Operating System - HP-UX
1830657 Members
28544 Online
110015 Solutions
New Discussion

error in creating volume group

 
SOLVED
Go to solution
twtandigi.com.my
Frequent Advisor

error in creating volume group

hi all,

i have this particular error when i create a volume group.
how can i over come it?

root@smtp1:/>vgcreate /dev/vg02 /dev/dsk/c5t10d0
Increased the number of physical extents per physical volume to 17501.
vgcreate: Volume group "/dev/vg02" 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.

regards,
Calvin
19 REPLIES 19
Rajeev  Shukla
Honored Contributor

Re: error in creating volume group

Hi Calvin,

you are using a minor number for vg02 which already is being used by another. Check all the volume groups to see what minor number they have and use the one thats not being used. Do something linke this
# ll /dev/vg*/group
crw-r----- 1 root sys 64 0x000000 Sep 22 2004 /dev/vg00/group
crw-r----- 1 root sys 64 0x090000 Oct 28 2004 /dev/vg02/group
crw-r----- 1 root sys 64 0x050000 Oct 25 2004 /dev/vgxx/group
crw-r----- 1 root sys 64 0x0a0000 Oct 5 2004 /dev/vgyy/group
crw-r----- 1 root sys 64 0x030000 Dec 29 2004 /dev/vgzz/group

So as you see in column 6 which is the minor number, use the one that is not listed in your ll command.
say 0x010000 (in my case)
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x010000
then try doing vgcreate

Cheers
Rajeev
Joseph Loo
Honored Contributor
Solution

Re: error in creating volume group

hi,

r u extending or creating a new volume group?

if vg02 already exist, u should be extending. so, u may check:

# ls -ld /dev/vg*
whether vg02 exists, if so:
# vgextend /dev/vgr02 /dev/dsk/c5t10d0

if u r creating a new volume group:

# pvcreate -f /dev/rdsk/c5t10d0
# mkdir /dev/vgXX
# mknod /dev/vgXX/group c 64 0x0#0000
where # is a minor number which does not exist in /dev/vg*
# vgcreate vgXX /dev/dsk/c5t10d0

subsequently, u may create the logical volumes whether u have vgextend or vgcreate.

regards.
what you do not see does not mean you should not believe
saju_2
Respected Contributor

Re: error in creating volume group

Hi

While you create a VG , the minor number of the group file of the VG should be unique.

Find out the minor number which exists in your server by executing the below command

ll /dev/vg*/group|awk '{print $6,$10}'

The minor number should be 0xNN0000 where NN should be unique within a server.

Regards
CS
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

i am still getting another error
vgcreate: "/dev/vg02/group": not a character device.

what do should i do next?
Rajeev  Shukla
Honored Contributor

Re: error in creating volume group

Few things
1. can you post your output of
ll /dev/vg02/group
2. Does vg02 already exist or its a new VG you are trying to create.
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

ll /dev/vg02/group
crw-r--r-- 1 root sys 64 0x090000 Jul 13 12:10 /dev/vg02/group
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

i was trying to create a new vg group but i seem to hit a few setbacks
Sudeesh
Respected Contributor

Re: error in creating volume group

1. strings /etc/lvmtab : to see all the existing volume groups and devices. select an unused volume group name. Assume vg_new

2. mkdir /dev/vg_new

3. ll /dev/vg*/group : to list all the group files. Select an unused minor number for the new vg. Assume 0x050000.

4. mknod group c 64 0x050000 : create group file.

5. vgcreate /dev/vg_new /dev/dsk/c#d#t#


Sudeesh

The most predictable thing in life is its unpredictability
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

now i have a problem to rename the lvol of the new hard disk that i have placed on the system.
do you have any suggestion on what should i do to get the things to work?
lvol1 vg02 VxFS 69904 0 /tempimail
to
imail vg02 VxFS 69904 0 /tempimail
Joseph Loo
Honored Contributor

Re: error in creating volume group

hi,

aiyoh, never mind.

first, do this to check if vg02 exists:
# vgdisplay -v vg02

secondly, would like to know what other volume group exists:
# ls -ld /dev/vg*

please reply with output.

u may have to rm the /dev/vg02 and re-do the steps i send earlier.

regards.
what you do not see does not mean you should not believe
Rajeev  Shukla
Honored Contributor

Re: error in creating volume group

