1835960 Members
1954 Online
110088 Solutions
New Discussion

vgimport on disk

 
SOLVED
Go to solution
p7
Frequent Advisor

vgimport on disk

hi all

i have a group of disk on an xp1024 that were used many moons ago. i dont recall any info on them. is it possible to do an import on 1 of these disks just to see what volume group it was, etc?

thx in advance
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: vgimport on disk

Hi:

Using 'vgimport' is actually the way you would rename a volume group after 'vgexport'ing it. Hence, you are not going to ascertain what the name of the volume group to which the disk belonged at one time.

You could 'vgimport' the disks and in doing so, ascertain the contents of any logical volumes still on them. You don't need a mapfile to do this as the absence of a mapfile means that default, standard logical volume group names (e.g. 'lvol1', 'lvol2', etc.) are created. Mount each logical volume exposed to see if there is anything of interest.

Regards!

...JRF...
P Arumugavel
Respected Contributor

Re: vgimport on disk

Hi,

Yes it is possible to do an vgimport. Vgimports assumes that the volume group information has already been created on the disk. The disk is scanned to get the vg information and LV information.

It creates logical volume device files under the volume group name using the default name (lvol1, lvol2...etc)

#mkdir vg_name
#mknod /dev/vg_name/group c 64 0xyy0000
#vgimport -v /dev/vg_name pvname
#vgchange -a y /dev/vg_name

Reg \ Vel
shjn
New Member

Re: vgimport on disk

Hi Pasquale,

You can recreate the VG on the server. But you cant find out the name of the VG which previously used. Because on the Server side only we are using the VG name and in disks ( In LVM HEADER) VGID is the idintification which is stored in VGRA.

You can present these disks to the server(Since you dont have any map file containing vgid and lvnames) you need to know the disks which were previusly used for that VG.

a) First create the VG directory in /dev
mkdir /dev/vgnew
b) Then create one group file using
mknod /dev/vgnew/group c 64 0x**0000
note:- ** just check the server for available minor no
c) Import the vg to the server .
vgimport vgnew " disks block device file name "
d) activate the VG using
vgchange -a y vgnew
e) Use " vgdisplay -v vgnew " and find out the lvnames and mount these lvs to the temperory mount points and view the contents.


You can also use this attached script to check whether the disk is a part of any VG
and it will show PVID and VGID if it is included in any VG




p7
Frequent Advisor

Re: vgimport on disk

thx everyone, one more question:

since its a san and i have 5 different systems mapped to this 1024, if i do an import and these disks are being used or mounted on another system (for arguments sake) will it cause any issues?

thx again
Aneesh Mohan
Honored Contributor

Re: vgimport on disk

Hi,

You should make sure that those disks are not using RW mode in any other systems or not presented to any other hosts from Storage Side.

You Can import the volume groups from any other similar systems and use the logical volumes , but it cant be shared across the systems without any cluster softwares.


Aneesh