1828667 Members
1843 Online
109984 Solutions
New Discussion

Re: vgcreate issue

 
SOLVED
Go to solution
emily_3
Frequent Advisor

vgcreate issue

Hello,

I removed vg01 by "vgreduce","vgremove" and then I want to recreate it by following the normal procedure. But encountered the following problem, pls help on this.

# vgcreate /dev/vg01 /dev/dsk/c2t1d0
Increased the number of physical extents per physical volume to 8683.
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.

Did I miss some step when remove the vg01, which cause the minor number is occupied?

Thanks.
24 REPLIES 24
Steven E. Protter
Exalted Contributor

Re: vgcreate issue

Shalom emily,

Yes you missed a step.

check the group files in /dev/vg## for all volume groups. Make sure they are consistent for the volume groups

vgexport vg01

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

There must not be any other volume groups with in their group files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
emily_3
Frequent Advisor

Re: vgcreate issue

follow the step but still the same.

# vgexport vg01
vgexport: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "vg01".
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c2t1d0
Increased the number of physical extents per physical volume to 8683.
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.

# echo $?
1
Robert-Jan Goossens
Honored Contributor

Re: vgcreate issue

Emily,

could you post

# ll /dev/*/group

Regards,
Robert-Jan
Enrico P.
Honored Contributor

Re: vgcreate issue

Hi,
check the minor number used with the command:

ll /dev/*/group

Perhaps you used a minor number for vg01 (with the command mknod) that is already in use.

Enrico
Fabio Ettore
Honored Contributor

Re: vgcreate issue

Hi emily,

vgremove doesn't remove the vgXX directory as well where vgexport does that. So if you use vgremove then should delete manually /dev/vgXX directory.
That should be the reason now the system is finding another group file with the same major/minor number.
Check as other people said by ll /dev/*/group and if any just delete it.

Please don't forget to give the final statement here about the conclusion of the problem and if you think people here helped you then don't forget to assign points.

Thanks for your collaboration!

Best regards,
Fabio
WISH? IMPROVEMENT!
emily_3
Frequent Advisor

Re: vgcreate issue

Thanks for all your help!

# ll /dev/*/group

crw-r----- 1 root sys 64 0x000000 Jun 1 08:20 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x010000 Jun 1 11:54 /dev/vg01/group

It looks like both vgreduce and vgremove, couldn't be able to clean remove it. So is there any command to clean remove one VG?
A. Clay Stephenson
Acclaimed Contributor

Re: vgcreate issue

Yes, as the others have tried to tell you, the command is "vgexport /dev/vg01"; this will remove /dev/vg01/* and the /dev/vg01 directory itself; in addition, it removes all references to vg01 in /etc/lvmtab. vgexport does not, however, alter any data on the disks themselves; those data remain intact and can be vgimport'ed on this host or another host.
If it ain't broke, I can fix that.
emily_3
Frequent Advisor

Re: vgcreate issue

Ok, now I confirmed that vg01 has been cleaned, and re-create vg01 again, but still face the same problem:
# ll /dev/vg01
/dev/vg01 not found
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# chmod 640 /dev/vg01/group
# ll /dev/vg01
total 0
crw-r----- 1 root sys 64 0x010000 Jun 2 03:13 group
# vgcreate /dev/vg01 /dev/dsk/c2t1d0
Increased the number of physical extents per physical volume to 8683.
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.

Michael Steele_2
Honored Contributor

Re: vgcreate issue

Was this server ever used with service guard?

Is there an /dev/slvmvg file?

# rm /dev/slvmvg
# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -a -p -­v

-p for prep
Support Fatherhood - Stop Family Law
emily_3
Frequent Advisor

Re: vgcreate issue

Hi,

there is no /dev/slvmvg, just did:

# vgscan -a -p
# vgcreate /dev/vg01 /dev/dsk/c2t1d0

But still the same failure.
A. Clay Stephenson
Acclaimed Contributor

Re: vgcreate issue

Check /etc/lvmpvg; you may have defined PVG's at some time and there may be bogus entries in this file. It's a textfile so you can use vi to view/edit it.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: vgcreate issue

Another thing to check is if there is another bogus device node out there some where.

find / -type c -exec ls -l {} \; | grep 64 | grep 0x01

Let's just see what that turns up.
If it ain't broke, I can fix that.
emily_3
Frequent Advisor

Re: vgcreate issue

There is no /etc/lvmpvg

After did the find, there is only one result, which is /dev/vg01/group. Actually there is no other files.!

My system is ia64 (11.23), is there any special feature?
Daniel Varabief
Occasional Advisor

Re: vgcreate issue

Hi Emily,
Please try
#vgexport vg01
#pvcreate -f /dev/rdsk/c2t1d0
After that repeat known procedure of creating vg's:
#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgcreate /dev/vg01 /dev/dsk/c2t1d0

Kind regards,
Dan
F Verschuren
Esteemed Contributor
Solution

Re: vgcreate issue

one easy workarount:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x0a0000
ps you can alsow try to rename the vg01 to somting els but reading your tekst I do not hink it is the solution...


please post a ll /dev/* |grep 0x010000
F Verschuren
Esteemed Contributor

Re: vgcreate issue

befor you change yous numbres please first chek if it is free:
ll /dev/* |grep [new numbre]
if it is not free just pick the next numbre
Darrel Louis
Honored Contributor

Re: vgcreate issue

Hi Emily,

Can you check if the disk is oke?
- diskinfo -v /dev/rdsk/c2t1d0
Did the "find command" resulted in any Character devices found with the same minor number?

- pvcreate /dev/rdsk/c2t1d0
- mkdir /dev/
Try to use a differnt minor number
- mknod /dev//group c 64 0x020000

GoodLuck

Darrel
emily_3
Frequent Advisor

Re: vgcreate issue

Hello,

vgcreate is successfully created by change the minor number. But still don't know why 0x010000 is occupied, since didn't found any other by "find" command. Thanks.

Darrel Louis
Honored Contributor

Re: vgcreate issue

Emily,

What's the result of:
find / -type c -exec ls -l {} \; | grep 64 | grep 0x01
To check which Char. device is using this minor number.


Darrel
Daniel Varabief
Occasional Advisor

Re: vgcreate issue

Hi,
So, a workaround is to use a different minor number. Or, if you want to use the same minor number,
#vgexport vg01
check:
#ll /dev/*/group
Reboot the system.
After reboot:
#pvcreate -f /dev/rdsk/c2t1d0
Create vg01:
#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgcreate /dev/vg01 /dev/dsk/c2t1d0

Also, check if the latest LVM cumulative patch was installed (according with your OE version).
BTW, what is your OE version? :)

Best Regards,
Dan
emily_3
Frequent Advisor

Re: vgcreate issue

By running the "find" commond, there is nothing.

My OE is B.11.23.0505, don't know what's the lvm patch for this.

Now I am trying, i reboot the system first, and then re-create,after remove the VG01
emily_3
Frequent Advisor

Re: vgcreate issue

Hi,

the problem is solved by add reboot before re-create vg01. Thanks everyone.
Daniel Varabief
Occasional Advisor

Re: vgcreate issue

Most recent LVM cumulative patch for 11.23 is PHKL_34094, recommended is PHKL_33312. Please check the patch database.
Bye,
Dan
Daniel Varabief
Occasional Advisor

Re: vgcreate issue

...thx for points emily....