Bug 1800353

Summary: lvm gets stuck trying to use itself as writecache pool
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Cache Logical Volumes QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, mcsontos, msnitzer, pasik, prajnoha, teigland, zkabelac
Version: 8.2Flags: pm-rhel: mirror+
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.08-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:59:23 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 Corey Marthaler 2020-02-06 22:46:16 UTC
Description of problem:
Create just one linear, and attempt to writecache itself, using itself.

[root@hayes-02 ~]# lvs -a -o +devices
  LV     VG                Attr       LSize Pool Origin Data% Devices               
  linear writecache_sanity -wi------- 1.00g                   /dev/sdb1(0)

[root@hayes-02 ~]# lvconvert -vvvv --yes --type writecache --cachevol writecache_sanity/linear writecache_sanity/linear
[...]
16:41:20.717525 lvconvert[1494] activate/activate.c:2432  Deactivating writecache_sanity/linear.
16:41:20.717540 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV].
16:41:20.717596 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV [ noopencount flush ]   [16384] (*1)
16:41:20.717613 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV].
16:41:20.717623 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV [ opencount flush ]   [16384] (*1)
16:41:20.717652 lvconvert[1494] mm/memlock.c:625  Entering prioritized section (deactivating).
16:41:20.717666 lvconvert[1494] mm/memlock.c:489  Raised task priority 0 -> -18.
16:41:20.717676 lvconvert[1494] activate/dev_manager.c:3621  Creating DEACTIVATE tree for writecache_sanity/linear.
16:41:20.717688 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV].
16:41:20.717698 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV [ opencount flush ]   [16384] (*1)
16:41:20.717711 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm deps   (253:0) [ opencount flush ]   [16384] (*1)
16:41:20.717730 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear-real [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-real].
16:41:20.717740 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-real [ opencount flush ]   [16384] (*1)
16:41:20.717752 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear-cow [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-cow].
16:41:20.717762 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-cow [ opencount flush ]   [16384] (*1)
16:41:20.717776 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info   (253:0) [ opencount flush ]   [16384] (*1)
16:41:20.717788 lvconvert[1494] device_mapper/libdm-deptree.c:1015  Removing writecache_sanity-linear (253:0)
16:41:20.717807 lvconvert[1494] device_mapper/libdm-common.c:2553  Udev cookie 0xd4d5799 (semid 41189397) created
16:41:20.717818 lvconvert[1494] device_mapper/libdm-common.c:2573  Udev cookie 0xd4d5799 (semid 41189397) incremented to 1
16:41:20.717841 lvconvert[1494] device_mapper/libdm-common.c:2445  Udev cookie 0xd4d5799 (semid 41189397) incremented to 2
16:41:20.717849 lvconvert[1494] device_mapper/libdm-common.c:2695  Udev cookie 0xd4d5799 (semid 41189397) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
16:41:20.717861 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm remove   (253:0) [ noopencount flush retryremove ]   [16384] (*1)
16:41:20.740526 lvconvert[1494] device_mapper/libdm-common.c:1489  writecache_sanity-linear: Stacking NODE_DEL [trust_udev]
16:41:20.740555 lvconvert[1494] mm/memlock.c:637  Leaving section (deactivated).
16:41:20.740568 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV].
16:41:20.740590 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV [ noopencount flush ]   [16384] (*1)
16:41:20.740616 lvconvert[1494] metadata/lv_manip.c:6067  Creating logical volume linear_cvol_wcorig
16:41:20.740640 lvconvert[1494] activate/dev_manager.c:810  Getting device info for writecache_sanity-linear_cvol [LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-cvol].
16:41:20.740650 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV-cvol [ noopencount flush ]   [16384] (*1)
16:41:20.740662 lvconvert[1494] device_mapper/ioctl/libdm-iface.c:1875  dm info  LVM-XobTg9eSFs4utPran2YLb1AWfMKSgeJhJNQw0S8xbbySaZKbKuhn1XMTCZpu2yLV [ noopencount flush ]   [16384] (*1)
16:41:20.740673 lvconvert[1494] metadata/lv_manip.c:7154  Inserting layer linear_cvol_wcorig for linear_cvol
16:41:20.740685 lvconvert[1494] metadata/lv_manip.c:1268  Stack writecache_sanity/linear_cvol:0[0] on LV writecache_sanity/linear_cvol_wcorig:0.
16:41:20.740694 lvconvert[1494] metadata/lv_manip.c:819  Adding writecache_sanity/linear_cvol:0 as an user of writecache_sanity/linear_cvol_wcorig.
16:41:20.740704 lvconvert[1494] metadata/lv_manip.c:6228  LV linear_cvol in VG writecache_sanity is now hidden.
16:41:20.740714 lvconvert[1494] metadata/lv_manip.c:819  Adding writecache_sanity/linear_cvol:0 as an user of writecache_sanity/linear_cvol.

# Stuck


Version-Release number of selected component (if applicable):
kernel-4.18.0-173.el8    BUILT: Fri Jan 24 06:02:03 CST 2020
lvm2-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
lvm2-libs-2.03.07-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019
device-mapper-event-libs-1.02.167-1.el8    BUILT: Mon Dec  2 00:09:32 CST 2019

Comment 2 Marian Csontos 2020-02-24 16:22:59 UTC
Corey, could you ack please?

Comment 6 Corey Marthaler 2020-02-24 20:58:32 UTC
Fix verified in the latest rpms.

kernel-4.18.0-179.el8    BUILT: Fri Feb 14 17:03:01 CST 2020
lvm2-2.03.08-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
lvm2-libs-2.03.08-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-libs-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-event-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020
device-mapper-event-libs-1.02.169-2.el8    BUILT: Mon Feb 24 11:21:38 CST 2020


[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/linear writecache_sanity/linear
  Invalid cachevol LV.

Comment 8 errata-xmlrpc 2020-04-28 16:59:23 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-2020:1881