public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2010-08-12  9:15 fabbione
  0 siblings, 0 replies; 7+ messages in thread
From: fabbione @ 2010-08-12  9:15 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	fabbione@sourceware.org	2010-08-12 09:15:00

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Fix clvmd init script return code when executed as non-root user.
	
	clvmd daemon itself does the right thing when invoked as non-root, by
	returning 4.
	
	The patch removes the use daemon function from
	/etc/rc.d/init.d/functions that´s unnecessary and has th bad habit to
	mask the return codes from the real daemon.
	
	Add a simple and generic check to see if clvmd is executed by root or not.
	
	Our stop/reload/restart paths in the init script are complex and not all
	the tools involved in the process are guaranteed to return 4 if executed
	by non-root against a process that´s running as root (for example kill
	-TERM will return -1 and parsing the output to catch the error is
	suboptimal at best).
	
	https://bugzilla.redhat.com/show_bug.cgi?id=553381

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1701&r2=1.1702
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.9&r2=1.10

--- LVM2/WHATS_NEW	2010/08/12 04:11:48	1.1701
+++ LVM2/WHATS_NEW	2010/08/12 09:14:59	1.1702
@@ -1,5 +1,6 @@
 Version 2.02.73 - 
 ================================
+  Fix clvmd init script exit code when executed as non-root user.
   Change default alignment of pe_start to 1MB.
   Add --norestorefile option to pvcreate.
   Require --restorefile when using pvcreate --uuid.
--- LVM2/scripts/clvmd_init_red_hat.in	2010/06/23 16:24:14	1.9
+++ LVM2/scripts/clvmd_init_red_hat.in	2010/08/12 09:15:00	1.10
@@ -66,7 +66,7 @@
 {
 	if ! rh_status_q; then
 		echo -n "Starting $DAEMON: "
-		daemon $DAEMON $CLVMDOPTS || return $?
+		$DAEMON $CLVMDOPTS || return $?
 		echo
 	fi
 
@@ -165,6 +165,11 @@
 	fi
 }
 
+[ "$EUID" != "0" ] && {
+	echo "clvmd init script can only be executed as root user"
+	exit 4
+}
+
 # See how we were called.
 case "$1" in
   start)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2010-06-23 16:24 mbroz
  0 siblings, 0 replies; 7+ messages in thread
From: mbroz @ 2010-06-23 16:24 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2010-06-23 16:24:14

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Fix clvmd init script status
	
	- s/Active clustred VG/clustered VG/ (only LV can be active)
	
	- print only active LVs (not all) in status command
	(In the lvdisplay form /dev/vg/lv.)
	
	For now, still use awk (already used in clustered_vgs).
	
	https://bugzilla.redhat.com/show_bug.cgi?id=598495

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1629&r2=1.1630
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.8&r2=1.9

--- LVM2/WHATS_NEW	2010/06/23 12:54:46	1.1629
+++ LVM2/WHATS_NEW	2010/06/23 16:24:13	1.1630
@@ -1,5 +1,6 @@
 Version 2.02.68 -
 ===============================
+  Fix clvmd initscript status to print only active clustered LVs.
   Fix typo "INTERNAL ERROR" -> "INTERNAL_ERROR" in libdm-iface.c.
   Add lv_path to reports to offer full /dev pathname.
   Fix typo in warning message about missing device with allocated data areas.
--- LVM2/scripts/clvmd_init_red_hat.in	2010/06/03 21:03:54	1.8
+++ LVM2/scripts/clvmd_init_red_hat.in	2010/06/23 16:24:14	1.9
@@ -25,7 +25,7 @@
 lvm_vgchange=${sbindir}/vgchange
 lvm_vgdisplay=${sbindir}/vgdisplay
 lvm_vgscan=${sbindir}/vgscan
-lvm_lvs=${sbindir}/lvs
+lvm_lvdisplay=${sbindir}/lvdisplay
 
 CLVMDOPTS="-T30"
 
@@ -47,9 +47,10 @@
 		awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'
 }
 
