Operating System - HP-UX
1833252 Members
2697 Online
110051 Solutions
New Discussion

Recover Volume group info after boot disk crash.

 
SOLVED
Go to solution
Jack Daniels_1
Occasional Contributor

Recover Volume group info after boot disk crash.

We have a 2 node HP/UX 10.20 SG cluster. The boot disk failed on one of the node.So All packages were failed over to the other node.

After the disk was replaced, i couldn't bring up the system on the mirrored disk. After talking with HP, it was suggested to recover from make_recovery tape.Fortunately, i had done a make_recovery tape before shutting down. So, i was able to boot of the tape and recover everything in vg00.

However the /etc/lvmconf doesn't have the details about the other 15 shared VGs which are part of the cluster.

What is the safest/sure method to recover the VG information on this box before failing over the packages to the original setup.

The /etc/cmcluster directory is intact and the cmclconfig binary is the same as on the working node.

I am hoping that i wouldn't have to reconfigure the packages with the cmapplyconf.

Here is what i have planned.

1.On the working node,
#vgexport -m mapfile -v -p $VG_NAME
(preview mode)

2.Copy the map files to the failed node.

3.Shutdown the packages on the working node.

4.On the failed node,
Delete the lv device files from /dev/$VG_NAME
leaving just the group file.

5.On the failed node,
#vgimport -m mapfile /dev/$VG_NAME.
This will update /etc/lvmtab and create the device files for the LVs in /dev/$VG_NAME.

6.Join the failed node back to the cluster.

7.Startup the packages on the failed node and test.

Any suggestions/help would be greatly appreciated.

TIA
6 REPLIES 6
Jeff Machols
Esteemed Contributor

Re: Recover Volume group info after boot disk crash.

You are 100% right, doing the export and import is the best way to recover the LVM information. However I think you will have to run cmapplyconf -f to get the MC information on the failed node
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Recover Volume group info after boot disk crash.

Hi Jack,

You don't need to reconfigure the packages. You just need to import the volume groups and that should be enough apart from making sure the network configuration is restored properly.

**YOU DON'T NEED TO HALT THE CLUSTER/PACKAGE**

1. On the working node do

vgexport -p -s -m /tmp/vg##.map vg##

If you don't like -s, you can use -f

vgexport -p -m /tmp/vg##.map -f /tmp/vg##.disks vg##

Copy vg##.map and/or vg##.disks to the other system.

2. vgexport all the vg##s except the local volume groups like vg00 etc.,

3. Create volume group directories and group device files

mkdir /dev/vg##
mknod /dev/vg##/group c 64 0x0?0000

Make sure the group numbers match on both the systems. (not mandatory but a good practice)

4. Import the volume groups

vgimport -s -v -m /tmp/vg##.map vg##

If you don't like to use -s, you can use -f option to import. Make sure you edit vg##.disks and modify the C# numbers to match the hardware on the failed node.

5. Once all the VGs are imported, you can safely bring up the node as /etc/cmcluster has already been restored through mak_recovery.

cmrunnode (on the failed node)

6. Do a cmviewcl -v and make sure everything looks ok.

7. Some people edit /etc/lvmrc and disable the volume groups from being checked during the startup. Not mandatory as vgchange -c y takes care of these volume groups.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
harry d brown jr
Honored Contributor

Re: Recover Volume group info after boot disk crash.

JD,

When you say you did a "make_recovery" before you shutdown, did you include the -A option??


If not, you will need to restore the other parts of vg00

live free or die
harry
Live Free or Die
Jack Daniels_1
Occasional Contributor

Re: Recover Volume group info after boot disk crash.

thanks for the feedback.

The make_recovery tape was created with -A option. So my entire vg00 got restored.

Sridhar,

Can i import VG information on the failed node when the volume groups are still active on the other node. Don't i need to vgchange to deactivate them on the other node before doing the import on the failed node.

TIA
Jeff Machols
Esteemed Contributor

Re: Recover Volume group info after boot disk crash.

In order to export a volume group it must be deactivated.
G. Vrijhoeven
Honored Contributor

Re: Recover Volume group info after boot disk crash.

Hi,

No.
You can import volume groups that are active on an other node. You can not activate them.

Gideon