Steve wrote: >6.3.6.1 Emergency unload > [... ]Emergency unload >is intended to be invoked in rare situations. Because this operation >is inherently uncontrolled, it is more mechanically stressful than a >normal unload.
Yes. I have a Thinkpad T43 with a Hitachi Travelstar 5K100 (HTS541060G9AT00) and used to have the same problem: when shutting down the computer, the power would be removed from the hard disk while the heads were still loaded and the disk would then have to perform an emergency unload, which resulted in the disk making a loud click. This was the case for me from (I think) OpenBSD 3.9, when I first installed OpenBSD, up to and including 4.8. A few months ago I upgraded to 4.9 (stable) and since then I can hear the disk normally unloading the heads (a short series of 4-5 muffled clicks in very short succession with a slightly increasing pitch) before powering down, which is much quieter. My disk and I both thank whoever implemented that change :-) >>>>>On Sep 3, 2011, at 15:41, Steve wrote: >>>>>>Can anyone suggest what I could do to stop this from happening? Well, it depends... You could try to manually sync(8) the disk, do something like "atactl wd0 apmset 1" (YMMV) to put the disk into standby power saving mode, which would result in the heads being unloaded after a short time, and then halt(8) the computer. The problem is that, as part of the normal powerdown sequence, OpenBSD writes some logs of the shutdown on the disk (which would then reload its heads) and also syncs the disk (I don't know if that action alone would reload the disk heads or not if there were no actual data to sync to the disk; using sync(8) twice in sequence results in my disk's light blinking twice but whether the second blink actually means anything with regard to the disk's heads is an entirely different question...) You could try to play with halt(8)'s -q and -n options and see what happens, but I wouldn't recommend it... Even if you were lucky and it worked, it would be an annoyance to do that every time and it'd be very easy to make a mistake and lose data. You could write scripts to automate the process but you'd be on your own if something went wrong... You could also try the following: - put the root partition, /var/log, and everything else required for a normal shutdown, on a USB stick and boot from that - have all the other stuff (/home, /usr/local, etc) on your disk - before shutting down, manually unmount all the partitions that are on the disk (forcing the unmount if necessary), use atactl to put the disk in a low-power mode that results in the heads being unloaded, then shutdown the computer as usual. Slightly better than the above, but again it'd be annoying to do and it'd be easy to make a mistake... With all that being said, I happily used OpenBSD on my laptop for about five years with my hard disk doing an emergency unload on every shutdown, and never had any problem. It's up to you to decide whether you can sleep at night knowing that your disk goes through a very small number of "mechanically stressful" events every day. 20000 emergency unloads supported by your disk at a minimum (or so Hitachi says...) / 5 shutdowns a day (say) = about 11 years... So it might be an acceptable solution to you until time (and if...) an OpenBSD developer decides to fix your problem. You have backups anyway, right? :-) Philippe