Operating System - HP-UX
1833053 Members
2380 Online
110049 Solutions
New Discussion

Re: How to set up an alternate link (path).

 
E. Vodegel
Occasional Advisor

How to set up an alternate link (path).

Hi,

How can I setup an alternate link on HPux 11.00? I have in an volume group (/dev/vg_cbp02) four physical volumes:
/dev/dsk/c9t2d0, c10t2d0, c11t2d0 and c12t2d0.

I want that PV c10t2d0 will become the alternate path for c9t2d0 and PV c12t2d0 for c10t2d0.

Can someone help me with the syntax?

Thanks,
Erwin
7 REPLIES 7
Carsten Krege
Honored Contributor

Re: How to set up an alternate link (path).

> I want that PV c10t2d0 will become the
> alternate path for c9t2d0 and PV c12t2d0 for
> c10t2d0.

??


Alternate links are alternate hardware paths to the identical disks. If you have four distinct physical disk mechanism they cannot become alternate paths to each other.

For your example: if c9t2d0 is the identical disk as c10t2d0 you would simply do the following, when c10t2d0 is already configured in the VG.

# vgextend /dev/vgXX /dev/dsk/c9t2d0

LVM will see that c9t2d0 has the same physical volume id as c10t2d0 and will recognize it as alternate link and display this in the vgdisplay -v output.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
David Navarro
Respected Contributor

Re: How to set up an alternate link (path).

Hi Erwin,
Just do:

First you need vg_cbp02 with primary PV's, that is

vgcreate /dev/vg_cbp02 /dev/dsk/c9t2d0
vgextend /dev/vg_cbp02 /dev/dsk/c10t2d0

Then extend tha same disk, but using the alternate path device file.

vgextend /dev/vg_cbp02 /dev/dsk/c11t2d0 /dev/dsk/c12t2d0
I think you make a mistake with device files and you want to configure c11t2d0 as alternate link of c9t2d0.


Bill McNAMARA_1
Honored Contributor

Re: How to set up an alternate link (path).

the order of volume group creation is important.

Seeing as the vg is already created you need to play with the vgextend and vgreduce command to configure correct pri/alt path settings.

The order that the strings /etc/lvmtab displays is the order of path selection on bootup.

Lets say your /etc/lvmtab looks like this
/dev/vg_cbp02
/dev/dsk/c9t2d0
/dev/dsk/c10t2d0
/dev/dsk/c11t2d0
/dev/dsk/c12t2d0

Assuming that
PV 1
c9t2d0 is a prefered primary link
and c10t2d0 is corresponding link

PV 2
c11t2d0 is preferred primary
and c12t2d0 is preferred alternate
Can someone help me with the syntax?

According to the lvmtab, on vg activation, you read in the order you see:
In our example
/dev/dsk/c9t2d0 will be primary
/dev/dsk/c10t2d0 will be alternate
/dev/dsk/c11t2d0 will be primary
/dev/dsk/c12t2d0 will be alternate

Good, no need to do anything.. but

Lets say your /etc/lvmtab looks like this
/dev/vg_cbp02
/dev/dsk/c10t2d0
/dev/dsk/c9t2d0
/dev/dsk/c11t2d0
/dev/dsk/c12t2d0

/dev/dsk/c10t2d0 will be primary
/dev/dsk/c9t2d0 will be alternate
/dev/dsk/c11t2d0 will be primary
/dev/dsk/c12t2d0 will be alternate

But you want the c10t2d0 and c9t2d0 the other way around.

Do this

vgreduce /dev/vg_cbp02 /dev/dsk/c10t2d0

You lvmtab will now look like this
/dev/vg_cbp02
/dev/dsk/c9t2d0 will be primary
/dev/dsk/c11t2d0 will be primary
/dev/dsk/c12t2d0 will be alternate

Note at this point there is a SPOF, c9t2d0 has no ha alternate.. but it is the default primary. Add the alternate:

