Right.  The script I wrote, which is a little less elegant, uses /proc/dasd/devices, 
and builds nodes for only "active" devices.

# $Id: dasdnode,v 1.1 2003/05/19 17:36:03 root Exp $
grep active /proc/dasd/devices | while read DASDENT ; do
  DEV=${DASDENT:27:6}
  if [ ! -b /dev/$DEV -a ${DEV:0:4} = dasd ] ; then
    MAJ=${DASDENT:15:3}
    MIN=${DASDENT:19:3}
    mknod /dev/$DEV b $MAJ $MIN
    chown root:disk /dev/$DEV
    chmod 660 /dev/$DEV
    mknod /dev/${DEV}1 b $MAJ $((MIN + 1))
    chown root:disk /dev/${DEV}1
    chmod 660 /dev/${DEV}1
    mknod /dev/${DEV}2 b $MAJ $((MIN + 2))
    chown root:disk /dev/${DEV}2
    chmod 660 /dev/${DEV}2
    mknod /dev/${DEV}3 b $MAJ $((MIN + 3))
    chown root:disk /dev/${DEV}3
    chmod 660 /dev/${DEV}3
  fi
done



> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
> Post, Mark K
> Sent: Thursday, April 22, 2004 2:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [LINUX-390] more than 26 disks
>
>
> Note that this is a rather brute force method (it does not
> check to see if
> the nodes already exist), and that it will only define nodes
> for volumes
> that have already been dasdfmt'ed, and fdasd'd, and the
> appropriate DASD
> kernel modules loaded.  Those caveats aside, it'll create
> what is needed.
>
>
> Mark Post
>
> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
> Richard Troth
> Sent: Thursday, April 22, 2004 2:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: more than 26 disks
>
>
>         tail +3 /proc/partitions \
>         | awk '{print "mknod -m 600 /dev/" $4, "b", $1, $2}' \
>         | sh -x
>
> -- R;
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access
> instructions, send email
> to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO
> LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>

==============================================================================

If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.

Click here for important additional terms relating to this e-mail.
     <http://www.ml.com/email_terms/>

==============================================================================

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to