cancel
Showing results for 
Search instead for 
Did you mean: 

vgimport fails.

fizan
Super Advisor

vgimport fails.

srvr A:
# vgexport -s -v -m /etc/lvmconf/vg01.map vg01
Beginning the export process on Volume Group "vg01".
/dev/dsk/c3t2d0
vgexport: Volume group "vg01" has been successfully removed.

srvr B :
# vgimport -s -v -m /etc/lvmconf/vg01.map vg01 /dev/dsk/c3t2d0
Beginning the import process on Volume Group "vg01".
Couldn't access the list of physical volumes for volume group "/dev/vg01".

in srvr B: o/p of strings /etc/lvmtab:
# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk36_p2
import is not performing plz help me out..

Thanks.
14 REPLIES
Lijeesh N G_1
Respected Contributor

Re: vgimport fails.

Hi,

Make sure the disk is accessible from both the nodes,

Provide following command outputs from both servers,

#ioscan -fnC disk
#strings /etc/lvmtab

Another thing if you mentioning -s switch, no need mention disk device file again,
just # vgimport -s -v -m /etc/lvmconf/vg01.map vg01 is enough.

Regards,
LIJEESH N G

Regards,
LIJEESH N G
fizan
Super Advisor

Re: vgimport fails.

# vgimport -s -v -m /etc/lvmconf/vg01.map vg01
Beginning the import process on Volume Group "vg01".
Couldn't access the list of physical volumes for volume group "/dev/vg01".
-------------------------------------------
srvr A:

# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk36_p2
bcoz /dev/vg01 is removed wen i give vgexport before tat vg01 is present.
# ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 3 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 0 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
/dev/dsk/c2t1d0s1 /dev/rdsk/c2t1d0s1
/dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0s2
/dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s3
disk 2 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 16 0/4/1/0.102.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d1 /dev/rdsk/c11t0d1
disk 17 0/4/1/0.102.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d2 /dev/rdsk/c11t0d2
disk 18 0/4/1/0.102.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d3 /dev/rdsk/c11t0d3
disk 19 0/4/1/0.102.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d4 /dev/rdsk/c11t0d4
disk 8 0/4/1/0.102.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d1 /dev/rdsk/c7t0d1
fizan
Super Advisor

Re: vgimport fails.

just help me with steps involved in vgexport and vgimport in two servers A and B?
Mel Burslan
Honored Contributor

Re: vgimport fails.

In your srvrB ioscan output, disk identified by c3t2d0 looks like it is a local drive. How can a local drive have the same vgid information with another drive on another server ?

vgimport basically reads the LVM header blocks on the given disk and match those with the map file you provide on the command line to reconstruct (a.k.a. import) the LVM structure.

I am not quite sure what exactly you are trying to do here. Please provide output from

ioscan -fnC disk

srvr A for better understanding.
________________________________
UNIX because I majored in cryptology...
fizan
Super Advisor

Re: vgimport fails.

# ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 3 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 0 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
/dev/dsk/c2t1d0s1 /dev/rdsk/c2t1d0s1
/dev/dsk/c2t1d0s2 /dev/rdsk/c2t1d0s2
/dev/dsk/c2t1d0s3 /dev/rdsk/c2t1d0s3
disk 2 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373453LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 16 0/4/1/0.102.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d1 /dev/rdsk/c11t0d1
disk 17 0/4/1/0.102.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d2 /dev/rdsk/c11t0d2
disk 18 0/4/1/0.102.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d3 /dev/rdsk/c11t0d3
disk 19 0/4/1/0.102.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d4 /dev/rdsk/c11t0d4
disk 8 0/4/1/0.102.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d1 /dev/rdsk/c7t0d1
disk 9 0/4/1/0.102.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d2 /dev/rdsk/c7t0d2
disk 10 0/4/1/0.102.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d3 /dev/rdsk/c7t0d3
disk 11 0/4/1/0.102.14.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d4 /dev/rdsk/c7t0d4
disk 4 0/4/1/0.109.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d1 /dev/rdsk/c5t0d1
disk 5 0/4/1/0.109.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d2 /dev/rdsk/c5t0d2
disk 6 0/4/1/0.109.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d3 /dev/rdsk/c5t0d3
disk 7 0/4/1/0.109.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d4 /dev/rdsk/c5t0d4
disk 12 0/4/1/0.109.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d1 /dev/rdsk/c9t0d1
disk 13 0/4/1/0.109.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d2 /dev/rdsk/c9t0d2
disk 14 0/4/1/0.109.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d3 /dev/rdsk/c9t0[rx26-207]/dev
Vishu
Trusted Contributor

Re: vgimport fails.

Hi fizan,

