Bug 338481 - fdisk rescan fails on /dev/mapper multipath device
Summary: fdisk rescan fails on /dev/mapper multipath device
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: device-mapper-multipath
Version: 4.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Ben Marzinski
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-18 17:36 UTC by Joe Sunday
Modified: 2010-01-12 02:31 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-11 16:06:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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