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