spin down spare drive


Recommended Posts

I have a spare drive I want to keep in the server for now.  I'm not sure whether you technically call this a warm spare or cool spare, but the idea is it sits there spun down, precleared, ready if needed.

 

When I have a drive un-assigned it returns a temp in unMENU, which to me means it is spinning.  When I manually tell it to spin down via unMENU, the temp disappears for a sec or two, but then eventually comes back.  I think unRAID is telling it to spin back up.

 

How do you set a drive outside the array to stay spun down permanently unless called for?

Link to comment

I have a spare drive I want to keep in the server for now.  I'm not sure whether you technically call this a warm spare or cool spare, but the idea is it sits there spun down, precleared, ready if needed.

 

When I have a drive un-assigned it returns a temp in unMENU, which to me means it is spinning.  When I manually tell it to spin down via unMENU, the temp disappears for a sec or two, but then eventually comes back.  I think unRAID is telling it to spin back up.

 

How do you set a drive outside the array to stay spun down permanently unless called for?

Some drives can return a temperature without spinning up.  The existence of a temperature is NOT a definitive indication of the spin status.

 

To spin down a drive on the command line, use the "hdparm" command.

/usr/sbin/hdparm -y /dev/sdX

 

To set the spin-down-time to 1 hour, use

hdparm -S242 /dev/sdX

 

Alternate values for timeout are described in the hdparm manual page:

-S    Set the standby (spindown) timeout for the drive. This value is

      used by the drive to determine how long to wait  (with  no  disk

      activity) before turning  off the spindle motor to save power.

      Under such circumstances, the drive may take as long as 30  sec-

      onds  to respond to a subsequent disk access, though most drives

      are much quicker. The encoding of the timeout value is somewhat

      peculiar.   A  value  of zero means "timeouts are disabled": the

      device will not automatically enter standby mode. Values from 1

      to  240 specify multiples of 5 seconds, yielding timeouts from 5

      seconds to 20 minutes.  Values from 241 to 251 specify from 1 to

      11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5

      hours.  A value of 252 signifies a  timeout  of  21  minutes.  A

      value  of 253 sets a vendor-defined timeout period between 8 and

      12 hours, and the value 254 is reserved. 255 is interpreted  as

      21  minutes  plus 15  seconds.  Note that some older drives may

      have very different interpretations of these values.

 

To learn the actual spinning status of the drive:

hdparm -C /dev/sdX

 

 

 

Link to comment

I have a spare drive I want to keep in the server for now.  I'm not sure whether you technically call this a warm spare or cool spare, but the idea is it sits there spun down, precleared, ready if needed.

 

When I have a drive un-assigned it returns a temp in unMENU, which to me means it is spinning.  When I manually tell it to spin down via unMENU, the temp disappears for a sec or two, but then eventually comes back.  I think unRAID is telling it to spin back up.

 

How do you set a drive outside the array to stay spun down permanently unless called for?

Some drives can return a temperature without spinning up.  The existence of a temperature is NOT a definitive indication of the spin status.

 

To spin down a drive on the command line, use the "hdparm" command.

/usr/sbin/hdparm -y /dev/sdX

 

To set the spin-down-time to 1 hour, use

hdparm -S242 /dev/sdX

 

Alternate values for timeout are described in the hdparm manual page:

-S    Set the standby (spindown) timeout for the drive. This value is

      used by the drive to determine how long to wait  (with  no  disk

      activity) before turning  off the spindle motor to save power.

      Under such circumstances, the drive may take as long as 30  sec-

      onds  to respond to a subsequent disk access, though most drives

      are much quicker. The encoding of the timeout value is somewhat

      peculiar.   A  value  of zero means "timeouts are disabled": the

      device will not automatically enter standby mode. Values from 1

      to  240 specify multiples of 5 seconds, yielding timeouts from 5

      seconds to 20 minutes.  Values from 241 to 251 specify from 1 to

      11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5

      hours.  A value of 252 signifies a  timeout  of  21  minutes.  A

      value  of 253 sets a vendor-defined timeout period between 8 and

      12 hours, and the value 254 is reserved. 255 is interpreted  as

      21  minutes  plus 15  seconds.  Note that some older drives may

      have very different interpretations of these values.

 

To learn the actual spinning status of the drive:

hdparm -C /dev/sdX

 

Thanks for this!  Will check this out when I am back on Wednesday and mark this solved.

Link to comment

there was another thread similar to this a few weeks ago that had some go script examples in it to do just what you want.. however,  I am not seeing it now.

I dont remember if they worked or not.

 

Joe L's example in the go script would work... however, the dev/sdX could change on reboot... 

Link to comment

Joe L's example in the go script would work... however, the dev/sdX could change on reboot...

And here's the contents of my go script, which doen't need to know the actual /dev/sdx point:

# Assign my static disk
mkdir /mnt/Static
mount -L Static /mnt/Static

# Set it to spin down
hdparm -S 180 `blkid -l -o device -t LABEL=Static | head -c 8`

The extra disk has a label set of "Static""

 

Cheers.

Link to comment

Joe L's example in the go script would work... however, the dev/sdX could change on reboot...

And here's the contents of my go script, which doen't need to know the actual /dev/sdx point:

# Assign my static disk
mkdir /mnt/Static
mount -L Static /mnt/Static

# Set it to spin down
hdparm -S 180 `blkid -l -o device -t LABEL=Static | head -c 8`

The extra disk has a label set of "Static""

 

Cheers.

 

For whatever reason using the spindown command in unMENU does not spin down the Seagate spare drive for more than 30 seconds. 

 

I do notice the following error in the syslog :Jul 19 21:01:03 TODD-Svr unmenu[2249]: Precleared disk sdd not found in drivedb[]

It occurs every time I attempt to spin down the spare drive in unMENU.

 

Using Joe's command above from command prompt did work and it isn't spinning right back up.  However, I did something that eventually triggered it, some command in unMENU.  So rather than worrying about it, I do want the spin down set for 20-30 minutes. 

 

I can certainly copy paste your example above into my go script, but since I'm not a linux dude let me make sure I understand and do it correctly. 

How does that command line know which drive to label "static"?  Does it just go for the unassigned drive?  Is there anything in that script I should modify to make it specific for my purpose (other than perhaps the -S value)?

 

Thanks again everyone.

 

 

EDIT:  I did set the spin down time to 180, and let everything sit.  Hours later the drive is spinning again.  Any idea what could be triggering that drive to spin up.  It's still doing it, just not as fast as it did when I spun down through unMENU.

I'll be curious to see if it's running in the morning.

Link to comment

I can certainly copy paste your example above into my go script, but since I'm not a linux dude let me make sure I understand and do it correctly. 

How does that command line know which drive to label "static"?  Does it just go for the unassigned drive?  Is there anything in that script I should modify to make it specific for my purpose (other than perhaps the -S value)?

Sorry I wasn't a clear as I should have been.

 

"Static" is a volume label I have assigned to one of the partitions on that particular drive.  Depending on the filesystem used, the commands to set that vary slightly.  Google it, based on the filesystem used and "label".

 

So breaking down what I have gives:

mkdir /mnt/Static

Create a directory to mount a partition.

mount -L Static /mnt/Static

Mount the partition labelled Static.  The beauty here is, that is doesn't care which physical device is being used.

hdparm -S 180 <device>

Set the spindown time for this device.

`blkid -l -o device -t LABEL=Static | head -c 8`

Execute these commands which will return the actual device where the partition labelled "Static" resides.

 

*** Update ***

I just noticed that you had said:

precleared

So, to label it use:

reiserfstune -l <label> <device>

 

Cheers.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.