-clustered_lvs() {
+clustered_active_lvs() {
 	for i in $(clustered_vgs); do
-		${lvm_lvs} -o lv_name --noheadings $i
+		${lvm_lvdisplay} $i 2>/dev/null | \
+		awk 'BEGIN {RS="LV Name"} {if (/[^N^O^T] available/) print $1;}'
 	done
 }
 
@@ -197,8 +198,8 @@
 	rtrn=$?
 	if [ $rtrn = 0 ]; then
 		cvgs="$(clustered_vgs)"
-		echo Active clustered Volume Groups: ${cvgs:-"(none)"}
-		clvs="$(clustered_lvs)"
+		echo Clustered Volume Groups: ${cvgs:-"(none)"}
+		clvs="$(clustered_active_lvs)"
 		echo Active clustered Logical Volumes: ${clvs:-"(none)"}
 	fi
 	;;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2010-06-03 21:03 mbroz
  0 siblings, 0 replies; 7+ messages in thread
From: mbroz @ 2010-06-03 21:03 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2010-06-03 21:03:54

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Fix clvmd initscript restart command to start clvmd if not yet running.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1605&r2=1.1606
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.7&r2=1.8

--- LVM2/WHATS_NEW	2010/06/03 13:50:26	1.1605
+++ LVM2/WHATS_NEW	2010/06/03 21:03:53	1.1606
@@ -1,5 +1,6 @@
 Version 2.02.67 -
 ===============================
+  Fix clvmd initscript restart command to start clvmd if not yet running.
   Use absolute paths for clvmd restart.
   Require partial option in lvchange --refresh for partial LVs.
   Do not fail lvm_init() if init_logging() or _init_rand() generates an errno.
--- LVM2/scripts/clvmd_init_red_hat.in	2010/05/17 03:18:28	1.7
+++ LVM2/scripts/clvmd_init_red_hat.in	2010/06/03 21:03:54	1.8
@@ -152,13 +152,15 @@
 
 	# Try to get clvmd to restart itself. This will preserve 
 	# exclusive LV locks
-	action "Restarting $DAEMON: " $DAEMON -S || return $?
+	action "Restarting $DAEMON: " $DAEMON -S
 
 	# If that fails then do a normal stop & restart
 	if  [ $? != 0 ]; then
 	    stop && start
+	    return $?
 	else
 	    touch $LOCK_FILE
+	    return 0
 	fi
 }
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2010-05-17  3:18 fabbione
  0 siblings, 0 replies; 7+ messages in thread
From: fabbione @ 2010-05-17  3:18 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	fabbione@sourceware.org	2010-05-17 03:18:28

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Fix clvmd init script stop function to not deactive non-clustered volume groups.
	
	https://bugzilla.redhat.com/show_bug.cgi?id=592362

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1559&r2=1.1560
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.6&r2=1.7

--- LVM2/WHATS_NEW	2010/05/14 15:19:42	1.1559
+++ LVM2/WHATS_NEW	2010/05/17 03:18:27	1.1560
@@ -1,5 +1,6 @@
 Version 2.02.65 - 
 =================================
+  Fix clvmd init script to not deactive non-clustered volume groups.
   Disallow cluster attr toggling if there are active mirrors or snapshots.
   Use /bin/bash for scripts with bashisms.
   Skip internal lvm devices in scan if ignore suspended devices is requested.
