Volume group import

 
Nyck_1
Super Advisor

Volume group import

Hello,

 

We have an old hp-ux server which decided to fail and will not boot anymore, I had a check and it appears that the root drive is duff and there was no mirror. This particular server had an HP disk array connected to it so my remote hands person disconnected the array from the failed server and re-connected it to a working server. I have run an ioscan -funC disk and can see it so I'm wondering if there is a way to re-import the volume groups and logical volumes that are on there from the old server to the new server?

 

Regards

 

Nick

 

4 REPLIES 4
Ajay Agarwal
Frequent Advisor

Re: Volume group import

If the disks are intact,  you should be able to recover the data by following the below steps:

 

# vgimport vgxxx /dev/disk/diskxxx

 

# vgchange -a y vgxxx

 

# vgdisplay -v vgxxx

 

# mkdir /testROOT

 

# mount /dev/vgxxx/lvol3 /testROOT

 

You may have to run fsck before mounting the LVs.

 

Hope this works.

Nyck_1
Super Advisor

Re: Volume group import

Thanks for the quick reply :-)

 

How can I find out which disks were being used in the original volume group on the failed server?

Patrick Wallek
Honored Contributor

Re: Volume group import

There is no real easy way to determine which disks were a part of which VG on the old server.

 

A very tedious way is to use the 'xd' command and read the headers of each disk to find the VG id number of the VG that the disk was in.  Each disk that was in the same VG will have the same VG id number recorded on the header.

 

The command to run is:

 

# xd -An -j8200 -N16 -tx <disk device file>

 

For example:

# xd -An -j8200 -N16 -tx /dev/rdsk/c1t2d0
                69ea86f7        503542b4        69ea86f7        503543e0

 

The VG id number is the 4th field in the output.  So in this case the VG id is 503543e0.  If I were to run this against numerous disks, and found another with the same VG id, then it is very likely that they are part of the same VG.

 

 

Once you know which disks are have the same VG id, you can then vgimport that set of disks into a VG on the current system.

 

If this is an older system (ie, running HP-UX 11.23 or earlier) then you will need to use the /dev/dsk and /dev/rdsk rather than the /dev/disk that the person above mentioned.

 

 

Torsten.
Acclaimed Contributor

Re: Volume group import

Another helpful command is

# vgscan -p -v

this scans the disks in preview mode, no changes will be done.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!