Bug 338481 - fdisk rescan fails on /dev/mapper multipath device
fdisk rescan fails on /dev/mapper multipath device
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: device-mapper-multipath (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Ben Marzinski
Corey Marthaler
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-10-18 13:36 EDT by Joe Sunday
Modified: 2010-01-11 21:31 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-11 11:06:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Sunday 2007-10-18 13:36:34 EDT
Description of problem:
Writing a new partition table to a multipath lun fails rescanning the parition table

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Map a new LUN via fibre channel through mpio
2. Fdisk the new /dev/mapper device
3. Create partition 1 spanning from cylinder 1 to the end of the disk:

# fdisk /dev/mapper/360a9800068714342575a454155643943
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-1019, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1019, default 1019): Using default value 1019

Command (m for help): The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot. 
Actual results:
Kernel fails to reload partition table and requires reboot

Expected results:
ioctl should force partition rescan and create /dev/mapper and /dev/mpath device nodes for the new
partition table.

Additional info:
Comment 1 Ben Marzinski 2007-10-26 18:53:49 EDT
There are no plans to make this work for RHEL 4. There is a possibility that
this feature to make it into RHEL 5. See bz #156609 for more details.

There are two ways to work around this. The obvious one is to run

# multipath -f <device_you_want_to_parition>
# fdisk <one_of_the_underlying_devices>
# multipath

The other method is to use LVM on top the multipathed device.  This will allow
you to "repartition" your device without bringing the multipath device down.

Note You need to log in before you can comment on or make changes to this bug.