1833513 Members
3399 Online
110061 Solutions
New Discussion

Re: vgimport

 
khilari
Regular Advisor

vgimport

Hi Guys, i wanted to ask regarding vgimport.
Lets say,on a system having vg01 with 4 external disks and their total size of all 4 is 100 gigs even.
Now, i go on a disaster recovery site with an ignite image which has the configuration og vg01. and i run
vgimport -v /dev/vg01 /dev/dsk/c2t2d0 > c2t2d0 is one disk worth 100 gigs.
Now, by doing so will i be able to restore vg01 data. Since it now has 100 gigs as well like the production box. And the lv's under it also have space.
So, will this work in a disaster recovery situation... Will that update /etc/lvmtab.
Thanks
6 REPLIES 6
Olivier Masse
Honored Contributor

Re: vgimport

I don't think so, as your DR site's 100Gb disk will be empty. vg00 is recreated automatically when restoring your ignite image to whatever disk you specify to be part of vg00, but for vg01, running vgimport will not work as there will be no VGID information on that disk at all.

Instead, you need to plan ahead in your DR documentation the procedure to recreate the structure of vg01 and its filesystems manually from scratch, before restoring your data on it.

Good luck
Pete Randall
Outstanding Contributor

Re: vgimport

No - you would use vgimport if you had the original disks. At a disaster recovery site you would use vgcreate to set up a new, empty vg01 and then restore your data into it. In this case, vgimport has no bearing.


Pete

Pete
khilari
Regular Advisor

Re: vgimport

so in a DR there is no way, i can run a command and get my vg's back..
For a remote site recovery the external vg's have to made manually and thats it . Right??
James R. Ferguson
Acclaimed Contributor

Re: vgimport

Hi:

> so in a DR there is no way, i can run a command and get my vg's back.. For a remote site recovery the external vg's have to made manually and thats it .

What's so hard about that? You should have simple scripts that you can run at the disaster recovery site that create the volume groups. logical volumes and filesystems that you need. You run them and then you begin to populate them with data from your backups.

Regards!

...JRF...
khilari
Regular Advisor

Re: vgimport

Can you kindly tell me of that script that you say can bring back the volume group back to life without manually creating it.
I will really appreciate that.
Thanks
James R. Ferguson
Acclaimed Contributor

Re: vgimport

Hi (again):

> Can you kindly tell me of that script that you say can bring back the volume group back to life without manually creating it.

You missed what we are saying. The magical script begins by 'pvcreate'ing available devices; performs a 'vgcreate' of a volume group; 'lvcreate's its logical volumes and 'newfs's the filesystems housed within the logical volumes --- exactly the steps you would do at home. You simply need to pass (or hard-code) the names of the device files you have available at runtime. These will vary exercise to exercise.

Regards!

...JRF...