Operating System - HP-UX
1752788 Members
5776 Online
108789 Solutions
New Discussion юеВ

Re: MC/SG Add additional PV

 
SOLVED
Go to solution
kholikt
Super Advisor

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
10 REPLIES 10
Rajeev Tyagi
Valued Contributor
Solution

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
Noel Miranda
Frequent Advisor

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

regards.
kholikt
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
abc
nsjayasundar
Advisor

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
Ralf Seefeldt
Valued Contributor

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

HTH
Gerhard
Klaas D. Eenkhoorn
Regular Advisor

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

Kl@@s