Operating System - HP-UX
1833043 Members
2637 Online
110049 Solutions
New Discussion

Why use major number as 64.

 
jkumar
Advisor

Why use major number as 64.

Hello All,

Can anyone explain ,
why we use major number as 64 ?
Can we change the major ?
Is it depend on kernal bit ? ( 32bit 64 bit)

One more question

Where will be the default loaded kernal drivers located in hp-ux ?

Jai,,,,
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: Why use major number as 64.

I assume that this is an LVM-related question so:

1) Because that's the way the LVM device driver was designed.

2) No (at least without great difficulty and access to source code).

3) No.
If it ain't broke, I can fix that.
Court Campbell
Honored Contributor

Re: Why use major number as 64.

I think you need to look up the definition for the word arbitrary.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Dhananjaya Amarakoon
Regular Advisor

Re: Why use major number as 64.

Hi Friend

We don't use major number as 64 every time. major number represents the kernel driver use for the device.
So major number change accourding to the device that we use.

64 mean, it is related to lvm driver. if you use another device , the major number change accourding to that driver.

major number depends on Kernel driver not on the kernel bit.


Thanks & Regards

Dhananjaya Amarakoon
nishith
Frequent Advisor

Re: Why use major number as 64.

Hi Kumar,

major number associates the driver number which the kernel uses when it access the devices.this number cannot is fixed.

For LVM it is 64. you can see the varios device driver major number using the lsdev command.

node2#lsdev | more
Character Block Driver Class
0 -1 cn pseudo
1 -1 asio0 tty
2 0 sioflop unknown
2 0 sioflop unknown
3 -1 mm pseudo
4 -1 iomem pseudo
5 -1 dev_olar olar
6 -1 consp1 unknown
7 -1 SCentIf unknown
8 -1 udp6 pseudo
10 -1 udp pseudo
11 -1 tcp6 pseudo
12 -1 tcp pseudo
13 -1 rawip6 pseudo
14 -1 rawip pseudo
15 -1 nuls pseudo
16 -1 ptym ptym
17 -1 ptys ptys
18 -1 ip6 pseudo
19 -1 ip pseudo
20 -1 arp pseudo
21 -1 func0 tty
22 -1 gvid unknown
23 -1 olar_psm_if olar
25 -1 ciss ext_bus
26 -1 tlcotsod pseudo
27 -1 dmem pseudo
28 -1 diag0 diag
31 -1 tlcots pseudo
32 -1 tlclts pseudo
33 -1 lpr0 unknown
36 -1 devkrs pseudo
37 1 dmp vxvm
44 -1 usbd unknown
45 -1 hub unknown
46 -1 netdiag1 unknown
48 -1 hid unknown
49 -1 hcd unknown
50 -1 evp pseudo
51 -1 fcd fc
54 -1 fcp fcp
57 -1 fddi4 lan
58 -1 ipmi unknown
61 -1 ipsecpol pseudo
62 -1 ipseckey pseudo
63 -1 mpt ext_bus
64 64 lv lvm



regds,

nishith
nishith
Frequent Advisor

Re: Why use major number as 64.

ooopps typo-error..... this number cannot change. it is fixed.
Bill Hassell
Honored Contributor

Re: Why use major number as 64.

The major number is nothing more than the ID number of each driver. People need need something more meaningful than a number when configuring a kernel. Device files are nothing more than the ID (major number) of the driver and the options specific to this driver (minor number).

Now the ID numbers are setup by the driver writers and may change between major versions of the OS. So a tape driver ID number may be different between version 9.0, 10.0 and 11.11.

The default drivers are included in the /stand/system file, but it is easier to get started with HP-UX kernel features using the sam program.


Bill Hassell, sysadmin