Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1821970

Summary: RFE: Integrate VDO support into blkdeactivate script
Product: Red Hat Enterprise Linux 7 Reporter: Andy Walsh <awalsh>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Scripts / lvmdump / vgimportclone QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, awalsh, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, pvlasin, rhandlin, zkabelac
Version: 7.9Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.187-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:55:48 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:
Attachments:
Description Flags
Patch file as provided in other BZ. (1706154) none

Description Andy Walsh 2020-04-08 00:15:52 UTC
Created attachment 1677081 [details]
Patch file as provided in other BZ. (1706154)

Description of problem:
As provided in BZ1706154#comment29, to better support VDO devices in the stack, I am requesting that we incorporate the attached patch into the blkdeactivate script.

Version-Release number of selected component (if applicable):
device-mapper-1.02.164-7.el7.x86_64
lvm2-2.02.186-7.el7.x86_64

Comment 4 Alasdair Kergon 2020-04-08 00:20:43 UTC
typo 
>                 VDO_VAILABLE=0

Comment 14 Corey Marthaler 2020-04-29 17:07:21 UTC
Marking verified in the latest rpms.

3.10.0-1136.el7.x86_64

lvm2-2.02.187-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
lvm2-libs-2.02.187-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
lvm2-cluster-2.02.187-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
lvm2-lockd-2.02.187-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
lvm2-python-boom-0.9-27.el7    BUILT: Thu Apr 16 12:10:50 CDT 2020
cmirror-2.02.187-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
device-mapper-1.02.170-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
device-mapper-libs-1.02.170-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
device-mapper-event-1.02.170-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
device-mapper-event-libs-1.02.170-2.el7    BUILT: Thu Apr 16 11:56:15 CDT 2020
vdo-6.1.3.23-5.el7    BUILT: Fri Apr 10 10:26:41 CDT 2020
kmod-kvdo-6.1.3.23-5.el7    BUILT: Fri Apr 10 10:30:12 CDT 2020


[root@harding-02 ~]# vdo create --name=vdo1 --device=/dev/mapper/mpatha1 --vdoLogicalSize=12G
Creating VDO vdo1
Starting VDO vdo1
Starting compression on VDO vdo1
VDO instance 1 volume is ready at /dev/mapper/vdo1
[root@harding-02 ~]# vgcreate test /dev/mapper/vdo1
  Physical volume "/dev/mapper/vdo1" successfully created.
  Volume group "test" successfully created
[root@harding-02 ~]# lvcreate -n lv1 -l 50%FREE test
  Logical volume "lv1" created.
[root@harding-02 ~]# grep -r 'use_lvmetad =' /etc/lvm/lvm.conf
    use_lvmetad = 1

# mkfs

[root@harding-02 ~]# grep test /etc/fstab 
/dev/test/lv1 /mnt/lv1 xfs defaults,x-systemd.requires=vdo.service 0 0
[root@harding-02 ~]# grep test /etc/fstab 
/dev/test/lv1 /mnt/lv1 xfs defaults,x-systemd.requires=vdo.service 0 0

[root@harding-02 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/test-lv1               6.0G   33M  6.0G   1% /mnt/lv1

[root@harding-02 ~]# reboot
Connection to harding-02 closed by remote host.
Connection to harding-02 closed.


Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: starting device 'vdo1'
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: underlying device, REQ_FLUSH: not supported, REQ_FUA: not supported
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: Using write policy sync automatically.
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: zones: 1 logical, 1 physical, 1 hash; base threads: 5
Apr 29 11:51:20 harding-02 kernel: kvdo1:journalQ: VDO commencing normal operation
Apr 29 11:51:20 harding-02 kernel: uds: kvdo1:dedupeQ: creating index: dev=/dev/disk/by-id/dm-uuid-part1-mpath-36006016028a034002a8530330e27e411 offset=4096 size=2781704192
Apr 29 11:51:20 harding-02 kernel: uds: kvdo1:dedupeQ: Using 16 indexing zones for concurrency.
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: Setting UDS index target state to online
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: device 'vdo1' started
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: resuming device 'vdo1'
Apr 29 11:51:20 harding-02 kernel: kvdo1:dmsetup: device 'vdo1' resumed
Apr 29 11:51:20 harding-02 kernel: kvdo1:packerQ: compression is enabled
Apr 29 11:51:21 harding-02 UDS/vdodmeventd[47648]: INFO   (vdodmeventd/47648) VDO device vdo1 is now registered with dmeventd for monitoring
Apr 29 11:51:21 harding-02 lvm[38608]: Monitoring VDO pool vdo1.
Apr 29 11:55:06 harding-02 kernel: XFS (dm-27): Mounting V5 Filesystem
Apr 29 11:55:06 harding-02 kernel: XFS (dm-27): Ending clean mount
Apr 29 11:56:31 harding-02 systemd-logind: New session 24 of user root.
Apr 29 11:56:31 harding-02 systemd: Started Session 24 of user root.
Apr 29 11:56:41 harding-02 systemd: Removed slice system-selinux\x2dpolicy\x2dmigrate\x2dlocal\x2dchanges.slice.
Apr 29 11:56:41 harding-02 systemd: Stopping Availability of block devices...
Apr 29 11:56:41 harding-02 systemd: Stopped target resource-agents dependencies.
Apr 29 11:56:41 harding-02 systemd: Stopping RPC bind service...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:17...
Apr 29 11:56:41 harding-02 systemd: Stopped Dump dmesg to /var/log/dmesg.
Apr 29 11:56:41 harding-02 systemd: Removed slice system-qarshd.slice.
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:21...
Apr 29 11:56:41 harding-02 systemd: Stopped target Timers.
Apr 29 11:56:41 harding-02 systemd: Stopped target RPC Port Mapper.
Apr 29 11:56:41 harding-02 systemd: Stopping btimed - boot time daemon service...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:13...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:10...
Apr 29 11:56:41 harding-02 systemd: Stopping Authorization Manager...
Apr 29 11:56:41 harding-02 systemd: Stopped daily update of the root trust anchor for DNSSEC.
Apr 29 11:56:41 harding-02 systemd: Stopping Session 5 of user root.
Apr 29 11:56:41 harding-02 systemd: Stopping Session 24 of user root.
Apr 29 11:56:41 harding-02 systemd: Closed LVM2 poll daemon socket.
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:25...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:20...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 8:33...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:12...
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:15...
Apr 29 11:56:41 harding-02 systemd: Stopping Device-Mapper Multipath Device Controller...
Apr 29 11:56:41 harding-02 systemd: Stopped Daily Cleanup of Temporary Directories.
Apr 29 11:56:41 harding-02 systemd: Stopping LVM2 PV scan on device 253:11...
[...]



[cmarthal@localhost ~]$ 
[cmarthal@localhost ~]$ ssh root@harding-02
root@harding-02's password: 
Last login: Wed Apr 29 11:56:31 2020
[root@harding-02 ~]# grep lv1 /proc/mounts 
/dev/mapper/test-lv1 /mnt/lv1 xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
[root@harding-02 ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/test-lv1               6.0G   33M  6.0G   1% /mnt/lv1

Comment 16 errata-xmlrpc 2020-09-29 19:55:48 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 (lvm2 bug fix and enhancement update), 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/RHBA-2020:3927