1836384 Members
3910 Online
110100 Solutions
New Discussion

Re: HPUX mknod

 
SOLVED
Go to solution
Leslie Fischer
Frequent Advisor

HPUX mknod

Need help trying to figure out what the minor number is for my autochanger's picker. Have been told that I need to create a picker device using the sctl driver. Understand part of the document to create the new picker but am confused about the getting the minor number.
This is the output from an ioscan -fn:
ext_bus 1 0/0/8/0/1 c8xx CLAIMED INTERFACE SCSI C1010 Ultra160 Wide LVD
target 1 0/0/8/0/1.0 tgt CLAIMED DEVICE
autoch 0 0/0/8/0/1.0.0 schgr CLAIMED DEVICE HP ThinStor AutoLdr
/dev/rac/c1t0d0
target 2 0/0/8/0/1.5 tgt CLAIMED DEVICE
tape 1 0/0/8/0/1.5.0 stape CLAIMED DEVICE HP Ultrium 1-SCSI
/dev/rmt/1m /dev/rmt/1mn /dev/rmt/c1t5d0BEST /dev/rmt/c1t5d0BESTn
/dev/rmt/1mb /dev/rmt/1mnb /dev/rmt/c1t5d0BESTb /dev/rmt/c1t5d0BESTnb
Not sure how to get the hex number from the LUN number. Is there some tool or table available to help me covert the LUN to minor number?
Thanks
3 REPLIES 3
Steven E. Protter
Exalted Contributor
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: HPUX mknod

The use of the sctl driver implies that you will NOT use the autoch (schgr) device driver but rather use the SCSI pass-thru driver.

Note that the hardware path 0/0/8/0/1 refers to ext_bus 1; the '1' is your controller 'instance' number - the 'c' part. c1 in this case.

The listing under autoch for your picker indicates that the SCSI ID (target) is set to
0 - the 't' part and that the LUN is also '0' the 'd' part.

We now know that your device should be c1t0d0 -- although we could call it anything -- the major/minor device number tuples are all that matter.

Do an lsdev and note the major device number associated with the sctl driver. Probably 203.

For the minor device number, the first two hex digits represent the controller instance number (c1 - 01h); the next hex digit is the SCSI ID or target (t0 - 0h); the next hex digit is the LUN (d0 - 0h); the remaining 2 hex digits are driver dependent but 00h will work just fine in the case. Thus your minor device should be
010000h.

Now to make the node:


mkdir -p -m 755 /dev/robot
mknod /dev/robot/c1t0d0 c 203 0x010000
chmod 664 /dev/robot/c1t0d0

You should be good to go.


If it ain't broke, I can fix that.
Leslie Fischer
Frequent Advisor

Re: HPUX mknod

Thank you, that worked.