mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
scripts: use --ignoreskippedcluster in lvm2-monitor initscript/systemd unit
When clustered VG is available in the system but we don't have clustering set up for whatever reason, the lvm2-monitor scripts should not fail completely just because these clustered VGs are skipped during vgs/vgchange calls in lvm2-monitor initscript/systemd unit.
This commit is contained in:
parent
6e2f706233
commit
f33a224ef0
@ -1,5 +1,6 @@
|
||||
Version 2.02.106 -
|
||||
====================================
|
||||
Use --ignoreskippedcluster in lvm2-monitor initscript/systemd unit.
|
||||
Do not use VG read/write state for LV read/write state.
|
||||
Use --ignoreskippedcluster in activation systemd units if use_lvmetad=0.
|
||||
Allow approximate allocation when specifying size in percentage terms.
|
||||
|
@ -48,10 +48,10 @@ start()
|
||||
{
|
||||
ret=0
|
||||
# TODO do we want to separate out already active groups only?
|
||||
VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
|
||||
VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
|
||||
for vg in $VGSLIST
|
||||
do
|
||||
action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
|
||||
action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
|
||||
done
|
||||
|
||||
return $ret
|
||||
@ -66,10 +66,10 @@ stop()
|
||||
echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override."
|
||||
return 1
|
||||
fi
|
||||
VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
|
||||
VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
|
||||
for vg in $VGSLIST
|
||||
do
|
||||
action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
|
||||
action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
|
||||
done
|
||||
return $ret
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ Conflicts=shutdown.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
|
||||
ExecStart=@sbindir@/lvm vgchange --monitor y
|
||||
ExecStart=@sbindir@/lvm vgchange --monitor y --ignoreskippedcluster
|
||||
# The lvmetad must be disabled here, it needs https://bugzilla.redhat.com/show_bug.cgi?id=843587 to be resolved first.
|
||||
ExecStop=@sbindir@/lvm vgchange --monitor n --config 'global{use_lvmetad=0}'
|
||||
ExecStop=@sbindir@/lvm vgchange --monitor n --config 'global{use_lvmetad=0}' --ignoreskippedcluster
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user