Quote:>scsi-idle spins the drives down alright, but when they come back up the
>system hangs. Anyone has got an idea whats wrong here ?
I had problems with scsi-idle when used with disk drives that go into
CHECK CONDITION: UNIT ATTENTION status after having been spun down and
spun back up.
There's some code in the SCSI probing code that can clear a UNIT
ATTENTION when the devices are initially probed and spun up (all you
have to do is read the sense codes). The main portion of the sd.c
disk code does not deal gracefully with UNIT ATTENTION, though.
During normal operation, UNIT ATTENTION means "something about the
device has changed behind your back, dear host, so you should re-query
the drive to get a fresh idea of its actual characteristics." The
Linux drivers seem to have been written on the assumption that [1]
this isn't supposed to happen, or [2] is relevant only for removable
SCSI media such as SyQuest drives which are going to need some amount
of manual intervention (e.g. umount/mount) anyhow.
I experimented with a patch to the mid-level SCSI code which would
deal with a UNIT ATTENTION by simply reading the sense codes (this is
normally done anyhow) and then just reissuing the command. This
seemed to allow most SCSI disks to work correctly with the scsi_idle
feature.
I haven't bothered to keep this patch up-to-date, as I've stopped
using scsi_idle. Even with the patch, it didn't seem to work
correctly if the drive being spun down/up has an active swap partition
on it - something about the swapper seemed to be more sensitive to the
drive being not-ready fairly quickly, and the system would panic. As
I only have one drive in my machine these days, it doesn't make sense
to try to spin it down.