Aristarc Diez Redorta writes:
>is it possible to add DASD devices dinamically?
>I tried to do it following the instructions on the IBM RedBook Device
>drivers and Installation Commands anb I could'nt achieve it.

While different versions of distros provide various levels of support for
this, the manual steps for attaching DASD to a running system are pretty
much the same for all:

1) Define the DASD for the guest using CP to be some virtual device XXXX.
2) Add it to the DASD device list using the kernel's /proc interface:
        echo add XXXX > /proc/dasd/devices
3) Vary on the device:
        echo on XXXX > /proc/dasd/devices
3) Look up the Linux device name for the new device:
        Dev=`grep ^XXXX /proc/dasd/devices | cut -c28-33`
   That puts the device name into the $Dev variable, which will be "dasdf"
   or something like that.
4) Format the DASD: dasdfmt -f /dev/$Dev -b 4096
5) Build a partition table on it: fdasd -a /dev/$Dev

You are now ready to build a Linux filesystem on /dev/${Dev}1 and then
mount it.

A note about step 2: You cannot delete DASD devices from the kernel's
table, so if you have already added an entry for device XXXX to
/proc/dasd/devices, do not add another one.  You will just use up one of
the limited Linux device names (there's only 64 of them).

To dynamically remove the device, you do kind of the reverse:

1) Unmount the filesystem on that device if it is mounted
2) Vary off the device:
        echo off XXXX > /proc/dasd/devices
3) Undefine the DASD from the guest using CP.

If you are scripting this, remember that it may take some time for the
kernel to add or vary the device on or off, so you have to check to see if
it is done by reading /proc/dasd/devices and looking for the appropriate
keywords in the line for your device ("active" appears when it has been
varied on).

I've got this stuff working dynamically quite reliably, so if you still
have problems getting this going, just ask.
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

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