Bug 858704 - partprobe generates incorrect DM UUIDs for partitions created on top of DM devices
partprobe generates incorrect DM UUIDs for partitions created on top of DM de...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
18
All Linux
high Severity high
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-19 09:14 EDT by Peter Rajnoha
Modified: 2012-12-20 10:31 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:31:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Peter Rajnoha 2012-09-19 09:14:11 EDT
When there are partitions defined on top of a device-mapper device (either a bare device-mapper device or any device-mapper subsystem like LVM or multipath), calling partprobe on such a device causes the original DM UUID to be reused for mappings representing partitions this way:

  <original_dm_uuid>p<partition_number>

This is not very suitable as each subsystem uses its own prefix for DM UUID, for example "LVM-" prefix for LVM devices, "mpath-" for multipath devices, "CRYPT-LUKS1-" for LUKS devices using cryptsetup etc.

Using the same DM UUID prefix for mappings representing partitions can cause problems when identifying these devices, for example lsblk then incorrectly identifies the partition mapping as an LVM device if partitions are defined over an LVM device:

rawhide/~ # partprobe /dev/vg_test/lvol0

rawhide/~ # dmsetup info -c -o name,uuid
Name            UUID                                                                  
vg_test-lvol0p1  LVM-uMhMAV4UYSX8yUhYKoiquxOsMQsX24GkCyKytUdEYXK5uexWROeJvH4O4NmpfCjLp1
vg_test-lvol0    LVM-uMhMAV4UYSX8yUhYKoiquxOsMQsX24GkCyKytUdEYXK5uexWROeJvH4O4NmpfCjL  

rawhide/~ # lsblk -o name,type /dev/vg_test/lvol0  
NAME                     TYPE
vg_test-lvol0 (dm-0)     lvm
`-vg_test-lvol0p1 (dm-1) lvm

...as lsblk derives the exact device type from DM UUID if it's a device-mapper device. This could pose problems in udev rules as well as most of the rules are taking into account DM UUID to resolve the subsystem type used (triggering different parts of the rules).


I suggest using the same scheme as kpartx uses nowadays:

rawhide/~ # kpartx -a /dev/mapper/vg_test-lvol0

rawhide/~ # lsblk -o name,type /dev/vg_test/lvol0
NAME                     TYPE
vg_test-lvol0 (dm-0)     lvm
`-vg_test-lvol0p1 (dm-1) part

rawhide/~ # dmsetup info -c -o name,uuid
Name             UUID                                                                      
vg_test-lvol0p1  part1-LVM-uMhMAV4UYSX8yUhYKoiquxOsMQsX24GkCyKytUdEYXK5uexWROeJvH4O4NmpfCjL
vg_test-lvol0    LVM-uMhMAV4UYSX8yUhYKoiquxOsMQsX24GkCyKytUdEYXK5uexWROeJvH4O4NmpfCjL      

rawhide/~ # lsblk -o name,type /dev/vg_test/lvol0
NAME                     TYPE
vg_test-lvol0 (dm-0)     lvm
`-vg_test-lvol0p1 (dm-1) part

Which means using a "partition prefix" instead of suffix in DM UUIDs. Such scheme does not pose any problems for device identification.
Comment 1 Peter Rajnoha 2012-09-19 10:03:33 EDT
Appears in current rawhide (parted-3.1-7.fc19) as well as F18 alpha (parted-3.1-7.fc18). Problem does not appear in F17 (parted-3.0-10.fc17) as UUIDs are not copied and they remain blank for partition mappings. There's still time to include this in F18.
Comment 2 Fedora Update System 2012-10-16 20:12:19 EDT
parted-3.1-8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/parted-3.1-8.fc18
Comment 3 Fedora Update System 2012-10-16 23:18:23 EDT
Package parted-3.1-8.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing parted-3.1-8.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16288/parted-3.1-8.fc18
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-12-20 10:31:36 EST
parted-3.1-8.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.