cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rohara@sourceware.org <rohara@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/fence/agents/scsi fence_scsi_test.pl s ...
Date: 6 Feb 2008 17:39:17 -0000	[thread overview]
Message-ID: <20080206173917.9822.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	rohara at 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
 #



                 reply	other threads:[~2008-02-06 17:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080206173917.9822.qmail@sourceware.org \
    --to=rohara@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).