LVM and VxVM

vgreduce vgextend for alternate link

 
kholikt
Super Advisor

vgreduce vgextend for alternate link

Hi,

I noticed that some of path in my pvlink is not very good. I intend to some vgextend / vgreduce to change the vg path. What is the procedure for MC/SG and standard volume?
abc
8 REPLIES 8
kholikt
Super Advisor

Re: vgreduce vgextend for alternate link

Apart from this, each device got 4 paths, How could I tell those paths are refer to the same device?

Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 0 0/0/3/0.0.0.0 sdisk CLAIMED DEVICE _NEC DVD+-RW ND-6650A
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 2 0/1/1/1.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t0d0 /dev/rdsk/c3t0d0
disk 3 0/2/1/0.1.0.0.0.0.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d0 /dev/rdsk/c4t0d0
disk 5 0/2/1/0.1.0.0.0.0.2 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d2 /dev/rdsk/c4t0d2
disk 6 0/2/1/0.1.0.0.0.0.3 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d3 /dev/rdsk/c4t0d3
disk 7 0/2/1/0.1.0.0.0.0.4 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d4 /dev/rdsk/c4t0d4
disk 8 0/2/1/0.1.0.0.0.0.5 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d5 /dev/rdsk/c4t0d5
disk 10 0/2/1/0.1.0.0.0.0.7 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t0d7 /dev/rdsk/c4t0d7
disk 11 0/2/1/0.1.0.0.0.1.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t1d0 /dev/rdsk/c4t1d0
disk 12 0/2/1/0.1.0.0.0.1.1 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t1d1 /dev/rdsk/c4t1d1
disk 43 0/2/1/0.1.0.0.0.1.2 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t1d2 /dev/rdsk/c4t1d2
disk 44 0/2/1/0.1.0.0.0.1.3 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t1d3 /dev/rdsk/c4t1d3
disk 45 0/2/1/0.1.0.0.0.1.4 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c4t1d4 /dev/rdsk/c4t1d4
disk 57 0/2/1/0.1.0.0.0.2.0 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c4t2d0 /dev/rdsk/c4t2d0
disk 60 0/2/1/0.1.0.0.0.2.1 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c4t2d1 /dev/rdsk/c4t2d1
disk 13 0/2/1/0.1.1.0.0.0.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c6t0d0 /dev/rdsk/c6t0d0
disk 14 0/2/1/0.1.1.0.0.0.1 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c6t0d1 /dev/rdsk/c6t0d1
disk 19 0/2/1/0.1.1.0.0.0.6 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c6t0d6 /dev/rdsk/c6t0d6
disk 21 0/2/1/0.1.1.0.0.1.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c6t1d0 /dev/rdsk/c6t1d0
disk 52 0/2/1/0.1.1.0.0.1.5 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c6t1d5 /dev/rdsk/c6t1d5
disk 53 0/2/1/0.1.1.0.0.1.6 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c6t1d6 /dev/rdsk/c6t1d6
disk 54 0/2/1/0.1.1.0.0.1.7 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c6t1d7 /dev/rdsk/c6t1d7
disk 55 0/2/1/0.1.1.0.0.2.0 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c6t2d0 /dev/rdsk/c6t2d0
disk 23 0/6/1/0.1.0.0.0.0.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d0 /dev/rdsk/c10t0d0
disk 25 0/6/1/0.1.0.0.0.0.2 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d2 /dev/rdsk/c10t0d2
disk 26 0/6/1/0.1.0.0.0.0.3 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d3 /dev/rdsk/c10t0d3
disk 27 0/6/1/0.1.0.0.0.0.4 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d4 /dev/rdsk/c10t0d4
disk 28 0/6/1/0.1.0.0.0.0.5 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d5 /dev/rdsk/c10t0d5
disk 30 0/6/1/0.1.0.0.0.0.7 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t0d7 /dev/rdsk/c10t0d7
disk 31 0/6/1/0.1.0.0.0.1.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t1d0 /dev/rdsk/c10t1d0
disk 32 0/6/1/0.1.0.0.0.1.1 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t1d1 /dev/rdsk/c10t1d1
disk 46 0/6/1/0.1.0.0.0.1.2 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t1d2 /dev/rdsk/c10t1d2
disk 47 0/6/1/0.1.0.0.0.1.3 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t1d3 /dev/rdsk/c10t1d3
disk 48 0/6/1/0.1.0.0.0.1.4 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c10t1d4 /dev/rdsk/c10t1d4
disk 58 0/6/1/0.1.0.0.0.2.0 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c10t2d0 /dev/rdsk/c10t2d0
disk 59 0/6/1/0.1.0.0.0.2.1 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c10t2d1 /dev/rdsk/c10t2d1
disk 33 0/6/1/0.1.1.0.0.0.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c12t0d0 /dev/rdsk/c12t0d0
disk 34 0/6/1/0.1.1.0.0.0.1 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c12t0d1 /dev/rdsk/c12t0d1
disk 39 0/6/1/0.1.1.0.0.0.6 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c12t0d6 /dev/rdsk/c12t0d6
disk 41 0/6/1/0.1.1.0.0.1.0 sdisk CLAIMED DEVICE DGC CX500WDR10
/dev/dsk/c12t1d0 /dev/rdsk/c12t1d0
disk 49 0/6/1/0.1.1.0.0.1.5 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c12t1d5 /dev/rdsk/c12t1d5
disk 50 0/6/1/0.1.1.0.0.1.6 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c12t1d6 /dev/rdsk/c12t1d6
disk 51 0/6/1/0.1.1.0.0.1.7 sdisk CLAIMED DEVICE DGC CX500WD
/dev/dsk/c12t1d7 /dev/rdsk/c12t1d7
disk 56 0/6/1/0.1.1.0.0.2.0 sdisk CLAIMED DEVICE DGC CX500WDR5
/dev/dsk/c12t2d0 /dev/rdsk/c12t2d0
abc
Mridul Shrivastava
Honored Contributor

Re: vgreduce vgextend for alternate link

You need to check the vgdisplay -v output to find the alternate path details..

As far as changing the primary and alternate path is concerned, If you vgreduce the primary link then alternate will become the primary and then you can add the other one as alternate using vgextend.
Time has a wonderful way of weeding out the trivial
Geoff Wild
Honored Contributor

Re: vgreduce vgextend for alternate link

Download and install the inq utility (free) from EMC - unless you alread have it - that will tell you easily which devices point to the same disk.

Basically, disks with the same "SER NUM" are the same physical disk (LUN).

For SG, you can gdreduce/vgextend on the fly...

What do you mean "some of path in my pvlink is not very good"???

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
kholikt
Super Advisor

Re: vgreduce vgextend for alternate link

Hi Geoff,

I just a little bit confuse for MC/SG configuration, if I modify the pvlink by including alternate link or order, will this setting carried over to the secondary node when the cluster failover. Do I need to export the vg as map file and use the map file to re-create the VG on secondary node
abc
Doug O'Leary
Honored Contributor

Re: vgreduce vgextend for alternate link

Hey;

ID'ing pvlinked disks is, in my opinion, one of the HP's weakest points in a generally very strong disk management field. This is my pet peeve so excuse the minor soap box tirade.

I actually destroyed a 200 gig database many moons ago because another admin neglected to add the pvlinked disks to a VG when he created it.

Without some detailed knowledge, there is very little you can do to identify pvlinked disks with built in OS commands.

To prevent this type of situation from recurring, I wrote the attached script. It scans the pv headers looking for the vg ids. Output is something like:

# ./id_lv_disks
/dev/dsk/c0t10d0 vg00 synced
/dev/dsk/c0t8d0 vg00 synced
/dev/dsk/c2t0d0 Unassigned
/dev/dsk/c2t10d5 vgsap1 synced
/dev/dsk/c2t10d6 vgsap1 synced
/dev/dsk/c2t10d7 vgsap1 synced
/dev/dsk/c2t11d0 vgsap2 synced
/dev/dsk/c2t11d1 vgsapdata1 synced
/dev/dsk/c2t11d2 vgsapdata1 synced
/dev/dsk/c2t11d3 vgsapdata1 synced
/dev/dsk/c2t11d4 vgsapdata1 synced
/dev/dsk/c2t11d5 vgsapdata1 synced
/dev/dsk/c2t11d6 vgsapdata1 synced
/dev/dsk/c2t11d7 vgsapdata1 synced
/dev/dsk/c2t12d0 vgsapdata1 synced
/dev/dsk/c2t12d1 vgsapdata2 synced
/dev/dsk/c2t12d2 vgsapdata2 synced
/dev/dsk/c2t6d1 vgsapdata1 synced
/dev/dsk/c3t0d0 vgsap1 synced
/dev/dsk/c5t0d0 Unassigned
/dev/dsk/c5t10d5 vgsap1 synced
/dev/dsk/c5t10d6 vgsap1 synced
/dev/dsk/c5t10d7 vgsap1 synced
/dev/dsk/c5t11d0 vgsap2 synced
/dev/dsk/c5t11d1 vgsapdata1 synced
/dev/dsk/c5t11d2 vgsapdata1 synced
/dev/dsk/c5t11d3 vgsapdata1 synced
/dev/dsk/c5t11d4 vgsapdata1 synced
/dev/dsk/c5t11d5 vgsapdata1 synced
/dev/dsk/c5t11d6 vgsapdata1 synced
/dev/dsk/c5t11d7 vgsapdata1 synced
/dev/dsk/c5t12d0 vgsapdata1 synced
/dev/dsk/c5t12d1 vgsapdata2 synced
/dev/dsk/c5t12d2 vgsapdata2 synced
/dev/dsk/c5t6d1 vgsapdata1 Alt link not assigned to vg!
/dev/dsk/c6t0d0 vgsap1 synced


As you can see, I apparently have a disk I need to examine - need to talk to my cohorts!

From your initial post, it looks like you're trying to change which link is primary and which is alternate as a method of manually balancing the load. If that's accurate, use pvchange -[Ss] to do that. Examine the man page for more details.

To answer your last question, when MCSG imports the VG, it will import all the disks associated with the VG. It invariably chooses one path as the primary so if you want to have some type of load balance after a failover, you'll have to run the pvchange commands again.

Short answer, though, is MCSG will get all the pvs and pvlinks associated with the VG on import.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
kholikt
Super Advisor

Re: vgreduce vgextend for alternate link

actually my task is the current MC/SG volume created with only two PVLINK, it should have four PVLINKs instead of two. I need to vgextend the other two NEW LINK into the exisiting VG plus vgreduce to re-organize the path in order. Basically I just wanna to know is this the same way for standalone and MC/SG clustered node
abc
Doug O'Leary
Honored Contributor

Re: vgreduce vgextend for alternate link

Hey,

Yes, you simply vgextend the 2 additional pvs. Use pvchange to alter the order of the links though, you don't have to vgreduce/vgextend multiple times.

pvchange -S n ${pv}
pvchange -s ${pref_hw_path} ${pv}

And, to reiterate, any order you specify will be gone when the package fails over. MCSG will choose one path as the primary and use that - but, all PVs will be part of the VG on the adoptive node.

In order to set up the load balancing, you'll need to rerun the pvchange commands.

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Vivek_Pendse
Valued Contributor

Re: vgreduce vgextend for alternate link

For MCSG, for lvextend there is no need to do the settings in SG files.
But for new lv or vg add'n you will need to refine the pkg & cntl & lvmtab files across all nodes in cluster.
Thanks,
Vivek