--- LVM2/scripts/clvmd_init_red_hat.in	2010/04/20 14:07:38	1.6
+++ LVM2/scripts/clvmd_init_red_hat.in	2010/05/17 03:18:28	1.7
@@ -109,7 +109,10 @@
 {
 	rh_status_q || return 0
 
-	action "Deactivating clusterd VG(s):" ${lvm_vgchange} -anl ${LVM_VGS:-$(clustered_vgs)} || return $?
+	[ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
+	if [ -n "$LVM_VGS" ]; then
+		action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
+	fi
 
 	action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2010-02-26 13:07 fabbione
  0 siblings, 0 replies; 7+ messages in thread
From: fabbione @ 2010-02-26 13:07 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7752 bytes --]

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	fabbione@sourceware.org	2010-02-26 13:07:43

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	- fix whitespaces all over (tabs/spaces)
	- increase timeout to 30 secs (on Chrissie request)
	- source both cluster and clvmd for options (like all the other cluster
	init scripts)
	- add clustered_vgs and _lvs commodity fns
	- move rh_status* fns at the top, so they can be reused
	- heavily cleanup start and stop fns from redundant code and unnecessary
	loops
	- improve output from different operations
	- make the init script lsb compliant
	- don´t force kill of the daemon, send only a TERM signal and then wait
	for it to exit
	- Resolves rhbz#533247

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1439&r2=1.1440
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.4&r2=1.5

--- LVM2/WHATS_NEW	2010/02/24 20:01:40	1.1439
+++ LVM2/WHATS_NEW	2010/02/26 13:07:43	1.1440
@@ -1,5 +1,6 @@
 Version 2.02.62 -
 ====================================
+  Rewrite clvmd init script.
   Remove lvs_in_vg_activated_by_uuid_only call.
   Run device info query device by uuid only.
   Don't touch /dev in vgmknodes if activation is disabled.
--- LVM2/scripts/clvmd_init_red_hat.in	2009/05/29 18:54:48	1.4
+++ LVM2/scripts/clvmd_init_red_hat.in	2010/02/26 13:07:43	1.5
@@ -1,171 +1,196 @@
 #!/bin/bash
 #
+# clvmd - Clustered LVM Daemon init script
+#
 # chkconfig: - 24 76
-# description: Starts and stops clvmd
+# description: Cluster daemon for userland logical volume management tools.
 #
 # For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
-#	       
+#
 ### BEGIN INIT INFO
-# Provides: clvmd
-# Required-Start: $local_fs
-# Required-Stop: $local_fs
-# Default-Start:
-# Default-Stop: 0 1 6
-# Short-Description: Clustered LVM Daemon
+# Provides:		clvmd
+# Required-Start:	$local_fs
+# Required-Stop:	$local_fs
+# Short-Description:	This service is Clusterd LVM Daemon.
+# Description:		Cluster daemon for userland logical volume management tools.
 ### END INIT INFO
 
-. /etc/init.d/functions
+. /etc/rc.d/init.d/functions
 
 DAEMON=clvmd
 
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@
 
-LVDISPLAY=${sbindir}/lvdisplay
-VGCHANGE=${sbindir}/vgchange
-VGSCAN=${sbindir}/vgscan
-VGDISPLAY=${sbindir}/vgdisplay
-VGS=${sbindir}/vgs
+lvm_vgchange=${sbindir}/vgchange
+lvm_vgdisplay=${sbindir}/vgdisplay
+lvm_vgscan=${sbindir}/vgscan
+lvm_lvs=${sbindir}/lvs
 
-CLVMDOPTS="-T20"
+CLVMDOPTS="-T30"
 
 [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+[ -f /etc/sysconfig/$DAEMON ] && . /etc/sysconfig/$DAEMON
 
 [ -n "$CLVMD_CLUSTER_IFACE" ] && CLVMDOPTS="$CLVMDOPTS -I $CLVMD_CLUSTER_IFACE" 
 
+# allow up to $CLVMD_STOP_TIMEOUT seconds to clvmd to complete exit operations
+# default to 10 seconds
+
+[ -z $CLMVD_STOP_TIMEOUT ] && CLVMD_STOP_TIMEOUT=10
+
 LOCK_FILE="/var/lock/subsys/$DAEMON"
 
-start()
-{
-	for rtrn in 0
-	do
-		if ! pidof $DAEMON > /dev/null 
-		then 
-			echo -n "Starting $DAEMON: "
-			daemon $DAEMON $CLVMDOPTS
-			rtrn=$?
-			echo
-			if [ $rtrn -ne 0 ]
-			then
-				break
-			fi
- 		fi	
-		# refresh cache
-		$VGSCAN  > /dev/null 2>&1
-		
-		if [ -n "$LVM_VGS" ]
-		then
-			for vg in $LVM_VGS
-			do
-				action "Activating VG $vg:" $VGCHANGE -ayl $vg || rtrn=$?
-			done
-		else
-			action "Activating VGs:" $VGCHANGE -ayl || rtrn=$?
-		fi
+# NOTE: replace this with vgs, once display filter per attr is implemented.
+clustered_vgs() {
+	${lvm_vgdisplay} 2>/dev/null | \
+		awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'
+}
+
+clustered_lvs() {
+	for i in $(clustered_vgs); do
+		${lvm_lvs} -o lv_name --noheadings $i
 	done
+}
 
-	return $rtrn
+rh_status() {
+	status $DAEMON
 }
 
-stop()
+rh_status_q() {
+	rh_status >/dev/null 2>&1
+}
+
+start()
 {
-	for rtrn in 0
-	do
-		if [ -n "$LVM_VGS" ]
-		then
-			for vg in $LVM_VGS
-			do
-				action "Deactivating VG $vg:" $VGCHANGE -anl $vg || rtrn=$?
-			done
-		else
-			# Hack to only deactivate clustered volumes
-			clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
-			for vg in $clustervgs; do
-				action "Deactivating VG $vg:" $VGCHANGE -anl $vg || rtrn=$?
-			done
-		fi
-
-		[ $rtrn -ne 0 ] && break
-
-		echo -n "Stopping clvm:"
-		killproc $DAEMON -TERM
-		rtrn=$?
+	if ! rh_status_q; then
+		echo -n "Starting $DAEMON: "
+		daemon $DAEMON $CLVMDOPTS || return $?
 		echo
-	done
-	
-	return $rtrn
+	fi
+
+	# Refresh local cache.
+	#
+	# It's possible that new PVs were added to this, or other VGs
+	# while this node was down. So we run vgscan here to avoid
+	# any potential "Missing UUID" messages with subsequent
+	# LVM commands.
+
+	# The following step would be better and more informative to the user:
+	# 'action "Refreshing VG(s) local cache:" ${lvm_vgscan}'
+	# but it could show warnings such as:
+	# 'clvmd not running on node x-y-z  Unable to obtain global lock.'
+	# and the action would be shown as FAILED when in reality it didn't.
+	# Ideally vgscan should have a startup mode that would not print
+	# unnecessary warnings.
+
+	${lvm_vgscan} > /dev/null 2>&1
+
+	action "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $?
+
+	touch $LOCK_FILE
+
+	return 0
 }
 
 wait_for_finish()
 {
 	count=0
-
-	while [ "$count" -le 10 -a -n "`pidof $DAEMON`" ]
-	do
+	while [ "$count" -le "$CLVMD_STOP_TIMEOUT" ] && \
+		 rh_status_q ]; do
 		sleep 1
-		count=$((count + 1))
+		count=$((count+1))
 	done
-	
-	if [ `pidof $DAEMON` ]
-	then
+
+	! rh_status_q
+}
+
+stop()
+{
+	rh_status_q || return 0
+
+	action "Deactivating clusterd VG(s):" ${lvm_vgchange} -anl ${LVM_VGS:-$(clustered_vgs)} || return $?
+
+	action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
+
+	# wait half second before we start the waiting loop or we will show
+	# the loop more time than really necessary
+	usleep 500000
+
+	# clvmd could take some time to stop
+	rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
+
+	if rh_status_q; then
+		echo -n "$DAEMON failed to exit"
+		failure
+		echo
 		return 1
 	else
-		return 0
+		echo -n "$DAEMON terminated"
+		success
+		echo
 	fi
-}
 
-reload() {
-	$DAEMON -R
-}
+	rm -f $LOCK_FILE
 
-rh_status() {
-	status $DAEMON
+	return 0
 }
 
-rh_status_q() {
-	rh_status >/dev/null 2>&1
+reload() {
+	rh_status_q || exit 7
+	action "Reloading $DAEMON configuration: " $DAEMON -R || return $?
 }
 
-
-rtrn=1
+restart() {
+	# if stop fails, restart will return the error and not attempt
+	# another start. Even if start is protected by rh_status_q,
+	# that would avoid spawning another daemon, it would try to
+	# reactivate the VGs.
+	stop && start
+}
 
 # See how we were called.
 case "$1" in
   start)
 	start
 	rtrn=$?
-	[ $rtrn = 0 ] && touch $LOCK_FILE
 	;;
 
   stop)
 	stop
 	rtrn=$?
-	[ $rtrn = 0 ] && rm -f $LOCK_FILE
 	;;
 
-  restart)
-	if stop
-	then
-		wait_for_finish
-		start
-	fi 
+  restart|force-reload)
+	restart
 	rtrn=$?
 	;;
 
