Operating System - HP-UX
1752618 Members
4565 Online
108788 Solutions
New Discussion юеВ

Re: error when using vgcreate.

 
SOLVED
Go to solution
surendranath
Advisor

error when using vgcreate.

hqlabbu2:> vgcreate vg01 /dev/dsk/c1t5d0
Increased the number of physical extents per physical volume to 4341.
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.
11 REPLIES 11
Jeeshan
Honored Contributor

Re: error when using vgcreate.

it seems an error related to minor number. and comes generally when there is same minor number to another VG. post the command output here,

#ll /dev/*/group
a warrior never quits
surendranath
Advisor

Re: error when using vgcreate.

hqlabbu2:> ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Sep 3 17:23 /dev/vg00/group
crw-r--r-- 1 root sys 64 0x010000 Jan 22 00:21 /dev/vg01/group
hqlabbu2:>


Jeeshan
Honored Contributor

Re: error when using vgcreate.

delete the group file first,

#rm /dev/vg01/group

then create again

#mknod /dev/vg01/group c 64 0x010000
a warrior never quits
sujit kumar singh
Honored Contributor

Re: error when using vgcreate.

hi
u can do like this


#mkdir /dev/vg02
#mknod /dev/vg02/group c 64 0x020000
#vgcreate /dev/vg02 /dev/dsk/c1t5d0



but before that the disk /dev/dsk/c1t5d0 should have been pvcreated if that is a new disk and that had not been being used in the system earlier
the pvcreate has to be done on a new disk befpre u can use this with vgcreate
#pvcreate /dev/rdsk/c1t5d0

pvcreate creates the necessary LVM structures on a disk

remeber that pvcreate is a dangerous command and if u use this by mistake on a disk already being used in a system u are sure to destroy all data on this.


Regards
Sujit
Matti_Kurkela
Honored Contributor
Solution

Re: error when using vgcreate.

The error message may appear because the /etc/lvmtab file contains information about another volume group whose group device file is/was using minor 0x010000. This volume group may have been removed using an improper procedure.

To recover from this situation and make this VG minor number useable again, you may have to temporarily recreate the VG directory and the group file of that old VG and then run vgexport for that volume group.

First, you must find out the name of the old volume group that is still in /etc/lvmtab. If you have HP-UX 11.31 with the latest updates, you can use "lvmadm -l"; otherwise, use "strings /etc/lvmtab" and ignore the garbage characters that may appear. Does this list display a VG that does not actually exist any more?

If so, find the name of that VG (replace with it in commands below) and run:
mkdir /dev/
mknod /dev//group c 64 0x010000
vgexport -v -m /tmp/.map

The vgexport command will remove the /dev/ directory and the old information from the /etc/lvmtab file.
(Warning: if exists but is not active, this command will remove it. If you make a mistake, you may use your previous lvmtab listing and the /tmp/.map file to restore it with the vgimport command.)

After this, the minor number 0x010000 is again free for use, and you can complete the creation of vg01 as normal.

MK
MK
surendranath
Advisor

Re: error when using vgcreate.

Hi Matti,

I'm unable to use lvmadm -l command as OS is 11.11. when I do strings /etc/lvmtab doesnot show any old VG's. Two days ago, I deleted few VG's and their group files and rebooted the server. Now, when I'm trying to recreate new volume group with that minor number. It isn't allowing me to do so. Could you please tell me whether is there any way to use that minor number?.

sujit kumar singh
Honored Contributor

Re: error when using vgcreate.

hi

in lines of What Matti has to say, i would also suggest the same as

#vgexport /dev/vg01
#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgcreate /dev/vg01 /dev/dsk/c1t5d0

assuming that the disk /dev/dsk/c1t5d0 has no data u can also run a pvcreate on this

Regards
sujit
sujit kumar singh
Honored Contributor

Re: error when using vgcreate.

hi

how did u delete those VGs that u happened to do ?

if a vG and the disks u do not want to use on a system, it is always suggested that u do a vgexport to remove the VG.

that does few things

removes the entry of the VG from the /etc/lvmtab
removes the /dev/vgXX and the corresponding raw and block special files for the LVs from in there.

also it is a good practice to always do a vgexport in preview mode -p option with a 0m option so that u can get a map file of the VG.
this will save u lot of hard work if u have by mistake vgexport ed a wrong VG.

Then u want to finally remove the VG then do a vgexport straight away.

that is say vgXX u want tp remove from the system.

do

#vgexport -p -v -s -m /tmp/vgXX.map /dev/vgXX

this will vgexport that VG in Preview mode and create a map file /tmp/VGxx.map for u .

then do a vgexport to remove the VG from the system.

#vgexport /dev/vgXX
Regards
Sujit
surendranath
Advisor

Re: error when using vgcreate.

Hi Matti,

I tried all the steps you have written. I searched for all the map files in the server and found only one. I tried all the commands you gave me using that map file but did not work.
hqlabbu2:> strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c2t5d0
hqlabbu2:>

hqlabbu2:> find / -name *.map
/etc/hpC2400/hparray.map
/usr/obam/X/etc/keytables/keytable.map
/var/stm/config/tools/monitor/ha_disk_array.map
/var/stm/config/tools/monitor/msamon.map
/.ssh/vgunload.map

hqlabbu2:> mkdir /dev/vgunload
hqlabbu2:> rm -r /dev/vg01
hqlabbu2:> mknod /dev/vgunload/group c 64 0x010000
hqlabbu2:> vgexport -v -m /.ssh/vgunload.map /dev/vgunload
Beginning the export process on Volume Group "/dev/vgunload".
vgexport: Volume group "/dev/vgunload" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "/dev/vgunload".

hqlabbu2:> vgcreate /dev/vgunload /dev/dsk/c1t5d0
Increased the number of physical extents per physical volume to 4341.
vgcreate: Volume group "/dev/vgunload" 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.