1836574 Members
2592 Online
110102 Solutions
New Discussion

Re: vgimport error

 
Brent Hardesty
Advisor

vgimport error

I am vgexporting from one host and vgimmporting on another (both attached to an emc array).

1. vgexport -p -m /tmp/vgapp03.mapfile /dev/vgapp03
2. rcp file over
3. since this was a new disk...pvcreate /dev/rdsk/c22t3d3
4. mkdir /dev/vgstgapp03
5. mknod /dev/vgstgapp03/group c 64 0x680000
6. vgcreate /dev/vgstgapp03 /dev/dsk/c22t3d3
7. vgexport -m /tmp/vgstgapp03.mapfile /dev/vgstgapp03 (had to do step 6 and 7 because when i tried to vgimport it gave me an error saying that it could not import because no vg was associated with pv...or something similar)
8. mkdir again
9. mknod again
10. vgimport -m /tmp/vgstgapp03.mapfile -v /dev/vgstgapp03 /dev/dsk/c22t3d3

I get the following error....

Beginning the import process on Volume Group "/dev/vgstgapp03".
Logical Volume is not defined on any physical volume.
"/dev/vgstgapp03/lvtrans" is missing Physical Volumes.
Logical Volume is not defined on any physical volume.
"/dev/vgstgapp03/lvsapmnt" is missing Physical Volumes.
Volume group "/dev/vgstgapp03" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating
the volume group.

The volume group is created but the lv is not.

If I vgexport destroy and recreate the dir. and node and then reimport i still get the same error.

Any ideas???
Brent
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: vgimport error

Hi Brent:

The operation of 'vgexport' on one server and 'vgimport' on another is designed to give ownership of a volume group from the source (export) to the destination (import).

The data on the physical disk comprising the volume group is not changed. You are "telling" one server that it no longer owns the volume group while "telling" the second server that it does now own it. In part, in the process, each server's /etc/lvmtab is updated to reflect the presence/absence of the volume group and the physical disk.

You do *not* do '*create' on anything.

...JRF...
Bill McNAMARA_1
Honored Contributor

Re: vgimport error

just as a quick analysis, it appears that you are trying to create a vg in line 6 without doing a pvcreate on the dsk c22t3d0
If there is already a pvcreate done on the vg before, there is no reason typically to do a vgcreate.. the vgimport does the vgcreation for you.. apart from the group file.. (68 seems really large - did you ll /dev/*/group to find that?)

Note that if you pvcreate, all lvm headers and fs lv structure will be lost and it is difficult to recreate it.
Try the commands w/out the vgcreate.

vgexport -p -m /tmp/vgapp03.mapfile /dev/vgapp03
2. rcp file over
3. since this was a new disk...pvcreate /dev/rdsk/c22t3d3
4. mkdir /dev/vgstgapp03
5. mknod /dev/vgstgapp03/group c 64 0x680000
6. vgcreate /dev/vgstgapp03 /dev/dsk/c22t3d3
7. vgexport -m /tmp/vgstgapp03.mapfile /dev/vgstgapp03 (had to do step 6 and 7 because when i tried to vgimport it gave me an error saying that it could not import because no vg was associated with pv...or something similar)
8. mkdir again
9. mknod again
10. vgimport -m /tmp/vgstgapp03.mapfile -v /dev/vgstgapp03 /dev/dsk/c22t3d3

It works for me (tm)
Brent Hardesty
Advisor

Re: vgimport error

James and Bill:

Thanks for your responses. I realize that I should not have to do a vgcreate as long as the disk was pvcreated (which it was). I have retried to do the vgimport from the beginning. 1. Re pvcreated the disk
2. mkdir
3. mknod
4. vgexported from other host
5. rcp'd the mapfile over
6. vgimported and i get the following error (which is why i decided to go ahead and do the vgcreate as previously mentioned)

Beginning the import process on Volume Group "/dev/vgstgapp03".
Physical Volume "/dev/dsk/c22t3d3" is not part of a Volume Group

What am I missing here?

As to why #0x68....we have app. 100 vg's on this server.

thx again
Brent Hardesty
Advisor

Re: vgimport error

last post didnt come out like i meant....

"I realize that I should not have to do a vgcreate as long as the disk was pvcreated (which it was)"

Should have read...once the new disk was pvcreated...I realize the vgimport should create the vg for me.......


again...thx for your help/time
Steve Tasker
Occasional Advisor

Re: vgimport error

You are exporting a volume group structure from on host to another host.
Since they are EMC, are you trying to do BCV configuration.
If bcv configuration do as follows
On a souce host(Where you have STD devices)
vgexport -m -p -v /dev/
rcp :/

On destination host(Where you have BCV devices)
-----------------------------------------------
mkdir /dev/
mknod /dev//group c 64 0xnnnnnn
Now you have to find out which std device is matched with what bcv device
vgimport -m -v /dev/
vgchange -a y /dev/
vgcfgbackup /dev/

If you moving disks from host port to another host ports through SDR (Symmetrix disk relocator) software:
Do following steps
---------------------
Run inq on source host and store it in a file
vgdisplay -v /dev/|grep "PV Name"|grep -v "Alternate"|sed e 's/^ *//'|awk '{print $3}'|sed -e 's/dsk/rdsk/' > vgname.disks
for i in `cat vgname.disks`
do
grep ${i} inq.out
done > vgname_emc_disk.info
Print out vgname_emc_disk.info
vgexport -m -v /dev/
rpc map file to target host(where you are moving your disks
move volume group disks to target host with SDR software.
log on to target host
run ioscan -fnC disk
run insf -e -C disk
run ioscan -fnC disk > ioscan.out
look ioscan.out for new disks
run inq > inq_targethost.out
From the Print out vgname_emc_disk.info take 5th field. Grep this 5th field from inq_targethost.out file.
You get new set of PV disks
Do not do pvcreate on these disks

mkdir /dev/ on target host
mknod /dev//group c 64 0xnnnnnn on target hot
vgimport -m -v /dev/
vgchange -a y /dev/
vgcfgbackup /dev/

this will work for you

Srini
Where there is will there is a way