On Wed Sep 15 10, Oliver Fromme wrote:
> Warren Block <wbl...@wonkity.com> wrote:
>  > [...]
>  > 8. Alexander Motin has an updated CAM version of the ATA system which 
>  > will eventually replace the existing one.  In -CURRENT, anyway.  He was 
>  > kind enough to look at my event handler.  My understanding is that he is 
>  > looking at implementing the head parking/standby mechanism in that new 
>  > code.
> 
> The patch below will work with the new CAM ATA driver
> (i.e. ada(4) disks).  It adds a sysctl, so you can switch
> the spin-down off if you're going to just reboot:
> # sysctl kern.cam.ada.spindown_shutdown=0

i haven't tested your patch yet, but i don't think deciding whether to spin
down the hdd should be decided merely from the sysctl value.

the hdd should spindown when a shutdown has been issued and not spindown,
if a reboot has been issued.

either people have the sysctl set to 1 in which case a reboot will cause a
spindown (which isn't healthy for the hdd)
...or people will set it to 0 in which case everything remains just the way it
is.

imo the sysctl should stay, but shuld have a different meaning. if it is set to
1 (which should be the default) a shutdown will issue a spindown; a reboot
won't.
if for some reason people want back the current behavior (no spindown even
during a shutdown) they need to set it to 0.

deciding whether freebsd reboots or shuts down cannot be done from a script,
since users might use the reboot or halt commands in which case (if i'm not
mistaken) all shutdown scripts get skipped.

cheers.
alex

> 
> This patch applies to stable/8, but I think it should
> work with current, too (I haven't tried because I don't
> have a machine running HEAD that has ada(4) disks).
> 
> Best regards
>    Oliver
> 
> <snip>
> 
> 
> -- 
> 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
> 
> Python is executable pseudocode.  Perl is executable line noise.

-- 
a13x
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to