FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 02-06-2008, 04:39 PM
 
Default 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=RH EL4&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 "$!
";

waitpid($pid, 0);

- die "Error: unable to exec lvs command.
" if WEXITSTATUS($?);
+ die "Error: unable to exec vgs command.
" 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
#
 

Thread Tools




All times are GMT. The time now is 11:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org