Spin down HDD after disk sync or before power off

Oliver Fromme olli at lurza.secnetix.de
Thu Feb 4 12:46:37 UTC 2010


Warren Block wrote:
 > Oliver Fromme wrote:
 > > Alexander Best wrote:
 > > > imo this patch takes good care of the problem. would be nice to
 > > > have it in HEAD.
 > > 
 > > No -- *Please* make sure that the disks are only spun down
 > > upon an actual power-off command (i.e. when reboot() is
 > > called with the RB_POWEROFF flag).  In all other cases the
 > > disks should keep running.  It's not good to have the disks
 > > spin down and then immediately spin up again on every
 > > reboot.
 > 
 > Could you elaborate a little on why that's bad?  It seems like it would 
 > be similar to a standby/resume action.

While notebook disks are usually optimized to handle a high
number of start/stop cycles, this isn't true for normal
desktop or server disks, especially ones that are meant for
continuous operation (24/7).  This varies greatly between
vendors and models, though.

The point is that I defintitely wouldn't want to waste a
start/stop cycle when it's not necessary.

Also, it would be nice to have a way to disable the STANDBY
command alltogether for people who don't want it.  This could
easily be implemented with a sysctl.

 > Are there any other device drivers that differentiate the reboot and 
 > poweroff actions that could be used as inspiration or simply shamelessly 
 > copied in modifying ata-disk?

I'm sorry, I don't know.

If the ad_shutdown() function doesn't have easy access to
the boot "howto" variable, maybe the information could be
stored in a kenv variable?

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

I suggested holding a "Python Object Oriented Programming Seminar",
but the acronym was unpopular.
        -- Joseph Strout


More information about the freebsd-hackers mailing list