Re: [gentoo-user] How can I power disk off?

2011-10-07 Thread Mark Knecht
On Thu, Oct 6, 2011 at 6:14 PM, Michael Mol mike...@gmail.com wrote:

 On Oct 6, 2011 9:06 PM, Mark Knecht markkne...@gmail.com wrote:

 On Thu, Oct 6, 2011 at 1:28 PM, Michael Mol mike...@gmail.com wrote:
  On Thu, Oct 6, 2011 at 4:21 PM, Mark Knecht markkne...@gmail.com
  wrote:
  On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
  My worry was that if the mdraid daemon saw one drive gone - either
  when starting to spin down or when one spins up slowly - and if mdraid
  didn't understand that all this stuff was taking place intentionally
  then it might mark that drive as having failed.
 
  Does mdraid even have an awareness of timeouts, or does it leave that
  to lower drivers? I think the latter condition is more likely.
 
  I suspect, though, that if your disk fails to spin up reasonably
  quickly, it's already failed.
 

 In general I agree. However drives that are designed for RAID have a
 feature known as Time Limited Error Recovery (TLER) which supposedly
 guarantees that they'll get the drive back to responding fast enough
 to not have it marked as failed in the RAID array:

 http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

 When I built my first RAID I bought some WD 1TB green drives, built
 the RAID and immediately had drives failing because they didn't have
 this sort of feature. I replaced them with RAID Edition drives that
 have the TLER feature and have never had a problem since. (Well, I
 actually bought all new drives and kept the six 1TB drives which I'd
 mostly used up for other things like external eSATA backup drives,
 etc...)

 Anyway, I'm possibly over sensitized to this sort of timing problem
 specifically in a RAID which is why I asked the question of Paul in
 the first place.

 My first RAID was with three Seagate economy 1.5TB drives in RAID 5, shortly
 followed by three 1TB WD black drives in RAID 0. I never had the problems
 you describe, though I rebuit the RAID5 several times as I was figuring
 things out. (the 3TB RAID0 was for some heavy duty scratch space.)

Yeah, I understand. This sort of problem, I found out after joining
the linux-raid list, is _very_ dependent on the _exact_ model of
drives chosen to build the RAID. I've had exactly ZERO problems with
any the 2 drive RAID0's, 3  5 drive RAID1's and 5 drive RAID6's that
I built using WD RAID Edition drives. They've run for 18 months and
nothing has ever gone off line or needed any attention of any type.
They just work.

On the other hand all the RAID0  RAID1's that I build using the WD
1TB _Green_ drives simply wouldn't work reliably. They'd go off line
every day or two, and I'm talking in the very same computer. No other
differences hardware wise. I've heard of people using the same drive
model (but possibly different firmware) having similar problems until
they got a WD app to twiddle with the firmware, and others that never
got the drives working well at all. The drives are perfectly fine
non-RAID.

I appreciate the inputs. It's an interesting subject and hearing other
people's experiences helps put some shape around the space.

Cheers,
Mark



[gentoo-user] How can I power disk off?

2011-10-06 Thread Jarry

Hi,

In my server I have a few disks which must be running 24/7,
but I also have a single big hard-drive, which is used only
for a few minutes every day, just for backups. How could I
power disk off when not needed (and on again when needed)
in order to save a little power and prolong its life?

Jarry
--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Mark Knecht
On Thu, Oct 6, 2011 at 12:14 PM, Jarry mr.ja...@gmail.com wrote:
 Hi,

 In my server I have a few disks which must be running 24/7,
 but I also have a single big hard-drive, which is used only
 for a few minutes every day, just for backups. How could I
 power disk off when not needed (and on again when needed)
 in order to save a little power and prolong its life?

 Jarry
 --
 ___
 This mailbox accepts e-mails only from selected mailing-lists!
 Everything else is considered to be spam and therefore deleted.



Look into keywords such  as 'Linux disk spin down' in Google. It
doesn't completely remove power but if your disks support it then it
does significantly reduce power consumed by the drive. I have no idea
what's actually in portage to make this easy.

HTH,
Mark

