Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

MC/SG Add additional PV

Go to solution
Super Advisor

MC/SG Add additional PV


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.
Rajeev Tyagi
Valued Contributor

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/ /dev/vg1

Copy this map file /tmp/ on passive node.
#rcp /tmp/ 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/ /dev/vg1
Noel Miranda
Frequent Advisor

Re: MC/SG Add additional PV


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.
Henk Geurts
Esteemed Contributor

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.

Super Advisor

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

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*
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 / /dev/

Copy the map file to your adoptive node.

#rcp / :/

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 / /dev/

Now U do change and check for the active status.


Ralf Seefeldt
Valued Contributor

Re: MC/SG Add additional PV


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

Gerhard Roets
Esteemed Contributor

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.

Klaas D. Eenkhoorn
Regular Advisor

Re: MC/SG Add additional PV


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 ---------


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

rm /tmp/$
rm /tmp/$
vgexport -p -m /tmp/$ -f /tmp/$ $1
scp /tmp/$ $2:/tmp
scp /tmp/$ $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/$ -f /tmp/$ $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.

Klaas D. Eenkhoorn
Regular Advisor

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.

Matthew Ghofrani
Regular Advisor

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