Bug#499833: chccwdev cannot set device offline in Lenny
I have some new information. I happened to be logged on to the virtual Linux
server's virtual console in VM while attempting to vary the device offline in
a separate remote ssh session. When I did so, I saw messages on the virtual
console like I see during boot-up when the device first comes online. That
tells me that chccwdev (or echo redirection to the appropriate file in the
/sys virtual file system) does get the device offline, but the device is then
immediately brought online again by the dasd driver. Further testing seems to
indicate that a device which *IS NOT* specified in the dasd option of the
dasd_mod kernel module can be brought online and offline manually just fine.
But a device which *IS* specified in the dasd option of the dasd_mod kernel
module is immediately brought online again by the dasd_mod kernel module once
it is varied offline. This now appears to me to be a bug in the dasd_mod
kernel module, which is part of the Linux kernel itself. The dasd_mod kernel
module behaved as expected in the 2.6.18 kernel of etch (and earlier), but
somewhere between the 2.6.18 and 2.6.24 kernels, the aberrant behavior began.
In my case, I have a file called /etc/modprobe.d/dasd which contains the
options dasd_mod dasd=0.0.0200-0.0.0203
Any dasd device in the device number range 200-203 cannot be varied offline,
except for a few milliseconds. Then the dasd driver varies it back online
again. This is incorrect behavior. The driver should vary the device online
automatically at boot time, and assign device nodes to the devices in the
order that they are specified (200 = /dev/dasda, 201 = /dev/dasdb, etc.).
But if the device is varied offline manually, it should be left offline until
it is varied online manually again.
This ticket should be reassigned to the kernel.