dm-part-sync.patch breaks creating multiple partitions on a LVM volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
parted (Ubuntu) |
Fix Released
|
High
|
Canonical Foundations Team | ||
Precise |
Fix Released
|
High
|
Canonical Foundations Team | ||
Quantal |
Fix Released
|
High
|
Canonical Foundations Team |
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/
/dev/mapper/
/dev/mapper/
[Regression Potential]
The changes are unlikely to impact anything other than using parted on dm devices, which is essentially broken in its current state.
Related branches
- Dimitri John Ledkov: Approve
- Ubuntu branches: Pending requested
-
Diff: 231 lines (+100/-16) (has conflicts)3 files modifieddebian/changelog (+10/-0)
debian/patches/dm-part-sync.patch (+88/-12)
debian/patches/udevadm-settle.patch (+2/-4)
- Bryce Harrington: Approve
- Ubuntu branches: Pending requested
-
Diff: 221 lines (+97/-16)3 files modifieddebian/changelog (+7/-0)
debian/patches/dm-part-sync.patch (+88/-12)
debian/patches/udevadm-settle.patch (+2/-4)
tags: | added: rls-q-incoming |
tags: | added: quantal |
Changed in parted (Ubuntu Precise): | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in parted (Ubuntu Precise): | |
milestone: | none → ubuntu-12.04.1 |
Changed in parted (Ubuntu Quantal): | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
tags: | removed: rls-q-incoming |
description: | updated |
Changed in parted (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Changed in parted (Ubuntu Precise): | |
milestone: | ubuntu-12.04.1 → ubuntu-12.04.2 |
tags: |
added: verification-done removed: verification-needed |
apport information