1753773 Members
5290 Online
108799 Solutions
New Discussion юеВ

minor number

 
SOLVED
Go to solution
kunjuttan
Super Advisor

minor number

How to know the minor number for a new device?
15 REPLIES 15
Sunny123_1
Esteemed Contributor
Solution

Re: minor number

Hi

You can view the minor number in in /dev/vgname/group file

for example if you want to view groupfile of vg01 then

ll dev/vg01/group


it will show 0x010000 in last column of the output then 01 is minor number

remember it is in hexadecimal.

Regards
Sunny
R.K. #
Honored Contributor

Re: minor number

Hi Dipesh,

Is there any specific device you are looking for?

You will find minor number of devices under /dev directory and its sub-directories.

Don't fix what ain't broke
kunjuttan
Super Advisor

Re: minor number

Thanks Sunny.And that I know.But my question was if I want to create device file for a new device which is newly added I have to give the device number.How can I able to know this??
R.K. #
Honored Contributor

Re: minor number

To create spl device files:

Let the system detect your device:
and find hardware path:
# ioscan -fn

Create device file:
# insf -eH

Example:
If you have added a tape drive:
# ioscan -fnC tape
# insf -eH


Or simply you can do (recreate device file for everything):
# insf -e
Don't fix what ain't broke
kunjuttan
Super Advisor

Re: minor number

But if I want to create a VG I have to give the minor number with mknod command.Right?At that time How can I able to know the minor number??
SoorajCleris
Honored Contributor

Re: minor number

Hi ,

you need to
#ll /dev/*/group

then check which ever minor number is free, then use the free one .

Regards,
sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
Honored Contributor

Re: minor number

Hi ,

Remember till 11.23 you have "maxvgs" parameter and if it is set to 10 , you will not be able to create new VG if you complet

0X090000

and remember if you have only one VG with 0x000000 and if you are using 0X090000 next time it will not allow you to create.

So check which is lowest free and use it

cheers

sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
kunjuttan
Super Advisor

Re: minor number

Thanks Sooraj,
#ll /dev/*/group


What is this * indicates?just a directory or any special meaning?
Sunny123_1
Esteemed Contributor

Re: minor number

Hi

It will sort out the all the minor nubmer that is in use then you can give any number that which is not in use


Regards
Sunny