After changing to backports kernel 3.2.0-0.bpo.3-amd64 there is no longer a wake of all drives between issuing reboot
and message Will now restart.
appears, with or without swap being enabled.
Note that the console "end_request I/O error, dev sdb, sector {0, 8, 16, 128, 4096}" error messages are still there when the drives are in standby state.
Update #1
The "Synchronizing SCSI cache before rebooting" issue re-appears in 3.2.0-0.bpo.4-amd64. Although both seem to share the same version of the mpt2sas module:
# modinfo /lib/modules/3.2.0-0.bpo.{3,4}-amd64/kernel/drivers/scsi/mpt2sas/mpt2sas.ko | grep ^version
version: 10.100.00.00
version: 10.100.00.00
Update #2
The issue doesn't seem to be kernel and storage module related. After changing back to kernel 2.6.32-5-amd64, setting all drives to standby, and commanding a reboot, there were no "Synchronizing SCSI cache", no drive spin ups, and therefore no delays.
Update #3
When turning off write cache hdparm -W0 /dev/sd?
and flushing the write cache with sync && sdparm --command=sync /dev/sd? && sleep 1
and finally setting the drive to standby using hdparm -y /dev/sd?
then there is no "Synchronizing SCSI cache" for every drive after running reboot
and seeing output "Mounting root filesystem read-only...done." and "Will now restart." when using:
- Linux debian 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64
- Linux debian 3.2.0-0.bpo.3-amd64 #1 SMP Thu Aug 23 07:41:30 UTC 2012 x86_64
Kernel 3.2.0-0.bpo.4-amd64 is faulty and does "Synchronizing SCSI cache" for every drive on every reboot
.
Best Answer
In file /etc/grub.d/30_os-prober the line
makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the
os-prober
that needs to be disabled.apt-get --purge remove os-prober
.$ which os-prober
. Output might look like:/usr/bin/os-prober
. The remove the executable rights for all users for that file:# chmod a-x /usr/bin/os-prober
$ locate /30_os-prober
. Output might look like:/etc/grub.d/30_os-prober
. The remove the executable rights for all users for that file:# chmod a-x /etc/grub.d/30_os-prober
/etc/grub.d/30_os-prober
. For example by making theGRUB_DISABLE_OS_PROBER=true
option work in our grub version 1.98. This can be done by inserting in file/etc/grub.d/30_os-prober
the code below the lineset -e
:...