Bug 1811725
| Summary: | snapshot of inactive LV leaves the LV locked | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | David Teigland <teigland> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | LVM lock daemon / lvmlockd | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, pasik, prajnoha, rhandlin, teigland, zkabelac |
| Version: | 8.2 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.09-4.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 02:00:25 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
David Teigland
2020-03-09 15:47:43 UTC
fix in master https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dd0fdd846d85d7028e65bb801c27791a8e2cee2d Fix verified in the latest rpms.
kernel-4.18.0-232.el8 BUILT: Mon Aug 10 02:17:54 CDT 2020
lvm2-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-libs-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-lockd-2.03.09-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-libs-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-libs-1.02.171-5.el8 BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-persistent-data-0.8.5-3.el8 BUILT: Wed Nov 27 07:05:21 CST 2019
sanlock-3.8.2-1.el8 BUILT: Mon Aug 10 12:12:49 CDT 2020
sanlock-lib-3.8.2-1.el8 BUILT: Mon Aug 10 12:12:49 CDT 2020
[root@host-073 ~]# systemctl status sanlock
â sanlock.service - Shared Storage Lease Manager
Loaded: loaded (/usr/lib/systemd/system/sanlock.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2020-08-13 18:20:44 CDT; 3 days ago
Process: 3582 ExecStart=/usr/sbin/sanlock daemon (code=exited, status=0/SUCCESS)
Main PID: 3591 (sanlock)
Tasks: 9 (limit: 93971)
Memory: 90.9M
CGroup: /system.slice/sanlock.service
ââ3591 /usr/sbin/sanlock daemon
ââ3592 /usr/sbin/sanlock daemon
Aug 13 18:20:44 host-073.virt.lab.msp.redhat.com systemd[1]: Starting Shared Storage Lease Manager...
Aug 13 18:20:44 host-073.virt.lab.msp.redhat.com systemd[1]: Started Shared Storage Lease Manager.
[root@host-073 ~]# systemctl status lvmlockd
â lvmlockd.service - LVM lock daemon
Loaded: loaded (/usr/lib/systemd/system/lvmlockd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2020-08-13 18:21:01 CDT; 3 days ago
Docs: man:lvmlockd(8)
Main PID: 3612 (lvmlockd)
Tasks: 5 (limit: 93971)
Memory: 5.0M
CGroup: /system.slice/lvmlockd.service
ââ3612 /usr/sbin/lvmlockd --foreground
Aug 13 18:21:01 host-073.virt.lab.msp.redhat.com systemd[1]: Starting LVM lock daemon...
Aug 13 18:21:01 host-073.virt.lab.msp.redhat.com lvmlockd[3612]: [D] creating /run/lvm/lvmlockd.socket
Aug 13 18:21:01 host-073.virt.lab.msp.redhat.com lvmlockd[3612]: 1597360861 lvmlockd started
Aug 13 18:21:01 host-073.virt.lab.msp.redhat.com systemd[1]: Started LVM lock daemon.
Aug 13 21:16:18 host-073.virt.lab.msp.redhat.com lvmlockd[3612]: 1597371378 S lvm_vdo_2_7084 R SS1RVu-epPQ-iDhX-UqO4-Osn2-wXM1-CPtf6m clear lock persistent
Aug 17 11:09:21 host-073.virt.lab.msp.redhat.com lvmlockd[3612]: 1597680561 S lvm_vdo_1_1668 R 3iLFuj-EDhs-na4c-wC0t-Bl1c-L4QY-sG2faN clear lock persistent
[root@host-073 ~]# vgcreate --shared test /dev/sdd1 /dev/sdc2 /dev/sdc1
Logical volume "lvmlock" created.
Volume group "test" successfully created
VG test starting sanlock lockspace
Starting locking. Waiting until locks are ready...
# Other host
[root@host-083 ~]# vgchange --lock-start test
VG test starting sanlock lockspace
Starting locking. Waiting for sanlock may take 20 sec to 3 min...
[root@host-073 ~]# lvcreate --activate n -L 12M -n lv test
WARNING: Logical volume test/lv not zeroed.
Logical volume "lv" created.
[root@host-073 ~]# lvcreate --activate n -L 12M -n lv2 test
WARNING: Logical volume test/lv2 not zeroed.
Logical volume "lv2" created.
[root@host-073 ~]# lvs -o +lv_uuid
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert LV UUID
lv test -wi------- 12.00m RmsfC9-qAoj-P2G8-0sgW-jkdR-iUBN-DhZFPV
lv2 test -wi------- 12.00m 4XCm0V-3ZG8-JOZa-vynS-gKb1-mciT-Ahgn8v
[root@host-073 ~]# lvmlockctl -i
VG global lock_type=sanlock V3wQRT-GjNp-Wx3A-fTxg-snpz-SsF1-oaYdvd
LS sanlock lvm_global
LK VG un ver 0
LK GL un ver 6
VG test lock_type=sanlock xOZ1Rd-XgC3-X32T-pF0D-m97S-11Tu-n1YxtS
LS sanlock lvm_test
LK VG un ver 5
LK LV un RmsfC9-qAoj-P2G8-0sgW-jkdR-iUBN-DhZFPV
LK LV un 4XCm0V-3ZG8-JOZa-vynS-gKb1-mciT-Ahgn8v
[root@host-073 ~]# lvcreate -L 12m -s lv2 -n test/lv2-snap
Logical volume "lv2-snap" created.
[root@host-073 ~]# lvs -o +lv_uuid
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert LV UUID
lv test -wi------- 12.00m RmsfC9-qAoj-P2G8-0sgW-jkdR-iUBN-DhZFPV
lv2 test owi---s--- 12.00m 4XCm0V-3ZG8-JOZa-vynS-gKb1-mciT-Ahgn8v
lv2-snap test swi---s--- 12.00m lv2 AZmG1a-fgJ4-Havn-eJNq-pX6u-nla5-fumXpq
[root@host-073 ~]# lvmlockctl -i
VG global lock_type=sanlock V3wQRT-GjNp-Wx3A-fTxg-snpz-SsF1-oaYdvd
LS sanlock lvm_global
LK VG un ver 0
LK GL un ver 6
VG test lock_type=sanlock xOZ1Rd-XgC3-X32T-pF0D-m97S-11Tu-n1YxtS
LS sanlock lvm_test
LK VG un ver 7
LK LV un RmsfC9-qAoj-P2G8-0sgW-jkdR-iUBN-DhZFPV
LK LV un 4XCm0V-3ZG8-JOZa-vynS-gKb1-mciT-Ahgn8v
# Other host is able to activate the volume
[root@host-083 ~]# lvchange -a y test/lv2
[root@host-083 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
[lvmlock] global -wi-ao---- 256.00m /dev/sde2(0)
lv test -wi------- 12.00m /dev/sde1(64)
lv2 test owi-a-s--- 12.00m /dev/sde1(67)
lv2-snap test swi-a-s--- 12.00m lv2 0.00 /dev/sde1(70)
[lvmlock] test -wi-ao---- 256.00m /dev/sde1(0)
[root@host-083 ~]# lvmlockctl -i
VG global lock_type=sanlock V3wQRT-GjNp-Wx3A-fTxg-snpz-SsF1-oaYdvd
LS sanlock lvm_global
LK VG un ver 0
LK GL un ver 6
VG test lock_type=sanlock xOZ1Rd-XgC3-X32T-pF0D-m97S-11Tu-n1YxtS
LS sanlock lvm_test
LK VG un ver 7
LK LV ex 4XCm0V-3ZG8-JOZa-vynS-gKb1-mciT-Ahgn8v
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:4546 |