Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2009 14:30:57 -0600
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Spin down HDD after disk sync or before power off
Message-ID:  <20090306203057.GA49994@keira.kiwi-computer.com>
In-Reply-To: <20090304195614.GA179@britannica.bec.de>
References:  <c0f49ea0903040910w496f4a72m3c3ce6882e55c307@mail.gmail.com> <200903041938.n24Jcqdr060153@lurza.secnetix.de> <20090304195614.GA179@britannica.bec.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 04, 2009 at 08:56:14PM +0100, Joerg Sonnenberger wrote:
> On Wed, Mar 04, 2009 at 08:38:52PM +0100, Oliver Fromme wrote:
> > Octavian Covalschi wrote:
> >  > I'm looking a way to spin down HDD just right before power off. Why?
> >  > 
> >  > Because currently when I call "shutdown -p now", HDD is powered off at it's
> >  > full speed (7200.4) and as a result
> >  > I hear a noise of stopping/spinning down of HDD, and _this_ concerns me as
> >  > I'm afraid it can damage HDD.
> > 
> > You don't have to spin down a disk before powering it off.
> > The noise you hear is probably caused by the "autopark"
> > feature of the drive.  It is harmless.
> 
> This is not true. Many hard disks don't like having to do an emergency
> shutdown as it affects the disk life time negatively. That's what
> happens if you poweroff the machine when the disks are still spinning.

I believe you are incorrect.  Most hard drives do an "autopark" of the head
into the landing zone (which is near the spindle) when power is lost.  My
understanding is that because it is spinning so fast, the heads can fly for
quite a long time so the HDD has enough time to autopark and such an
operation does not consume much power.  Thus the operation can be performed
with a little capacitance or by using some of the mechanical energy in the
spindle.

If drives did not auto, there would be orders of magnitude more failures
due to head crashes.  The heads absolutely have to be retracted into the
landing zone if the spindle speed is too low or the drive will fail.

What's actually bad for the drives is the actual spinup and spindowns,
which require the head to sit in the very bumpy landing zone until the
drive reaches optimal spindle speed and thus enough airflow to safely move
the heads around the platter without contact.

Strangely, atacontrol(8) has a command for spindown (which is inherently
bad for drives yet still a reasonable feature) but there is no command for
spinup.  I wish there was a spinup command because I've seen drives that
won't do a spinup until they receive a special ATA command.  I was never
able to find any docs, so if anyone knows the command I'd be willing to
write a patch against atacontrol!

-- Rick C. Petty



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090306203057.GA49994>