dm-part-sync.patch breaks creating multiple partitions on a LVM volume
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| parted (Ubuntu) |
High
|
Canonical Foundations Team | ||
| Precise |
High
|
Canonical Foundations Team | ||
| Quantal |
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 on 2012-07-17
- Ubuntu branches: Pending requested 2012-06-26
-
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 on 2012-07-19
- Ubuntu branches: Pending requested 2012-06-26
-
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: apport-collected precise |
description: | updated |
summary: |
- dm-part-sync.patch breaks creating multiple partition on a LVM volume + dm-part-sync.patch breaks creating multiple partitions on a LVM volume |
Phillip Susi (psusi) wrote : | #2 |
Hrm... I notice that the partition symlinks are not being created under /dev/vg, and using /dev/mapper/vg-lv instead of /dev/vg/lv works fine. It looks like the missing symlink may be a separate bug and parted should always use the canonical name ( /dev/mapper/vg-lv ) no matter what name is specified on the command line.
Phillip Susi (psusi) wrote : | #3 |
It also seems that there was another problem with the patch: it would only add at most 1 partition to a dm disk. That's a release regression and going to need an SRU.
Changed in parted (Ubuntu): | |
importance: | Undecided → High |
status: | New → In Progress |
tags: | added: regression-release |
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 |
Stéphane Graber (stgraber) wrote : | #4 |
Sounds like a bug for Colin or Dmitrijs, could one of you review the branches?
Assuming they are good, we should have enough time to actually land this in 12.04.1.
Changed in parted (Ubuntu Precise): | |
status: | In Progress → Triaged |
status: | Triaged → In Progress |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Martin Pitt (pitti) wrote : | #5 |
Phillip, is there an upstream bug for this somewhere? Can you please forward this to upstream as well? Thanks!
Phillip Susi (psusi) wrote : | #6 |
It's a bug in our patch, not upstream. I had forwarded the patch upstream, but it was never applied. I'll have to update the patch and resend it.
Dimitri John Ledkov (xnox) wrote : | #7 |
When running the test case as described in the bug description, with the fixed package by psusi, I go this:
$ sudo parted --script -- /dev/internalhd
Error: You requested a partition from 3000kB to 4000kB.
The closest location we can manage is 4194kB to 4194kB.
Changing to create the second partition further down, succeeds.
Phillip Susi, can you please use the https:/
description: | updated |
Launchpad Janitor (janitor) wrote : | #8 |
This bug was fixed in the package parted - 2.3-10ubuntu2
---------------
parted (2.3-10ubuntu2) quantal; urgency=low
* Fix dm-part-sync.patch to canonicalize the dm name when constructing
the partition device path (LP: #1012946)
-- Phillip Susi <email address hidden> Tue, 17 Jul 2012 15:50:56 +0100
Changed in parted (Ubuntu Quantal): | |
status: | In Progress → Fix Released |
Changed in parted (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
Bryce, has this been actually uploaded and accepted into precise-proposed? If not, the precise task should not be Fix Committed.
Stéphane Graber (stgraber) wrote : | #10 |
Parted is in Unapproved, marking In Progress for now, should automatically be marked Fix commited in a few days.
Changed in parted (Ubuntu Precise): | |
status: | Fix Committed → In Progress |
Hello Ludovico, or anyone else affected,
Accepted parted into precise-proposed. The package will build now and be available at http://
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-
Further information regarding the verification process can be found at https:/
Changed in parted (Ubuntu Precise): | |
status: | In Progress → Fix Committed |
tags: | added: verification-needed |
Changed in parted (Ubuntu Precise): | |
milestone: | ubuntu-12.04.1 → ubuntu-12.04.2 |
lhotari (lartsa) wrote : | #12 |
This bug also affects the usage of raw partitions in vmbuilder.
Dimitri John Ledkov (xnox) wrote : | #13 |
@lartsa there is no need to confirm the bug. It is fix released in quantal. Please help test the proposed update for precise following these instructions: https:/
lhotari (lartsa) wrote : | #14 |
Installing the precise-proposed version from https:/
tags: |
added: verification-done removed: verification-needed |
The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.
Launchpad Janitor (janitor) wrote : | #16 |
This bug was fixed in the package parted - 2.3-8ubuntu5.1
---------------
parted (2.3-8ubuntu5.1) precise-proposed; urgency=low
* Fix dm-part-sync.patch to canonicalize the dm name when constructing
the partition device path (LP: #1012946)
-- Phillip Susi <email address hidden> Sat, 16 Jun 2012 21:26:34 -0400
Changed in parted (Ubuntu Precise): | |
status: | Fix Committed → Fix Released |
apport information