Operating System - HP-UX
1753500 Members
4334 Online
108794 Solutions
New Discussion юеВ

how to determine if two device file is pointing to same disk?

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

how to determine if two device file is pointing to same disk?

I have two HBA, and two paths to the same disk. Without looking into the physical connections, how do I determine whether or not two paths(device files) are connecting to same disk drives?

Thanks,
none
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: how to determine if two device file is pointing to same disk?

Other than looking at the path itself (which may not tell you anything) you could always use the "make the disk light up" technique. Do a dd on the two disks and either look for the LED indicating activity or use Glance to determine if there is increased activity.

dd if=/dev/rdsk/c?t?d? of =/dev/null bs=2048k


Pete

Pete
malay boy
Trusted Contributor

Re: how to determine if two device file is pointing to same disk?

Yap Pete right.dd will do the trick.Work like a charm for me.


regards
mB
There are three person in my team-Me ,myself and I.
Geoff Wild
Honored Contributor

Re: how to determine if two device file is pointing to same disk?

Another way is, if you add them to a volume group - 1 of them will show up as the "alternate link" - then you know it's the same disk.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sanjiv Sharma_1
Honored Contributor

Re: how to determine if two device file is pointing to same disk?

Hi,

I too am using dd for this and it works fine provided I am able to see the disk LED.

Some high end disk array like XP512 etc... We cannot see the disk/lun.

Here we need to run the utility which comes with the Disk Array. Like xpinfo for xp512 and check the Ldev number. Same disk will have two device files but the same LDEV number and hence we can say that they are the same disk/lun.

Thanks,

Everything is possible
Suhas_2
Regular Advisor

Re: how to determine if two device file is pointing to same disk?

Hi Henry,
Are these disks from EMC Symmetrix ?.. if so, you can install "syminq" or "inq" utility from EMC on the server. By executing the "inq" command, you can make out whether two device files are pointing to same disk or not. In EMC symmetrix there is a qnique number by which each disk is identified. The inq o/p would show you those details.
Never say "Die"
Duncan Webbe
New Member

Re: how to determine if two device file is pointing to same disk?

Just use the lssf command on your device files (/dev/dsk) to determine which of them have the same target and lun information.
Massimo Bianchi
Honored Contributor
Solution

Re: how to determine if two device file is pointing to same disk?

Hi,
here is my favorite trick:

read the PVID.

What is PVID ?

Is a unique identifier given by the kernel when you initialize it (aka pvcreate)

How do I find the PVID ?




echo 0x2008?2X | adb /dev/dsk/cxtxdx | expand | tr -d " " | sed "s/2008:/PVID /"


if two PVID are the same, then the disks are the same.

HTH,
Massimo

Dietmar Konermann
Honored Contributor

Re: how to determine if two device file is pointing to same disk?

Some time ago I wrote a little shell script that actually reads LVM/VxVM disk's identifiers and groups information in a table. Works also for multiple systems... just pass a list of hostnames as arguments to the script.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
V. V. Ravi Kumar_1
Respected Contributor

Re: how to determine if two device file is pointing to same disk?

hi,
if the disk is configured in a VG, u can get the info using pvdisplay . it will display primary and alternate links.

Regards
Never Say No