Spin down HDD after disk sync or before power off
gary.jennejohn at freenet.de
Wed Jan 27 09:44:35 UTC 2010
On Tue, 26 Jan 2010 20:17:23 +0100 (CET)
Alexander Best <alexbestms at wwu.de> wrote:
> hi there,
> because of kern/140752 i looked through a discussion back in 2009
> concerning freebsd's hdd spin down procedure. right now ATA_FLUSHCACHE is
> being used although the hitachi hdd specs referenced in the pr say that this
> will not cause proper load/unload and thus an emergency unload will occur
> which reduces the life expectancy of hdds dramatically (20.000 shutdowns vs.
> 600.000 shutdowns). unfortunately the discussion back then didn't come up with
> any sort of decision/patch.
> attached you'll find a very simple patch which issues ATA_STANDBY_IMMEDIATE
> instead of ATA_FLUSHCACHE during hdd spin down.
> could somebody with hdd knowledge comment on this? this matter seems quite
> important since there may be a chance that the current spin down mechanism in
> freebsd damages hdds!
What if the disk doesn't support ATA_STANDBY_IMMEDIATE? Your patch then
negates the benefit of calling ad_shutdown(), namely flushing the cache,
I suggest putting your new code at the top and leaving the old code in an
More information about the freebsd-hackers