Seems like it does not recognize the device file or is corrupted.
Ok before we proceed plz reconfirm that you dont have any group file with the major number as 0x090000 and then remove the whole /dev/vg02 directory
and then follow the steps
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x090000
pvcreate /dev/dsk/c5t10d0
vgcreate /dev/vg02 /dev/dsk/c5t10d0
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

hi Joseph,

here is the information as required
what should i do next?

root@smtp1:/>vgdisplay -v vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 17501
VGDA 2
PE Size (Mbytes) 4
Total PE 17499
Alloc PE 17476
Free PE 23
Total PVG 1
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg02/lvol1
LV Status available/syncd
LV Size (Mbytes) 69904
Current LE 17476
Allocated PE 17476
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c5t10d0
PV Status available
Total PE 17499
Free PE 23
Autoswitch On


--- Physical volume groups ---
PVG Name imail
PV Name /dev/dsk/c5t10d0


root@smtp1:/> ls -ld /dev/vg*
drwxr-xr-x 2 root root 1024 Sep 1 2000 /dev/vg00
drwxrwxrwx 2 root sys 96 Aug 30 2000 /dev/vg01
drwxr-xr-x 2 root sys 96 Jul 13 12:14 /dev/vg02
Joseph Loo
Honored Contributor

Re: error in creating volume group

hi,

i am confused but after going thru the thread, i realise u have created vg02 with minor number 0x090000 and major number 64, correct me if I am wrong.

so, now your problem is how to rename /dev/vg02/lvol1 to /dev/vg02/imail? is that right?

besides this, i notice u have created Physical Volume Groups, imail as well.

regards.
what you do not see does not mean you should not believe
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

yup you got all the facts right.
that is the problem that i am currently encoutering.
do you have any idea how to over come it?
Sudeesh
Respected Contributor

Re: error in creating volume group

Instead of renaming, you can create another device file with new name having same minor number. See the example below:

I am creating new device file 'sudhi' for /dev/vg00/lvol9

#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 229376 162736 66184 71% /
/dev/vg00/lvol1 327680 106360 219648 33% /stand
/dev/vg00/lvol8 2621440 106432 2495408 4% /var
/dev/vg00/lvol7 2686976 2017160 664640 75% /usr
/dev/vg00/lvol4 229376 8688 219032 4% /tmp
/dev/vg00/lvol6 2523136 1581224 934608 63% /opt
/dev/vg00/lvol5 32768 8432 24160 26% /home
/dev/vg00/lvol9 229376 1165 213955 1% /sudhi

#cd /dev/vg00

#mknod sudhi b 64 0x000009 : creating block device

#mknod rsudhi c 64 0x000009 : creating charector device

#umount /sudhi

#mount /dev/vg00/sudhi /sudhi

#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 229376 162736 66184 71% /
/dev/vg00/lvol1 327680 106360 219648 33% /stand
/dev/vg00/lvol8 2621440 106440 2495400 4% /var
/dev/vg00/lvol7 2686976 2017160 664640 75% /usr
/dev/vg00/lvol4 229376 8688 219032 4% /tmp
/dev/vg00/lvol6 2523136 1581224 934608 63% /opt
/dev/vg00/lvol5 32768 8432 24160 26% /home
/dev/vg00/sudhi 229376 1165 213955 1% /sudhi


Hope this helps

Sudeesh







The most predictable thing in life is its unpredictability
Sudeesh
Respected Contributor

Re: error in creating volume group

This how the new files look:

#ll *sudhi
crw-rw-rw- 1 root sys 64 0x000009 Jul 13 11:15 rsudhi
brw-rw-rw- 1 root sys 64 0x000009 Jul 13 11:14 sudhi
#ll *lvol9
brw-r----- 1 root sys 64 0x000009 Jul 10 12:54 lvol9
crw-r----- 1 root sys 64 0x000009 Jul 10 12:54 rlvol9

Sudeesh
The most predictable thing in life is its unpredictability
Joseph Loo
Honored Contributor

Re: error in creating volume group

hi,

two ways; either u lvremove the existing logical volume and re-lvcreate but this time naming it imail or u may rename this way:

# mv /dev/vg02/lvol1 /dev/vg02/imail
# mv /dev/vg02/rlvol1 /dev/vg02/rimail

remember that in both cases, u have to amend /etc/fstab accordingly.

regards.
what you do not see does not mean you should not believe
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

Thank you very much for all the help and advice.
twtandigi.com.my
Frequent Advisor

Re: error in creating volume group

hi all,

Thank you for all your help and encouragement.