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:
100%
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:
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.