Re: Mknod command

 
SOLVED
Go to solution
Kevin_107
Regular Advisor

Mknod command

Sorry that should have read...When issuing the mknod command how do I determine the minor number ?!?!
He who laughs last.....doesnt get the joke !!
9 REPLIES 9
Clemens van Everdingen
Honored Contributor
Solution

Re: Mknod command

Hi,

You will have to look in /dev/vgxx for example to see waht minors already exist and pick that does not exist.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Emmanuelle
Advisor

Re: Mknod command

ll /dev/vg*/group

Re: Mknod command

Kevin,

in order to keep somewhat of a system standard, I usually assign my minor numbers to match my VGnn, i.e vg01 would have a minor number of 00x010000, vg02=00x020000 and so on.

Andy
Clemens van Everdingen
Honored Contributor

Re: Mknod command

Hi,

correct ! I forgot the /group

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Chris Fadrowski
Super Advisor

Re: Mknod command

just be careful to remember this is in hex. When you get up to lets say vg11 and higher you will need to convert this number (11). And the Letter associated with it... ie... 00x0E0000
doug hosking
Esteemed Contributor

Re: Mknod command

It's not clear to me from the question why previous responders assumed the question was about disks. Every device file has a major and minor number, with the minor number generally containing information about the unit number and (sometimes) operational modes for the device. These modes vary from driver to driver (such as whether a tape drive should rewind on last close, or configuration attributes for a terminal device), so it's not possible to give a totally useful answer without knowing which specific device file you're talking about, and, in some cases, which version of HP-UX you are running.
Clemens van Everdingen
Honored Contributor

Re: Mknod command

Hi,

Doug is right !
There are other possibilities.
For example a jukebox device or modem devive etc.
Bu tmost of the time the documentation about the device will guide you.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
T G Manikandan
Honored Contributor

Re: Mknod command

minor number's format is like so 0xxx0000 whereby xx can have the value between 00 and ff

It depends on the maxvgs parameter.
The default value of maxvgs(maximum volume groups) is 10.

Like
vg00 = 0x000000
vg01 = 0x010000

If maxvgs is more than 10,then
vg10=0x0a0000
vg15 = 0x0f0000

It is not that it should be in this order.
you can use the minor numbers if they are not used.
They should be unique.
YOu can just do a
ll /dev/vg*/group
to find out the used ones.

Thanks
Trevor Parfitt
Occasional Advisor

Re: Mknod command

Volume groups do not have to begin with vg
So I use the command

find .|grep group|xargs ll|sort -k6