mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
o cluster lvm requires that /usr/sbin/$TOOL is used instead of
/sbin/lvm.static $TOOL o made variables LVDISPLAY, VGSCAN and VGCHANGE configurable in /etc/sysconfig/cluster
This commit is contained in:
parent
ceda2b1426
commit
6b71063b6d
@ -9,14 +9,15 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/init.d/functions
|
. /etc/init.d/functions
|
||||||
|
|
||||||
|
LVDISPLAY="/usr/sbin/lvdisplay"
|
||||||
|
VGCHANGE="/usr/sbin/vgchange"
|
||||||
|
VGSCAN="/usr/sbin/vgscan"
|
||||||
|
|
||||||
[ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
|
[ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
|
||||||
|
|
||||||
LOCK_FILE="/var/lock/subsys/clvmd"
|
LOCK_FILE="/var/lock/subsys/clvmd"
|
||||||
|
|
||||||
lvdisplay="/sbin/lvm.static lvdisplay"
|
|
||||||
vgchange="/sbin/lvm.static vgchange"
|
|
||||||
vgscan="/sbin/lvm.static vgscan"
|
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
for rtrn in 0
|
for rtrn in 0
|
||||||
@ -38,14 +39,14 @@ start()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# refresh cache
|
# refresh cache
|
||||||
$vgscan > /dev/null 2>&1
|
$VGSCAN > /dev/null 2>&1
|
||||||
|
|
||||||
if [ -n "$LVM_VGS" ]
|
if [ -n "$LVM_VGS" ]
|
||||||
then
|
then
|
||||||
for vg in $LVM_VGS
|
for vg in $LVM_VGS
|
||||||
do
|
do
|
||||||
echo -n "Activating lvm $vg:"
|
echo -n "Activating lvm $vg:"
|
||||||
if $vgchange -ayl $vg > /dev/null 2>&1
|
if $VGCHANGE -ayl $vg > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
@ -57,7 +58,7 @@ start()
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo -n "Activating lvms:"
|
echo -n "Activating lvms:"
|
||||||
if $vgchange -ayl > /dev/null 2>&1
|
if $VGCHANGE -ayl > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
@ -81,7 +82,7 @@ stop()
|
|||||||
for vg in $LVM_VGS
|
for vg in $LVM_VGS
|
||||||
do
|
do
|
||||||
echo -n "Deactivating lvm $vg:"
|
echo -n "Deactivating lvm $vg:"
|
||||||
if $vgchange -anl $vg > /dev/null 2>&1
|
if $VGCHANGE -anl $vg > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
@ -93,7 +94,7 @@ stop()
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo -n "Deactivating lvms:"
|
echo -n "Deactivating lvms:"
|
||||||
if $vgchange -anl > /dev/null 2>&1
|
if $VGCHANGE -anl > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
success
|
success
|
||||||
echo
|
echo
|
||||||
@ -152,7 +153,7 @@ case "$1" in
|
|||||||
|
|
||||||
status)
|
status)
|
||||||
status clvmd
|
status clvmd
|
||||||
vols=$( $lvdisplay -C --nohead 2> /dev/null | awk '($3 ~ /....a./) {print $1}' )
|
vols=$( $LVDISPLAY -C --nohead 2> /dev/null | awk '($3 ~ /....a./) {print $1}' )
|
||||||
echo active volumes: ${vols:-"(none)"}
|
echo active volumes: ${vols:-"(none)"}
|
||||||
rtrn=0
|
rtrn=0
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user