Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 57229 | Differences between
and this patch

Collapse All | Expand All

(-)rc-scripts-1.4.16.orig/init.d/checkfs (-2 / +2 lines)
Lines 33-43 Link Here
33
	then
33
	then
34
		ebegin "Setting up the Logical Volume Manager"
34
		ebegin "Setting up the Logical Volume Manager"
35
		#still echo stderr for debugging
35
		#still echo stderr for debugging
36
		/sbin/vgscan >/dev/null 
36
		/sbin/vgscan --ignorelockingfailure --mknodes -P >/dev/null 
37
		if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \
37
		if [ "$?" -eq 0 ] && [ -x /sbin/vgchange ] && \
38
		   [ -f /etc/lvmtab -o -d /etc/lvm ]
38
		   [ -f /etc/lvmtab -o -d /etc/lvm ]
39
		then
39
		then
40
			/sbin/vgchange -a y >/dev/null
40
			/sbin/vgchange --ignorelockingfailure -P -a y >/dev/null
41
		fi
41
		fi
42
		eend $? "Failed to setup the LVM"
42
		eend $? "Failed to setup the LVM"
43
	fi
43
	fi
(-)rc-scripts-1.4.16.orig/init.d/halt.sh (-4 / +50 lines)
Lines 124-137 Link Here
124
eend 0
124
eend 0
125
125
126
# Stop LVM
126
# Stop LVM
127
if [ -x /sbin/vgchange ] && [ -f /etc/lvmtab -o -d /etc/lvm ] && \
127
if [ -x /sbin/vgchange ] && \
128
   [ -x /sbin/lvdisplay ] && \
129
   [ -x /sbin/vgdisplay ] && \
130
   [ -x /sbin/lvchange ] && \
131
   [ -f /etc/lvmtab -o -d /etc/lvm ] && \
128
   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
132
   [ -d /proc/lvm  -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
129
then
133
then
130
	ebegin "Shutting down the Logical Volume Manager"
134
	einfo "Shutting down the Logical Volume Manager"
131
	/sbin/vgchange -a n >/dev/null
135
	# If these commands fail it is not currently an issue
132
	eend $? "Failed to shut LVM down"
136
	# as the system is going down anyway based on the current LVM 
137
	# functionality as described in this forum thread
138
	#https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html
139
140
	LOGICAL_VOLUMES=`lvdisplay |grep "LV Name"|awk '{print $3}'|sort|xargs echo`
141
	VOLUME_GROUPS=`vgdisplay |grep "VG Name"|awk '{print $3}'|sort|xargs echo`
142
	for x in ${LOGICAL_VOLUMES}
143
	do
144
		LV_IS_ACTIVE=`lvdisplay ${x}|grep "#"|awk '{print $3}'`
145
		if [ "${LV_IS_ACTIVE}" = 0 ]
146
		then
147
			ebegin "  Shutting Down logical volume: ${x} "
148
			lvchange -an --ignorelockingfailure -P ${x} >/dev/null
149
			eend $?
150
		fi
151
	done
152
153
	for x in ${VOLUME_GROUPS}
154
	do
155
		VG_HAS_ACTIVE_LV=`vgdisplay ${x}|grep "Open LV"|awk '{print $3}'|xargs echo`
156
		if [ "${VG_HAS_ACTIVE_LV}" = 0 ]
157
		then
158
			ebegin "  Shutting Down volume group: ${x} "
159
			vgchange -an --ignorelockingfailure -P ${x} >/dev/null
160
			eend
161
		fi
162
	done
163
164
	for x in ${LOGICAL_VOLUMES}
165
	do
166
		LV_IS_ACTIVE=`lvdisplay ${x}|grep "#"|awk '{print $3}'`
167
		if [ "${LV_IS_ACTIVE}" = 1 ]
168
		then
169
			
170
			ROOT_DEVICE=`mount|grep " / "|awk '{print $1}'`
171
			if [ ! ${ROOT_DEVICE} = ${x} ]
172
			then
173
				ewarn "  Unable to shutdown: ${x} "
174
			fi
175
		fi
176
	done
177
	einfo "Finished Shutting down the Logical Volume Manager"
133
fi
178
fi
134
179
180
135
# This is a function because its used twice below this line as:
181
# This is a function because its used twice below this line as:
136
#   [ -f /etc/killpower ] && ups_kill_power
182
#   [ -f /etc/killpower ] && ups_kill_power
137
ups_kill_power() {
183
ups_kill_power() {

Return to bug 57229