From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d1e7f9f3cbd882f9 X-Google-Attributes: gidfee84,public 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 Message-ID: <3r92tj$1dh9@unixfe.rl.ac.uk>#1/1 X-Deja-AN: 104036412 distribution: world references: <3r7mpm$us@dub-news-svc-6.compuserve.com> organization: Rutherford Appleton Labs, Oxon, Uk. keywords: dev rz28 reply-to: nmh1@axplr1.rl.ac.uk newsgroups: comp.unix.osf.osf1 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++