http://www.cs.cmu.edu/~mukesh/hacks/spindown/t1.html



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Alex Schuster
Jarry writes:

 In my server I have a few disks which must be running 24/7,
 but I also have a single big hard-drive, which is used only
 for a few minutes every day, just for backups. How could I
 power disk off when not needed (and on again when needed)
 in order to save a little power and prolong its life?

Use hdparm -Y to spin it down immediately, or hdparm -Sn to set a
duration of idle time until it will spin down automatically. See the
hdparm man page for the -S parameter and more information.

You can set the -S command in /etc/conf.d/hdparm. If you want the drive
to spin down right after booting, do this in /etc/local.d/.

Wonko



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Paul Hartman
On Thu, Oct 6, 2011 at 2:14 PM, Jarry mr.ja...@gmail.com wrote:
 Hi,

 In my server I have a few disks which must be running 24/7,
 but I also have a single big hard-drive, which is used only
 for a few minutes every day, just for backups. How could I
 power disk off when not needed (and on again when needed)
 in order to save a little power and prolong its life?

Use hdparm to set the power-saving level. Also look into general
power-saving tips for linux laptop users which may help reduce
unnecessary accesses to that drive. Maybe even use laptop-mode-tools.



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Dale

Jarry wrote:

Hi,

In my server I have a few disks which must be running 24/7,
but I also have a single big hard-drive, which is used only
for a few minutes every day, just for backups. How could I
power disk off when not needed (and on again when needed)
in order to save a little power and prolong its life?

Jarry


Look into hdparm and the -S option.  That could be what you want.

Dale

:-)  :-)



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Mark Knecht
On Thu, Oct 6, 2011 at 12:38 PM, Paul Hartman
paul.hartman+gen...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 2:14 PM, Jarry mr.ja...@gmail.com wrote:
 Hi,

 In my server I have a few disks which must be running 24/7,
 but I also have a single big hard-drive, which is used only
 for a few minutes every day, just for backups. How could I
 power disk off when not needed (and on again when needed)
 in order to save a little power and prolong its life?

 Use hdparm to set the power-saving level. Also look into general
 power-saving tips for linux laptop users which may help reduce
 unnecessary accesses to that drive. Maybe even use laptop-mode-tools.


Paul,
   Would hdparm be advisable if the drive was part of a RAID? I suspect not.

   I don't think this applies to the OP but for the sake of discussion
why not include RAID as part of the solution, if possible.

- Mark



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Paul Hartman
On Thu, Oct 6, 2011 at 2:44 PM, Mark Knecht markkne...@gmail.com wrote:
 Paul,
   Would hdparm be advisable if the drive was part of a RAID? I suspect not.

   I don't think this applies to the OP but for the sake of discussion
 why not include RAID as part of the solution, if possible.

