From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 09:55:32 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B64106566B for ; Thu, 5 Mar 2009 09:55:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id D8CBE8FC19 for ; Thu, 5 Mar 2009 09:55:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 236643684; Thu, 05 Mar 2009 10:55:29 +0200 Message-ID: <49AF9381.50709@FreeBSD.org> Date: Thu, 05 Mar 2009 10:55:29 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Daniel Thiele References: <200903041938.n24Jcqdr060153@lurza.secnetix.de> <49AF1C1B.3050604@gmx.net> In-Reply-To: <49AF1C1B.3050604@gmx.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: octavian.covalschi@gmail.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Spin down HDD after disk sync or before power off X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 09:55:32 -0000 Daniel Thiele wrote: > 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. I am not sure that there is any problem. Last 10 years drives using electromagnetic head positioning which mechanically parts heads on power down. > | [...] > | You can't do anything from > | userland at this point. If you want to insert a spin-down > | for your disks, you will have to modify the kernel. > > That is what I did and am still doing successfully since 2006. > See > http://lists.freebsd.org/pipermail/freebsd-acpi/2006-January/002375.html > for my initial problem description and > http://lists.freebsd.org/pipermail/freebsd-acpi/2006-February/002566.html > for the "solution". Note that back then David Tolpin > (dvd@davidashen.net) suggested to use > " ... & (ATA_SUPPORT_APM|ATA_SUPPORT_STANDBY)" > instead. > > I don't know if that is the way it should be done, but for me it worked > across 3 hard disks and two notebooks so far. I am aware that 3 disks > and 2 notebooks provide very limited test results, but maybe this work > around solves your problem, too. > > It would still be great, though, if a proper solution for this could be > permanently implemented into FreeBSD. That is, if the current behaviour > really is not that healthy to hard drives, as Joerg suggested. I have thought about doing that on device detach to prepare drive to mechanical shocks in case of drive physical removing. But to work properly it requires some changes in ATA core to be made first to protect against submitting commands to already physically removed drive.. I can agree with doing that on suspend if ACPI does not doing it automatically. But on system shutdown having meaning of reboot, I think, commanding drive IDLE will just lead to additional mechanical and power stress for drive and PSU when drives will be spin-up in just a few seconds after spin-down. -- Alexander Motin