Linux – Prevent HDDs from spinning up before shutdown in Ubuntu/ZoL/SAS2008 environment

hard drivelinuxshutdownubuntu-14.04zfs

I am running Ubuntu 14.04.2 with ZFS on Linux. As I ran out of SATA ports on my Asus M5A78L-M/USB3, I bought a Dell PERC H200 card and crossflashed it to LSI 9211-8i P19 IT mode firmware to passthrough the drives transparently.

This works like a charm with the mpt2sas driver with SMART commands and so on, despite one drawback:

I spin down my pool drives automatically after a period of time with hdparm -y /dev/sdx. Before I got the H200 card, all my drives were connected to the motherboard and when I shut down the system, the system was shut down immediately without spinning up the drives.

Now, all drives that are connected to the H200 are spinned up first and the system does not shut down until all drives are spinned up.

So my question is:
How can I prevent Ubuntu from spinning up my disks, that are connected to the H200, before shutting down the system?

Maybe it's a standby/shutdown command that is send to the drives that causes the H200 to wake up the drives.

Best Answer

Short of patching your kernel, I don't think you can. During shutdown, the scsi disk driver issues a SYNCHRONIZE CACHE command to flush the disk's internal cache. This will cause the drive to spin up, then the drive is spun down again before shutting down.

Related Topic