Bug 832145

Summary: parted unsets device-mapper partitions' UUIDs when doing a commit to a device-mapper disk
Product: Red Hat Enterprise Linux 6 Reporter: Kendrick Gay <kgay>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2CC: jstodola, sbhasker, wburrows
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: parted-2.1-19.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:13:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 782183, 840685    
Attachments:
Description Flags
parted patch to get and set UUID none

Description Kendrick Gay 2012-06-14 16:24:19 UTC
Created attachment 591869 [details]
parted patch to get and set UUID

Description of problem:

Regression involving parted with prevents 'dmsetup info -c' from including UUID for partitioned multipath devices.

In _dm_add_partition(), parted is setting the device name, but doesn't set the UUID.  This leaves the partition's UUID blank.  Other utilities (in particular, kpartx) set the UUID on creation of the partition's device node, so a kpartx -d/-a cycle results in the expected UUID.

Version-Release number of selected component (if applicable):

2.1-17.el6.x86_64 

How reproducible:

Always.

Steps to Reproduce:
1. Enable multipathing
2. Create partition on mpath device with parted
3. Run 'dmsetup info -c' and review UUID column
  
Actual results:

No UUID printed under UUID column for partitioned mpath devices

Expected results:

UUID should be printed for all relevant devices.

Additional info:

Similar issue seem here:
https://bugzilla.redhat.com/show_bug.cgi?id=639138

Attaching customer-provided patch to case.

Comment 2 Brian Lane 2012-06-14 16:57:08 UTC
This isn't a regression, parted 2.1 has always had this problem. The fix has been in Fedora since F14 so is well tested and low impact.

Comment 3 sbhasker 2012-06-21 08:47:16 UTC
When can we expect an official patch

Comment 4 RHEL Program Management 2012-07-16 22:49:32 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 6 Jan Stodola 2013-01-02 15:57:15 UTC
Reproduced with parted-2.1-18.el6 (RHEL-6.3):

[root@rtt7 ~]# parted /dev/mapper/mpatha mkpart primary 1 200
Information: You may need to update /etc/fstab.                           

[root@rtt7 ~]# dmsetup info -c
Name             Maj Min Stat Open Targ Event  UUID                                                                
vg_rtt7-LogVol00 253   3 L--w    1    1      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdzqp3jHjOlyiEJQ9NeROZihTZ7NN9mjc5
mpathap1         253   4 L--w    0    1      0                                                                     
mpatha           253   2 L--w    1    1      1 mpath-36005076305ffc73d0000000000002007                             
vg_rtt7-LogVol02 253   1 L--w    1    3      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdKTusJrxf3ffwNbvSVQz2uyfSRpihKYDY
vg_rtt7-LogVol01 253   0 L--w    1    1      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdnHt5UBj4Jcn3rdUeWFWzdMXYZ4B34rD0
[root@rtt7 ~]#

Verified with parted-2.1-19.el6 (RHEL6.4-20121212.1):

[root@rtt7 ~]# parted /dev/mapper/mpatha print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/mpatha: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

[root@rtt7 ~]# parted /dev/mapper/mpatha mkpart primary 1 200
Information: You may need to update /etc/fstab.                           

[root@rtt7 ~]# dmsetup info -c
Name             Maj Min Stat Open Targ Event  UUID                                                                
vg_rtt7-LogVol00 253   3 L--w    1    1      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdzqp3jHjOlyiEJQ9NeROZihTZ7NN9mjc5
mpathap1         253   4 L--w    0    1      0 part1-mpath-36005076305ffc73d0000000000002007                       
mpatha           253   2 L--w    1    1      1 mpath-36005076305ffc73d0000000000002007                             
vg_rtt7-LogVol02 253   1 L--w    1    3      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdKTusJrxf3ffwNbvSVQz2uyfSRpihKYDY
vg_rtt7-LogVol01 253   0 L--w    1    1      0 LVM-r10pS6on7MooQb7FjOEcqThBMPAuXphdnHt5UBj4Jcn3rdUeWFWzdMXYZ4B34rD0

Moving to VERIFIED.

Comment 8 errata-xmlrpc 2013-02-21 10:13:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0407.html