Operating System - HP-UX
1837035 Members
3156 Online
110111 Solutions
New Discussion

can vgimport if the OS crashed...??

 
SOLVED
Go to solution
Tony Escujuri_1
Advisor

can vgimport if the OS crashed...??

I have created non-vg00 maps of all the volume groups can I use them if the OS crashed and I wasn't able to vgexport the volume groups.

I want to create a script that would get all these maps if ever there was a full scale OS crash. Is this possible??

We are running 11.0 systems.

Let me know if more information is required.

Thanks and Best Regards,
Tony Escujuri
I don't know very much!
5 REPLIES 5
George Abraham_1
Regular Advisor
Solution

Re: can vgimport if the OS crashed...??

hai Tony

You can use these maps.. It is a good thing you have created the non-vg00 maps also...I am not sure what you mean by full OS crash... If you have to reload the OS then also these maps will be handy..

cheers
George
keep smiling
Michael Tully
Honored Contributor

Re: can vgimport if the OS crashed...??

Hi Tony,

Everyday, on all of my production servers I run a cron job which does a 'vgexport' in preview mode. This is basically a non-desrtuctive way to save your information. I have it saving to a directory in my vg00 and it also gets backed up to tape.
Here's an example

vgexport -m myvg1.mapfile -p -v /dev/myvg1

Yes, you could get the information back, because the actual LVM information lives in the header of each disk. As long as you have the disks, you can do this. It is even possible to do it without having your mapfiles. Over the last year on a few occasions we have actually moved servers aside
wheeled another in and imported each of the volume groups using these exported map files.

Michael
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: can vgimport if the OS crashed...??

Hi Tony:

If you routinely make Ignite recovery tapes, this will happen automatically.

'make_tape_recovery' will not only create maps for non-vg00 volumes, but attempt to 'vgimport' them if you re-ignite your server.

To capture all of vg00 (and mapfiles for all other volume groups), do:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: can vgimport if the OS crashed...??

Yes, you can do an import of VGs, even if they have not been exported. This is commonly done when you upgrade HP-UX by doing a cold install, then import your data disks back.

Hopefully you have the map files stored on tape so they are accessable to you if the machine crashes.

A good way to create you mapfiles without actually exporting the VG's:

# vgexport -m mapfilename -p -v -s vg??

This will create your mapfile with the VGID at the top of the file.

When you want to import:

#mkdir /dev/vg??

# mknod /dev/vg??/group c 3 0x0?0000

# vgimport -m mapfilename -v -s vg??

Using the '-s' option creates the map file so that you DON'T have to specify the disk device files of the VG you are importing.

Bill Hassell
Honored Contributor

Re: can vgimport if the OS crashed...??

And just a note in case you don't have anyu mapfiles: vgimport will create the volume group without them! If the names of the lvols are defaulted (ie, lvol1, lvol2, etc) then it's a three step process:

mkdir /dev/vgXXX
mknod /dev/vgXXX/group c 64 0x0Y0000
vgimport -v /dev/vgXXX /dev/dsk/

That's it. This method works fine with good knowledge of which disks constitute the original volume group. For complex situations (many volume groups and lots of disks), always create a mapfile for each VG but use the vgexport options: vgexport -s -p -v -m vgXXX (the -p just previews, creates the map but does not export the VG)

The -s option adds the VGID value which helps vgimport locate the correct disks.automatically.


Bill Hassell, sysadmin