Bug 1515183

Summary: "vdo create" should set the device mapper UUID
Product: Red Hat Enterprise Linux 7 Reporter: Marius Vollmer <mvollmer>
Component: vdoAssignee: Sweet Tea Dorminy <sweettea>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bgurney, jkrysl, limershe, sweettea
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.0.72 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 15:48:32 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:

Description Marius Vollmer 2017-11-20 10:49:07 UTC
Description of problem:

"vdo create" leaves the UUID of the device mapper entry empty.  It seems to be customary to set it to something like "VDO-xxxx".  This seems to help at least lsblk.

Version-Release number of selected component (if applicable):
vdo-6.1.0.0-6.x86_64

How reproducible:
Always

Steps to Reproduce:
# vdo create --name vdo0 --device /dev/sda2
# lsblk /dev/sda2
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda2     8:2    0  15G  0 part 
└─vdo0 253:4    0  15G  0 dm   

 
Actual results:
lsblk doesn't identify vdo0 as "vdo".

Expected results:

# lsblk /dev/sda2
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda2     8:2    0  15G  0 part 
└─vdo0 253:4    0  15G  0 vdo  


Additional info:

Setting the UUID is also necessary to make partitions work on device mapper devices, but I don't know whether we care about that.

Comment 3 Jakub Krysl 2017-12-04 14:52:53 UTC
Tested with vdo 6.1.0.72-12. When the vdo is created, UUID is passed to dm:
# vdo create --device=/dev/mapper/mpatha --name=vdo --verbose
Creating VDO vdo
    pvcreate -qq --test /dev/mapper/mpatha
    modprobe kvdo
    vdoformat --uds-checkpoint-frequency=0 --uds-memory-size=2 /dev/mapper/mpatha
    vdodumpconfig /dev/mapper/mpatha
Starting VDO vdo
    dmsetup status vdo
    modprobe kvdo
    vdodumpconfig /dev/mapper/mpatha
    dmsetup create vdo --uuid VDO-71f82ed8-72ef-4260-a728-25a98e31672d --table '0 209715200 dedupe /dev/mapper/mpatha 4096 disabled 0 32768 16380 on sync vdo ack=1,bio=4,bioRotationInterval=64,cpu=2,hash=1,logical=1,physical=1'
    dmsetup status vdo
Starting compression on VDO vdo
    dmsetup message vdo 0 compression on
    dmsetup status vdo
VDO instance 6 volume is ready at /dev/mapper/vdo

So now lsblk can identify VDO correctly:
# lsblk
NAME                        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
--snip--
sdc                           8:32   0   100G  0 disk
└─mpatha                    253:2    0   100G  0 mpath
  └─vdo                     253:4    0   100G  0 vdo

Comment 6 errata-xmlrpc 2018-04-10 15:48:32 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.

https://access.redhat.com/errata/RHEA-2018:0871