1760061 Members
3746 Online
108889 Solutions
New Discussion юеВ

vgimport with same name

 
SOLVED
Go to solution
Stephen Morrison_3
New Member

vgimport with same name

Hi,

I have a machine that has gone belly up. It had two disks in it vg01 and vg02. I need to get the data off these disks.

I have another machine, but it has the same volume groups on it (vg01 and vg02). I have not been able to export the disks, because the machine went belly up. How do I import the volume groups manually on to this second machine?

I am guessing something along the lines of creating a directory /dev/vgnew and creating the /dev/vgnew/group node but then what do I do?

Thanks.
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: vgimport with same name

Hi,

Take a look at next question and answer made A. Clay Stephenson

http://bizforums.itrc.hp.com/cm/QuestionAnswer/0,,0xd1480fe6d0f7d61190050090279cd0f9,00.html

Hope it helps,

Robert-Jan.
Patrick Wallek
Honored Contributor

Re: vgimport with same name

You are correct. YOu first need to create the /dev/vgnew directory and then the group file.

From there you can just do:

# vgimport /dev/vgnew /dev/dsk/c?t?d?

Do this for both disks.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: vgimport with same name

Hi,

Use the disks in the command line. For ex., if you know that c0t0d0 and c0t0d1 correspond to vg01, then you would do the following.

#mkdir /dev/vgnew
#mknod /dev/vgnew/group c 64 0x0?0000
#vgimport -v /dev/vgnew /dev/dsk/c0t0d0 /dev/dsk/c0t0d1
#vgchange -a y vgnew

This will create lvols in /dev/vgnew with default names like lvol1, lvol2 etc., By mounting each logical volume and looking at the contents, you should be able to find out the mounted directories.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: vgimport with same name

You can actually import volume groups with a different name. It is the logical volume information that is important not the names.

# vgimport -v /dev/myvg1 /dev/dsk/c0t6d0 /dev/dsk/c2t6d0
Once imported, you can activate the group and then mount it.

# vgchange -a y /dev/myvg1
# mount /dev/myvg1 /mymountpoint1
Anyone for a Mutiny ?
James R. Ferguson
Acclaimed Contributor

Re: vgimport with same name

Hi Stephen:

Physically move the disks from the dead machine to the viable one. Then do:

# mkdir /dev/vgXY
# mknod /dev/vgXY/group c 64 0xXY0000
# vgimport m /tmp/vgXY.mapfile vgXY
# vgchange ???a y vgXY

For your mapfile, make it look like this:

1 lvol1
2 lvol2
3 lvol3
....

Once the vgimport is done, you should be able to mount filesystems and extract data.

Regards!

...JRF...




...where 'XY' is a unique number of your choice.

# vgimport ???s ???m /jrfcoldvault/vgXY.mapfile vgXY
# vgchange ???a y vgXY
James R. Ferguson
Acclaimed Contributor

Re: vgimport with same name

Hi (again) Stephen:

Sorry, the previous post got fat-fingered):

# mkdir /dev/vgXY
# mknod /dev/vgXY/group c 64 0xXY0000
# vgimport -m /tmp/vgXY.mapfile vgXY /dev/dsk/cXtYdZ
# vgchange ???a y vgXY

For your mapfile, make it look like this:

1 lvol1
2 lvol2
3 lvol3
....

...the logical volume names don't matter. In the above, "XY" is any unique number of your choice. Once the vgimport is done, you should be able to mount filesystems and extract data.

Regards!

...JRF...