Operating System - HP-UX
1834406 Members
1719 Online
110067 Solutions
New Discussion

How to tell if device files pointing to same disk on both nodes ?

 
SOLVED
Go to solution
Sammy_2
Super Advisor

How to tell if device files pointing to same disk on both nodes ?

Hpux 11.0 Nclass server
1) SAN admin assigned (supposedly) shared disks to 2 nodes (ops cluster).
ioscan -fnC disk reveals:
Server 1:device names are c20t0d0 thru d7
Server 2: device names are c19t0d0 thru d7.
How can I be sure c19 and c20 are same disk ? And if they are how to make device names c19 on both nodes ?
good judgement comes from experience and experience comes from bad judgement.
4 REPLIES 4
RAC_1
Honored Contributor

Re: How to tell if device files pointing to same disk on both nodes ?

I do diskinfo on two disks. Unless you have secure path/auto path, there is no sureshot way to tell it. What SAN is this?? Can you query (using SAN management commands) those disk??
Rather than changing config files, it would be better to c19 to c20. The ioconfig chnage procedure.

How to change instance number for LAN, disks, tape:
-----------------------------------------------------------------
1. ioscan -kf | grep -e INTERFACE -e DEVICE | grep -v target | awk
'{printf %s %s %sn,,,}' > infile

2. vi infile ( we exchange instance numbers for all devices which we are interested )

3. mv infile /stand/infile

4. mv /stand/ioconfig /stand/ioconfig.sav
mv /etc/ioconfig /etc/ioconfig.sav

5. shutdown -ry 0

6. interrupt the boot process, boot pri, interact with ISL.

7. ISL> hpux -is

8. cd /stand
/sbin/ioinit -c
/sbin/ioinit -f infile

9. reboot

For example if we only want to do it for tape our invile will look like:

10/4/8.3.0 tape 0

10/12/5.0.0 tape 3

In cluster environment is better use only -f option -c can choose already made changes. For more information see man ioinit.
There is no substitute to HARDWORK
lowster
Honored Contributor

Re: How to tell if device files pointing to same disk on both nodes ?

I have a funny feeling, but they may be on different one's

Chris
John Payne_2
Honored Contributor
Solution

Re: How to tell if device files pointing to same disk on both nodes ?

You can use the following:

echo "0x2008?4D" |adb /dev/dsk/c20t0d0

echo "0x2008?4D" |adb /dev/dsk/c19t0d0

If the output from these 2 are EXACTLY the same, they are the same. If they differ in any way, they are not.

John
Spoon!!!!
TwoProc
Honored Contributor

Re: How to tell if device files pointing to same disk on both nodes ?

#
# @(#) get_pv_id - get the unique id of a physical volume
#
#
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

This is what I use to check to see if I'm dealing with the same disk or not.
We are the people our parents warned us about --Jimmy Buffett