1833994 Members
4390 Online
110063 Solutions
New Discussion

vgimport problem

 
Arunkumar_3
Advisor

vgimport problem

Hi
I created a vg with 130 lvs. I exported this. Using this map file I am importing the vg on different physical disk. It worked fine few times, later vgimport failed and given an error message saying "vgimport failed: vg is still active". I check lvmtab, /dev directory etc., but no syptoms of this new vg.
I found that some times LVM is locking the minor number, reboot is the only solution. I heard that Patch PHCO_24437 resolve this problem which is the later version of patch PHCO_23791 and PHCO_23499. I have those patches on my system. Still I am getting this error message. Any ideas why it is happening, any solutions?

Note: if I import the vg with different minor no it is working.
10 REPLIES 10
John Poff
Honored Contributor

Re: vgimport problem

Hi,

On the machine where you are importing the VG, is that machine a node in an MC/ServiceGuard cluster?

Are you doing a vgimport on the machine before doing the vgimport? If so, are there any complaints from the vgimport?

JP
Geoff Wild
Honored Contributor

Re: vgimport problem

How about try:

vgchange -a n /dev/yourvg

Then try the import...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: vgimport problem

What do you mean when you say you're "importing the vg on different physical disk."? The vgimport command is used to introduce an existing VG (on it's physical disks) into another system and NOT onto different physical disks.


Pete

Pete
Arunkumar_3
Advisor

Re: vgimport problem

I have a HSG80 storage array controller. I can create snapshots and clones on that. My source and target disks are on the same controller. Can assign those physical disks to my hpboxes and create a vg and lvs. I have to create a vg and lvs identical to my source VG on snap/clone disks. So I need to export and import the vg on the same system, but on different physical disks
Pete Randall
Outstanding Contributor

Re: vgimport problem

That's not the way vgimport works. To clone a volume group onto different physical disks, you're going to need to pvcreate, vgcreate, lvcreate, just like you were starting from scratch. Do a vgdisplay -v of the volume group and use that as a guide to create an identical VG on the other disks.


Pete

Pete
John Poff
Honored Contributor

Re: vgimport problem

Hi,

You might need to do a 'vgchgid' on the copy of the volume group you are importing so that it will have a different VGID from the original.

JP
Pete Randall
Outstanding Contributor

Re: vgimport problem

JP,

So, are you implying that this will work? You can use vgimport to clone vg/lv structure to create an identical vg on different disks? I didn't think that was possible. Am I just confused again?


Pete (it's tough getting old and senile)

Pete
Arunkumar_3
Advisor

Re: vgimport problem

hi
I think I didn't put in proper way.
I am working on a product which will take the mount point as a reference and create snap or clone depends on user choice and present that cloned or snapped physical disk to the system user choosed. There it has to create the VG and lvs identical to source and has to create the mount point and mount that particular lv.
In this process we are doing vg export and vgimport. I am facing problem while importing the vg, that also not quite often.
John Poff
Honored Contributor

Re: vgimport problem

Pete,

I'm not familiar with his hardware, but if I understand what he is doing, it sounds just like doing a copy with an XP or an EMC array. Sort of like an LVM snapshot. If so, he should be able to just do a vgimport on the split VG, do a vgchgid to give it a new VGID, and mount it up.

JP who is getting older and more senile too! :)

Pete Randall
Outstanding Contributor

Re: vgimport problem

JP,

Thanks. At least it's getting near quitting time and I can toddle on home and nurse on a "tonic" or too.


Pete

Pete