Operating System - HP-UX
1827483 Members
2142 Online
109965 Solutions
New Discussion

Hardware paths to the same disk

 
SOLVED
Go to solution
Derek Brown
Frequent Advisor

Hardware paths to the same disk

Hi, I wonder if anyone can help .

What's the easiest way to find out all of the h/w paths and associated device names to a given disk (saying which is primary and alternatives) without using SAM ?

I know that ioscan (# ioscan -knfC disk) gives all paths to a disk but it doesn't appear to indicate where 2 different h/w paths are physically connected to the same disk.

Many thanks for any help.
6 REPLIES 6
Eric Antunes
Honored Contributor

Re: Hardware paths to the same disk

Hi Derek,

Use lvdisplay. For exemple, to see witch disks are in my lvol9, I do:

#lvdisplay -v /dev/vg00/lvol9|more

Regards,

Eric
Each and every day is a good day to learn.
G. Vrijhoeven
Honored Contributor

Re: Hardware paths to the same disk

Hi,

If the disks belong to a volumegroup:
# vgdisplay -v vg
Displays multiple links.

The xpinfo command ( for XP's) displays device files associated with a lun.

HTH,

Gideon

Stuart Abramson
Trusted Contributor

Re: Hardware paths to the same disk

On EMC disks the commands:

inq
syminq
symdev list
sympd list

Show the disks by Disk Serial Number, so you can sort it and see the "duplicate paths".

In general, internal disks, which are usually HP, IBM or Seagates, don't have internal serial numbers that I remember. Or not unique ones..

You might try "diskinfo". He might have options that show "disk serial numbers".
Sanjay_6
Honored Contributor
Solution

Re: Hardware paths to the same disk

Hi Derek,

We use this script to check that all the disk in the VGs are having their alternate paths configured. This script uses /etc/lvmtab to check. disks not configured into /etc/lvmtab will not be included.

Hope this helps.

Regds
TwoProc
Honored Contributor

Re: Hardware paths to the same disk

Derek, given a PV name- I've come up with a script that reads the disk and comes up with a number that is always unique - providing a "pvcreate" has been run. I've discovered this out mainly by trial error...
Run this over a fair set of pvs and make sure that you also think it's reliable. I've found that with this, I can quickly see which pvs are pointing to the same disk.

#
# @(#) get_pv_id - get the unique id of a physical volume
# John Joubert
#
if [ $# -lt 1 ]; then
echo "ERROR- no physical volume given"
echo "ex. get_pv_id c10t2d4"
echo ""
exit 1
fi
if [ -x /dev/dsk/$1 ]
then
od -N 20000 /dev/dsk/$1 | head -3 | tail -1 | cut -f 10 -d " "
else
echo "ERROR- invalid physical volume given"
echo "ex. get_pv_id c10t2d4"
echo ""
exit 2
fi

You should be able to cobble up a script which calls this one, and makes a list, and sorts by the disk id, and gives the pvname next to it...

sample...

02304 /dev/dsk/c34t3d1
02304 /dev/dsk/c21t3d1

...

If you need this written for you I can generate that pretty quickly, just let me know if you need.
We are the people our parents warned us about --Jimmy Buffett
Derek Brown
Frequent Advisor

Re: Hardware paths to the same disk

all sorted