Operating System - HP-UX
1753365 Members
5586 Online
108792 Solutions
New Discussion юеВ

Check Primary and Alternate Link of PV

 
Arun Jain
Frequent Advisor

Check Primary and Alternate Link of PV

Hi All,

I have a HPUX server connected with IBM storage. I have a LUN ID with two paths.
How to check which is the primary and which is the alternate path before creating VG. Because after creating VG, I have to export it through map file and import on other server attached to same storage with LUN ID on two paths.

or

Does it matter in anyway if I choose any of the path to create the VG and extend the VG with another path.

Please suggest.
Arun
speak less say more
5 REPLIES 5
Suraj K Sankari
Honored Contributor

Re: Check Primary and Alternate Link of PV

Hi,
If you have any storege support or person around he can tell you which is primary and which is alternate path.

>>Does it matter in anyway if I choose any of the path to create the VG and extend the VG with another path

I think it will not giving any problem.

Suraj
R.K. #
Honored Contributor

Re: Check Primary and Alternate Link of PV

Hello Arun,

I think you can choose any path to create VG. It will all point to the same disk.

And for aletrnate Links:

After creating VG, try following:

# vgdisplay -v vg01
... ...
--- Physical volumes ---
PV Name /dev/dsk/c4t0d0
PV Name /dev/dsk/c5t0d0 Alternate Link
PV Status available
-----

# pvdisplay /dev/dsk/c4t1d0
--- Physical volumes ---
PV Name /dev/dsk/c4t1d0
PV Name /dev/dsk/c5t1d0 Alternate Link
VG Name /dev/vg01
PV Status available
-------


Hope this helps !

R.K.
Don't fix what ain't broke
SoorajCleris
Honored Contributor

Re: Check Primary and Alternate Link of PV

Does it matter in anyway if I choose any of the path to create the VG and extend the VG with another path.

If you are using PVlink

Ans: You may create the VG with one path and you can export the VG ( use switch s and m) and import in the same system. Which will add all your alternate patch to /etc/lvmtab automatically. If you do this, it is not required to do VG extend.

Warning for Users of PV Links with vgscan
If you have multiple physical paths to your disk devices, the vgscan command may cause
several side effects that may have an impact on your system.
├в ┬в vgscan may reverse the order of your primary and alternate links in the /etc/lvmtab
file.
├в ┬в Alternate links will be added to the /etc/lvmtab file even if they weren├в t configured in
the volume group initially.
├в ┬в Boot information may no longer be correct due to different order of disks in the new
/etc/lvmtab file.
In order to correct the above problems, do the following:
1. Use vgchange with -a option to activate all volume groups.
2. Use lvlnboot with -R option to correct boot information on disk.
3. Use vgreduce to reduce any alternate links that were added to the /etc/lvmtab file
by vgscan, but they were not needed.
4. Use the procedure on the slide to modify the order of the PV links in the /etc/lvmtab
file.
LVM Considerations
for Disk Arrays
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Sajjad Sahir
Honored Contributor

Re: Check Primary and Alternate Link of PV


it is not matter
but while u are creating physical volume
u should use pvcreate command not pvcreate -f command
if u are using pvcreate -f command
it will not ask u alternate link
if u are using pvcreate only without f
it will tell lun is already used. then u can check after that u can create. otherwise u will lose all data related to alternate link which one is already used

thanks and regards

Sajjad Sahir
R.K. #
Honored Contributor

Re: Check Primary and Alternate Link of PV

Hello Arun,

And one more thing:
Do not run pvcreate on the other devicefile. Remember that it points to the same disk and this disk has already been pvcreated.

Regds,
R.K.
Don't fix what ain't broke