]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
When shutting down try to stop LVM devices, too.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 22 Aug 2004 18:06:40 +0000 (18:06 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 22 Aug 2004 18:06:40 +0000 (18:06 +0000)
svn-id: @4430

rc.d/rc.shutdown

index ca59fe17dd2ebc2e90d9d8383ed7db12d944843e..2e90652184cd5fe4dd027f68100ae4994d3f5fcc 100755 (executable)
@@ -70,6 +70,16 @@ done
 
 run_cmd "Remounting root filesystem in ro mode" mount -n -o remount,ro /
 
+if is_yes "$EVMS_LVM" || [ -x /sbin/vgscan -a -x /sbin/vgchange ]; then
+        lvmversion=$(/sbin/vgchange --version 2>/dev/null | awk '{gsub("vgchange: Logical Volume Manager ",""); gsub("LVM version:     ",""); gsub(/\..*/,"");print $1; exit}')
+       if [ "$lvmversion" = "2" ] ; then
+               lvmignorelock="--ignorelockingfailure"
+       else
+               lvmignorelock=""
+       fi
+       run_cmd "Stopping LVM volume groups" /sbin/vgchange -a n $lvmignorelock
+fi
+
 goraidtab=1
 if [ -x /sbin/mdadm -a -f /etc/mdadm.conf ]; then
        if (grep -qE "^([[:blank:]]|)ARRAY[[:blank:]]" /etc/mdadm.conf); then
This page took 0.03733 seconds and 4 git commands to generate.