[Bug 1012946] Re: dm-part-sync.patch breaks creating multiple partitions on a LVM volume
Dmitrijs Ledkovs (community)
1012946 at bugs.launchpad.net
Sat Jul 21 08:06:19 UTC 2012
Bryce, has this been actually uploaded and accepted into precise-
proposed? If not, the precise task should not be Fix Committed.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to parted in Ubuntu.
https://bugs.launchpad.net/bugs/1012946
Title:
dm-part-sync.patch breaks creating multiple partitions on a LVM volume
Status in “parted” package in Ubuntu:
Fix Released
Status in “parted” source package in Precise:
Fix Committed
Status in “parted” source package in Quantal:
Fix Released
Bug description:
[IMPACT]
The patch dm-part-sync.patch, added during the precise development
cycle, caused a regression wherein users are unable to use parted to
manipulate partitions contained within an LVM logical volume under
either of two conditions:
1) You specify the "disk" using the /dev/VG/LV symlink rather than
/dev/mapper/vg-lv
2) There is more than one partition within the "disk"
In addition to LVM, this should also apply to dmraid disks.
The first problem is fixed by looking up the canonical /dev/mapper/
device name of the disk, and using that as the base name when building
the names of the partition devices. The second problem is fixed by
assuming that dm disks can hold MAX_NUM_PARTS partitions, rather than
looking up what the kernel reports in the sysfs ext_range attribute,
which is just one.
[TESTCASE]
# lvcreate -n test -L 10M matrix
Rounding up size to full physical extent 12.00 MiB
Logical volume "test" created
# parted --script -- /dev/matrix/test mklabel msdos
# parted --script -- /dev/matrix/test mkpart primary ext4 1 2
# parted --script -- /dev/matrix/test mkpart primary ext4 3 4
device-mapper: create ioctl failed: Device or resource busy
Error: Failed to add partition 1 (No such device or address)
# ls /dev/mapper/matrix-test*
/dev/mapper/matrix-test
/dev/mapper/matrix-test1
[Regression Potential]
The changes are unlikely to impact anything other than using parted on
dm devices, which is essentially broken in its current state.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1012946/+subscriptions
More information about the foundations-bugs
mailing list