lvm: Don't activate LVs with activationskip set
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1186854 Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>master
parent
a1b4efe6a7
commit
cfa365a32d
|
@ -106,6 +106,10 @@ if [ -n "$LVS" ] ; then
|
||||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
||||||
lvm lvscan --ignorelockingfailure 2>&1 | vinfo
|
lvm lvscan --ignorelockingfailure 2>&1 | vinfo
|
||||||
for LV in $LVS; do
|
for LV in $LVS; do
|
||||||
|
if [ "x$(lvm lvs --noheadings --select "lv_attr =~ k" $LV | wc -l)" = "x0" ]; then
|
||||||
|
info "Skipping activation of '$LV' because activationskip is set."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if [ -z "$sysinit" ]; then
|
if [ -z "$sysinit" ]; then
|
||||||
lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo
|
lvm lvchange --yes -ay --ignorelockingfailure $nopoll --ignoremonitoring $LV 2>&1 | vinfo
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue