1833874 Members
2257 Online
110063 Solutions
New Discussion

creating a vg

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

creating a vg

I have existing vg's from vg00 to vg34 on my system. vg00 is local disk and the rest reside on a EMC Sym. I attached Hitachi disk today and wanted to create vgh35 as a new volume group.

mkdir /dev/vgh35
mknod /dev/vgh35/group c 64 0x230000

then i try to make the vg

vgcreate /dev/vgh35 /dev/dsk/c19t0d0

and i get a message stating the vg already exists. I know this has something to do with the mknod. Can anyone tell me what the deal is? i think 35=23 in hex. Do i have enough 0's??
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor
Solution

Re: creating a vg

Hi Chris:

Check for duplicate minor numbers"

# ls -l /dev/vg*/group

Yes, the minor number is hexadecimal. Make sure your kernel's 'maxvgs' parameter is set high enough to accomodate this. By default, ten volume groups are supported (0-09).

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: creating a vg

Chris,

Yes, you've got enough zeroes (you need six digits after the x).

What is maxvg set to? I know that doesn't make any sense according to the error you're getting, but 35 is a log.

Pete

Pete
Jeff Schussele
Honored Contributor

Re: creating a vg

Hi Chris,

Your minor # is OK.....
Do a strings on /etc/lvmtab & grep for the vgh35 - may have already use dthe name.
Also do this
ll /dev/vg*/group
and check all the minors for a duplicate - may have already used 0x230000

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Helen French
Honored Contributor

Re: creating a vg

The reason is your minor number (0x230000) is already used by another vg. You have to give unique numbers here for each different vgs. Yes 35=23 in hex, but that might have been used by another vg. Checke /dev directory:

# cd /dev
# ls -al vg* | grep group (provided all your VG names start with 'vg')

This will list you all used minor numbers and figure out the next value from it.
Life is a promise, fulfill it!
Pete Randall
Outstanding Contributor

Re: creating a vg

Not my day: make that "35 is a lot".


You did do a pvcreate, too, didn't you?

Pete

Pete
Helen French
Honored Contributor

Re: creating a vg

Again, yes you have enough '0's in it. Also check the maxvgs parameter on the system kernel. This will limit your maximu allowed VGs in the system. Check it out and see if you 've reached the limit:

# sysdef | grep maxvgs
# kmtune | grep maxvgs
Life is a promise, fulfill it!
Jeff Schussele
Honored Contributor

Re: creating a vg

Need.....More.....Coffee...

Ignore my first suggestion. You'd have seen that problem in the mkdir command.
Still betting that 0x230000 duplicate is the problem.
And BTW you already have 35 VGs on the system as vg00 -to-> vg34 IS 35 total.
Use 0x240000

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Chris Fadrowski
Super Advisor

Re: creating a vg

yep, someone created vg23 with 0x230000. I should of thought to use ll /dev/vg*/group, sorry about that. I have my max vg's at 75 so that should not be a problem. Anyways, vg23 is dead now, it's emc disk that is empty and going away. i will just vgexport it and use it over. You don't see any problems with this do you? thanks for everyone's help. This forum is amazing.
James R. Ferguson
Acclaimed Contributor

Re: creating a vg

Hi Chris:

Yes, 'vgexport' is the cleanest and fastest way to dispose of a volume group -- '/dev/vgNN' entries, cleanup of '/etc/lvmtab', etc.

Regards!

...JRF...
Helen French
Honored Contributor

Re: creating a vg

Yes, you can get rid of that vg23 by doing a 'vgexport'. Once you 've done that check:
# strings /etc/lvmtab - and make sure you have removed that properly.

You can then use those minor numbers.
Life is a promise, fulfill it!