[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Confirmed Bug] Parted does not notify kernel when modifying partition t
[Confirmed Bug] Parted does not notify kernel when modifying partition tables in partitionable md arrays
Fri, 13 May 2011 21:56:39 +0200
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:220.127.116.11) Gecko/20110414 Thunderbird/3.1.10
After some serious back-and-forth on the md mailing list, it finally
turned out to be a bug in (g)parted, which has been reproduced by two
people on separate machines using the latest versions of (g)parted.
Here's how to reproduce the bug:
Create a PARTITIONABLE md array with mdadm (change parameters to
whatever test parameters you use, but keep the --auto=partX flag to make
it a partitionable md array):
mdadm --create --level=raid5 --auto=part2 /dev/md1 --metadata=1.2
--raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
Verify that the device was created (ls /dev/md* will show /dev/md1 and
nothing else since there are no partitions yet)
Run (g)parted on the MD array(this bug exists in both parted and
gparted, I prefer gparted but phil verified it in parted as well):
Create a partition table (type doesn't matter, I use GPT)
Create two partitions.
Apply the changes to write them to disk.
Check the device list (ls /dev/md*) and you will NOT see two partitions,
you will still just see /dev/md1.
Manually force a device re-scan in the kernel (blockdev --rereadpt
Check the device list (ls /dev/md*) and you WILL see two partitions
(/dev/md1, /dev/md1p1 and /dev/md1p2).
This is a serious bug, because if you try to use (g)parted to not only
make the partitions but also tell it to FORMAT the partitions in a
particular way, it will actually FAIL when it tries to execute mkfs.XXX
on each partition, since it cannot find /dev/md1p* due to the kernel not
having re-scanned the partition table after the partitions were created.
Other tools such as fdisk work properly and will properly tell the
kernel to re-scan the partition table after writing the partition table
(g)parted properly notifies the kernel about partition table changes
when modifying PHYSICAL disks. The bug only applies to working with
Phil Turman managed to detect a probable cause for the bug, and I will
"I suspect (g)parted is in fact requesting a rescan, but is being ignored.
I just tried this on one of my servers, and parted (v2.3) choked on an
I hope this is enough information to get an idea of where the bug is,
because I do not have the luxury of performing more testing, but all
steps to fully reproduce the bug are above.
Useless side info but I'll mention it before anyone asks: Linux Mint 11
RC, Kernel 2.6.38-8-generic.