Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: nmh1@ccdaw1.cc.rl.ac.uk (Nick Hill)
Subject: Re: HELP! How to create dev files for storgeworks -100304.336@compuserve.com (Claudia Schasiepen)
Date: 1995/06/09	[thread overview]
Message-ID: <3r92tj$1dh9@unixfe.rl.ac.uk> (raw)
In-Reply-To: 3r7mpm$us@dub-news-svc-6.compuserve.com


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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



  reply	other threads:[~1995-06-09  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
1995-06-12  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
read-only archive

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