Package: sysconfig-hardware
Version: 0.0.10
Severity: normal

When a DASD device is configured via sysconfig-hardware, it cannot be
varied offline.  (Strictly speaking, it can be varied offline, but it
then comes back online again immediately.)  I have been plagued with this
bug for a long time (see archived Debian bug report 499833), but I have
finally found the cause.  The bug is in a udev rule provided by the
sysconfig-hardware package.  The file names are

   /lib/udev/rules.d/85-sysconfig-hardware.rules
   /etc/udev/rules.d/85-sysconfig-hardware.rules

The two files are identical.
As currently packaged, the file looks like this:

   SUBSYSTEM=="ccw", WAIT_FOR_SYSFS="online"
   SUBSYSTEM=="ccw", RUN+="/sbin/hwup -A -D $devpath $env{SUBSYSTEM} $kernel"

The first rule doesn't seem to be causing a problem,
but the second rule is definitely in error.  The second rule
will match any ACTION value (add, change, remove, etc.).  It should only
match the "add" action.  Thus, this file should look like this:

   SUBSYSTEM=="ccw", WAIT_FOR_SYSFS="online"
   SUBSYSTEM=="ccw", ACTION=="add", RUN+="/sbin/hwup -A -D $devpath 
$env{SUBSYSTEM} $kernel"

The above change must be made to both copies of the file:
one in /lib/udev/rules.d and one in /etc/udev/rules.d.
(I'm not sure why the exact same file has to exist in both
places, but that is how things are currently set up.)

I have tested this on my system.  The devices are still brought online
at boot time, as they were before; but now a device configured by 
sysconfig-hardware
can be varied offline after booting (if one can get it unmounted).  For example,

   umount /boot
   echo 0 >/sys/bus/ccw/devices/0.0.0201/online

Note: the original example in Debian bug report 499833 is a poor example.
I now use the regular ECKD or FBA driver for the /boot partition all the
time.  But there are other reasons to take a device offline while the
system is running.  For example, maybe the disk is full and you need
to replace it with a larger one.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to