Author: arekm
Date: Fri Sep 30 12:54:07 2011
New Revision: 12360

Modified:
   rc-scripts/trunk/rc.d/rc.shutdown
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
Use --sysinit for lvm. When stopping hide error messages (normal for many cases 
like lvm on rootfs).

Modified: rc-scripts/trunk/rc.d/rc.shutdown
==============================================================================
--- rc-scripts/trunk/rc.d/rc.shutdown   (original)
+++ rc-scripts/trunk/rc.d/rc.shutdown   Fri Sep 30 12:54:07 2011
@@ -116,11 +116,11 @@
        if [ -x /sbin/vgchange ]; then
                lvmversion=$(LC_ALL=C /sbin/vgchange --version 2>/dev/null | 
awk '/LVM version:/{if ($3 >= 2) print "2"}')
                if [ "$lvmversion" = "2" ]; then
-                       lvmignorelock="--ignorelockingfailure"
+                       lvmsysinit="--sysinit"
                else
-                       lvmignorelock=""
+                       lvmsysinit=""
                fi
-               run_cmd "Stopping LVM volume groups" /sbin/vgchange -a n 
$lvmignorelock
+               /sbin/vgchange -a n $lvmsysinit > /dev/null 2>&1
        fi
 
        goraidtab=1

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Fri Sep 30 12:54:07 2011
@@ -606,23 +606,23 @@
                fi
                if [ "$lvmversion" = "1" ] ; then
                        modprobe -s lvm-mod >/dev/null 2>&1
-                       lvmignorelock=""
+                       lvmsysinit=""
                elif [ "$lvmversion" = "2" ] ; then
                        modprobe -s dm-mod >/dev/null 2>&1
-                       lvmignorelock="--ignorelockingfailure"
+                       lvmsysinit="--sysinit"
                else
                        modprobe -s lvm-mod >/dev/null 2>&1
                        # device mapper (2.5+ and patched 2.4)
                        modprobe -s dm-mod >/dev/null 2>&1
-                       lvmignorelock=""
+                       lvmsysinit=""
                fi
 
-               run_cmd "Scanning for LVM volume groups" /sbin/vgscan 
$lvmignorelock
-               run_cmd "Activating LVM volume groups" /sbin/vgchange -a y 
$lvmignorelock
+               run_cmd "Scanning for LVM volume groups" /sbin/vgscan 
$lvmsysinit
+               run_cmd "Activating LVM volume groups" /sbin/vgchange -a y 
$lvmsysinit
                if [ "$lvmversion" = "2" ]; then
-                       /sbin/vgmknodes $lvmignorelock
+                       /sbin/vgmknodes $lvmsysinit
                        # display VG statistics
-                       /sbin/vgdisplay -s $lvmignorelock
+                       /sbin/vgdisplay -s $lvmsysinit
                fi
        fi
 
@@ -721,8 +721,8 @@
                        # LVM on RAID (keep in sync with LVM setting few lines 
above)
                        if [ "$golvm" -eq "1" ]; then
                                if [ -x /sbin/vgscan -a -x /sbin/vgchange ]; 
then
-                                       run_cmd "Scanning for LVM volume groups 
(on RAID)" /sbin/vgscan $lvmignorelock
-                                       run_cmd "Activating LVM volume groups 
(on RAID)" /sbin/vgchange -a y $lvmignorelock
+                                       run_cmd "Scanning for LVM volume groups 
(on RAID)" /sbin/vgscan $lvmsysinit
+                                       run_cmd "Activating LVM volume groups 
(on RAID)" /sbin/vgchange -a y $lvmsysinit
                                        [ "$lvmversion" = "2" ] && 
/sbin/vgmknodes
                                fi
                        fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to