1753717 Members
4483 Online
108799 Solutions
New Discussion юеВ

vgcfgrestore

 
SOLVED
Go to solution
placitasmd
Frequent Advisor

vgcfgrestore

I am geting an error when trying to do a vgcfgrestore that says 'too many argumnets'. The syntax of my command is vgcfgrestore -n /dev/vgXX /dev/rdsk/c2t1d0 /dev/rdsk/c2t2d0 /dev/rdsk/c2t3d0...../dev/rdsk/c3t2d0. This is occurring on a system that we are using to test DR. System configured with a VA7100 disk array, that has three volume groups all containing raw logical volumes. Ignited the system, and replaced the VA array with a spare VA so that we would not corrupt any data from the original array. Created all the LUNS via VFP prior to booting from ignite tape. ioscan see all the luns. Had issues with serial numbers being different, but was able to solve that. /etc/lvmtab does not know about the volume groups on the array, but /etc/lvmconf has entries for all of them. vgscan does not add them into /etc/lvmtab because they are not LVM drives yet. So, is it possible to do a vgcfgrestore to a volume group on a VA7100 disk array?
Mark E Duhamel
17 REPLIES 17
Patrick Wallek
Honored Contributor

Re: vgcfgrestore

That should work, but need to specify only 1 device at a time on your command line.

You could write a small script to do this:

#!/usr/bin/sh
for i in c2t2d0 c2t3d0 #specify all your device files here.
do
vgcfgrestore -n /dev/vgXX /dev/rdsk/${i}
done


Joseph Loo
Honored Contributor

Re: vgcfgrestore

Hi,

The vxcfgrestore command with -n option does not allow listing the device files. Try this:

# vgcfgrestore -n /dev/vgXX -l
which should list the physical volumes in the volume group.

# man vgcfgrestore
for more information.

Yes, it is possible to perform vgcfgrestore on the mentioned disk array.

Regards.
what you do not see does not mean you should not believe
placitasmd
Frequent Advisor

Re: vgcfgrestore

I have tried both methods with no success. When trying to do a vgcfgrestore with only one device, the command responded fine, but in reality it did nothing. It indicated that the volume group was not in /etc/lvmtab, and that it created it, but it never would. As for listing the devices from the lvmconf file, the lsit out just fine.
Mark E Duhamel
Marco Santerre
Honored Contributor

Re: vgcfgrestore

Mark,

what seems to be happening in this case is that you don't have anything defined in your /dev/ directory at all. So even though vgcfgrestore does work, all it is doing is putting the VGRA on the disk, your VG not being know to your system may well be your problem. Since this is for DR, I would recommend another approach which would be for you to build a little script to "capture" all your LVM info on your source server and re-create that LVM structure on your DR server. But this is only an opinion.
Cooperation is doing with a smile what you have to do anyhow.
placitasmd
Frequent Advisor

Re: vgcfgrestore

My dev directory is fully in tact. The make recovery restored all of that, but for some reason it did not restore lvmtab.
Mark E Duhamel
Jean-Louis Phelix
Honored Contributor

Re: vgcfgrestore

Mark,

I'm not sure to understand why you want to vgcfgrestore the disks. If they are copies of another volume, then the lmv structures are already present. You just have to import the volume. If the new system is in the same cluster as the other one, also use vgchgid command to change the vgid. But the right command for you is vgimport I think, not vgcfgrestore.

Regards.
It works for me (┬й Bill McNAMARA ...)
placitasmd
Frequent Advisor

Re: vgcfgrestore

I need to restore because my data does not exist. We replaced the original VA7100 with a new one that has no data or LVM info on it. All I have done to the new VA7100 is create LUNs that are identical to the VA7100 we removed.
Mark E Duhamel
Jean-Louis Phelix
Honored Contributor

Re: vgcfgrestore

OK ...

In this case, you could create a new dummy vg (pvcreate the disks, vgcreate) then cfgrestore one disk at a time to get back the old lv structure.

Regards.
It works for me (┬й Bill McNAMARA ...)
Todd McDaniel_1
Honored Contributor

Re: vgcfgrestore

Unless I have totally misread your post... this is what you need to do.

First of all, You can't vgcfgrestore disks with info from a VG to disks which are not in any VG to begin with...you must vgimport the VGs...

Second, I dont believe you will need to vgcfgrestore b/c after you do the vgimport it will all be there...on your system.

I hope you created them with the vgexport -s option to attach a header to the disks for easy importing... however, you dont have to have that option defined as long as the /dev/dsk names can be made the same on the new host... otherwise I would re-export them with the -s option... it will save you a LOT of headaches... believe me the -s option is an awesome way to vgexport from one box and then reimport to another host.



Now, Okay so you say you have:

"pvcreated the disks...and that vgscan doesnt recognize them"... and "lvmtab doesnt know about the VGs on the array...

When you say "created the LUNS" what does that mean??" pvcreate? if so you just wiped out your data...

To the vgscan question. How could it rebuild them, you haven't imported them yet... The reason vgscan doesn't see them is b/c you haven't created any VGs as yet on the new disks...

__________
__________

Bottom line is this::

I agree with Jean-louis...

You need to peform a vgimport of the VGs so that lvmtab will see them.

mkdir
mknod
vgcreate -v -m /etc/lvmconf/*.mapfiles /dev/vgXX

mount

then make sure you set the proper mount options.

You just had a few steps out of order is all.
Unix, the other white meat.