From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 4 17:42:54 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62CE71065675 for ; Wed, 4 Mar 2009 17:42:54 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id 1D7F18FC08 for ; Wed, 4 Mar 2009 17:42:53 +0000 (UTC) (envelope-from octavian.covalschi@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so1857004ywt.13 for ; Wed, 04 Mar 2009 09:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=YLSda1V6auyqsOQanU676aX/VZSs79TI+uydu/catjE=; b=mZju3t7Tk3/aPFXBjrEmZHa6RGy2rwUFlexokaaMBOsOdvZCSIkmmax5lY5udZ9YmV iXaG3pM75+TTFUgAJEeUMxkXvPf6n5K6TEpKcLilzIlEy62PHeALZBqyeTYDGAzIDXrQ usCrHYVbwyZbETb4X6cFYVSbHgpmAYqPJe//c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xm9Up618L9NQpjymU7u9u71bK1Gfps2dCyXFm84Wpwfk6oVG0TFK9vNr8XRrX0q8sQ fzPoL4Toeu4bo5fjSMLZ4d6jV0F6pOLQa6mujEn0E3K5XEnCvLY9n7pij3MgBOdBHWYq rC8dBgRUbVhUzN92AuEaM/W+thKZ7B6eoJKk4= MIME-Version: 1.0 Received: by 10.142.207.8 with SMTP id e8mr21241wfg.338.1236186629006; Wed, 04 Mar 2009 09:10:29 -0800 (PST) Date: Wed, 4 Mar 2009 11:10:28 -0600 Message-ID: From: Octavian Covalschi To: hackers@freebsd.org X-Mailman-Approved-At: Wed, 04 Mar 2009 18:18:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: 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: Wed, 04 Mar 2009 17:42:54 -0000 Hi everyone. 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. So basically I want to spin down hdd/put into sleep mode before system is powered off. I've tried to use rc.shutdown, but the sync of disks "wakes" HDD again... While searching for a solution, I noticed that reboot command/app _does_ spin down hdd right before it resets system power, I can hear how HDD is powered on after that... but halt (which is used by shutdown) doesn't do that... 2nd thing is I cannot find "halt.c" file, i wanted to take a look how it does it... although I'm up to date it's not not in /usr/src/sbin Thank you in advance