Operating System - HP-UX
1832087 Members
2781 Online
110037 Solutions
New Discussion

Recreating volume group with serviceguard

 
SOLVED
Go to solution
Deborah Davies
Occasional Advisor

Recreating volume group with serviceguard

Hello,

I have the following situation on a serviceguard cluster - both servers are 11.00 running A.11.07 version.

It's a 2 node cluster, package A runs on node 1, package B and C on node 2. A few weeks ago, another sys admin added a 36GB disk into the volume group associated with package A, but seems to have missed the error message generated. Hence, because the volume group was initially created with a 18GB disk, only 18GB of the new disk is available (Max PE per PV problem). And no-one has noticed until now...

So, I need to recreate the volume group. I've read some posts regarding using vgexport/vgimport with the -s flag - would this work in this situation? Should I do a vgcreate or can I just recreate the group file then vgimport. Would appreciate any advice, especially from anyone who has done this before.

Thanks in advance,

Deborah Davies.
4 REPLIES 4
Sanjay_6
Honored Contributor

Re: Recreating volume group with serviceguard

Hi,

You can take a complete backup of all lv's in the vg and then destroy the old vg and recreate the same. Make sure you follow the steps that might be required to add this recreated vg to be added to SG cluster.

Hope this helps.

Regds
Sundar_7
Honored Contributor
Solution

Re: Recreating volume group with serviceguard

Hi Deborah,

vgexport/vgimport is not an alternative to vgcreate.

But the usual practice is to create the volume group using vgcreate on one node and then vgexport/vgimport to the other nodes of the cluster which should be able to activate the volume group

On a nutshell, this is how I would do ti

1) Backup the data
2) Shutdown the package
3) activate the VG vgchange -a e /dev/vg01
4) remove all the logical volumes lvremove
5) vgreduce all the logical volumes but one
6) vgremove /dev/vg01
7) # mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x??0000
8) create the VG with the apporirate MAX PE
use -e option with vgcreate
9) recreate the lvs and FS
10) mount the FS and restore the data from the backup
11) deactivate the VG and start the package

On Node1

# vgexport -p -v -s -m /root/vg01.map /dev/vg01

On node2

# rcp node1:/root/vg01.map /root
# vgexport /dev/vg01
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x??0000
# vgimport -v -s -m /root/vg01.map /dev/vg01

- Done

Sundar
Learn What to do ,How to do and more importantly When to do ?
Deborah Davies
Occasional Advisor

Re: Recreating volume group with serviceguard

Thanks Sanjay and Sundar for the responses.

Sundar, I have used your plan as a basis for my own - thanks for spending the time on this - it's just what I wanted.

Deborah.
Sundar_7
Honored Contributor

Re: Recreating volume group with serviceguard

One more thing to watch out for is the alternate links in the adaptive node. -s option lets the LVM probe all the disks with the specific VGID. So if you have huge number of disks that are part of the VG and you have alternate links too then you cannot really be sure that primary and alternate PV links are going to be in the same order when it is imported in the node.

Once the vg is imported back, review the PV links order and if they dont match the primary node then remove and add the PVs back again to get them straight.
Learn What to do ,How to do and more importantly When to do ?