vgextend /dev/vg_cbp02 /dev/dsk/c10t2d0
You lvmtab will now look like this
/dev/vg_cbp02
/dev/dsk/c9t2d0 will be primary 1
/dev/dsk/c11t2d0 will be primary 2
/dev/dsk/c12t2d0 will be alternate 2
/dev/dsk/c10t2d0 will be alternate 1

if you really want to get it looking nice
vgreduce /dev/vg_cbp02 /dev/dsk/c11t2d0
vgextend /dev/vg_cbp02 /dev/dsk/c11t2d0
vgreduce /dev/vg_cbp02 /dev/dsk/c12t2d0
vgextend /dev/vg_cbp02 /dev/dsk/c10t2d0

Your lvmtab will now look like this
/dev/vg_cbp02
/dev/dsk/c9t2d0 will be primary 1
/dev/dsk/c10t2d0 will be alternate 1
/dev/dsk/c11t2d0 will be primary 2
/dev/dsk/c12t2d0 will be alternate 2

vgdisplay -v vg_cbp02
tells you the dynamic current Alternates and which pvs device files point to the same PV, but it does not tell you in which order lvm wanted pri and secondary.

This you configure in vgcreation and extension time... and analyse with strings /etc/lvmtab

This can all be done online.. lvm will typically use the pvdisplay -v /dev/rdsk/c11t2d0 | grep -i timeout
value as the pv switch time. Use pvchange -t 20 /dev/rdsk to change default io timeout for switching.

Later,
Bill
It works for me (tm)
linuxfan
Honored Contributor

Re: How to set up an alternate link (path).

Hi Erwin,

Are the four physical volumes already part of a Volume Group. If you have redundant links to the same physical disk (either dual SCSI or fibre links to the same disk) then you can set up alternate links.
To check what is the configuration now, one of the things you can do is , do a vgdisplay -v and look at the bottom of the output, if you see "Alternate Link" then you already have alternate links set up but if the disks are four unique disks then you cannot configure them as alternate path, but what you can do is setup mirroring which will mirror the data on one disk(eg c10t2d0) to another(eg c9t2d0). Not sure what you are trying to achieve here.

Another utility i found to be extremely useful is inq. (This is a EMC utility to determine the serial numbers of the disk, you can easily tell by the serial number if you sharing disks)
You can get the utility at
ftp://ftp.emc.com/pub/symm3000/inquiry/v4.3.0.0

-HTH
I am RU
They think they know but don't. At least I know I don't know - Socrates
Deshpande Prashant
Honored Contributor

Re: How to set up an alternate link (path).

HI
As long as the these 4 device paths refer to same two disks you can extend the VG on the device paths and LVM will understand it as alt. links.

If /dev/dsk/c9t2d0 & /dev/dsk/c10t2d0 are your primary paths and same disks are addressed by
/dev/dsk/c11t2d0 & /dev/dsk/c12t2d0 you can use vgextend /dev/dsk/c11t2d0
vgextend /dev/dsk/c12t2d0

Thanks.
Prashant Deshpande.


Take it as it comes.
Sridhar Bhaskarla
Honored Contributor

Re: How to set up an alternate link (path).

Ervin,

If you are sure they are your alternate paths, you don't have to mess around with your volume group configuration.

Use the pvchange command

pvchange -s /dev/dsk/cxtxdx

cxtxdx will become primary. You can use this logic to change paths. Make sure you put this in a file. Next time when the system reboots or a path fails, you may have to run this again.

Hope this helps,
Sri
You may be disappointed if you fail, but you are doomed if you don't try
Oleg Zieaev_1
Regular Advisor

Re: How to set up an alternate link (path).

Assuming you have hardware configured that c9t2d0 and c10t2d0 point to the same physical disk (and the same for the other pair) do from root :
vgcreate /dev/vg_cbp02 /dev/dsk/c9t2d0 /dev/dsk/c10t2d0 /dev/dsk/c11t2d0 /dev/dsk/c12t2d0


Professionals will prevail ...