Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A few months ago I build a 1u server to go into a colo facility. Not knowing any better, I used WD Caviar Green drives. My users have been complaining that the system can be a little slow off the mark, and smartctl shows a very high Load_Cycle_Count. I've been reading that this is due to the "Green" meaning that they attempt to spin down frequently, and so the lag people are seeing is when the drives are spinning back up. The only suggestions I've seen for stopping them from spinning down involve bringing the server home and putting the disks into a Windows box to run a program. But I had a similar problem with a Seagate external drive once and fixed it with sdparm. Is there an sdparm command that will fix this problem?

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   168   133   021    Pre-fail  Always       -       4558
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       65
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   092   092   000    Old_age   Always       -       6213
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       58
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       42
193 Load_Cycle_Count        0x0032   196   196   000    Old_age   Always       -       14941
194 Temperature_Celsius     0x0022   120   106   000    Old_age   Always       -       27
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0
share|improve this question

4 Answers 4

up vote 5 down vote accepted

Is there any way you can image that server onto another set of drives that are server grade, rather than altering the way those drives are designed to work? It sounds like you have a little time on your hands, since nothing has actually failed.

Running anything that alters how a HDD works on a production server is bad news, IMO. Using these types of drives that have constant activity is going to wear them out incredibly fast. I recommend trying a different approach that involves new hardware, as much as you probably don't want to do that.

share|improve this answer
4  
These drives are designed for home computers. They're crap in servers. –  Tom O'Connor Mar 3 '11 at 20:06
    
That is what I ended up doing. I bought a pair of Hitachi Deathstars, and imaged the disks onto that. –  Paul Tomblin Dec 8 '11 at 13:32

Working solution follows, tested right now!

  1. Download the WDSpinUp DOS Utility.

  2. Make a bootable FreeDOS USB drive with UNetbootin (sudo apt-get install unetbootin).

  3. Copy the downloaded utility to the USB drive.

  4. Configure your BIOS to have disk controllers running in Compatible or Legacy mode (depends by your motherboard manufacturer).

  5. Boot FreeDOS via USB, select FreeDOS Live CD with HIMEM + EMM386

  6. Move to C: (the USB drive) with C:

  7. Finally execute the utility with wdidle3.exe /D

  8. Remember to re-enable Enhanced or SATA controllers from BIOS.

share|improve this answer

I've kept the green drives active by setting a cron to run every few minutes that forces some disk activity. This can be as simple as echo $(date) >> somefile just so that the drives inactivity timer is reset before it goes to sleep.

It's a hack, but it seemed to help with the problems that I was having in my file server at home. In the end, I wouldn't consider it a long-term solution.

share|improve this answer
    
Sorry, maybe I should have been more clear that this is a short bus answer but it will work in the absence of any better option. Rephrased my answer -- I didn't mean to imply it a good long-term solution at all (-- let alone the best.) –  Aaron Copley Mar 3 '11 at 20:44
3  
It's a hack that'll fill up all the disk space. Replacing the >> with > won't fill up the disk –  Tom O'Connor Mar 3 '11 at 20:48
    
If he leaves this hack in place long enough to fill up his drive with the date command, I think it's well deserved. :) (But, good point!) –  Aaron Copley Mar 3 '11 at 20:52
    
dd could also be used to read random sectors from the disk, for example dd if=/dev/sda of=/dev/null bs=512 count=1 skip=$[${NSECTORS}/32767*${RANDOM}]. –  Cristian Ciupitu Nov 4 '12 at 19:46

If the drives are SATA, you should be able to disable the spindown with:

# hdparm -S 0 /dev/sda

/dev/sda:
 setting standby to 0 (off)
share|improve this answer
    
I thought hdparm only worked for IDE? –  Paul Tomblin Mar 3 '11 at 20:08
1  
I'm not sure that this will work. The spindown is a firmware feature of the green drives. The hdparm tool only modifies the Linux device driver's settings, correct? –  Aaron Copley Mar 3 '11 at 20:09
    
hdparm is intended for IDE and SATA drives, though some of the commands will be support on SAS. Not many of them I'd imagine. Oh, BTW, looks like there's a solution for your old Seagate problem: -Z: Disable the automatic power-saving function of certain Seagate drives (ST3xxx models?), to prevent them from idling/spinning-down at inconvenient times. –  MikeyB Mar 3 '11 at 21:25
1  
Tried, it's not working. –  Giovanni Toraldo Dec 8 '11 at 8:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.