+  condrestart|try-restart)
+	rh_status_q || exit 0
+	restart
+	rtrn=$? 
+	;;
+
   reload)
-	rh_status_q || exit 7
 	reload
+	rtrn=$?
 	;;
 
   status)
 	rh_status
 	rtrn=$?
-	vols=$( $LVDISPLAY -C --nohead 2> /dev/null | awk '($3 ~ /....a./) {print $1}' )
-	echo active volumes: ${vols:-"(none)"}
+	if [ $rtrn = 0 ]; then
+		cvgs="$(clustered_vgs)"
+		echo Active clustered Volume Groups: ${cvgs:-"(none)"}
+		clvs="$(clustered_lvs)"
+		echo Active clustered Logical Volumes: ${clvs:-"(none)"}
+	fi
 	;;
 
   *)
-	echo $"Usage: $0 {start|stop|restart|reload|status}"
+	echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+	rtrn=2
 	;;
 esac
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2009-05-29 18:34 snitzer
  0 siblings, 0 replies; 7+ messages in thread
From: snitzer @ 2009-05-29 18:34 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	snitzer@sourceware.org	2009-05-29 18:34:10

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Fix rpmlint in clvmd initscript
	
	Added missing LSB stanza lines.
	Added reload capability.
	Remaining warning (incoherent-init-script-name) is not relevant.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1132&r2=1.1133
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.2&r2=1.3

