Bug 338481

Summary: fdisk rescan fails on /dev/mapper multipath device
Product: Red Hat Enterprise Linux 4 Reporter: Joe Sunday <sunday>
Component: device-mapper-multipathAssignee: Ben Marzinski <bmarzins>
Status: CLOSED WONTFIX QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: low    
Version: 4.5CC: agk, bmarzins, christophe.varoqui, dwysocha, egoggin, junichi.nomura, kueda, lmb, mbroz, prockai, tranlan, xdl-redhat-bugzilla
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-11 16:06:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Sunday 2007-10-18 17:36:34 UTC
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:

Comment 1 Ben Marzinski 2007-10-26 22:53:49 UTC
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.