How to avoid errors with smartd when hard disks spun down

published Jan 31, 2006, last modified Jun 26, 2013

Ross Burton chimes in with this question at Planet GNOME:

To reduce the noise generated by my NAS device (a LinkStation hacked to run Debian) I'm using hdparm -S 120 (spindown after 10 minutes). This seems to work, but now I'm getting this when (I think) it spins back up:

Jan 31 10:29:22 localhost kernel: hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
Jan 31 10:29:22 localhost kernel: hda: drive_cmd: error=0x04 { DriveStatusError }

Anybody know why this is, and if I can stop it? I'd ignore it but smartd mails me every time it happens...

I know what it is, and how to fix it.

Having "been there, done that", the hdparm trick to spin down disks is extremely useful. But sometimes they spin down right before smartd has scheduled a disk test. When spinning the disks up, they become unresponsive for some time to IDE commands, thus causing the error message that Burton is getting.

The solution? Configure smartd via smartd.conf to not check the disks when they are in power save mode. I was gonna say RTFM, but I'd rather suggest this: check the manual page for smartd.conf to see how it's done. Longish but more polite.

Good luck, Ross!