Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen)
@ 1995-06-08  4:00 100304.336
  1995-06-09  4:00 ` Nick Hill
  1995-06-12  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  0 siblings, 2 replies; 3+ messages in thread
From: 100304.336 @ 1995-06-08  4:00 UTC (permalink / raw)



Hi,

does somebody know how to calculate the minor numbers for devices
which are connected to a HSZ40 storage works controller? I'm using
KZTSA-AA as a SCSI adapter. I'm a bit confused with all the different 
LUNs ports and SCSI busses!
Thanks a lot!

Claudia



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen)
  1995-06-08  4:00 HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen) 100304.336
@ 1995-06-09  4:00 ` Nick Hill
  1995-06-12  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Hill @ 1995-06-09  4:00 UTC (permalink / raw)



In article <3r7mpm$us@dub-news-svc-6.compuserve.com>, 
<100304.336@compuserve.com> writes:
>
>Hi,
>
>does somebody know how to calculate the minor numbers for devices
>which are connected to a HSZ40 storage works controller? I'm using
>KZTSA-AA as a SCSI adapter. I'm a bit confused with all the different 
>LUNs ports and SCSI busses!
>Thanks a lot!
>
>Claudia
>

It is explained in the HS array manual but here is a simple little script
I wrote to do it as it is much easier than typing it all by hand!

#!/bin/sh
#
# make devices for HSZ40 served disks -- MAKEDEV will not do this
#
# usage hsz bus# target# lun#
#
# Nick Hill RAL 24/11/94
#
usage_error() {
 echo "Usage: $me bus target lun" >&2
 exit 1
}

PATH=/sbin:/usr/sbin:/usr/bin:$PATH
export PATH
me=`basename $0`
[ $# -lt 3 ] && usage_error

echo "bus is $1" >&2
echo "target is $2" >&2
echo "lun is $3" >&2
bname="/dev/rz`expr $1 '*' 8 + $2`$3"
cname="/dev/rrz`expr $1 '*' 8 + $2`$3"
minor=`expr $1 '*' 16384 + $2 '*' 1024 + $3 '*' 64`
echo "bname is $bname"
echo "minor is $minor"


echo "Make HSZ40 devices for $bname and $cname"

for partlet in a b c d e f g h
do
echo "mknod $bname$partlet b 8 $minor"
mknod $bname$partlet b 8 $minor
echo "mknod $cname$partlet c 8 $minor"
mknod $cname$partlet c 8 $minor
minor=`expr $minor + 1`
done
exit 1

-
Nick Hill

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Computing and Information Systems Department
Rutherford Appleton Laboratory
Chilton 
Didcot                                 Internet: nmh1@axprl1.rl.ac.uk
Oxfordshire                               Janet: nmh1@uk.ac.rl.axprl1
OX11 0QX                                 DECnet: omni:.uk.ac.rl.axprl1::nmh1
ENGLAND                                          20054::nmh1
                       WWW: http://www.cis.rl.ac.uk/people/nmh1/contact.html
Tel: +44 (0)1235-445598                       
Fax: +44 (0)1235-446626
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen)
  1995-06-08  4:00 HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen) 100304.336
  1995-06-09  4:00 ` Nick Hill
@ 1995-06-12  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1995-06-12  4:00 UTC (permalink / raw)



In article <3r7mpm$us@dub-news-svc-6.compuserve.com>, <100304.336@compuserve.com> writes:

>Hi,
>
>does somebody know how to calculate the minor numbers for devices
>which are connected to a HSZ40 storage works controller? I'm using
>KZTSA-AA as a SCSI adapter. I'm a bit confused with all the different 
>LUNs ports and SCSI busses!

If you have V3.2A (or later) installed use the script /dev/MAKE_RAID_LUNS
and don't worry about it.  For earlier versions, find one to send you
the script since it probably doesn't depend on anything particular
to V3.2.

For the logical unit 0 devices, just use the usual name:

	rz#; # = (bus * 8) + target-id

For non-LUN 0 devices you want to find a way to include the logical
unit in the name without creating names that will conflict with
other device names.  A common, but slightly broken convention is
to use the base drive number and then use a number for the logical
unit.  For example, the logical units for rz8 become rz80, rz81, etc.
Unfortunately, you could have enough SCSI busses on a system to have
an rz80, rz81, etc.

The naming convention used by the MAKE_RAID_LUNS script is:

	rz[b-h]#[a-h]

where, the first letter after the rz is the logical unit:

	b = LUN 1
	c = LUN 2
	etc.

You don't need to use A for LUN 0, because that is just the
base rz# name.

If you need to calculate the minor device numbers:

(bus * 16384) + (target * 1024) + (LUN * 64) + partition

(This is documented in the SCSI(7) manual page.)

>Thanks a lot!
>
>Claudia
>

--
Alan Rollow				alan@nabeth.cxo.dec.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-06-12  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-06-08  4:00 HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen) 100304.336
1995-06-09  4:00 ` Nick Hill
1995-06-12  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox