ISST-LTE: pmac-fdisk doesn't work with mpath devices

Bug #1473934 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mac-fdisk (Ubuntu)
Fix Released
High
Adam Conrad
Trusty
Fix Released
High
Adam Conrad
Vivid
Fix Released
Undecided
Unassigned
util-linux (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Vivid
Fix Released
Undecided
Unassigned

Bug Description

---Problem Description---
1. fdisk -l doesn't work with mpath device:

% sudo fdisk -l /dev/mapper/mpath0
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Disk /dev/sda: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
/dev/sda1 1 1 135324277143551+ ee Unknown
Partition 1 does not end on cylinder boundary:
     phys=(1023, 254, 63) should be (1023, 127, 32)
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Disk /dev/sdb: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
/dev/sdb1 1 1 21 42992 83 Linux native
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sdc: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sdd: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sde: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sdf: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sdg: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
The number of cylinders for this disk is set to 4252.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Disk /dev/sdh: 128 heads, 32 sectors, 4252 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Boot Begin Start End Blocks Id System
%

2. when trying to partition a mpath device with fdisk, it asks user to sed sectors and cylindes:

% sudo fdisk /dev/mapper/mpath4
You must set heads sectors and cylinders.
You can do this from the extra functions menu.
Warning: invalid flag 6f00 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/mapper/mpath4: 0 heads, 0 sectors, 0 cylinders
Units = cylinders of 1 * 512 bytes

             Device Boot Begin Start End Blocks Id System

Command (m for help): n
You must set heads sectors and cylinders.
You can do this from the extra functions menu.

Command (m for help):

3.fdisk will show a wrong partition name:

% ls /dev/mapper/mpath3-part1
/dev/mapper/mpath3-part1
% sudo fdisk /dev/mapper/mpath3
You must set heads sectors and cylinders.
You can do this from the extra functions menu.

Command (m for help): p

Disk /dev/mapper/mpath3: 0 heads, 0 sectors, 0 cylinders
Units = cylinders of 1 * 512 bytes

             Device Boot Begin Start End Blocks Id System
/dev/mapper/mpath31 63 2554287104277143551+ ee Unknown

Command (m for help):

---uname output---
Linux dilllp1 3.19.0-22-generic #22~14.04.1-Ubuntu SMP Wed Jun 17 10:03:39 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = na

---Debugger---
A debugger is not configured

---Steps to Reproduce---
 1. install ubuntu 14.04.3 on a system which has mpath devices
2. using "fdisk" to check mpath device:
* fdisk -l <mpath device>
* fdisk <mpath device> (partition the device)

Userspace tool common name: fdisk(symbol link to pmac-fdisk)

The userspace tool has the following bit modes: 64-bit

Userspace package: pmac-fdisk, version: 0.1-16ubuntu2

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-127442 severity-high targetmilestone-inin---
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1473934/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → mac-fdisk (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Strace Log
Download full text (3.6 KiB)

------- Comment on attachment From <email address hidden> 2015-07-13 14:13 EDT-------

strace -e open fdisk -l
strace -e open fdisk -l /dev/mapper/mpath0

Both commands gives same results (reading only /dev/sdx and /dev/hdx) and in unable to read multipath disk. And looking at code it seems it is meant to be so.

root@dilllp1:/# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 400 Jul 12 21:03 ./
drwxr-xr-x 13 root root 6400 Jul 12 21:03 ../
crw------- 1 root root 10, 236 Jul 12 20:46 control
lrwxrwxrwx 1 root root 7 Jul 13 08:41 mpath0 -> ../dm-0
brw------- 1 root root 252, 6 Jul 12 20:46 mpath0-part1
brw------- 1 root root 252, 7 Jul 12 20:46 mpath0-part2
brw------- 1 root root 252, 8 Jul 12 20:46 mpath0-part3
lrwxrwxrwx 1 root root 7 Jul 12 20:47 mpath1 -> ../dm-1
brw------- 1 root root 252, 9 Jul 12 20:46 mpath1-part1
brw------- 1 root root 252, 11 Jul 12 20:46 mpath1-part2
lrwxrwxrwx 1 root root 7 Jul 12 20:54 mpath2 -> ../dm-2
brw-rw---- 1 root disk 252, 16 Jul 12 20:47 mpath2-part1
brw-rw---- 1 root disk 252, 17 Jul 12 20:47 mpath2-part2
lrwxrwxrwx 1 root root 7 Jul 12 21:03 mpath3 -> ../dm-3
brw-rw---- 1 root disk 252, 13 Jul 12 21:03 mpath3p1
brw-rw---- 1 root disk 252, 14 Jul 12 21:03 mpath3-part1
lrwxrwxrwx 1 root root 7 Jul 12 20:52 mpath4 -> ../dm-4
lrwxrwxrwx 1 root root 7 Jul 12 20:47 mpath5 -> ../dm-5
lrwxrwxrwx 1 root root 8 Jul 12 20:47 mpath6 -> ../dm-10
lrwxrwxrwx 1 root root 8 Jul 12 21:03 mpath7 -> ../dm-12
root@dilllp1:/#
root@dilllp1:/#
root@dilllp1:/# ls -l /dev/dm-0
brw-rw---- 1 root disk 252, 0 Jul 13 08:41 /dev/dm-0
root@dilllp1:/#

Looking at code : fdisk.c

-----------------------
void try(char *device)
{
        disk_device = device;
        if (!setjmp(listingbuf)) {
                if ((fd = open(disk_device, type_open)) >= 0) {
                        close(fd);
                        get_boot();
                        list_table();
                        if (partitions > 4)
                                delete_partition(ext_index);
              } else {
                                /* Ignore other errors, since we try IDE
                                   and SCSI hard disks which may not be
                                   installed on the system. */
                 if(errno == EACCES) {
                    fprintf(stderr, "Cannot open %s\n", device);
                    exit(1);
                 }
              }
        }
}

void main(int argc, char **argv)
{
        if (argc > 3)
                fatal(usage);
        if (argc > 1 && *argv[1] == '-') {
                switch (*(argv[1] + 1)) {
                        case 'v':
                                printf("fdisk v" VERSION "\n");
                                exit(0);
                        case 'l':
                                listing = 1;
                                type_open = O_RDONLY;
                                try("/dev/hda");
                                try("/dev/hdb");
                                try("/dev/hdc");
                                try("/dev/hdd");
                                try("/dev...

Read more...

summary: - ISST-LTE: fdisk doesn't work with mpath devices
+ ISST-LTE: pmac-fdisk doesn't work with mpath devices
Revision history for this message
Diane Brent (drbrent) wrote :

Hohnbaum to follow up with Adam on next step... might be trivial change

Revision history for this message
Steve Langasek (vorlon) wrote :

In discussing this with Adam, we believe the issue is that we should simply be using the util-linux fdisk instead of the mac-fdisk one. This seems possible to fix for 14.04.3.

Changed in mac-fdisk (Ubuntu):
assignee: nobody → Adam Conrad (adconrad)
importance: Undecided → High
milestone: none → ubuntu-14.04.3
status: New → Triaged
Changed in mac-fdisk (Ubuntu Trusty):
assignee: nobody → Adam Conrad (adconrad)
importance: Undecided → High
milestone: none → ubuntu-14.04.3
status: New → Triaged
Changed in mac-fdisk (Ubuntu):
milestone: ubuntu-14.04.3 → none
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-07-22 09:02 EDT-------
---- Externalizing comment#17 ------
(In reply to comment #16)
<snip>
> Alternate solution would be to use util-linux for disk partition
> manipulation as advised by Mauricio in the IBM bug #121565

util-linux doesn't appear to include fdisk on 14.04.3; it only has cfdisk and sfdisk. We checked on a Ubuntu 15.10 guest and it has a separate fdisk binary in util-linux, so this looks like a bug in 14.04.3 with util-linux missing the fdisk binary.

***** From Ubuntu 14.04.3: *****

root@maplelp1:~# dpkg -L util-linux | grep fdisk
/sbin/sfdisk
/sbin/cfdisk
/usr/share/man/man8/cfdisk.8.gz
/usr/share/man/man8/sfdisk.8.gz
/usr/share/doc/util-linux/README.fdisk.gz
/usr/share/doc/util-linux/README.cfdisk
/usr/share/doc/util-linux/examples/sfdisk.examples.gz
root@maplelp1:~# ls -l /sbin/*fdisk*
-rwxr-xr-x 1 root root 65904 Feb 12 12:54 /sbin/cfdisk
lrwxrwxrwx 1 root root 10 Jul 14 07:52 /sbin/fdisk -> pmac-fdisk
-rwxr-xr-x 1 root root 43432 Feb 17 2014 /sbin/mac-fdisk
-rwxr-xr-x 1 root root 44760 Feb 17 2014 /sbin/pmac-fdisk
-rwxr-xr-x 1 root root 69408 Feb 12 12:54 /sbin/sfdisk

root@maplelp1:~# dpkg -l | grep "fdisk\|util-linux"
ii mac-fdisk 0.1-16ubuntu2 ppc64el Apple disk partition manipulation tool
ii pmac-fdisk 0.1-16ubuntu2 ppc64el fdisk partition manipulation tool for PowerPC
ii util-linux 2.20.1-5.1ubuntu20.4 ppc64el Miscellaneous system utilities

***** From Ubuntu 15.10: ****

root@flyg3:~# dpkg -L util-linux | grep fdisk
/sbin/cfdisk
/sbin/sfdisk
/sbin/fdisk
/usr/share/man/man8/fdisk.8.gz
/usr/share/man/man8/sfdisk.8.gz
/usr/share/man/man8/cfdisk.8.gz
/usr/share/bash-completion/completions/cfdisk
/usr/share/bash-completion/completions/sfdisk
/usr/share/bash-completion/completions/fdisk

root@flyg3:~# ls -l /sbin/*fdisk*
-rwxr-xr-x 1 root root 133568 Jul 3 10:47 /sbin/cfdisk
-rwxr-xr-x 1 root root 135888 Jul 3 10:47 /sbin/fdisk
-rwxr-xr-x 1 root root 67984 Jul 3 10:41 /sbin/mac-fdisk
-rwxr-xr-x 1 root root 69336 Jul 3 10:41 /sbin/pmac-fdisk
-rwxr-xr-x 1 root root 133248 Jul 3 10:47 /sbin/sfdisk

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-08-03 20:24 EDT-------
Any progress on this? As of August 3rd there has not been an update to util-linux.

Revision history for this message
Adam Conrad (adconrad) wrote :

So, this is definitely solved by swapping in the util-linux fdisk, just tested locally. Will upload SRUs that sort out that takeover for trusty and vivid. wily should be fine already.

Changed in mac-fdisk (Ubuntu):
status: Triaged → Fix Released
Changed in util-linux (Ubuntu):
status: New → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted mac-fdisk into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mac-fdisk/0.1-16ubuntu3~14.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mac-fdisk (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in mac-fdisk (Ubuntu Vivid):
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello bugproxy, or anyone else affected,

Accepted mac-fdisk into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mac-fdisk/0.1-16ubuntu3~15.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in util-linux (Ubuntu Vivid):
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello bugproxy, or anyone else affected,

Accepted util-linux into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.25.2-4ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (10.0 KiB)

------- Comment From <email address hidden> 2015-08-05 02:07 EDT-------
(In reply to comment #29)
> Hello bugproxy, or anyone else affected,
>
> Accepted mac-fdisk into trusty-proposed. The package will build now and be
> available at
> https://launchpad.net/ubuntu/+source/mac-fdisk/0.1-16ubuntu3~14.04 in a few
> hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Your feedback will aid us getting this update out
> to other Ubuntu users.
>
> If this package fixes the bug for you, please add a comment to this bug,
> mentioning the version of the package you tested, and change the tag from
> verification-needed to verification-done. If it does not fix the bug for
> you, please add a comment stating that, and change the tag to
> verification-failed. In either case, details of your testing will help us
> make a better decision.
>
Hi,

Looks like 'mac-fdisk' doesn't fix this problem:

% sudo dpkg -l mac-fdisk
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-==============-==============-============================================
ii mac-fdisk 0.1-16ubuntu2 ppc64el Apple disk partition manipulation tool
% sudo apt-get install mac-fdisk/trusty-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '0.1-16ubuntu3~14.04' (Ubuntu:14.04/trusty-proposed [ppc64el]) for 'mac-fdisk'
The following packages will be upgraded:
mac-fdisk
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 23.5 kB of archives.
After this operation, 24.6 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed/main mac-fdisk ppc64el 0.1-16ubuntu3~14.04 [23.5 kB]
Fetched 23.5 kB in 0s (38.6 kB/s)
(Reading database ... 98122 files and directories currently installed.)
Preparing to unpack .../mac-fdisk_0.1-16ubuntu3~14.04_ppc64el.deb ...
Unpacking mac-fdisk (0.1-16ubuntu3~14.04) over (0.1-16ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mac-fdisk (0.1-16ubuntu3~14.04) ...
% sudo fdisk -l /dev/mapper/mpath1
The number of cylinders for this disk is set to 60800.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Disk /dev/sda: 255 heads, 63 sectors, 60800 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Begin Start End Blocks Id System
/dev/sda1 1 1 60801488382487+ ee Unknown
The number of cylinders for this disk is set to 30720.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Disk /dev/sdb: 64 heads, 32 sectors, 30720 cylinders
Units...

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted util-linux into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/util-linux/2.20.1-5.1ubuntu20.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in util-linux (Ubuntu Trusty):
status: New → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Verified that upgrading both packages causes util-linux to take over /sbin/fdisk, which behaves a little better. Of course, fdisk in trusty doesn't support GPT, so it's still sort of half useless, but that's true on all architectures, and at least it tells you to use parted. :)

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mac-fdisk - 0.1-16ubuntu3~14.04

---------------
mac-fdisk (0.1-16ubuntu3~14.04) trusty; urgency=medium

  * Stop generating symlinks in postinst for /sbin/fdisk on PPC, we've
    given control of that binary over to util-linux now (LP: #1473934)

 -- Adam Conrad <email address hidden> Fri, 03 Jul 2015 08:48:54 -0600

Changed in mac-fdisk (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for mac-fdisk has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.20.1-5.1ubuntu20.6

---------------
util-linux (2.20.1-5.1ubuntu20.6) trusty; urgency=medium

  * Backport from 2.26.2-6ubuntu1 to take over fdisk on PPC (LP: #1473934)
    - debian/rules: Fix up arch-specific rules to ship fdisk on PPC.
    - debian/control: Break old versions of pmac-fdisk with symlinks.
  * Swap the order of dh_gencontrol calls to fix bsdutils ddeb generation.

 -- Adam Conrad <email address hidden> Tue, 04 Aug 2015 16:25:08 -0600

Changed in util-linux (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-08-07 01:39 EDT-------
I can confirm that this bug has been fixed with the new packages. Thanks!

Revision history for this message
bugproxy (bugproxy) wrote : Strace Log
Download full text (3.6 KiB)

------- Comment on attachment From <email address hidden> 2015-07-13 14:13 EDT-------

strace -e open fdisk -l
strace -e open fdisk -l /dev/mapper/mpath0

Both commands gives same results (reading only /dev/sdx and /dev/hdx) and in unable to read multipath disk. And looking at code it seems it is meant to be so.

root@dilllp1:/# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 400 Jul 12 21:03 ./
drwxr-xr-x 13 root root 6400 Jul 12 21:03 ../
crw------- 1 root root 10, 236 Jul 12 20:46 control
lrwxrwxrwx 1 root root 7 Jul 13 08:41 mpath0 -> ../dm-0
brw------- 1 root root 252, 6 Jul 12 20:46 mpath0-part1
brw------- 1 root root 252, 7 Jul 12 20:46 mpath0-part2
brw------- 1 root root 252, 8 Jul 12 20:46 mpath0-part3
lrwxrwxrwx 1 root root 7 Jul 12 20:47 mpath1 -> ../dm-1
brw------- 1 root root 252, 9 Jul 12 20:46 mpath1-part1
brw------- 1 root root 252, 11 Jul 12 20:46 mpath1-part2
lrwxrwxrwx 1 root root 7 Jul 12 20:54 mpath2 -> ../dm-2
brw-rw---- 1 root disk 252, 16 Jul 12 20:47 mpath2-part1
brw-rw---- 1 root disk 252, 17 Jul 12 20:47 mpath2-part2
lrwxrwxrwx 1 root root 7 Jul 12 21:03 mpath3 -> ../dm-3
brw-rw---- 1 root disk 252, 13 Jul 12 21:03 mpath3p1
brw-rw---- 1 root disk 252, 14 Jul 12 21:03 mpath3-part1
lrwxrwxrwx 1 root root 7 Jul 12 20:52 mpath4 -> ../dm-4
lrwxrwxrwx 1 root root 7 Jul 12 20:47 mpath5 -> ../dm-5
lrwxrwxrwx 1 root root 8 Jul 12 20:47 mpath6 -> ../dm-10
lrwxrwxrwx 1 root root 8 Jul 12 21:03 mpath7 -> ../dm-12
root@dilllp1:/#
root@dilllp1:/#
root@dilllp1:/# ls -l /dev/dm-0
brw-rw---- 1 root disk 252, 0 Jul 13 08:41 /dev/dm-0
root@dilllp1:/#

Looking at code : fdisk.c

-----------------------
void try(char *device)
{
        disk_device = device;
        if (!setjmp(listingbuf)) {
                if ((fd = open(disk_device, type_open)) >= 0) {
                        close(fd);
                        get_boot();
                        list_table();
                        if (partitions > 4)
                                delete_partition(ext_index);
              } else {
                                /* Ignore other errors, since we try IDE
                                   and SCSI hard disks which may not be
                                   installed on the system. */
                 if(errno == EACCES) {
                    fprintf(stderr, "Cannot open %s\n", device);
                    exit(1);
                 }
              }
        }
}

void main(int argc, char **argv)
{
        if (argc > 3)
                fatal(usage);
        if (argc > 1 && *argv[1] == '-') {
                switch (*(argv[1] + 1)) {
                        case 'v':
                                printf("fdisk v" VERSION "\n");
                                exit(0);
                        case 'l':
                                listing = 1;
                                type_open = O_RDONLY;
                                try("/dev/hda");
                                try("/dev/hdb");
                                try("/dev/hdc");
                                try("/dev/hdd");
                                try("/dev...

Read more...

tags: added: targetmilestone-inin14043
removed: targetmilestone-inin---
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mac-fdisk - 0.1-16ubuntu3~15.04

---------------
mac-fdisk (0.1-16ubuntu3~15.04) vivid; urgency=medium

  * Stop generating symlinks in postinst for /sbin/fdisk on PPC, we've
    given control of that binary over to util-linux now (LP: #1473934)

 -- Adam Conrad <email address hidden> Fri, 03 Jul 2015 08:48:54 -0600

Changed in mac-fdisk (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.25.2-4ubuntu3

---------------
util-linux (2.25.2-4ubuntu3) vivid; urgency=medium

  * Backport from 2.26.2-6ubuntu1 to take over fdisk on PPC (LP: #1473934)
    - debian/util-linux.install,util-linux.manpages: Ship fdisk on PPC.
    - debian/control: Break old versions of pmac-fdisk with symlinks.

 -- Adam Conrad <email address hidden> Tue, 04 Aug 2015 16:05:12 -0600

Changed in util-linux (Ubuntu Vivid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.