Script to check the SAN paths.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to check the SAN paths.
# 1  
Old 08-22-2011
Script to check the SAN paths.

Hello All,
We have a script which when run on the host gives us the status of the internal and SAN attached disks, its paths and other information. The output of which is as follows:

Code:
Nm DEVICE VEND PROD LunID SYM DevID DISKGROUP SIZE N E
----------------------------------------------------------------------------------------
1. cciss/c0d0 HP LOGICAL VOLUME N/A N/A N/A 68.33 1 1
2. sdb EMC SYMMETRIX 27 7300 251 app_DG 50.58 2 2
----------------------------------------------------------------------------------------
N =Number of Paths (NE =Not Enabled)
E =Number of Currently Enabled Paths

================================================== =======

The requirement now is to create another script which will check the SAN path status from the above script. If the no of Paths shows less than 1 for SAN disks, then I should get an alert that SAN path failed or if all the path is ok, then SAN path is ok.

Thanking in anticipation.

Regards

Last edited by pludi; 08-22-2011 at 09:25 AM..
# 2  
Old 08-22-2011
From the sample output you provided , which one gives the information about , whether the path is OK or not?

I'm sorry but not much clear with input and which columns to check.
# 3  
Old 08-22-2011
Hello Panyam,
Sorry if I have not been clear in my previous post. The script gives us a status of all the internal and external disks and also the no of paths visible to the disks. In the eg below, column N=Number of Paths and column E =Number of Currently Enabled Paths.

I would thus like to create a script which would extract the information of the above two parameters i.e. N and E. If the value is 2, it means successful and <2 means that all the paths are not available.This should be only for SAN disks.

Hope this helps.

Thanking in anticipation.
# 4  
Old 08-23-2011
So, what is the output you are expecting from your input(which you posted in your last post)?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris SAN Storage Multipath and Messages Check Script

Hi everybody, i am working on the new script , its job discover the Storage Env ( especially MultiPATH ) and FC cards for solaris 11 sparc systems for now.. script is seem working ( but may contain any mistakes or bug ) on the oracle Qlogic fc cards on Emc_VMAx systems and Solaris 11 Sparc_64... (0 Replies)
Discussion started by: ygemici
0 Replies

2. Shell Programming and Scripting

Is it possible to change paths inside a bash script?

i have some script with some paths inside it. The idea is to some files which is on desktop copy and move to another location. Problem is that inside script is similar to this: cp test1.zip /root/help/ because I allways have another zip files, does it possible to have some input which ask me... (18 Replies)
Discussion started by: tomislav91
18 Replies

3. UNIX for Advanced & Expert Users

Shell script to check the SAN dual path.

Hello, I would like to create a shell script which would check whether the hosts have SAN dual path or not. If yes, then I should get a success message, else should get a list of hosts on which SAN dual path is not working. Thanks.. (4 Replies)
Discussion started by: mahive
4 Replies

4. Shell Programming and Scripting

Unable to export Directory paths through Script

Following is the output of .profile file - $ cat /home/estdm2/.profile #!/bin/ksh set -o vi alias l="ls -ltr" umask 002 Following is the path setting script. $ cat DM_ENV_VARS_NEW.ksh #!/bin/ksh . /home/estdm2/.profile sEnv=$1 echo "We are in ${sEnv} environment" echo "STEP010... (3 Replies)
Discussion started by: sumeet
3 Replies

5. Red Hat

how do we check SAN storage?

Hello, I am using LINUX OS. I want to check what is the SAN storage size. How do i check this in server? Any help is really appreciated.. (3 Replies)
Discussion started by: govindts
3 Replies

6. Solaris

SAN - Hard loop / prefered paths - help

Hi all Right, Im a little bit thick when it comes to SAN :-) IVe got a dual port qlc in a solaris 10 server. Its all connected and I can see a number of disks. The SAN guy here has asked me about preferred paths, i.e. as the dual ports are connected to two fabrics, etc device will have 4... (2 Replies)
Discussion started by: sbk1972
2 Replies

7. Shell Programming and Scripting

Enabling a script to run in multiple paths

I have a script that i need to run from different paths. for example mypc/path1/path2/, mypc/path1/path2/path3/, and mypc/path1/path2/path3/path4 How do i set up that script so that it can execute in any of the above paths or how can i make it run on any path on my computer?? (5 Replies)
Discussion started by: dowell
5 Replies

8. Filesystems, Disks and Memory

Multiple Paths to SAN with LVM in Linux?

I'm setting up a CentOS 5 server that will be connected to an HP EVA4000. My previous experience is with an HP VA7400 and HP-UX. In HP-UX I can add "alternate paths" to a volume group in order to have redundant paths to the SAN via dual fiber channel HBAs just by either adding them with... (3 Replies)
Discussion started by: deckard
3 Replies

9. Solaris

Thoughts/experiences of SAN attaching V880 to EMC SAN

Hi everyone, I wonder if I can canvas any opinions or thoughts (good or bad) on SAN attaching a SUN V880/490 to an EMC Clarion SAN? At the moment the 880 is using 12 internal FC-AL disks as a db server and seems to be doing a pretty good job. It is not I/O, CPU or Memory constrained and the... (2 Replies)
Discussion started by: si_linux
2 Replies

10. Shell Programming and Scripting

Checking the valid paths in the shell script

Hi i am using a shell script for renaming the files and placing in the remote location(FTP) my code is: cd $1 day=$(date +%d) for i in `ls -1 BBW*` do last=`tail -1 $i` pat=`expr "$last" : '.*(\(.*\)).*'` pat=`echo $pat | sed 's/ /_/'` pat=$pat$day mv $i $pat rm -f $day done... (3 Replies)
Discussion started by: srivsn
3 Replies
Login or Register to Ask a Question