Operating System - HP-UX
1830945 Members
2067 Online
110017 Solutions
New Discussion

Need a script to verify multiple paths to SAN attached disks ?

 
SOLVED
Go to solution
Sammy_2
Super Advisor

Need a script to verify multiple paths to SAN attached disks ?

On Sun Solaris servers (running veritas), we have script we run to check dual paths before doing any SAN zone changes.(see attached perl script). In this script, If dual path,(script gives no output). if single path, then error message is displayed on the screen.

Is there a way in HPUNIX to check if the disk has single path and print it on the screen with a error message ?
good judgement comes from experience and experience comes from bad judgement.
7 REPLIES 7
Sammy_2
Super Advisor

Re: Need a script to verify multiple paths to SAN attached disks ?

We are using LVM and not veritas on HPUX 11.11


# vgdisplay apps
--- Physical volumes ---
PV Name /dev/dsk/c8t0d1
PV Name /dev/dsk/c9t0d1 Alternate Link


PV Status available
Total PE 17260
Free PE 5918
good judgement comes from experience and experience comes from bad judgement.
Marvin Strong
Honored Contributor

Re: Need a script to verify multiple paths to SAN attached disks ?

Check this thread out:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=888182

should give you what you need.
Mel Burslan
Honored Contributor
Solution

Re: Need a script to verify multiple paths to SAN attached disks ?

The answer is, it depends. I am not sure what exactly your script is doing but it looks like it is doing a filesystem check of some sorts using veritas filesystem. The actual litmus test of dual fibrechannel connectivity goes thru the additional commands introduced by your sam device. So, there is no one single command to test this. If you are running EMC, it will be something, if it is XP-xxxx array or VA-xxxx it will be all be different from each other.

From the volume manager perspective, if you are running in an LVM environment, you can do something like this:

for VG in `strings /etc/lvmtab | grep vg | grep -v vg00`
do
MainPathCount=`vgdisplay -v $VG | grep "PV Name" | grep -v Alternate | wc -l`
AltrPathCount=`vgdisplay -v $VG | grep "PV Name" | grep Alternate | wc -l`

if [ ${MainPathCount} != ${AltrPathCount} ]
then
echo "$VG has single path LUNs"
fi

done


this procedure has gaping holes in it as it does not do any error checks and it assumes your volume group names has character string "vg" in them. But it is just to give you an idea.

The correct way of doing it is via SAM related commands by mapping out devices and parsing the output.
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: Need a script to verify multiple paths to SAN attached disks ?

the last statement in my previous post should have read SAN not "SAM".. sorry.

also what kind of SAN storage do you have atached to this server ? EMC ? XP ? VA ?
________________________________
UNIX because I majored in cryptology...
Sammy_2
Super Advisor

Re: Need a script to verify multiple paths to SAN attached disks ?

In this case we are using EMC 8830. Also, have STK and Hitachi frames connected to hp servers. Don't think SAN admin know how to do from his end. They run the script I attached for sun and wanted something similiar for hpux.
good judgement comes from experience and experience comes from bad judgement.
rariasn
Honored Contributor

Re: Need a script to verify multiple paths to SAN attached disks ?

Hi,

anaya:/usr/symcli/bin#symcli


Symmetrix Command Line Interface (SYMCLI) Version V5.4.1.0 (Edit Level: 538)
built with SYMAPI Version V5.4.1.0 (Edit Level: 538)

If yes,

anaya:/usr/symcli/bin#symdev list|more

Salud
generic_1
Respected Contributor

Re: Need a script to verify multiple paths to SAN attached disks ?

Well I guess this is a good way to test if you have good coders and the apps wait on I/O like they are supposed to LOL.