1834557 Members
3674 Online
110069 Solutions
New Discussion

Can't run vgcreate!

 
SOLVED
Go to solution
Kevin Curtin
New Member

Can't run vgcreate!

Hi, my apologies if this has been asked hundred's of times before, or if this turns out to be really stupid, but this is my first venture into the world of LVM and to be honest, I'm not really enjoying it. Here's the problem...

I can't run vgcreate.

I've added a new 9GB disk to an old scrapper of an HP-UX workstation. I've run pvcreate, make a directory for a new vg, did the mknod thing (didn't complain about non-unique numbers), but when I run vgcreate, I get a message saying the vg "could not be created: Invalid argument"

The exact command was:
vgcreate /dev/vg05 /dev/dsk/c1t0d0

Which looks OK to me. I can vgextend other vg's with this disk, but that's no use because of the limits on the other vg's mean I can't use the whole disk.

Any help or advice would be greatly appreciated!
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Can't run vgcreate!

It's difficult to know what's wrong because nothing obvious appears wrong. The first thing that I would check is that whatever minor device number you've chosen is truly unique. Do an ls -l /dev/vg* and make certain that there are no conflicts. Mknod would not complain if you had hundreds of duplicate major/minor device number tuples. The next thing that I would do uis vgexport /dev/vg05 just to make certain that you are starting with a clean slate. The most likely problem that you are facing is very old software levels. I would install the latest LVM cumulative patch that is available.

If it ain't broke, I can fix that.
Kevin Curtin
New Member

Re: Can't run vgcreate!

Thanks for that, I think we're getting somewhere! Just to clarify things, how should you choose your major and minor numbers?
Bill Hassell
Honored Contributor

Re: Can't run vgcreate!

Major number for the group file is always 64. The minor number must be unique by assigning the first 2 hex digits a number. The value is not imoportant, just that it is unique. However, to maintain your sanity, I would make the number match the vgxx number as in:

vg00 = 0x000000
vg01 = 0x010000
vg05 = 0x050000
vg12 = 0x0c0000
(or vg12 = 0x120000)

The numbers beyond 09 could be represented as their hex equivalent or simply put the decimal digits there. With decimal numbering, you would be limited to 100 volume groups while using hex numbers, you can have up to 255 volume groups.


Bill Hassell, sysadmin
Kevin Curtin
New Member

Re: Can't run vgcreate!

Clay, Bill - thank you very much. Basically, I had my major / minor numbering slightly confused. I thought you had to get the minor number from the output of lsdev, and I was slightly puzzled to discover that vg00 used the same number. Anyway, it works now, and thanks again for making it all a bit clearer!