Operating System - HP-UX
1821246 Members
2712 Online
109632 Solutions
New Discussion юеВ

Re-creating vg's and lv's after make_recovery

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

Re-creating vg's and lv's after make_recovery

Our Unix server has quite a few vg's and lv's. We are currently working on our Disaster Recovery plan. Question is; How can i go about recreating all volume groups and logical volumes if my server would fail and would have to do a Make Recovery. Do i need to recreate by hand, make a script or is there a simple way i could grab a config file that would put these back if i had to recover to a similar system. All of the vg's are on other disks that are mirrored etc....any help would be appriciated greatly.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor
Solution

Re: Re-creating vg's and lv's after make_recovery

Hi Chris:

I just finished a D/R test last month. I use(d) make_tape_recovery for my vg00 restoration. I would construct basic scripts that compose skeletal volume groups and logical volumes ahread of time. You will not be able to provide the actual disk device (/dev/dsk/xXtYdZ) files ahead of time since you probably will not know the actual hardware available until the time of your test, but you can go a long way to shortening and documenting the process by building scripts to create these entities.

Once volume groups and logical volumes are created and mounted, you can load your data accordingly.

In a D/R scenario, I personally am not too worried about creating mirrors for data; at least not until I am fully up and running.

It will take about 45-minutes just to load the golden image from the Ignite tape. All displayed messages will be written to /var/opt/ignite/local/install.log. Do *not* dispair if at the end you see a block-letter "FAILURE" message. The Ignite recovery will attempt to process the non-zero volume groups and fail due to differing/missing devices files in the vg map files it's using.

I'd make sure to use the latest Ignite software:

http://www.software.hp.com/products/IUX/index.html

Use the new 'make_tape_recovery' which replaces 'make_recovery'. The command I use for doing this is:

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

Note that the "-I" in 'make_tape_recovery' causes the recovery process to be interactive and is the replacement for the "-i" option in the old 'make_recovery'. If you use the '-I' option, booting from tape will automatically offer the interactive Ignite session.

Choose the Advanced Installation mode and on the FileSystem tab note the "Additional Tasks" option. Selecting this will offer you the ability to change the physical vg attributes and set things like 'largefiles' etc.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Re-creating vg's and lv's after make_recovery

If you are talking about recovering your system locally, back onto the same system, then all of your VGs and LVs should come back automatically because all of you /dev/vg* directories are there on your make_recovery tape. I reinstalled an OS on my machine at one point (went to larger boot drives) and I didn't have a problem with the VGs I had. They all came back automatically and worked like a charm.

However, if you are paranoid, you could do the following:

vgexport -m mapfile_name -v -p -s /dev/vg??

Do this for all your VGs on the system and make sure the mapfile is somewhere where it will get backed up by the make_recovery.

Then afte_r you restore the system from tape and need to recover the VGs, you do a:

mkdir /dev/vg??
mknod c 64 0x0?0000 /dev/vg??/group
vgimport -m mapfile_name -s -v /dev/vg??

Do this for all of your VGs. The -s option with vgexport puts a VGID at the beginning of each mapfile. Using this with vgimport allows you to NOT put in all device names for the VG. It will scan the devices on your system for ones that have that VGID and import them for you.
Chris Fadrowski
Super Advisor

Re: Re-creating vg's and lv's after make_recovery

Are you sure that ALL vg info is on the tape. From what i can tell, if you are going back to the same system or a different system, the Make_recovery tape only holds what is on vg00. That is it. If you system fails (fire, water) etc... you would need to run the MR tape then recreate the vg's lv's and so on then restore from tape (omniback) or what ever you use. This is the way i understand it. Just need to confirm this.
Patrick Wallek
Honored Contributor

Re: Re-creating vg's and lv's after make_recovery

The VG information that is on the tape is what is stored in /dev/vg?/ and /etc (lvmtab, lvmpvg, etc.).

This way, if you lose a root disk, but still have all other disks from all other VGs attached, and have to restore from tape, then all your VGs will be seen.

If you have to use your tape to bring up another system, then you will have to recreate all your VGs from scratch.

It just depends on which scenario you have.
James R. Ferguson
Acclaimed Contributor

Re: Re-creating vg's and lv's after make_recovery

Hi Chris:

The point I was trying to reinforce was that while the volume group map files are present on the make_recovery (make_tape_recovery) tape, the specificiation of the actual device files in their map files may not match the hardware at the time of the restoration.

Specifically, if you are recovering at a remote disaster recovery site (as I was recently), the Ignite recovery process for importing the volume groups would *fail* because of mismatched (missing) device files. If I were recovering on the same hardware at home, all device and configuration files whould be the same (including /etc/lvmtab), and no manual intervention would be necessary.

...JRF...
Chris Fadrowski
Super Advisor

Re: Re-creating vg's and lv's after make_recovery

Thank you to both of you for your help. it looks as if i may need two different DR procedures. The only thing that i may need to find out is why if restoring to the same box, all the vg info comes back. How does ignite know to restore vg01, 02 and so on by itself. I understand that on a different system the hardware paths will be different. But on the same box it would seem that i would need to recreate them as well with a script or by hand even though the hardware paths will be the same.