I agree with Mel on this. your disk c3t2d0 looks like a local disk to the server. the option -s with vgimport scans for LVM header for the same VG ID information, which it has in its map file. Mostly used in shared storage or while moving disks from one server to other.

Now, if you want to import it on other disk, then avoid using the -s option and import it by specifying the disk name.

Prashanth Waugh
Esteemed Contributor

Re: vgimport fails.

Hi Fizan,

the syntax should be like that
on

srvr A:
vgexport -v -s -p -m /tmp/vgu1.map /dev/vgu1

on server B:
vgexport -v -s -m /tmp/vgu1.map /dev/vgu1

Pls check the man pages for vgexport and vgimport

Regards,
prashant

For success, attitude is equally as important as ability
fizan
Super Advisor

Re: vgimport fails.

if i export in server A it results as vg01 is removed?

normally vgexport removes thy exporting vg?
Patrick Wallek
Honored Contributor

Re: vgimport fails.

>>if i export in server A it results as vg01 is removed?

Yes!

>>normally vgexport removes thy exporting vg?

Yes, unless you add the '-p' (preview) option to the vgexport command.
Mel Burslan
Honored Contributor

Re: vgimport fails.

Yes, vgexport cleanly removes the vg's traces from your lvmtab. vgimport, provided the VGID headers are untouchhed, rebuilds the vg back into lvmtab.
________________________________
UNIX because I majored in cryptology...
fizan
Super Advisor

Re: vgimport fails.

so what is the solution to import it successfully?

without inserting the unplugged hard disk from srvr A into srvr B this vgimport will not work ah?

bcoz am trying to import it on a new hard disk added to ma srvr B:
1. pvcreate newdisk
2. mkdir /dev/vg01
3. mknod /dev/vg01/group c 64 0x010000
4.vgimport -s -v -m /etc/lvmconf/vg01.map vg01
--------------------
it displays as couldn't access the physical volumes added to this vg...??

5.. if i import it will automatically create a vg01 or just layout from export cmd?


prasanth before 2 steps just mentioned on srvr A & srvr B to vgexport?
Vishu
Trusted Contributor

Re: vgimport fails.

Fizan,

I dont know why are you exporting that VG from your srvrA, if you are not going to remove the hard drive from that server.

but anyhow,

you can do this way, as i already said, if you want to import it in a new disk added to your srvrB,

srvrA :
#vgexport -v -m /etc/lmvconf/vg01.map vg01

rcp this map file to srvrB at same location. create the directory and group file for that VG.

srvrB :
#vgimport -v -m /etc/lvmconf/vg01.map vg01 /dev/dsk/c3t2d0

here, /dev/dsk/c3t2d0 is the PV name, which you newly added to that server OR specify the PV_PATH of that newly added disk.

This way it will not scan for the VGID on that disk.
Mel Burslan
Honored Contributor

Re: vgimport fails.

>>so what is the solution to import it successfully?

For the disk you are trying to perform vgimport on, there is no solution. Actually there is no need for a solution.

Are you somehow expecting the data on this vg, on server A, magically appear on this imported vg on server B ? If you do, you have a big surprise coming.

If all you need is to recreate the LVM structure, well, how bad can it be to re-create the vg and the lvols from scratch ? 10 minutes may be ?? Hardly... So, why are you hell bent on using vgimport ? It is not the right tool. As one of the forum veteran here previously said: "if you only have a hammer, it does not make all the world's problems solvable by a hammer"

>>without inserting the unplugged hard disk from srvr A into srvr B this vgimport will not work ah?

That's RIGHT !!!

>>it displays as couldn't access the physical volumes added to this vg...??

The new disk on server B has no idea about the VGID of the original disk and as told many times before, this is an absolute MUST for vgimport.

>> 5.. if i import it will automatically create a vg01 or just layout from export cmd?

Huh ? Back to square one I suppose.. you can not import a vg from a disk or a group of disks, onto another disk or group of disks. This is against the nature of the vgexport/vgimport commands. These commands are provided to help you shared disks between the sharing nodes. These commands are not there to provide you the facility to copy LVM structures from one disk to another. On a new disk, LVM structure must be created from scratch. Period. End of discussion. Unless you are going to move /dev/dsk/c3t2d0 on server A, to the same hardware location on server B, do not spin your tail around vgimport. It ain't gonna happen. Crack down and start creating the logical volumes one by one or write a script to this for you.
________________________________
UNIX because I majored in cryptology...
Vishu
Trusted Contributor

Re: vgimport fails.

Fizan,

Mel is right. the procedure i gaven above will only provide you with the LVM structures only on your srvrB, but not the data. until you move your hard disk there is no way you can find the same data on your srvrB.

and if you find you query answered, please spare sometime to submit points.

Thanks