From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4D3611387FD for ; Wed, 11 Jun 2014 13:41:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0A555E0B5D; Wed, 11 Jun 2014 13:41:00 +0000 (UTC) Received: from uberouter3.guranga.net (unknown [78.25.223.226]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C9749E0B40 for ; Wed, 11 Jun 2014 13:40:58 +0000 (UTC) Received: from [192.168.18.15] (unknown [212.67.108.34]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by uberouter3.guranga.net (Postfix) with ESMTPSA id 9384182C13 for ; Wed, 11 Jun 2014 14:40:57 +0100 (BST) Message-ID: <53985C69.1040303@thegeezer.net> Date: Wed, 11 Jun 2014 14:40:57 +0100 From: thegeezer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Problem with power management of SATA hard drives References: <539855C0.4060209@ramses-pyramidenbau.de> In-Reply-To: <539855C0.4060209@ramses-pyramidenbau.de> Content-Type: multipart/alternative; boundary="------------080005040604020508020603" X-Archives-Salt: 00eb0958-e864-4acf-9206-ab8b796410bc X-Archives-Hash: 1270a0d5f905ffba3f67d9a1d862024d This is a multi-part message in MIME format. --------------080005040604020508020603 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 06/11/2014 02:12 PM, Ralf wrote: > Hi there, > > I'm using Gentoo ~amd64 on my NAS. > > This is my setup: > Mainboard - Asus E35M1 > CPU - AMD E350 > HDD - 1x 500GiB WD Caviar Green WD5000AADS (root) > HDD - 4x 3TiB WD Caviar Green WD30EZRX (Raid10) > > As these hard drives are desktop hard drives and not designed for 24/7 > purposes, I want to spin them down when they are not in use. > (And in fact, they will probably be idling most of the time, so let's > save energy) > > I'm able to force spin down those drive by using hdparm -y. hdparm -C > then tells me, that they switched from active/idle to standby. > Setting standby-time using hdparm -S also seems to work fine: > > hdparm -S 10 /dev/sdb > > /dev/sdb: > setting standby to 10 (50 seconds) > > But this does not standby my drive after 50 seconds. So I tried to set > the Power Management Level: > > hdparm -B 5 /dev/sdb > > /dev/sdb: > setting Advanced Power Management level to 0x05 (5) > HDIO_DRIVE_CMD failed: Input/output error > APM_level = not supported > > > Obviously, my system does not support APM what I can hardly believe... > So I tried to enable APM but my kernel configuration doesn't allow me > to enable APM support as long as I use a 64 bit kernel - APM option is > only available for 32 bit kernels. > > What am I doing wrong? My hardware is *relatively* new and I don't > believe that it doesn't support those power management features. > > But besides that, does anyone have further tips or tricks to protect > hard drives? E.g. try to minimize Load Cycle Count, ... > > Output of hdparm -I: http://pastebin.com/RyAU6u8T > > Cheers, > Ralf 50 seconds is very small timeout, be wary of spinup/spindown cycles which imho are worse than always spinning. depending on what is accessing /dev/sdb you might find that it sleeps then immediately is woken. lsof is your friend here. this is how I do it (my time is ten mins) # /etc/conf.d/hdparm # or, you can set hdparm options for all drives all_args="-S120" then.. # /etc/init.d/hdparm start --------------080005040604020508020603 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 06/11/2014 02:12 PM, Ralf wrote:
Hi there,

I'm using Gentoo ~amd64 on my NAS.

This is my setup:
Mainboard - Asus E35M1
CPU - AMD E350
HDD - 1x 500GiB WD Caviar Green WD5000AADS (root)
HDD - 4x 3TiB WD Caviar Green WD30EZRX (Raid10)

As these hard drives are desktop hard drives and not designed for 24/7 purposes, I want to spin them down when they are not in use.
(And in fact, they will probably be idling most of the time, so let's save energy)

I'm able to force spin down those drive by using hdparm -y. hdparm -C then tells me, that they switched from active/idle to standby.
Setting standby-time using hdparm -S also seems to work fine:
hdparm -S 10 /dev/sdb

/dev/sdb:
 setting standby to 10 (50 seconds)
But this does not standby my drive after 50 seconds. So I tried to set the Power Management Level:
hdparm -B 5 /dev/sdb

/dev/sdb:
 setting Advanced Power Management level to 0x05 (5)
 HDIO_DRIVE_CMD failed: Input/output error
 APM_level      = not supported

Obviously, my system does not support APM what I can hardly believe...
So I tried to enable APM but my kernel configuration doesn't allow me to enable APM support as long as I use a 64 bit kernel - APM option is only available for 32 bit kernels.

What am I doing wrong? My hardware is *relatively* new and I don't believe that it doesn't support those power management features.

But besides that, does anyone have further tips or tricks to protect hard drives? E.g. try to minimize Load Cycle Count, ...

Output of hdparm -I: http://pastebin.com/RyAU6u8T

Cheers,
  Ralf

50 seconds is very small timeout, be wary of spinup/spindown cycles which imho are worse than always spinning.

depending on what is accessing /dev/sdb you might find that it sleeps then immediately is woken.  lsof is your friend here.
this is how I do it (my time is ten mins)

# /etc/conf.d/hdparm
# or, you can set hdparm options for all drives
all_args="-S120"


then..
# /etc/init.d/hdparm start




--------------080005040604020508020603--