Operating System - HP-UX
1831211 Members
2664 Online
110021 Solutions
New Discussion

Re: two paths to the same disk?

 
Hanry Zhou
Super Advisor

two paths to the same disk?

I have two device files:
/dev/dsk/c6t11d3 and /dev/dsk/c9t3d3, and they both point to the same disk by two A5158A HBA cards. It is EMC Symmetrix disk.
1. I also did pvcreate on c6t11d3, now how do I add another device file c9t3d3 into the same vg01? I can't do the pvcreate on c9t3d3.
2. and how to setup one as primary path, another as 2ndary path?


none
11 REPLIES 11
Hai Nguyen_1
Honored Contributor

Re: two paths to the same disk?

Run:

# vgextend vg01 /dev/dsk/c9t3d3

Which will automatically add it as an alternate link.

Verify with:
# vgdisplay -v vg01 | grep -i alternate

Hai
Helen French
Honored Contributor

Re: two paths to the same disk?

You need to vgextend it to add the alternative (secondary) path:

# vgextend /dev/vg_name /dev/dsk/c9t3d3

System will say it's an alternative path and you can confirm it with:

# vgdisplay -v /dev/vg_name

Make sure you are using the right device file. Normally, only the controller number (c6, c9 etc) changes when having multiple paths.
Life is a promise, fulfill it!
Steven E. Protter
Exalted Contributor

Re: two paths to the same disk?

Its called PVLINKS.

Here are some tips on setup from someone who has done it.

Steven Farrelly

vgextend vgxx /dev/dsk/c1t0d0 /dev/dsk/c2t0d0
vgextend vgxx /dev/dsk/c1t0d1 /dev/dsk/c2t0d1
...
you do;
vgextend vgxx /dev/dsk/c1t0d0 /dev/dsk/c2t0d0
vgextend vgxx /dev/dsk/c2t0d1 /dev/dsk/c1t0d1

For more:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x950fc7912162e2428fba7a148bb49132,00.html

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd76cef70e827d711abdc0090277a778c,00.html&qt=PVLINKS&hit=17

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf4727e990647d4118fee0090279cd0f9,00.html&qt=PVLINKS&hit=9

http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2108595fae8bd711abdc0090277a778c,00.html&qt=PVLINKS&hit=1

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: two paths to the same disk?

Hi:

LVM alternate links are setup and manipulated at the volume group level. The first path associated with a particular physical disk during 'vgcreate' becomes its primary kink. Subsequent paths become alternate (secondary) links.

To create a volume group with one physical disk and two paths:

# vgcreate /dev/vgXX /dev/dsk/cXtYdZ

To *add* an alternate path:

# vgextend /dev/vgXX /dev/dsk/cXtYdZ

To swap a primary and secondary path:

# vgreduce /dev/vgXX /dev/dsk/cXtYdZ
# vgextend /dev/vgXX /dev/dsk/cXtYdZ

...where cXtYdZ is the *same* device file in both the 'vgreduce' *and* the 'vgextend'. This demotes the primary link and promotes the secondary link to a primary. The old primary link then becomes the new secondary link during rhe 'vgextend'.

Regards!

...JRF...
Jeff Schussele
Honored Contributor

Re: two paths to the same disk?

Hi Hanry,

Are you *sure* those are the same LUN?
They usually have the same t & d values & only different controller values.
I'd run the symminq command to verify they are indeed the same LUN.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Hai Nguyen_1
Honored Contributor

Re: two paths to the same disk?

Hanry,

To verify that the two device files actually points to the same disk, you can run:

# ioscan -funC disk

If the device files actually belong to the same disk, they should be shown next to each other.

Hai
Hanry Zhou
Super Advisor

Re: two paths to the same disk?

I's strange to me too.

I did echo "0x2008?4D" | adb /dev/dsk/c6d11d3 and /dev/dsk/c9t3d3 on both device, and got same output. I though that would verify I have the same disk.

I don't have symminq on this server.

Do I have to same t#d#, why?
In what case, I would have different t#d#?
none
Helen French
Honored Contributor

Re: two paths to the same disk?

Normally the number after "t" is the SCSI ID (or target ID) and the number after "d" is the LUN ID (or partition). So, when you access the same disk (or LUN on a disk array) through different controllers, only the "c" number changes.

You can confirm those with:
# ioscan -fn
# sam -> disk devices

Check the outputs and confirm you are pointing the same device.
Life is a promise, fulfill it!
Steve Post
Trusted Contributor

Re: two paths to the same disk?

I have an EMC disk array hooked to 3 unix systems. I am very careful to make sure I know which disk is called what on each system.

From EMC I got an excel spread sheet.
In the left columm is the EMC disk number.
Then the other columns hold the disk hardware name for it for each scsi interface and host.

example
c1 c8 c2
0A 3:4 6:0 5:3

This means EMC disk 0A is:
/dev/dsk/c1t3d4
/dev/dsk/c8t6d0
/dev/dsk/c2t5d3

When using the disk only ONE of these is used in the pvcreate command. The other disks are added to the volume group with vgextend.

IF you have EMC, you should also have the "inq" command. Do a man page on it. BETTER (and safer) YET, call EMC.

steve
Steve Post
Trusted Contributor

Re: two paths to the same disk?

ok ok. I should read some more of the forum before sending you a response.
Sorry about that.
You don't have syminq or whatever that is.
I have "inq".
There is some fancy,smancy symetric shell script that runs inq. All I remember the bugger doing is to list out the serial numbers of each EMC disk that is seen by the host.

The easy solution is to just call your EMC rep.

Angus Crome
Honored Contributor

Re: two paths to the same disk?

Those t# and d# are assignable throught the Symm configuration. EMC used to add 7 to the target ID (t#) for the alternate. That way you could easily maintain load-sharing across the two paths. It actually works great, until someone forgets to do it for some new disks. It then becomes a big pain to keep straight. I think that is why EMC stopped setting them up that way. Anyway, the short answer is, yes those numbers can be different.

If you are relatively sure that the disk is supposed to be seen by your machine, you can go ahead and try vgextending it. If it is your alternate, it will show up. If it isn't, it will either fail to extend (this is fine), or extend as another disk. In the latter case, just vgreduce it, and then try to figure out which one is actually your alternate. Under no circumstance should you run pvcreate on this volume until you are sure of what it is.
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown