Operating System - HP-UX
1755239 Members
4845 Online
108831 Solutions
New Discussion юеВ

Recover volume groups from storage after system corrupt

 
Nedved
Frequent Advisor

Recover volume groups from storage after system corrupt

Hi all,

Last day my HP-UX-v3 server was got crashed and my ignite tape also not working so again i installed v3 operating system nad now the system is come up.

now the problem is i already presented some 10 lun's to the server from my XP storage.
I configured lvm on those disks. is there any way to recover my Volume Groups along with LV & Data from the storage disks.

Need your help to solve this issue...

4 REPLIES 4
Matti_Kurkela
Honored Contributor

Re: Recover volume groups from storage after system corrupt

You can use the "vgimport" command to restore access to your VGs.

However, you must import one VG at a time, and you must know which LUNs belong to which VG.

Attached is a "getlvmid" script which can find the PVID and VGID from a LVM PV.

Example:
./getlvmid /dev/disk/disk2
/dev/disk/disk2 PVID = eb0784d24b081a24 (created on this host)
/dev/disk/disk2 VGID = eb0784d24b081a24 (created on this host)

You can run this on all your LUNs and look for groups of LUNs with matching VGIDs: the LUNs with the same VGID all belong to the same VG.

For example, once you know that disk1, disk2 and disk3 all belong to the same VG and none of the others do, run:

vgimport vg01 /dev/disk/disk1 /dev/disk/disk2 /dev/disk/disk3
vgchange -a y vg01

Once the VG is successfully imported and activated, you can mount its disks and look inside to identify their content. If you got the VG name wrong, just unmount, deactivate and export it, then re-import it using the correct name.

MK
MK
Nedved
Frequent Advisor

Re: Recover volume groups from storage after system corrupt

Hi MK,

whether i need to create group file before the vgimport command?

Thanks...
Robert-Jan Goossens
Honored Contributor

Re: Recover volume groups from storage after system corrupt

Yes, you will need to create the volume group directory and the group file before you can import the volume group.
Matti_Kurkela
Honored Contributor

Re: Recover volume groups from storage after system corrupt

Ordinarily I would agree with Robert-Jan Goossens... but you said this is a fresh install of HP-UX (11i I presume) v3.

In the recent 11iv3 releases there is a new LVM feature: the vgcreate/vgimport commands can automatically create the VG directory and the group file for you, if they don't already exist.

So, depending on how old your installation media kit was, your 11iv3 system might be able to auto-create the group file.

MK
MK