Bug 1492897
| Summary: | lvmlockd needs to safeguard against pvmoves on shared activated volumes with no cmirrord option | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | LVM lock daemon / lvmlockd | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, mcsontos, prajnoha, teigland, zkabelac |
| Version: | 7.4 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.175-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-10 15:22:16 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
2017-09-18 23:08:29 UTC
Two commits addressing mirror and pvmove issues in a shared VG: https://sourceware.org/git/?p=lvm2.git;a=commit;h=518a8e8cfbb672c2bf5e3455f1fe7cd8d94eb5b0 https://sourceware.org/git/?p=lvm2.git;a=commit;h=f2ee0e7aca6020cf273f22dc5bca20bfa3c89051 LVs with 'mirror' type can now be activated with a shared lock (-asy) from multiple hosts, and lvm correctly uses cmirrord for them. This only applies to shared VGs with lock_type dlm (sanlock is excluded since the combination of sanlock and corosync is not useful.) pvmove in a shared VG is restricted to cases where an LV name is specified (pvmove -n LV). A further restriction is that the node running pvmove must be able to exclusively activate the LV. This means a shared VG does not support pvmove of an entire PV, and does not support pvmove of an LV active on multiple nodes, e.g. under gfs. Verified that pvmoves on shared locked LVs (w/ or w/o a given -n lv name arg) is no longer allowed. LVs need to be exclusively locked (or converted to ex lock by being the only node w/ a shared lock) before a pvmove can take place.
limitations of lockd VGs
Things that do not yet work in lockd VGs:
[...]
· pvmove of entire PVs, or under LVs activated with shared locks
[root@host-026 ~]# lvs -a -o +devices pv_shuffle_A/stripe
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
stripe pv_shuffle_A -wi-ao---- 2.00g /dev/sda3(512),/dev/sda2(0),/dev/sda1(0)
[root@host-026 ~]# mount | grep stripe
/dev/mapper/pv_shuffle_A-stripe on /mnt/pv_shuffle_A_stripe type gfs2 (rw,relatime,seclabel)
# Unnamed attempt:
[root@host-026 ~]# pvmove -b -v /dev/sda2 /dev/sdh1
Cluster mirror log daemon is not running.
Wiping internal VG cache
Wiping cache of LVM-capable devices
pvmove in a shared VG requires a named LV.
# Shared lock w/ lv name attempt:
[root@host-026 ~]# pvmove -b -v -n pv_shuffle_A/stripe /dev/sda2 /dev/sdh1
Cluster mirror log daemon is not running.
Wiping internal VG cache
Wiping cache of LVM-capable devices
LV locked by other host: pv_shuffle_A/stripe
pvmove in a shared VG requires exclusive lock on named LV.
[root@host-026 ~]# lvchange -an pv_shuffle_A/stripe
[root@host-026 ~]# lvchange -aye pv_shuffle_A/stripe
[root@host-026 ~]# pvmove -b -v /dev/sda2 /dev/sdh1
Cluster mirror log daemon is not running.
Wiping internal VG cache
Wiping cache of LVM-capable devices
pvmove in a shared VG requires a named LV.
[root@host-026 ~]# pvmove -b -v -n pv_shuffle_A/stripe /dev/sda2 /dev/sdd2
Cluster mirror log daemon is not running.
Wiping internal VG cache
Wiping cache of LVM-capable devices
Archiving volume group "pv_shuffle_A" metadata (seqno 27).
Creating logical volume pvmove0
Moving 171 extents of logical volume pv_shuffle_A/stripe
activation/volume_list configuration setting not defined: Checking only host tags for pv_shuffle_A/stripe.
Setting up pvmove in on-disk volume group metadata.
Creating pv_shuffle_A-pvmove0
Loading pv_shuffle_A-pvmove0 table (253:6)
Loading pv_shuffle_A-stripe table (253:3)
Suspending pv_shuffle_A-stripe (253:3) with device flush
activation/volume_list configuration setting not defined: Checking only host tags for pv_shuffle_A/pvmove0.
Resuming pv_shuffle_A-pvmove0 (253:6)
Loading pv_shuffle_A-pvmove0 table (253:6)
Suppressed pv_shuffle_A-pvmove0 (253:6) identical table reload.
Resuming pv_shuffle_A-stripe (253:3)
Creating volume group backup "/etc/lvm/backup/pv_shuffle_A" (seqno 28).
Checking progress before waiting every 15 seconds.
[root@host-026 ~]# lvs -a -o +devices pv_shuffle_A/stripe
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
stripe pv_shuffle_A -wi-a----- 2.00g /dev/sda3(512),/dev/sdd2(257),/dev/sda1(0)
lvm2-2.02.175-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
lvm2-libs-2.02.175-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
lvm2-cluster-2.02.175-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
device-mapper-1.02.144-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
device-mapper-libs-1.02.144-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
device-mapper-event-1.02.144-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
device-mapper-event-libs-1.02.144-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7 BUILT: Mon Mar 27 10:15:46 CDT 2017
cmirror-2.02.175-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
sanlock-3.5.0-1.el7 BUILT: Wed Apr 26 09:37:30 CDT 2017
sanlock-lib-3.5.0-1.el7 BUILT: Wed Apr 26 09:37:30 CDT 2017
lvm2-lockd-2.02.175-2.el7 BUILT: Fri Oct 13 06:31:22 CDT 2017
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:0853 |