Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 44932 Details for
Bug 57229
lvm shutdown in /etc/init.d/halt is to early. Breaks root on lvm2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to halt.sh and checkfs to handle root on lvm situations
rc-scripts-1.4.16-root_on_lvm.patch (text/plain), 2.83 KB, created by
Eric Edgar (RETIRED)
on 2004-11-29 09:19:21 UTC
(
hide
)
Description:
patch to halt.sh and checkfs to handle root on lvm situations
Filename:
MIME Type:
Creator:
Eric Edgar (RETIRED)
Created:
2004-11-29 09:19:21 UTC
Size:
2.83 KB
patch
obsolete
>diff -urN rc-scripts-1.4.16.orig/init.d/checkfs rc-scripts-1.4.16/init.d/checkfs >--- rc-scripts-1.4.16.orig/init.d/checkfs 2004-11-29 10:59:20.000947255 -0600 >+++ rc-scripts-1.4.16/init.d/checkfs 2004-11-29 10:59:48.000007020 -0600 >@@ -33,11 +33,11 @@ > then > ebegin "Setting up the Logical Volume Manager" > #still echo stderr for debugging >- /sbin/vgscan >/dev/null >+ /sbin/vgscan --ignorelockingfailure --mknodes -P >/dev/null > if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \ > [ -f /etc/lvmtab -o -d /etc/lvm ] > then >- /sbin/vgchange -a y >/dev/null >+ /sbin/vgchange --ignorelockingfailure -P -a y >/dev/null > fi > eend $? "Failed to setup the LVM" > fi >diff -urN rc-scripts-1.4.16.orig/init.d/halt.sh rc-scripts-1.4.16/init.d/halt.sh >--- rc-scripts-1.4.16.orig/init.d/halt.sh 2004-11-29 10:59:20.000900143 -0600 >+++ rc-scripts-1.4.16/init.d/halt.sh 2004-11-29 10:59:44.000093614 -0600 >@@ -124,14 +124,60 @@ > eend 0 > > # Stop LVM >-if [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] && \ >+if [ -x /sbin/vgchange ] && \ >+ [ -x /sbin/lvdisplay ] && \ >+ [ -x /sbin/vgdisplay ] && \ >+ [ -x /sbin/lvchange ] && \ >+ [ -f /etc/lvmtab -o -d /etc/lvm ] && \ > [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ] > then >- ebegin "Shutting down the Logical Volume Manager" >- /sbin/vgchange -a n >/dev/null >- eend $? "Failed to shut LVM down" >+ einfo "Shutting down the Logical Volume Manager" >+ # If these commands fail it is not currently an issue >+ # as the system is going down anyway based on the current LVM >+ # functionality as described in this forum thread >+ #https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html >+ >+ LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|awk '{print $3}'|sort|xargs echo` >+ VOLUME_GROUPS=`vgdisplay |grep "VG Name"|awk '{print $3}'|sort|xargs echo` >+ for x in ${LOGICAL_VOLUMES} >+ do >+ LV_IS_ACTIVE=`lvdisplay ${x}|grep "#"|awk '{print $3}'` >+ if [ "${LV_IS_ACTIVE}" = 0 ] >+ then >+ ebegin " Shutting Down logical volume: ${x} " >+ lvchange -an --ignorelockingfailure -P ${x} >/dev/null >+ eend $? >+ fi >+ done >+ >+ for x in ${VOLUME_GROUPS} >+ do >+ VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|awk '{print $3}'|xargs echo` >+ if [ "${VG_HAS_ACTIVE_LV}" = 0 ] >+ then >+ ebegin " Shutting Down volume group: ${x} " >+ vgchange -an --ignorelockingfailure -P ${x} >/dev/null >+ eend >+ fi >+ done >+ >+ for x in ${LOGICAL_VOLUMES} >+ do >+ LV_IS_ACTIVE=`lvdisplay ${x}|grep "#"|awk '{print $3}'` >+ if [ "${LV_IS_ACTIVE}" = 1 ] >+ then >+ >+ ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'` >+ if [ ! ${ROOT_DEVICE} = ${x} ] >+ then >+ ewarn " Unable to shutdown: ${x} " >+ fi >+ fi >+ done >+ einfo "Finished Shutting down the Logical Volume Manager" > fi > >+ > # This is a function because its used twice below this line as: > # [ -f /etc/killpower ] && ups_kill_power > ups_kill_power() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 57229
:
44932
|
44933
|
44934
|
44992
|
44993
|
71904