[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence/agents/scsi fence_scsi_test.pl s ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	rohara sourceware org	2008-02-06 17:39:17

Modified files:
	fence/agents/scsi: fence_scsi_test.pl scsi_reserve 

Log message:
	BZ 431002 - Support for LVM stripes, mirrors.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/fence_scsi_test.pl.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.6.3&r2=1.1.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_reserve.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.6.11&r2=1.1.6.12

--- cluster/fence/agents/scsi/fence_scsi_test.pl	2007/03/06 19:09:11	1.1.6.3
+++ cluster/fence/agents/scsi/fence_scsi_test.pl	2008/02/06 17:39:17	1.1.6.4
@@ -98,13 +98,15 @@
 sub get_cluster_devices
 {
     my ($in, $out, $err);
-    my $cmd = "lvs --noheadings --separator : -o vg_attr,devices";
+
+    my $cmd = "vgs --config 'global { locking_type = 0 }'" .
+              "    --noheadings --separator : -o vg_attr,pv_name";
 
     my $pid = open3($in, $out, $err, $cmd) or die "$!\n";
 
     waitpid($pid, 0);
 
-    die "Error: unable to exec lvs command.\n" if WEXITSTATUS($?);
+    die "Error: unable to exec vgs command.\n" if WEXITSTATUS($?);
 
     while (<$out>)
     {
--- cluster/fence/agents/scsi/scsi_reserve	2007/11/08 17:00:44	1.1.6.11
+++ cluster/fence/agents/scsi/scsi_reserve	2008/02/06 17:39:17	1.1.6.12
@@ -16,9 +16,12 @@
 
 # get scsi devices that are part of clustered volumes
 #
-scsi_devices=$( lvs -o vg_attr,devices --noheadings \
-		| awk --posix ' $1 ~ /[-a-z]{5}c/ { print $2 } ' \
-		| sed -e 's/([0-9]*)//' | sort | uniq )
+
+# get physical volumes (devices) that are part of cluster volumes
+#
+scsi_devices=$( vgs --config 'global { locking_type = 0 }' \
+                    --noheadings -o vg_attr,pv_name 2> /dev/null \
+              | awk ' $1 ~ /.*c$/ { print $2 } ' )
 
 # if no scsi devices were found we can exit now
 #


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]