1827286 Members
1669 Online
109717 Solutions
New Discussion

strange vgimport error

 
Emanuele_4
Regular Advisor

strange vgimport error

Hi everybody!

I'm experiencing a strange errore while vgimporting a bcv disk
----------
The error is:
Couldn't attach to the volum group /dev/....
file exists

vgchange: File exists
------------
The error is the File exist line...

At the end of the vgchange command I still haven't imported the single physical disk indicated in the error below.

Does anybody have any suggestion?

Emanuele
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: strange vgimport error

Emanuele,

The normal sequence of events is:

mkdir /dev/vgNN
mknod /dev/vgNN/group c 64 0xNN0000
vgimport . . . .

Assuming you've followed those steps then we need to look at the possibility of duplicates - either a duplicate vgNN or a duplicate minor number 0xNN0000.


Pete

Pete
Emanuele_4
Regular Advisor

Re: strange vgimport error

Yes...I did mkdir, mknod, etc etc...all as usual...

I verified vg name and minor number...and they are univocal...

;-(

Thanks anyway

Emanuele
Borislav Perkov
Respected Contributor

Re: strange vgimport error

Hi,
Try to recreate lvmtab.
mv /etc/lvmtab /etc/lvmtab.old
vgscan -v
or maybe try to recreate the device drivers with
insf -e
Then proceed with installation.
Regards,
Borislav
Bharat Katkar
Honored Contributor

Re: strange vgimport error

Hi Emanuele,
Try doing this on the node where you r importing:

1. vgexport vgNN (remove if it has done it half way)
2. mkdir /dev/vgnn
3. mknod /dev/vgnn/group c 64
4. vgimport -s -v -m vgnn <..> <..>

5. vgchange -a y vgnn

I hope this should work.

If not check whether you are able to see PV's properly and you r referring to the ones which u r suppose to. Use diskinfo command to see status of the PV's.
# diskinfo

See if you are able to get the info of all PV's related to VGnn

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Dietmar Konermann
Honored Contributor

Re: strange vgimport error

Emanuele,

the error you are seeing happens if a physical volume with a different VGID is still attached (kernel-wise) to the volume group. This is a somewhat weird situation, since the the VG is supposed to be deactivated... a deactivated VG with a PV attached? Not ok, indeed.
You can provoke this symptom by fiddling around with vgchgid. :) I don't go into details here.

Unfortunately there no easy way to get this situation cleared without rebooting.

But only the single VG slot in the kernel's structures should be affected. So you could workaround this problem by importing the VG to another free VG minor number. Activation should work fine then.

After reboot all should be fine again. LVM is supposed be enhanced in this area.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Emanuele_4
Regular Advisor

Re: strange vgimport error

I resolvede the problem!

The error was very atipical!

There was 2 different disks with the same physical volume group number!

I'm pvmoving data on another disk....restoring situation and I hope everything will go fine!

thanks to everything

Emanuele