--- LVM2/WHATS_NEW	2009/05/28 01:59:37	1.1132
+++ LVM2/WHATS_NEW	2009/05/29 18:34:10	1.1133
@@ -1,5 +1,6 @@
 Version 2.02.48 - 
 ===============================
+  Fix rpmlint in clvmd initscript
   When creating new LV, double-check that name is not already in use.
   Remove /dev/vgname/lvname symlink automatically if LV is no longer visible.
   Rename internal vorigin LV to match visible LV.
--- LVM2/scripts/clvmd_init_red_hat.in	2009/02/10 11:53:34	1.2
+++ LVM2/scripts/clvmd_init_red_hat.in	2009/05/29 18:34:10	1.3
@@ -6,7 +6,12 @@
 # For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
 #	       
 ### BEGIN INIT INFO
-# Provides: 
+# Provides: clvmd
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Clustered LVM Daemon
 ### END INIT INFO
 
 . /etc/init.d/functions
@@ -109,6 +114,19 @@
 	fi
 }
 
+reload() {
+	$DAEMON -R
+}
+
+rh_status() {
+	status $DAEMON
+}
+
+rh_status_q() {
+	rh_status >/dev/null 2>&1
+}
+
+
 rtrn=1
 
 # See how we were called.
@@ -134,15 +152,20 @@
 	rtrn=$?
 	;;
 
+  reload)
+	rh_status_q || exit 7
+	reload
+	;;
+
   status)
-	status $DAEMON
+	rh_status
 	rtrn=$?
 	vols=$( $LVDISPLAY -C --nohead 2> /dev/null | awk '($3 ~ /....a./) {print $1}' )
 	echo active volumes: ${vols:-"(none)"}
 	;;
 
   *)
-	echo $"Usage: $0 {start|stop|restart|status}"
+	echo $"Usage: $0 {start|stop|restart|reload|status}"
 	;;
 esac
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in
@ 2009-02-10 11:53 ccaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: ccaulfield @ 2009-02-10 11:53 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	ccaulfield@sourceware.org	2009-02-10 11:53:34

Modified files:
	.              : WHATS_NEW 
	scripts        : clvmd_init_red_hat.in 

Log message:
	Add option to /etc/sysconfig/cluster to select cluster type for clvmd.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1039&r2=1.1040
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/clvmd_init_red_hat.in.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/WHATS_NEW	2009/02/10 11:52:40	1.1039
+++ LVM2/WHATS_NEW	2009/02/10 11:53:33	1.1040
@@ -1,5 +1,6 @@
 Version 2.02.45 - 
 ===================================
+  Add option to /etc/sysconfig/cluster to select cluster type for clvmd.
   Allow clvmd to start up if its lockspace already exists.
   Separate PV label attributes which do not need parse metadata when reporting.
   Remove external dependency on the 'cut' command in fsadm.
--- LVM2/scripts/clvmd_init_red_hat.in	2008/11/19 20:14:24	1.1
+++ LVM2/scripts/clvmd_init_red_hat.in	2009/02/10 11:53:34	1.2
@@ -26,6 +26,8 @@
 
 [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
 
+[ -n "$CLVMD_CLUSTER_IFACE" ] && CLVMDOPTS="$CLVMDOPTS -I $CLVMD_CLUSTER_IFACE" 
+
 LOCK_FILE="/var/lock/subsys/$DAEMON"
 
 start()


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-12  9:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  9:15 LVM2 ./WHATS_NEW scripts/clvmd_init_red_hat.in fabbione
  -- strict thread matches above, loose matches on Subject: below --
2010-06-23 16:24 mbroz
2010-06-03 21:03 mbroz
2010-05-17  3:18 fabbione
2010-02-26 13:07 fabbione
2009-05-29 18:34 snitzer
2009-02-10 11:53 ccaulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).