From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 5 19:49:11 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 05F1D1065670 for ; Thu, 5 Mar 2009 19:49:11 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id DAAE38FC18 for ; Thu, 5 Mar 2009 19:49:10 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n25JnAo24064; Thu, 5 Mar 2009 11:49:10 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n25JnAn28799; Thu, 5 Mar 2009 11:49:10 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Thu, 5 Mar 2009 11:49:10 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Tobias Blersch In-Reply-To: <49B02211.1010809@abitos.org> Message-ID: References: <200903050758.n257wod8088426@lurza.secnetix.de> <49B02211.1010809@abitos.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: 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 19:49:11 -0000 On Thu, 5 Mar 2009, Tobias Blersch wrote: > Oliver Fromme wrote: >> > Joerg Sonnenberger wrote: >> > 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. >> >> Can you point to any authoritative information (URL) about >> that claim, such as vendor specs, white paper or similar? > > http://www.hitachigst.com/tech/techlib.nsf/techdocs/28DCCB17E0EEC5A086256F4E006E2F5B > > Thats the specification for my notebooks hard drive. Section 6.6 > Reliability gives data about how to power-off the disk. It also contains > numbers of supported load/unloads and emergency unloads. Emergency > unloads are invoked when the heads are still loaded and power fails. Ok, I didn't know that. There are some drives that can unload the heads normally on power loss and don't need any special handling, and I was under the mistaken impression that this was universal. But the documentation suggests that this should be a BIOS function. When the kernel tries to poweroff the system, isn't that normally done via the BIOS (perhaps with ACPI/APM)? So maybe the BIOS is supposed to unload the heads (by sending a standby/sleep command) before cutting the power. This makes sense in some ways. Suppose the drive is attached to a weird ATA controller that FreeBSD doesn't know anything about. (Maybe it's used by the other system in a dual-boot setup.) There's no way that FreeBSD could send it a power-down sequence, but the BIOS could. Perhaps the OP's BIOS for some reason doesn't do this correctly. -- Nate Eldredge neldredge@math.ucsd.edu