Operating System - HP-UX
1832932 Members
3065 Online
110048 Solutions
New Discussion

Re: Pvdisplay - Alternate Disks

 
SOLVED
Go to solution
sudhapage
Regular Advisor

Pvdisplay - Alternate Disks

Hi all,

output of pvdisplay and vgdisplay showing physical disks are alternate links. What is the meaning of alternate links?

Now I am going to remove one physical volume in one volume group, because of this alternate link any problem will come?

Below i have pasted the output of vgdisplay & pvdisplay.

Kindly suggest.

--- Physical volumes ---

PV Name /dev/dsk/c3t2d0
PV Name /dev/dsk/c4t2d0 Alternate Link
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t3d0
PV Name /dev/dsk/c4t3d0 Alternate Link
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t5d0
PV Name /dev/dsk/c4t5d0 Alternate Link
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t6d0
PV Name /dev/dsk/c4t6d0 Alternate Link
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t7d0
PV Name /dev/dsk/c4t7d0 Alternate Link
PV Status available
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c3t8d0
PV Name /dev/dsk/c4t8d0 Alternate Link
PV Status available
Total PE 4340
Free PE 65
Autoswitch On


Regards,
Sudhakaran.K
6 REPLIES 6
RAC_1
Honored Contributor

Re: Pvdisplay - Alternate Disks

You can safely take pv out of VG. No problems. The alternate links are for failover. If one path to the disk is lost, then other path takes over.
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Pvdisplay - Alternate Disks

Alternate links come into play with disk arrays. There are multiple paths that can access the same LUN. The idea is if the primary path fails (bad cable, bad HBA, bad array controller,... ) the LUN is still accessible from the host via the alternate link(s). LVM shifts to the alternate link after a timeout period. If you want to remove a PV from a VG then you run vgreduce and remove the alternate link(s). If you vgreduce and remove the primary path an alternate link becomes the primary path and the PV is not actually removed. So do the vgreduce, removing all the alternate link(s) first and finally do a vgreduce specifying the primary path the PV is then removed. Of course, you must also make sure that no LVOL's are using any part of the PV before attempting the vgreduce. Man vgreduce for details.
If it ain't broke, I can fix that.
sudhapage
Regular Advisor

Re: Pvdisplay - Alternate Disks

Hi Clay & RAC,

I just got confused with your answers, because RAC you have mentioned no problem. But Clay mentioned first we have to do vgreduce. What should I follow?

The problem is i have to remove one pv from vg03, then add it to vg01.

Vg01 having root,stand,swap,opt,var,tmp,usr filesystems. For adding this PV to vg01, i have to do in single user mode? or runlevel 3? how i can do?

If all the things is ok, then i have to configure anything for this alternate link?

Please suggest

Regards,
Sudhakaran.K
freddy_21
Respected Contributor
Solution

Re: Pvdisplay - Alternate Disks

alternate link means: you have one disk, but assign to 2 fc cards.

The advantage is: when one fc card problem or cable have problem, your data still can access with alternate link.


ex:
PV Name /dev/dsk/c3t8d0
PV Name /dev/dsk/c4t8d0

both of disk have one phisical disk but the disk using 2 path. one at card number 3 and the other at card number 4.

regarding for remove one disk from vg configuration, all of your disk have data.
ex:
PV Name /dev/dsk/c3t8d0
PV Name /dev/dsk/c4t8d0 Alternate Link
PV Status available
Total PE 4340
Free PE 65
Autoswitch On

disk c3t8d0 have 4340 PE, and have free size 65 PE.

if you still want remove the disk:
1. check contain of our disk
pvdisplay -v /dev/c0t2d0|more
example:
anakin:/>pvgdisplay -v /dev/dsk/c0t2d0|more
sh: pvgdisplay: not found.
anakin:/>pvdisplay -v /dev/dsk/c0t2d0|more
--- Physical volumes ---
PV Name /dev/dsk/c0t2d0
VG Name /dev/vg02
PV Status available
Allocatable yes
VGDA 2
Cur LV 13
PE Size (Mbytes) 8
Total PE 17499
Free PE 524
Allocated PE 16975
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg02/lvol1 12500 12500
/dev/vg02/lvol2 1875 1875
/dev/vg02/lvol3 2000 2000
/dev/vg02/lvol4 188 188
/dev/vg02/lvol5 2 2
/dev/vg02/primary 38 38
/dev/vg02/pstore 7 7
/dev/vg02/mirror 38 38
/dev/vg02/lvol9 13 13
/dev/vg02/lvol10 13 13
/dev/vg02/lvol11 13 13
/dev/vg02/lvol12 13 13
/dev/vg02/lvol13 275 275

2. make sure all logical group unused. when you remove the disk, all logical volume at the disk will be gone. and you will loose your data.

3. If you already sure about that
You can remove logical volume at the disk
lvremove /dev/vg02/lvol13
lvremove /dev/vg02/lvol1
etc etc etc....

4.make sure with
pvdisplay -v /dev/dsk/c0t2d0 all logical volume already gone
after that, remove disk from vg configuration.
vgreduce /dev/vg02 /dev/dsk/c0t2d0 /dev/dsk/cxtydz

note: cxtydz is the alternate disk from your disk.

after that you can us that disk.



good luck

freddy





sudhapage
Regular Advisor

Re: Pvdisplay - Alternate Disks

Really thanks freddy

Once again thanks for your clear way of explanation.

Regards,
Sudhakaran.K
freddy_21
Respected Contributor

Re: Pvdisplay - Alternate Disks

welcome. I glad you can understand with my explaination. To be honest my english not good. But I am happy if someone can understand my explaination. ;p


Good Luck... :))


Thanks
Freddy