7

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

4 Answers 4

6

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.

2
  • 4
    These drives are designed for home computers. They're crap in servers. Mar 3, 2011 at 20:06
  • That is what I ended up doing. I bought a pair of Hitachi Deathstars, and imaged the disks onto that. Dec 8, 2011 at 13:32
8

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.

1
  • Be careful using this method, as some people have reported disabling the spin-down timer can make the drive slow to a crawl - forums.ncix.com/forums/…. Use the command wdidle3.exe /s300 instead, as this sets the timer to 5 minutes, which is the maximum allowed
    – George
    May 23, 2016 at 19:47
4

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.

4
  • 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.) Mar 3, 2011 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 Mar 3, 2011 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!) Mar 3, 2011 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}]. Nov 4, 2012 at 19:46
1

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)
4
  • I thought hdparm only worked for IDE? Mar 3, 2011 at 20:08
  • 2
    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? Mar 3, 2011 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, 2011 at 21:25
  • 2
    Tried, it's not working. Dec 8, 2011 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .