Operating System - HP-UX
1833159 Members
3028 Online
110051 Solutions
New Discussion

Error when try to create an vg.

 
Juan Manuel López
Valued Contributor

Error when try to create an vg.

I was trying to add a new volume group through SAM and I get this message

vgcreate: Volume group "/dev/vg01" could not be created:
A volume group is already using this major and minor number.
Please check the minor number of the "group" device file.

So I check there is not another vg with the same minor number...Where is the problem ?
Maybe I remove not correctly another vg with that minor number...any idea ?

Thanks.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
9 REPLIES 9
T G Manikandan
Honored Contributor

Re: Error when try to create an vg.

Just do a
#ls -l /dev/vg*/group

this should give you an idea on the existing minor numbers.

then just give a unique number for to create the VG.


melvyn burnard
Honored Contributor

Re: Error when try to create an vg.

so what does :
ll /dev/vg*/group reveal?
also, do a strings /etc/lvmtab to see if htere is anything in htere, that should not be.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Ian Dennison_1
Honored Contributor

Re: Error when try to create an vg.

strings /etc/lvmtab,

match up this output against ll /dev/vg*/group.

if there is a difference,

mv /etc/lvmtab /etc/lvmtab.prev
vgscan -v

Share and Enjoy! Ian
Building a dumber user
James R. Ferguson
Acclaimed Contributor

Re: Error when try to create an vg.

Hi:

If you are absolutely sure that an 'ls -l /dev/vg*/group' fails to show any duplicate minor numbers, try a reboot. The kernel may "remember" that one once existed. Otherwise, choose another, unused miror number. By convention, the minor number of 'vg01' would be one (1) but that is only by convention.

Regards!

...JRF...
Robert-Jan Goossens
Honored Contributor

Re: Error when try to create an vg.

James,

Is it possible to use vgexport here, I know vgexport can resolve a lot of problems.

Robert-Jan.
Juan Manuel López
Valued Contributor

Re: Error when try to create an vg.

Thanks at all for your solutions.
I am sure that ls -l /dev/vg*/group fail. So I should to reboot the machine, because what I want is to repair the problem. I try to create another vg with a diferent minor number and the are not problems.
I will try also to mv the lvmtab file and run vgscan to re-create it.
Thanks all for your help.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
T G Manikandan
Honored Contributor

Re: Error when try to create an vg.

there also could be problems when the VG's were not removed properly.

For the vg's which you think are not there in the system but the /dev/ files exist you can just do a vgexport of the volume group.

vgexport would remove the unwanted files from the /dev dir and will update the /etc/lvmtab.

//Make sure that the vg is not used or not existent but the group files exist//

Thanks
James R. Ferguson
Acclaimed Contributor

Re: Error when try to create an vg.

Hi Robert-Jan:

Situations like this suggest that 'vgexport' was not used to remove the original volume group. The presence of '/etc/lvmconf/vgNN.conf' would tend to confirm this. If there are no entries for the volume group in '/etc/lvmtab' a 'vgexport' will fail having noted such. A reboot should clear the problem if it as we suspect, above.

Regards!

...JRF...
Jakes Louw_1
Frequent Advisor

Re: Error when try to create an vg.

Instead of a full reboot, refresh the kernel by calling "vgchange -a y" which will attempt to make all the VGs available again.

This often sorts out the LVMTAB vs kernel mismatch.