Operating System - HP-UX
1833462 Members
2870 Online
110052 Solutions
New Discussion

Restoring LVM structure at DR

 
SOLVED
Go to solution
trpjr1
Advisor

Restoring LVM structure at DR

Hi All,

I have a very large DB server with lots of VGs. I am looking for a way to recover the LVM structures to a server at the DR site. I use ignite to recover vg00 then usually go about creating the other filesystems via command line because there is no info on the disk regarding the lvm structures. I'm looking for something similar to the AIX savevg and restvg commands.

Thanks in advance for any info you can provide.
Tommy P.
5 REPLIES 5
Ismail Azad
Esteemed Contributor

Re: Restoring LVM structure at DR

Hi Tommy,

Well of what I have understood of savevg and restvg , I really think the command you are looking for in the HPUX flavor is vgcfgrestore which is used to recreate LVM data structures and is one of the LVM commands that is normally associated with the "recovery process". Well the filesystems should be recovered from your preferred backup utility whether it is of the "heterogenous variety" as in tar or cpio or if you want to go the HPUX way, fbackup/frecover would be the way to go. {This is the way I know}

pax is also a good option. At filesystem level in terms of data one way I know is turn to your backup utility.

There around 19 commands in LVM that are used which the "LVM subsystem" as such backups with a command internally running which as a matter of fact can also be executed manually called as vgcfgbackup and ofcourse the term "backup" is always in turn eventually related to the word "restore" and hence you see the command in the initial part of this post.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
N,Vipin
Frequent Advisor

Re: Restoring LVM structure at DR

Hi Tommy,

I assume that you have a storage at the DR site and data is intact.

Check out the possibility of vgexport and vgimport.

http://docs.hp.com/en/B235590681/vgexport.1M.html

http://docs.hp.com/en/B235590681/vgimport.1M.html

It works if the DR site server detected the storage LUNs in the same hardware path as in the primary site.

trpjr1
Advisor

Re: Restoring LVM structure at DR

Thank you both for the responses.

Let me see if I can explain better.
We have a large DB server with 50 VGs and each has six disks (a couple odd balls have more) and one lvol for database Fses. After I ignite the server I have to:

pvcreate all the new disk zoned to the server
mkdir /dev/vg## should already there
mknod ...
vgcreate vg## PV PV ...
lvcreate
newfs
edit the fstab and mount FSes

start restoring with legato...ugh!

All the disks are new to the system and do not have any LVM info on them. (so no dice with vgcfgrestore or vgimport) I clean up all the /dev/vg1## so I can start over. I am trying to find a better way to create all the VGs as opposed to doing it manually.

Thanks again
Tommy P.
James R. Ferguson
Acclaimed Contributor
Solution

Re: Restoring LVM structure at DR

Hi Tommy:

> I am trying to find a better way to create all the VGs as opposed to doing it manually.

What I have always done is build a simple script to re-creation my LVM configuration using 'pvcreate', 'vgcreate', 'lvcreate' and 'mkfs' commands. Since the device names may not be known until you go to deploy the script, simply stub in strings like '/dev/rdsk/cXtYdZ' or '/dev/rdisk/diskN' and modify the template before you need to use it.

Regards!

...JRF...
trpjr1
Advisor

Re: Restoring LVM structure at DR

thanks for your input everyone :)