Operating System - HP-UX
1830098 Members
7616 Online
109998 Solutions
New Discussion

could not create new volume group due to already assigned minor number

 
SOLVED
Go to solution
jaminas
Advisor

could not create new volume group due to already assigned minor number

Hi,

I have already removed a directory for a volume group vg_filesys, with rm -r /dev/vg_filesys which turns out to remove "group" the xter device file.

Initially, this VG uses 0x010000 (1 as the minor no.) but when I re-created the directoy vg_filesys and wish to use the same minor no 0x010000 the following errors came up:

mkdir /dev/vg_filesys - successfull
mknod /dev/vg_filesys/group c 64 0x010000 - sucessful
vgcreate /dev/vg_filesys /dev/dsk/c0t4d0 /dev/dsk/c1t4d0 - unsuccessful due the following errors:

vgcreate: Volume group "/dev/vg_filesys" could not be created:

A volume group is already using the major and minor number. Please check the minor number of the "group" device file.
11 REPLIES 11
J. Bravo
Respected Contributor

Re: could not create new volume group due to already assigned minor number

Hi:

Could you post the otuput of "strings /etc/lvmtab", "ll -d /dev/vg*" and "ll /etc/lvmconf"?

Regards;

J. Bravo.
Fat Scrape
Honored Contributor

Re: could not create new volume group due to already assigned minor number

Jaminas,

if you want to recreate the new vol_grp, I think that the steps are:

mkdir /dev/vg_filesys
mknod /dev/vg_filesys/group c 64 0x010000

N.B. obviously now you destroy all filesys presents on disks

pvcreate -f /dev/dsk/c0t4d0
pvcreate -f /dev/dsk/c1t4d0

the -f option:
Force the creation of a physical volume (thus deleting any file system present) without first requesting confirmation.

vgcreate /dev/vg_filesys /dev/dsk/c0t4d0 /dev/dsk/c1t4d0

Fat
Ivan Krastev
Honored Contributor

Re: could not create new volume group due to already assigned minor number

Check for all group files:
# ll /dev/*/group

and see what is duplicate and remove it.

After that create new with mknod.

regards,
ivan
Torsten.
Acclaimed Contributor

Re: could not create new volume group due to already assigned minor number

Did you vgremove or vgexport this VG or just deleted the /dev/vg_filesys directory?

What gives

strings /etc/lvmtab

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TwoProc
Honored Contributor

Re: could not create new volume group due to already assigned minor number

Get a listing of all the minor numbers in use:

ls -al /dev/vg*/group

and then when you run the following:
mknod /dev/vg_filesys/group c 64 0x010000

make sure to change the last parameter (minor number) to be an unused number.

So, lets say that 1,2,3,4,5 are in use
then make the newest one 6.

mknod /dev/vg_filesys/group c 64 0x060000

We are the people our parents warned us about --Jimmy Buffett
jaminas
Advisor

Re: could not create new volume group due to already assigned minor number

torsten,

I used ordinary delete i.e rm -r /dev/vg_filesys, and when I ran ll /dev/*/group it displays with this group in question, ie. /dev/vg_fileysy/group with 0x010000 with minor no of 1. What baffles me is that i deleted the entire directory with rm -r as I have stated and yet it shows that the minor no has been used. how do I remove this minor no completely and re-use it for the sam VG?
melvyn burnard
Honored Contributor

Re: could not create new volume group due to already assigned minor number

you should not just rm these device files, rather use vgexport to clear it out of the /etc/lvmtab file AND remove the /dev/vg directory and files
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Fat Scrape
Honored Contributor

Re: could not create new volume group due to already assigned minor number

Hi All,

if the procedure to destroy vol_grp vg_filesys was'nt correct and now it isn't possible to reacreate a vol_grp with the same minor number, I think that it's possible to recreate it, if this is what you want:

1) mkdir /dev/vg_filesys
2) mknod /dev/vg_filesys/group c 64 0x020000 if it's unsed
3) pvcreate -f /dev/dsk/c0t4d0
4) pvcreate -f /dev/dsk/c1t4d0
5) vgcreate /dev/vg_filesys /dev/dsk/c0t4d0 /dev/dsk/c1t4d0

and finally clear /etc/lvmtab with vgscan command, used, if I remember, to re-create of the /etc/lvmtab.

Is it ok for all?

Fat
Torsten.
Acclaimed Contributor
Solution

Re: could not create new volume group due to already assigned minor number

The system still "remembers" this VG, because it is still listed in /etc/lvmtab.

If you want to remove a VG, always use either vgremove or vgexport!

No move the existing /etc/lvmtab away and run

vgscan -v -p (preview)
and
vgscan -v (for create a new file)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: could not create new volume group due to already assigned minor number

Please change "No move" to "now move" - sorry.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jaminas
Advisor

Re: could not create new volume group due to already assigned minor number

Torsten

Your solution of moving away the /etc/lvmtab really soleved the problem.

Thanks a lot.

Sorry I forgot to assign point but will surely do that.

Thanks everybody