# Parallel wake-up of sleeping HDDs that are used for big RAID

## mbar

I have 6 hard disks that are used as RAID5. They are set to sleep after approx 10 minutes of inactivity (this is my home setup, so I want them to sleep most of the time). The problem is that any read/write that can not be satisfied by memory buffer wakes RAID5 drives one-by-one, which means that sometimes I have to wait approx 1 minute to start the real reading or writing!

Is there any option in kernel that would wake up RAID drives all at once?

----------

## madchaz

The reason for this a simple one of electrical load. When it starts spinning the platter, a harddisk draws a LOT of current from your power supply. If you were allowed to start all 6 drives at once, chances are you'd overload something. This is actually not controled by the kernel as much as the disk themselves. It's why when you start the computer, probably also don't all start to spin at the same time.

----------

## mbar

 *madchaz wrote:*   

> It's why when you start the computer, probably also don't all start to spin at the same time.

 

Quite the contrary, they DO spin up simultaneously on powerup, I even had to replace the PSU with larger power capacity because of that this year  :Smile: 

So, the power is there, but not the means  :Wink: 

----------

## madchaz

Then I guess you will need someone with more knowledge then me. Have you looked at the settings in mdadm?

Edit: Had a look at the mdadm page and didn't find anything on it.

----------

## mbar

Yep, I guess it's in the kernel, because it seems to "freeze" waiting for some IO_READY signal from SATA controller before it moves to the next drive in RAID...

----------

## eccerr0r

Don't think this is a feature of RAIDs.  Normally for RAID it's for high availability, sleeping RAIDs implies you're reducing availability...  Someone can write a kernel patch to do this but unless you're willing to, I doubt many people care too much about this particular situation...

I do notice two of my disks being spun up at a time, so it depends on how many simultaneous read requests the kernel kicks out.  But I don't have as many disks on my RAID, only 4...  Of course it also depends on how your hard drives are hooked up, if you were using PATAs or legacy mode SATA, then it may take longer if you have master/slave...

----------

