1849588 Members
7172 Online
104044 Solutions
New Discussion

Re: vgimport error MC/SG

 
hpuxsa
Frequent Advisor

vgimport error MC/SG

I am trying to import a vg on to the standby node in a MC/SG cluster and i am getting the following error. How do I import it on both the PV's. The disks are visible on both the paths.

vgimport -p -v -m /tmp/vg01.map vg01 /dev/dsk/c25t0d1 /dev/dsk/c29t0d1
Beginning the import process on Volume Group "vg01".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
vgimport: Warning: Volume Group contains "1" PVs, "2" specified. Continuing.
Logical volume "/dev/vg01/lvol1" has been successfully created
with lv number 1.
Volume group "/dev/vg01" 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.

Appreciate your help.
Thanks in advance.
8 REPLIES 8
Massimo Bianchi
Honored Contributor

Re: vgimport error MC/SG

The sintax is ccorrect, you are only seeing a warning because the VG was created on the oyher server.


To do the real import, just tear away the "-p"
vgimport -p -v -m /tmp/vg01.map vg01 /dev/dsk/c25t0d1 /dev/dsk/c29t0d1

I say it a second time: they are NORMAL warnings, they are not errors.

Massimo

Tim D Fulford
Honored Contributor

Re: vgimport error MC/SG

Hi

I think the command was successful. see the line at the end

> Volume group "/dev/vg01" has been successfully created. <

As Massimo says strip out the -p option to do the import. I assume that the VG consists of 1 disk with 2 alternate paths (hence the warning can be ignored)

Regards

Tim
-
Rita C Workman
Honored Contributor

Re: vgimport error MC/SG

Before I vgimport I always get rid of what is out in lvmtab first:

vgexport /dev/vgname
mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x_ _ 0000

Then I do my import ( I tend to use the -s option, but that's just me.. ):

vgimport -vs -m /etc/lvmconf/vgname.map /dev/vgname

I do not tend to extend the statement with the disk device info (c_t_d_) as you noted above.

Just a thought,
Rita
Kent Ostby
Honored Contributor

Re: vgimport error MC/SG

A document that might help you with this process is:

http://www2.itrc.hp.com/service/cki/search.do?category=c0&mode=id&searchString=UXSGKBAN00000037&searchCrit=allwords&docType=Security&docType=Patch&docType=EngineerNotes&docType=BugReports&docType=Hardware&docType=ReferenceMaterials&docType=ThirdParty&search.x=30&search.y=5

It is a certified document related to distributing the VGs between SG nodes.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Sanjay_6
Honored Contributor

Re: vgimport error MC/SG

The way we do this is,

on the 1st node,

vgchange -a n /dev/vgname
vgexport -p -s -m /tmp/vgname.map /dev/vgname

rcp the /tmp/vgname.map file to the second node, then do a vgimport on the other node.

mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x0n0000
vgimport -s -m /tmp/vgname.map /dev/vgname
vgchange -a n /dev/vgname
vgchange -a y /dev/vgname

If this was a cluster aware vg, use vgchange -a e /dev/vgname to activate the vg in exclusive mode.

mount the filesystems and check and see if the vg is correctly imported or not.

Hope this helps.

Regds
hpuxsa
Frequent Advisor

Re: vgimport error MC/SG

i did a vgimport on the standby node only after exporting the vg. There was no reference to the vg in the lvmtab file of the standby node. But when i try to vgimport it gives me the Warning:Volume Group contains "1" PVs, "2" specified. Where does the standby node get the info that the vg has only one PV.
I tried importing the vg ignoring the warning and it updates the lvmtab file with Alternate PV path also.

I was trying to recreate the cluster config file "cmquerycl -v -n node1 -n node2 -C filename". The config file created is missing the values for
FIRST_CLUSTER_LOCK_VG
FIRST_CLUSTER_LOCK_PV
VOLUME_GROUP
Sandro Schaer_2
Occasional Advisor

Re: vgimport error MC/SG

check the vg on your main server by using 'vgdisplay -v /dev/vg01'. what does it show under 'Cur PV' ? This is the number of pv's on the main server.

I do the vgexport/import usually as follows :

on the main server :
vgexport -p -s -v -m /tmp/vg01.map /dev/vg01

on the standby host(s) :
- vgexport /dev/vg01
- ioscan -fnCdisk
- insf -e
- get vg01.map from main server, save into /tmp
- mkdir /dev/vg01
- mknod /dev/vg01/group c 64 0xnn0000 (same as on main server)
- vgimport -s -v -m /tmp/vg01.map /dev/vg01


Never had any difficulties with this procedure. Running a 8-node cluster with 28 packages and almost 60 vg's spread across various disk systems.


hope this helps


have fun
Sandro
Tim D Fulford
Honored Contributor

Re: vgimport error MC/SG

Hi

>But when i try to vgimport it gives me the
>Warning:Volume Group contains "1" PVs, "2"
>specified. Where does the standby node get >the info that the vg has only one PV.

The warning is because you have alternate paths set up. LVM stores this information on the header & footer of the disks themselves & they KNOW that there is only 1 physical disk (or LUN I assume), & when you do the vgimport you are specifying two disks/paths (hence the eWarning message). At that point the programs obviously do not know one path is an alternate PV link.

IF you were to do
vgexporet -s -m /tmp/vg01.map -p -v vg01
&
vgimport -s -m /tmp/vg01.map -v vg01

you would not see this message, as the vgimport goes off & scans the hardware & finds all the disks with the correct VGID.

There really is nothing to worry about, it is an warning that you can ignore.

Regards

Tim
-