Re: MC/SG Add additional PV (143 Views)
Reply
Super Advisor
kholikt
Posts: 545
Registered: ‎02-12-2001
Message 1 of 11 (143 Views)
Accepted Solution

MC/SG Add additional PV

Hi,

I have MC/SG Cluster connected to a VA7400. We have just created a couple of new LUN on the VA recently. I need to extend some of the cluster volume group. May I know what is the proper step to vgextend a cluster volume group. My cluster is running in active/passive mode.
abc
Valued Contributor
Rajeev Tyagi
Posts: 89
Registered: ‎11-05-2000
Message 2 of 11 (143 Views)

Re: MC/SG Add additional PV

You can extend volume group with new disk and logical volumes on active node. Then do vgexport in preview mode as follows on active node.

#vgexport -s -p -m -v /tmp/vg1.map /dev/vg1

Copy this map file /tmp/vg1.map on passive node.
#rcp /tmp/vg1.map passive_node:/tmp

Now on passive node do

#vgexport /dev/vg1
#mkdir /dev/vg1
#remsh active_node ll /dev/vg1/group
crw-r--r-- 1 root sys 64 0x070000 Jun 12 2001 /dev/vg1/group
#mknod /dev/vg1/group c 64 0x070000
#vgimport -s -m /tmp/vg1.map /dev/vg1
Frequent Advisor
Noel Miranda
Posts: 64
Registered: ‎09-01-2000
Message 3 of 11 (143 Views)

Re: MC/SG Add additional PV

vgextend

eg: vgextend /dev/vg01 /dev/dsk/c1t1d0

You have to create a physical volume before running the above command.

pvcreate /dev/rdsk/c1t1d0

The r in the rdsk implies that you have to use the character device.
Esteemed Contributor
Henk Geurts
Posts: 299
Registered: ‎08-18-2002
Message 4 of 11 (143 Views)

Re: MC/SG Add additional PV

just an minor explanation on Rajeev's reply:
it's important to keep the minor numbers of the VG identical on both clusternodes.
therefor do a
ll of the /dev/vgname/group on the active node and use that output (in his example 0x070000)for the mknod command on the passive node.

regards.
Super Advisor
kholikt
Posts: 545
Registered: ‎02-12-2001
Message 5 of 11 (143 Views)

Re: MC/SG Add additional PV

Just wondering do I need to do pvcreate on the standby node as well or just the primary node alone
abc
Advisor
nsjayasundar
Posts: 35
Registered: ‎11-29-2004
Message 6 of 11 (143 Views)

Re: MC/SG Add additional PV

Dear Kholikt,

No need of creating PV in Standbynode.

The Full procedure is given below.

In active node,

#pvcretae /dev/rdsk/c*t*d*
#vgextend
Now U do the LV modification as u need. Create new LV's or extend the existing LV's as u need.

The craete map file for vg
#vgexport -p -s -m -v /vg.map /dev/

Copy the map file to your adoptive node.

#rcp /vg.map :/vg.map

Now the export the vg in adoptive node.

#vgexport /dev/
#mkdir /dev/
#mknod C 64 0x0*0000
Here replace the * with the same minor in the primary node for this vg.
#vgimport -s -m /vg.map /dev/

Now U do change and check for the active status.

Cheers.

Sundar
Valued Contributor
Ralf Seefeldt
Posts: 167
Registered: ‎04-02-2001
Message 7 of 11 (143 Views)

Re: MC/SG Add additional PV

Hi.

Just a remark for creation volumegroups.
For security reasons, do:
vg=vg99
chmod 755 /dev/${vg}
chmod 600 /dev/${vg}/group

Regards
Ralf
Respected Contributor
Gerhard Roets
Posts: 428
Registered: ‎02-20-2001
Message 8 of 11 (143 Views)

Re: MC/SG Add additional PV

Hi Kholikt

You must not pvcreate on the passive nodes. Especially if there is already data on the discs ... it might lead to a fun restore.

pvcreate's function is to initialize the VG structures on the physical medium.

HTH
Gerhard
Regular Advisor
Klaas D. Eenkhoorn
Posts: 108
Registered: ‎11-04-2002
Message 9 of 11 (143 Views)

Re: MC/SG Add additional PV

Hi,

After adding the PV to the volumegroup on the active cluster node and doing everything that needs to be done with that volume, like creating LV's, mirrors etc., when i'm finished i use the following script to distribute the new volumeconfiguration to all the other passive nodes:

------- start of script ---------

#!/bin/ksh

# Script for moving volumegroups to other machines
# $1 -> vgname
# $2 -> to machine

rm /tmp/$1.map
rm /tmp/$1.dev
vgexport -p -m /tmp/$1.map -f /tmp/$1.dev $1
scp /tmp/$1.map $2:/tmp
scp /tmp/$1.dev $2:/tmp
ssh $2 "/usr/sbin/vgexport $1"
ssh $2 "/usr/bin/mkdir /dev/$1"
MAJMIN=$(ls -l /dev/$1/group|awk '{print $6}')
ssh $2 "/usr/sbin/mknod /dev/$1/group c 64 $MAJMIN"
ssh $2 "/usr/sbin/vgimport -m /tmp/$1.map -f /tmp/$1.dev $1"
scp /etc/lvmpvg $2:/etc

----------- end of script -----------

Important, this is only possable when all the devicenames for the disks are the same !!

change 'scp and ssh' in 'rcp and rsh' if needed.

Kl@@s
Regular Advisor
Klaas D. Eenkhoorn
Posts: 108
Registered: ‎11-04-2002
Message 10 of 11 (143 Views)

Re: MC/SG Add additional PV

By the way,

If you have multiple paths from the system to the disks in the VA, i mean multiple HBA's in the system that see the same disks in the VA, do not forget to add these paths as alternate paths to the disk.
This is important if you do not use AutoPath or SecurePath software from HP.

This is a perfect way to do cheap but effective loadbalancing over multiple fibers to the VA and get a high available storage environment.

Kl@@s
Regular Advisor
Matthew Ghofrani
Posts: 142
Registered: ‎07-16-1996
Message 11 of 11 (142 Views)

Re: MC/SG Add additional PV

A few other general things to consider before any of the above, so life would be easy:
1- Make sure your VG can accept extra disks for expansion (meaning MAX PV)
2- Make sure you can do "pvcreate -f /dev/rdsk/c..t..d.." on both nodes and all the paths.(This checks that all nodes can see the shared disks before you go any where!) and no harm is done by doing it again from the mother node.
3- Make sure all nodes can handle vgcreate and are not limited by "MAX VG"
4- Make sure your add on disks are the same size (do not buy the story that yes it is ok) it will come back to hunt you.
5- If any of the LVs were stripped, you need to do vgextend with multiples of disks previously involved in stripping.
6- Always do make an ignite boot recovery before messing with VGs or Kernel changes.

Yours Truly Matthew Ghofrani, Beth Israel Hospital, Boston MA
Life is full of bugs
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.