** Description changed: - # lsb_release -a - No LSB modules are available. - Distributor ID: Ubuntu - Description: Ubuntu 12.04 LTS - Release: 12.04 - Codename: precise + [IMPACT] - # apt-cache policy parted - parted: - Installed: 2.3-8ubuntu5 - Candidate: 2.3-8ubuntu5 - Version table: - *** 2.3-8ubuntu5 0 - 500 http://mirrors.service.softlayer.com/ubuntu/ precise/main amd64 Packages - 100 /var/lib/dpkg/status + 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 + 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 - If I remove rebuild parted without the dm-part-sync.patch (actually, - also without dmraid.patch and udevadm-settle.patch, otherwise it would - not build), it works properly: + [Regression Potential] - - root@matrix:~# lvcreate -n test -L 10M matrix - Rounding up size to full physical extent 12.00 MiB - Logical volume "test" created - root@matrix:~# parted --script -- /dev/matrix/test mklabel msdos - root@matrix:~# parted --script -- /dev/matrix/test mkpart primary ext4 1 2 - Error: msdos disk labels do not support partition names. - root@matrix:~# parted --script -- /dev/matrix/test mkpart primary ext4 3 4 - Error: msdos disk labels do not support partition names. - Error: msdos disk labels do not support partition names. - root@matrix:~# ls /dev/mapper/matrix-test* - /dev/mapper/matrix-test - /dev/mapper/matrix-test1 - /dev/mapper/matrix-test2 - --- - ApportVersion: 2.0.1-0ubuntu8 - Architecture: amd64 - DistroRelease: Ubuntu 12.04 - Package: parted 2.3-8ubuntu5 - PackageArchitecture: amd64 - ProcEnviron: - TERM=xterm - LANG=en_US - SHELL=/bin/bash - ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16 - Tags: precise - Uname: Linux 3.2.0-24-generic x86_64 - UpgradeStatus: Upgraded to precise on 2012-06-13 (0 days ago) - UserGroups: + The changes are unlikely to impact anything other than using parted on + dm devices, which is essentially broken in its current state.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1012946 Title: dm-part-sync.patch breaks creating multiple partitions on a LVM volume To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1012946/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