I use hdparm to set power-saving on all members of my RAID5 and it
works (in my case, I'm setting them to never spin-down). I created a
file /etc/local.d/hd-power-level-fix.start containing one line:

hdparm -B 254 /dev/sd[abcdef]

which automatically sets those drives to never spin down.

In my original recommendation, I hadn't considered hdparm's spindown
immediately option. I was thinking of the -B command like I used
above, to adjust the spin down after X idle time option. If all
members of the RAID have the same idle time they'll probably all spin
up and down together under normal usage (well, depending what kind of
RAID it is, I suppose). In my case, I found the click, whirr, click,
whirr, click, whirr, click, whirr, click, whirr waiting for 5 disks
to spin-up when I accessed the RAID annoying, so I disabled it. (I
have not done any power-consumption measurements to see what that's
costing me...)



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Mark Knecht
On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
paul.hartman+gen...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 2:44 PM, Mark Knecht markkne...@gmail.com wrote:
 Paul,
   Would hdparm be advisable if the drive was part of a RAID? I suspect not.

   I don't think this applies to the OP but for the sake of discussion
 why not include RAID as part of the solution, if possible.

 I use hdparm to set power-saving on all members of my RAID5 and it
 works (in my case, I'm setting them to never spin-down). I created a
 file /etc/local.d/hd-power-level-fix.start containing one line:

 hdparm -B 254 /dev/sd[abcdef]

 which automatically sets those drives to never spin down.

 In my original recommendation, I hadn't considered hdparm's spindown
 immediately option. I was thinking of the -B command like I used
 above, to adjust the spin down after X idle time option. If all
 members of the RAID have the same idle time they'll probably all spin
 up and down together under normal usage (well, depending what kind of
 RAID it is, I suppose). In my case, I found the click, whirr, click,
 whirr, click, whirr, click, whirr, click, whirr waiting for 5 disks
 to spin-up when I accessed the RAID annoying, so I disabled it. (I
 have not done any power-consumption measurements to see what that's
 costing me...)


My worry was that if the mdraid daemon saw one drive gone - either
when starting to spin down or when one spins up slowly - and if mdraid
didn't understand that all this stuff was taking place intentionally
then it might mark that drive as having failed.

I can see the utility of spinning down a RAID in something like a home
video server where I keep movies. The machine could be on, ready to
serve a movie, but the drives aren't drawing much power.

I suspect that there's a pretty substantial power savings on a big
RAID if done right, but I haven't done any measurements either.

Cheers,
Mark



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Michael Mol
On Thu, Oct 6, 2011 at 4:21 PM, Mark Knecht markkne...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
 My worry was that if the mdraid daemon saw one drive gone - either
 when starting to spin down or when one spins up slowly - and if mdraid
 didn't understand that all this stuff was taking place intentionally
 then it might mark that drive as having failed.

Does mdraid even have an awareness of timeouts, or does it leave that
to lower drivers? I think the latter condition is more likely.

I suspect, though, that if your disk fails to spin up reasonably
quickly, it's already failed.

-- 
:wq



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread David W Noon
On Thu, 6 Oct 2011 13:21:10 -0700, Mark Knecht wrote about Re:
[gentoo-user] How can I power disk off?:

 My worry was that if the mdraid daemon saw one drive gone - either
 when starting to spin down or when one spins up slowly - and if mdraid
 didn't understand that all this stuff was taking place intentionally
 then it might mark that drive as having failed.

Surely you would umount the filesystem before spinning down the disk.
I know I would.  Perhaps I'm just old fashioned.
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwn...@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


signature.asc
Description: PGP signature


Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Paul Hartman
On Thu, Oct 6, 2011 at 3:21 PM, Mark Knecht markkne...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
 paul.hartman+gen...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 2:44 PM, Mark Knecht markkne...@gmail.com wrote:
 Paul,
   Would hdparm be advisable if the drive was part of a RAID? I suspect not.

   I don't think this applies to the OP but for the sake of discussion
 why not include RAID as part of the solution, if possible.

 I use hdparm to set power-saving on all members of my RAID5 and it
 works (in my case, I'm setting them to never spin-down). I created a
 file /etc/local.d/hd-power-level-fix.start containing one line:

 hdparm -B 254 /dev/sd[abcdef]

 which automatically sets those drives to never spin down.

 In my original recommendation, I hadn't considered hdparm's spindown
 immediately option. I was thinking of the -B command like I used
 above, to adjust the spin down after X idle time option. If all
 members of the RAID have the same idle time they'll probably all spin
 up and down together under normal usage (well, depending what kind of
 RAID it is, I suppose). In my case, I found the click, whirr, click,
 whirr, click, whirr, click, whirr, click, whirr waiting for 5 disks
 to spin-up when I accessed the RAID annoying, so I disabled it. (I
 have not done any power-consumption measurements to see what that's
 costing me...)


 My worry was that if the mdraid daemon saw one drive gone - either
 when starting to spin down or when one spins up slowly - and if mdraid
 didn't understand that all this stuff was taking place intentionally
 then it might mark that drive as having failed.

 I can see the utility of spinning down a RAID in something like a home
 video server where I keep movies. The machine could be on, ready to
 serve a movie, but the drives aren't drawing much power.

 I suspect that there's a pretty substantial power savings on a big
 RAID if done right, but I haven't done any measurements either.

The drive's not gone, it's not offline, it's just not spinning. I
don't think mdraid would even know that.



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Paul Hartman
On Thu, Oct 6, 2011 at 3:31 PM, David W Noon dwn...@ntlworld.com wrote:
 On Thu, 6 Oct 2011 13:21:10 -0700, Mark Knecht wrote about Re:
 [gentoo-user] How can I power disk off?:

 My worry was that if the mdraid daemon saw one drive gone - either
 when starting to spin down or when one spins up slowly - and if mdraid
 didn't understand that all this stuff was taking place intentionally
 then it might mark that drive as having failed.

 Surely you would umount the filesystem before spinning down the disk.
 I know I would.  Perhaps I'm just old fashioned.

No need for that, I think it would make things inconvenient...
especially if it's your root filesystem! Don't confuse spindown with
parking of the heads. Spindown is just normal power-saving and happens
all the time if you own a laptop or any modern consumer-grade hard
drive... some of them don't even allow you to disable it anymore!



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Mark Knecht
On Thu, Oct 6, 2011 at 1:28 PM, Michael Mol mike...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 4:21 PM, Mark Knecht markkne...@gmail.com wrote:
 On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
 My worry was that if the mdraid daemon saw one drive gone - either
 when starting to spin down or when one spins up slowly - and if mdraid
 didn't understand that all this stuff was taking place intentionally
 then it might mark that drive as having failed.

 Does mdraid even have an awareness of timeouts, or does it leave that
 to lower drivers? I think the latter condition is more likely.

 I suspect, though, that if your disk fails to spin up reasonably
 quickly, it's already failed.


In general I agree. However drives that are designed for RAID have a
feature known as Time Limited Error Recovery (TLER) which supposedly
guarantees that they'll get the drive back to responding fast enough
to not have it marked as failed in the RAID array:

http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

When I built my first RAID I bought some WD 1TB green drives, built
the RAID and immediately had drives failing because they didn't have
this sort of feature. I replaced them with RAID Edition drives that
have the TLER feature and have never had a problem since. (Well, I
actually bought all new drives and kept the six 1TB drives which I'd
mostly used up for other things like external eSATA backup drives,
etc...)

Anyway, I'm possibly over sensitized to this sort of timing problem
specifically in a RAID which is why I asked the question of Paul in
the first place.

Cheers,
Mark



Re: [gentoo-user] How can I power disk off?

2011-10-06 Thread Michael Mol
On Oct 6, 2011 9:06 PM, Mark Knecht markkne...@gmail.com wrote:

 On Thu, Oct 6, 2011 at 1:28 PM, Michael Mol mike...@gmail.com wrote:
  On Thu, Oct 6, 2011 at 4:21 PM, Mark Knecht markkne...@gmail.com
wrote:
  On Thu, Oct 6, 2011 at 1:03 PM, Paul Hartman
  My worry was that if the mdraid daemon saw one drive gone - either
  when starting to spin down or when one spins up slowly - and if mdraid
  didn't understand that all this stuff was taking place intentionally
  then it might mark that drive as having failed.
 
  Does mdraid even have an awareness of timeouts, or does it leave that
  to lower drivers? I think the latter condition is more likely.
 
  I suspect, though, that if your disk fails to spin up reasonably
  quickly, it's already failed.
 

 In general I agree. However drives that are designed for RAID have a
 feature known as Time Limited Error Recovery (TLER) which supposedly
 guarantees that they'll get the drive back to responding fast enough
 to not have it marked as failed in the RAID array:

 http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

 When I built my first RAID I bought some WD 1TB green drives, built
 the RAID and immediately had drives failing because they didn't have
 this sort of feature. I replaced them with RAID Edition drives that
 have the TLER feature and have never had a problem since. (Well, I
 actually bought all new drives and kept the six 1TB drives which I'd
 mostly used up for other things like external eSATA backup drives,
 etc...)

 Anyway, I'm possibly over sensitized to this sort of timing problem
 specifically in a RAID which is why I asked the question of Paul in
 the first place.

My first RAID was with three Seagate economy 1.5TB drives in RAID 5, shortly
followed by three 1TB WD black drives in RAID 0. I never had the problems
you describe, though I rebuit the RAID5 several times as I was figuring
things out. (the 3TB RAID0 was for some heavy duty scratch space.)