Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Data Storage Bug Software Linux

Ubuntu May Be Killing Your Laptop's Hard Drive 419

wwrmn writes "There's a debate going on over at bugs.launchpad.net on whether it's the Ubuntu, BIOS, hard-drive manufacturer, or pick-any-player's fault, but Ubuntu (and perhaps any OS) may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature / acpi bug / OS configuration. Regardless of where the fault lies or how it's fixed, you might want to take some actions now to try to prevent the damage."
This discussion has been archived. No new comments can be posted.

Ubuntu May Be Killing Your Laptop's Hard Drive

Comments Filter:
  • Ubuntu (Score:2, Funny)

    by Andrewkov ( 140579 )
    It seems to be killing Slashdot's hard drives also!
  • The Ubuntu (Score:3, Insightful)

    by bazald ( 886779 ) <bazald@@@zenipex...com> on Tuesday October 30, 2007 @01:24PM (#21174201) Homepage
    FTA:

    When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles -- in only 100 hours. That's at least one unloading per minute. Googling for "load unload cycles notebook OR laptop" shows that most laptop drives handle up to 600,000 such cycles. As these values clearly show, this issue is of high importance and should be fixed sooner rather than later.
    It definitely sounds like it is "the Ubuntu" that is at fault in this case. Where is the room for doubt?
    • Re: (Score:3, Informative)

      Something's goofy... I just switch my Inspiron 9400 to battery power. It's only been about 10 minutes, but so far my Load_Cycle is sticking at 1 where it started. I'm not seeing this problem. It might be laptop-specific.
      • by eln ( 21727 ) on Tuesday October 30, 2007 @02:16PM (#21175029)

        It's only been about 10 minutes, but so far my Load_Cycle is sticking at 1 where it started.
        You have to pull the knob out to get it to start the other cycles. It won't start the Spin_Cycle until you close the lid, though.
    • Re:The Ubuntu (Score:5, Informative)

      by TypoNAM ( 695420 ) on Tuesday October 30, 2007 @01:40PM (#21174505)
      According to gentoo-wiki.com/MAN_hdparm [gentoo-wiki.com] -B is:
      Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. A value of 255 will disable apm on the drive.

      I would say blame the hard drive vendor.
    • Re:The Ubuntu (Score:5, Informative)

      by timster ( 32400 ) on Tuesday October 30, 2007 @01:41PM (#21174537)
      Actually, if you R(TRO)TFA, you'll find that Ubuntu is not issuing that command at all. Rather, this is a default set by the drive manufacturer.
    • Re:The Ubuntu (Score:5, Informative)

      by kebes ( 861706 ) on Tuesday October 30, 2007 @01:42PM (#21174565) Journal
      First off, putting a launchpad link on the frontpage of Slashdot is bad form. Launchpad is for discussing and resolving bugs, and we're not helping by swamping that page. It might be better if people read the wiki that has been set up to summarize the issue [ubuntu.com].

      In answer to your question about how this isn't Ubuntu's fault, apparently the problem is that the manufacturer sets certain default values for "aggressive power management" and enables this aggressive power management by default. Ubuntu's policy is to not change the manufacturer defaults, and simply uses them. Unfortunately these defaults are "too aggressive" and cause the hard drive to park/unpark too frequently.

      But Ubuntu is not blameless. First of all, if Ubuntu can push out a patch that resets the manufacturer defaults to sane values (and this will save some people from hard drive failures), then it definitely should. Also, there is some discussion that perhaps an Ubuntu daemon is probing the hard disk too frequently, so that the hard-drive can't sit in the parked state for long enough to actually make it a useful feature.

      Regardless of who is to blame, it would appear that the Ubuntu devs should push out a patch that forces systems to ignore the manufacturer values, and use settings that will protect the drive lifetime.
      • Re:The Ubuntu (Score:5, Interesting)

        by Kjella ( 173770 ) on Tuesday October 30, 2007 @02:00PM (#21174823) Homepage
        I actually disagree. Sure, if the manufacturer issues a recommendation or something to change it, then by all means. Otherwise Ubuntu should just keep their hands off and let the HDD manufacturer deal with it. Does Windows automagically disable this behavior?
        • Re:The Ubuntu (Score:5, Insightful)

          by kebes ( 861706 ) on Tuesday October 30, 2007 @02:11PM (#21174977) Journal

          Does Windows automagically disable this behavior?
          Good question. The comments in the bug report speculate that Windows either completely ignores this feature, or ignores the manufacturer values and uses its own values. (In either case, what's the point in having BIOS set defaults?)

          A conspiracy theorist might suggest that the hardware manufacturers are intentionally adding a feature that causes the drives to fail eventually (but statistically outside of the manufacturer's warranty period), so that people have to buy more hardware. The more likely explanation is that the manufacturer set the defaults, but didn't notice that the values were unsafe because Windows ignores them.

          Getting Ubuntu to override the defaults should be viewed as a short-term solution. Ultimately the hardware manufacturers should be setting default values that will not damage the hardware. Ideally they would design safeties into the hardware, which do sanity checks and reject ridiculous values.
        • Re:The Ubuntu (Score:5, Insightful)

          by PhilipMckrack ( 311145 ) on Tuesday October 30, 2007 @02:52PM (#21175591)
          I think the answer is they should both fix the problem. Drive manufacturers should issue a sane value and operating systems should check that the value is sane before using it. Same rule as accepting any data from an outside source, you tell them what they are supposed to do, but then you double check it to make sure they did. Pointing fingers at each other while customers hardware fries doesn't help anyone.
      • Re:The Ubuntu (Score:4, Interesting)

        by cmowire ( 254489 ) on Tuesday October 30, 2007 @02:18PM (#21175079) Homepage
        I tend to think that somebody ought to take a fine toothed comb through a fairly standard desktop linux setup with a fairly standard set of applications and daemons and ruthlessly examine every disk access.

        It seems like most of the things that are desirable for a server that are merely OK on a desktop are probably really bad for laptops and there's optimizations to be made.

        And I'm not just thinking of Linux here. When I use a Windows laptop, I notice the hard disk spinning up on a fairly regular basis, even when I'm doing something fairly lame like web browsing or word processing. And you know that pretty much nobody thinks about it without being prodded....

        But with Linux, you could make "Lapbuntu" that would contain a set of apps that were modified to aggressively avoid using the disk unless it's already spun up by patching existing software.
        • Re: (Score:3, Informative)

          by SL Baur ( 19540 )

          When I use a Windows laptop, I notice the hard disk spinning up on a fairly regular basis, even when I'm doing something fairly lame like web browsing or word processing.

          I would expect both of those two activities to access the disk. A web browser could be saving cache or saving a history file, or more likely, page faulting. Text editing I would expect to periodically write to an autosave file.

          You could tune a notebook mode to eliminate most or all of the web browser disk accesses, turn off history, caching, swapping to disk, etc. However, especially with a notebook, you would want aggressive autosaving in case the battery suddenly dies.

    • Re:The Ubuntu (Score:5, Informative)

      by Anonymous Coward on Tuesday October 30, 2007 @01:44PM (#21174601)
      I have an Dell Inspiron 6400 running Gentoo. I had this problem too. I fixed it by adding

              # -B 255 doesn't work for me
              sda_args="-B 254 -S 60"

      to /etc/conf.d/hdparm. This would fix the issue on boot, but after resuming, this would be moot. For that, I added

              # redo hdparm settings on resume /etc/init.d/hdparm restart

      after running /etc/acpi/suspend.sh in /etc/acpi/default.sh, though I suppose I could have put that line somwhere in suspend.sh.

      The key thing here is to run hdparm on boot *and* on resume

    • by darkonc ( 47285 ) <`stephen_samuel' `at' `bcgreen.com'> on Tuesday October 30, 2007 @03:12PM (#21175921) Homepage Journal
      One of the comments notes that at least one drive had the same problem with Windows -- The difference is that, lacking ubiquitous SMART tools, Windows users would be much less likely to get to the source of the problem.

      So, it comes down to: Ubuntu users were able to diagnose the problem, and have the tools to implement a workaround. Nix to either for Windows users -- they just need to remember to replace their drive once a year.

      • Re: (Score:3, Informative)

        by maxume ( 22995 )
        A windows user who knows what SMART is could go right ahead and download any one of the dozen free tools available. An Ubuntu user who doesn't know what it is isn't going to be helped out a whole lot by it being there.

        HD Tune and Speedfan are among the better utils:

        http://www.hdtune.com/ [hdtune.com]
        http://www.almico.com/speedfan.php [almico.com]
  • Ubuntu (Score:4, Funny)

    by Anonymous Coward on Tuesday October 30, 2007 @01:25PM (#21174223)

    but Ubuntu [...] may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature
    I always thought that Gibbon was just a bit too gutsy!
  • by loafula ( 1080631 ) on Tuesday October 30, 2007 @01:26PM (#21174235)
    I'll just buy another 4 hard drives with the money I saved not buying Vista!
    • by blazerw11 ( 68928 ) <blazerw@noSPAm.bigfoot.com> on Tuesday October 30, 2007 @01:58PM (#21174805) Homepage

      I'll just buy another 4 hard drives with the money I saved not buying Vista!

      You may not have to. My Toshiba Satellite M45 has been running Ubuntu since Edgy, 6.10 and has a "Load_Cycle_Count" of 5,416. Maybe the default install does not have this issue? Maybe you have to install some other package to create the problem? It's not "laptop-mode-tools" because I have that installed. Do you have to be on battery power?

      It's still 5,416.

      193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 5416
  • by kusanagi374 ( 776658 ) on Tuesday October 30, 2007 @01:26PM (#21174241)
    Yeah, sure. Whatever it is, it can't be compared to the damage done to Ubuntu's launchpad after it was slashdotted.

    Once they control the fire and get the backup server online, maybe I'll be able to RTFA. :(
  • I just got two Thinkpads at auction I wanted to put Ubuntu on. Launchpad is hit so hard I can't even subscribe to the bug to search for potential workarounds or better settings. :(
  • AHA! :D (Score:4, Funny)

    by Killjoy_NL ( 719667 ) <slashdot@@@remco...palli...nl> on Tuesday October 30, 2007 @01:27PM (#21174267)
    That's why I use windows. So I don't have to wonder who the culprit is ;)

    ^_^
    • Re:AHA! :D (Score:5, Insightful)

      by ajs ( 35943 ) <ajs@ajs . c om> on Tuesday October 30, 2007 @01:34PM (#21174371) Homepage Journal

      That's why I use windows. So I don't have to wonder who the culprit is
      Oh? Then you've never been caught in the "it's the graphics driver, no it's the motherboard, no it's the OS, no it's the graphics driver," loop.
      • Re: (Score:3, Interesting)

        by Killjoy_NL ( 719667 )
        Heh,actually, buying Windows Vista solved a problem I'd been having, random reboots during WoW and only WoW under xp. No blue screens nothing, just poof death and hey look, I have 2gb of ram wheeeeeeeeee.

        Well, after buying Vista (was only +/- 18 euros since I work for an educational institution) I got a reboot too, after a nice blue screen. Best part about Vista for me is, it shows the info from the blue screen next time you boot up. I googled the error, did a little digging and it turns out 1 bios setting
        • Re: (Score:3, Informative)

          by HunterZ ( 20035 )
          You can set XP to show a bluescreen instead of just rebooting. I'm guessing you had it set to just reboot instead.
          • I know that, it's one of the first things I configure after I install XP on a system (that and turning off sounds and turning off the annoying error messages except the fatal ones).

            Windows Sysadmin here :)
            (this will not make myself some friends here ;)
            • Wait a minute! You're a Windows sysadmin and you said this...

              Heh,actually, buying Windows Vista solved a problem I'd been having, random reboots during WoW and only WoW under xp. No blue screens nothing, just poof death and hey look, I have 2gb of ram wheeeeeeeeee. Well, after buying Vista (was only +/- 18 euros since I work for an educational institution) I got a reboot too, after a nice blue screen. Best part about Vista for me is, it shows the info from the blue screen next time you boot up. I googled the error, did a little digging and it turns out 1 bios setting was wonky.

              How can you be a sysadmin and NOT know that you could have been doing the same thing with XP? And if you DID know, then why didn't you do the same thing when you were in XP? Doesn't sound like you're a very good sysadmin.

              • Well, since XP didn't give me the bsod (and yes I turned off autoreboot), I didn't have much to go on, stripped the pc to its barebones, and still had the issue.
                Since I already bought Vista (bought it cheaply earlier since I was thinking about leaving my employer, can't beat that price unless you go to the piracy place, something I was kind of tired of) I thought I'd give it a try (to make sure it wasn't an incompatibility/error in XP) and lo and behold, the cause was found.

                (btw, dutch guy here, so my spell
              • Re:AHA! :D (Score:5, Funny)

                by Schraegstrichpunkt ( 931443 ) on Tuesday October 30, 2007 @02:16PM (#21175035) Homepage

                You're a Windows sysadmin
                ...

                Doesn't sound like you're a very good sysadmin.

                Gasp!

  • Ubuntu? (Score:5, Insightful)

    by keithjr ( 1091829 ) on Tuesday October 30, 2007 @01:29PM (#21174289)
    If perhaps it could be "any OS" then why headline this as "Ubuntu" killing laptops? I can't find much in TFA that makes a compelling case that it isn't APCI. I'd read more but that page hurts my eyes.
  • by zappepcs ( 820751 ) on Tuesday October 30, 2007 @01:31PM (#21174333) Journal
    I mean, the OSS community at large finds a problem, and sets about to fix it... from the link:

    Ralf Nieuwenhuijsen wrote on 2007-10-25: (permalink)

    May i just warn ya all to NOT play the blame-game?

    It does sound like it's the fault of the BIOS (and somebody should contact them).

    To rescue a hard-drive in distress sounds like something that should have a high-priority (critical?).
    Not because it's ubuntu's fault or the bios fault. But because Ubuntu can solve this issue _now_.
    Doesn't sound like it is NOT being dealt with, it just isn't listed everywhere as critical and in the news all over the intarweb tubes.
  • Old news??? (Score:5, Informative)

    by BUL2294 ( 1081735 ) on Tuesday October 30, 2007 @01:32PM (#21174347)
    From the now very overloaded page...

    Bug #59695, first reported on 2006-09-09.
    Apparently there has been no rush to fix it. Now that /. has picked it up and the site is being bombarded, how long till it gets fixed???
  • by kusanagi374 ( 776658 ) on Tuesday October 30, 2007 @01:34PM (#21174387)
    I wonder what is the effect of this bug on officially endorsed and supported Dell notebooks with Ubuntu on them? Wouldn't something like this be caught up by Dell's QA? Or is it exclusive to 7.10?
    • Since the bug is over a year old, I doubt is exclusive to 7.10.

      I will imagine that Dell will shorten the warantee on their drives and make more money replacing them. At least until people get pissed.

    • by internetcommie ( 945194 ) on Tuesday October 30, 2007 @02:19PM (#21175081)
      Considering the HD failure rate on Dell laptops, I doubt anybody will notice a difference.
      • Re: (Score:3, Funny)

        by rucs_hack ( 784150 )
        My dell laptop lasted for seven years....

        Ok, then it almost burned a hole in my carpet when it died, but apart from that it was good.

        I also have a Dell OpenMosix cluster made up of by four pc's that are approximately five years old. Not one single problem has occurred with them, ever, I haven't had to reboot them for over a year, and that was just because we moved them to a new server room.
  • by Ecuador ( 740021 ) on Tuesday October 30, 2007 @01:36PM (#21174429) Homepage
    I mean, if it was Windows that was destroying laptop hard drives, this would have been a legendary thread, with viciously bashing comments, insightfully (40%) funny (20%) attacks against MS, Vista drama etc.
    With Ubuntu as the culprit there is some sort of "respect" that kills the potential of the thread. Come on guys, it is not Linux, it is just Ubuntu. What are the SuSE/RH/etc fans waiting for?
    • by jmorris42 ( 1458 ) * <jmorris@[ ]u.org ['bea' in gap]> on Tuesday October 30, 2007 @01:48PM (#21174649)
      > I mean, if it was Windows that was destroying laptop hard drives, this would have been a
      > legendary thread, with viciously bashing comments, insightfully (40%) funny (20%) attacks
      > against MS, Vista drama etc.

      Of course, because all laptops are DESIGNED for Windows so if it doesn't work abuse and ridicule should be heaped on them if it was hitting multiple hardware vendors with the only common factor the OS vendor.

      But this case is tricky. I just read through the thread and most people there are paniced sheep just turning off all power management because they don't EVER want the hdd to unload. They don't understand the three year replacement cycle all PC hardware is designed around, it is BUILT to FAIL. Looks like there IS a problem of some sort though because some people are reporting unload followed almost instantly by a load. But power management remains one of the areas of PCs that vary wildly in totally undocumented ways not only from vendor to vendor and model to model but from minor BIOS revisions. It is a non-trivial problem.
    • by msimm ( 580077 ) on Tuesday October 30, 2007 @01:57PM (#21174781) Homepage
      With Vista it's Microsoft's fault. With Ubuntu (or any open source project) technically, it's our fault. So if you're confused about the missing flames maybe you need to rethink what Open means.
    • well actually it is linux and perhaps even OSX, as whats happening is that linux is merely using the default setting on the Hard drive, therefore the manufacturer is setting it, most likely in anticipation that the OS (windows) will change it anyway.

      its all really just a big foam finger blame pointing game
  • Selected Excerpts (Score:5, Informative)

    by asphaltjesus ( 978804 ) on Tuesday October 30, 2007 @01:37PM (#21174457)
    From Google's cache:

    When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles -- in only 100 hours. That's at least one unloading per minute. Googling for "load unload cycles notebook OR laptop" shows that most laptop drives handle up to 600,000 such cycles. As these values clearly show, this issue is of high importance and should be fixed sooner rather than later.

    The command hdparm -b 255 turn off completely APM.

    Here is how I permanently fixed it:

    1) make a file named "99-hdd-spin-fix.sh". The important thing is starting with "99".
    2) make sure the file contains the following 2 lines (fix it if you have PATA HDD):
    #!/bin/sh
    hdparm -B 255 /dev/sda
    3) copy this file to 3 locations: /etc/acpi/suspend.d/ /etc/acpi/resume.d/ /etc/acpi/start.d/

    Voila! After that the HDD never spins down on power (looks like it actually spins down on battery at modest rate).
    Sorry if the instruction is too detailed, no offense.

    An alternative to the "99-hdd-spin-fix.sh" fix is to install and enable the package laptop-mode-tools,
    then customize /etc/laptop-mode/laptop-mode.conf, setting
    • Re:Selected Excerpts (Score:5, Interesting)

      by tchuladdiass ( 174342 ) on Tuesday October 30, 2007 @01:44PM (#21174579) Homepage
      The main problem is a combination of the short spindown time, and something wanting to write out to the drive every 30 seconds or so. The main culprit could be the fact that by default, a files last access time (atime) gets updated on every read, even if that read comes from cache. So when the drive is spun down, it gets spun up even on cached reads (to write out the atime).
      Add "-o noatime" to the filesystems in /etc/fstab, and that should clear up the issue.
    • Re: (Score:3, Interesting)

      by skintigh2 ( 456496 )
      Not to defend any sloppy programming or unnecessary ware on hardware, but is this really that big of an issue?

      At that rate, it will take you 8571.4 hours to hit that limit. For an evening user like me, even at 4 hours a day every day that's 2142.9 days, or 5.87 years. I'm used to Maxtors dying after 3 or so years, and my Seagates are usually obsolete (or dropped) in that amount of time, and that's on a desktop. I'm assuming not many laptops survive 6 years at all, or at least are used regularly that long
  • by marcantonio ( 895721 ) on Tuesday October 30, 2007 @01:39PM (#21174479)
    It's important to note that this only occurs if ENABLE_LAPTOP_MODE is enabled. By default it is NOT set. From /etc/default/acpi-support:

    # Switch to laptop-mode on battery power - off by default as it causes odd
    # hangs on some machines
    ENABLE_LAPTOP_MODE=false
    • The comment in the file is misleading (there are other problems!), which is a bug all by itself. Just because it's not the default doesn't mean that people don't do it. Doesn't it say somewhere, "If you have a laptop, set ENABLE_LAPTOP_MODE"?

      It is Entirely Accurate that this is a Bug.
  • by bluefrogcs ( 656231 ) on Tuesday October 30, 2007 @01:40PM (#21174519)
    Here's the fix http://ubuntuforums.org/showthread.php?t=596602 [ubuntuforums.org]
  • Cheap test.. (Score:5, Informative)

    by delire ( 809063 ) on Tuesday October 30, 2007 @01:43PM (#21174571)
    Ive tested on 3 Ubuntu laptops here and found no problem. Here's a little script to test yourselves (can't remember where i found the greppable bit - perhaps a Planet Ubuntu author).

    Run this every hour and compare differences in the load count (the last value in the output written to the file 'load_count' in the current directory).. Replace /dev/sda with your own drive. Not sure which? sudo fdisk -l. You'll need smartmontools (sudo apt-get install smartmontools).

    echo `sudo smartctl -a /dev/sda | grep Load_Cycle_Count` " | " `date` >> load_count

    If the difference in this count is more than 90 from one hour to the next you may be in trouble if there is anything to this wear and tear fear.
  • All the bitching around my work about how hard drives used to last longer. With my limited cross section, I have 2 computers at home, both ca 1998, still running original hard drives, in fact I've obsoleted 6 workstations so far at home, none of them had hard drive failures, I had one PSU, one GPU, and one NIC failure. At work (mainly a IBM shop) I've had to replace about 20% of drives within 4 years (I admin 50 workstations). I realize there is a lot of variables, smaller read heads, faster spin rates etc,
  • What about Mandriva? Does the bug affect them too?
    Since my upgrade to Gutsy was less than smooth. I've got to reinstall the lot anyway and since Mandriva was a favourite of mine a few years back I might give them another go. I hear that they've cleaned up the mess they had back then.
    So, how is it Mandriva guys. Do you also try to kill my HD or are you a safe (data)haven?

    .haeger

  • by Prototerm ( 762512 ) on Tuesday October 30, 2007 @01:52PM (#21174711)
    The aggressive power saving settings here are perhaps a little too aggressive, but did anyone really think you could do that totally without cost? This isn't magic, you know. It's a trade-off. If you tell your computer (usually in a laptop) to spin down the hard drives to save power, you're going to cause greater wear-and-tear on the things because each time they spin down, they have to spin back up before you can use them again. If you want to save energy without the wear, turn the bloody thing off when you're not using it.

    What, you're in too much of a hurry to view the latest pr0n? Chill, dude, before you go blind!

    If you run a desktop, it's doubtful you'll have a problem with this, as most desktop users turn power saving features off entirely (and yeah, I also drive a big honkin' SUV. Bite me), but be careful on a laptop. If your hard drive supports SMART, you can do a quick check of the numbers (I think the one you want is # 193, IIRC), and see if you're at risk. But not all drives support SMART (I have a laptop drive that doesn't), so as usual, YMMV.

  • by Boojumbunn ( 1003095 ) on Tuesday October 30, 2007 @01:57PM (#21174789)
    You know, it's funny. A while back there was an outcry about manufacturers who decided that installing linux nullified your warrenty. This incident makes me wonder if maybe they have a point? After all... they have likely tested the hardware for long term windows reliability. They probably haven't tested their hardware for long term Linux reliability (through all the various linux types and settings.)

    That said, they could probably still support their warrenty on things they know won't be affected by operating systems, like the hinge of the laptops screen.

    Boojum the brown bunny
  • by orangesunglasses ( 1140459 ) on Tuesday October 30, 2007 @02:00PM (#21174825)
    http://mjg59.livejournal.com/77672.html [livejournal.com]
    Matthew garret, who runs the laptop testing team. Read this, instead of just spreading FUD.
  • Hard disk mp3 players like iPods are very aggressive with power savings.
    Don't they also treat their hard disks badly? I know that the disks made
    for use in mp3 players are NOT quite the same as those in laptops (1.8" or 1"
    instead of 2.5") and perhaps these drives are built with frequent spin up/down
    in mind.
  • by mmontour ( 2208 ) <mail@mmontour.net> on Tuesday October 30, 2007 @02:42PM (#21175443)
    I see a similar issue with my new WD10EACS (1 TB Western Digital "Green Power") desktop drive:

    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
        9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 582
    193 Load_Cycle_Count 0x0032 180 180 000 Old_age Always - 62848

    I don't know the drive's rating for Load_Cycle_Count, but the scaled SMART attribute has gone down from 181 yesterday to 180 today so it does seem to be burning through its allocated cycles quite rapidly.

    Interestingly, this drive does not appear to support the "hdparm -B 255" command:

    mythtv:~# hdparm -B 255 /dev/sda /dev/sda:
      setting Advanced Power Management level to disabled
      HDIO_DRIVE_CMD failed: Input/output error

    "hdparm -I" lists "Power Management feature set" and "Automatic Acoustic Management feature set", but not "Advanced Power Management feature set".

    The system is running Debian Etch with a 2.6.23 kernel, and I'm using hdparm version 7.7. I am not using any "laptop mode" settings (at least, none that I can see).
  • It is NOT Ubuntu (Score:5, Informative)

    by chill ( 34294 ) on Tuesday October 30, 2007 @02:48PM (#21175529) Journal
    My company just issued me a Lenovo T60 laptop *yesterday*. I installed Kubuntu 7.10 *last night*. Prior to that it has had Windows XP on it since it was purchased via a corporate sale from Lenovo. It is about 15 months old and the value in question looks like this:

    193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 2144751

    That is 2,144,751 in case the lack of commas throws you. This is just a tad more than the 600,000 that was mentioned in the original bug report, so I don't know out of who's hat that number was pulled.

    For completeness, here is the drive info.

    Model Family: Seagate Momentus 7200.1 series
    Device Model: ST96023AS
    Serial Number: 3MG06BZ3
    Firmware Version: 4.06
  • by Wapiti-eater ( 759089 ) on Tuesday October 30, 2007 @03:01PM (#21175739)
    It's already been posted, but apparently no one's reading it

    =====================
    Linux-hero wrote about how Ubuntu kills your hard drive. The situation is somewhat less clear than you might think from the article, but the basic takeaway message is that Ubuntu doesn't touch your hard drive power management settings by default. In almost all cases, it's more likely to be your BIOS or the firmware on your hard drive.

    The script that's executed when you plug or unplug your laptop is /etc/acpi/power.sh. The relevant sections are:

    function laptop_mode_enable { ...
            $HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
            $HDPARM -B 1 /dev/$drive 2>/dev/null
    }

    That is, when the laptop_mode_enable function is called, we set the drive power parameters. Now, by default laptop_mode_enable isn't called:

    if [ x$ENABLE_LAPTOP_MODE = xtrue ]; then
            (sleep 5 && laptop_mode_enable)&
    fi

    because ENABLE_LAPTOP_MODE is false in the default install (check /etc/default/acpi-support). This means that, by default, we do not alter the hard drive power settings. In other words, the APM settings that your drive is using in Ubuntu are the ones that your BIOS programmed into it when the computer started. This is supported by the fact that people see this issue after resuming from suspend. We don't touch the hard drive settings at that point, so the only way it can occur is if your BIOS or drive default to this behaviour.

    If you enable laptop mode, then we will enable aggressive power management on the drive and that may lead to some reduction in hard drive lifespan. That's a fairly inevitable consequence of laptop mode, since it only makes sense if the laptop enages in aggressive power management. But, as I said, that's not the default behaviour of Ubuntu.

    There's certainly an argument that we should work around BIOSes, but in general our assumption has been that your hardware manufacturer has a better idea what your computer is capable of than we do. If a laptop manufacturer configures your drive to save power at the cost of life expectancy, then that's probably something you should ask your laptop manufacturer about.
    =====================

    Don't fall prey to 'Digg-ish' sensationalism. You all are supposed to know better over here.
  • by redelm ( 54142 ) on Tuesday October 30, 2007 @03:20PM (#21176017) Homepage
    Yes, boyz'n'grlls spin-up kills hard-disks. And worse with Unix and other Linux-like OSes since they modify the directory entries each time a file is accessed (even from cache), updating the 'atime' entry. AFAIK, MS-ntfs has no such entry. Yet :)


    This is a well-known performance-killer (imagine a newspool), so disks should be mount'd with the `noatime` and `nodiratime` options if at all possible. This can be done automagically by replacing 'defaults' with 'noatime,nodiratime' in /etc/fstab .

  • by fifirebel ( 137361 ) on Tuesday October 30, 2007 @03:31PM (#21176171)
    Since this story hit the front-page I've been monitoring hard drives on three laptops that I can remotely access from work (hi boss).
    • Disk 1:
      • Seagate ST96023A (Seagate Momentus 7200.1 series)
      • Power_On_Hours 1438
      • Load_Cycle_Count 187925
      • 130 load/unload per hour (roughly 2 per minute)
    • Disk 2:
      • Hitachi HTS721010G9SA00
      • Power_On_Hours 818
      • Load_Cycle_Count 90539
      • 110 load/unload per hour (roughly 2 per minute)
    • Disk 3:
      • TOSHIBA MK6006GAH
      • Power_On_Hours 2896
      • Load_Cycle_Count 199757
      • 68 load/unload per hour (roughly 1 per minute)
    Then I've been monitoring the hard drive with this one-liner.

    lcc() { smartctl -a /dev/hda | grep 'Load_Cycle_Count' | awk '{print $10}'; }; n=$(lcc); while :; do nn=$(lcc); echo "$(date) $((nn-n))"; n=$nn; sleep 60; done
    Before you ask, it is only one line, as you only press enter once :-). And that's a short one-liner for me.

    This shows on all three laptops that the load counts increases by 1 to 4 every minute.

    Now I issued:

    hdparm -B 255 /dev/hda
    This has stopped load cycles on two drives.
    The third one (the TOSHIBA MK6006GAH) still continues loading and unloading like hdparm did not help at all.

    However, setting the power-management level to "lowest power savings mode" with:

    hdparm -B 254 /dev/hda
    did prevent any more load/unload cycles from happening.

    So in summary:

    1. Use hdparm -B 254 at boot.
    2. Re-issue it after every suspend/wake-up cycle as this setting seems to be lost on suspends.
  • Not Just Ubuntu (Score:3, Informative)

    by markbthomas ( 123470 ) on Tuesday October 30, 2007 @06:55PM (#21178307)
    This isn't just Ubuntu, I just fired up my 5-year-old laptop with Debian from 2 years ago installed on it (haven't used it in 2 years) and smartctl gives me 184,305 load cycles in 2179 power on hours. The hard drive clicks every 30 seconds or so when idle (I noticed it before but assumed it was something messing around with the disk). hdparm -B 254 /dev/hda stops it from going up any more.
  • hdparm -B 255 (Score:3, Informative)

    by MrKaos ( 858439 ) on Tuesday October 30, 2007 @10:16PM (#21179567) Journal
    There are other values besides just turning the drive power management off. Ok, if it's set too agressively and cycling the heads, maybe it would be a good idea to establish what your drive is capable of. From the hdparm man page

    -B Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power manage- ment and a high value means better performance. A value of 255 will disable apm on the drive.

    but there is more, power mode status

    -C Check the current IDE power mode status, which will always be one of unknown (drive does not support this command), active/idle (normal operation), standby (low power mode, drive has spun down), or sleeping (low- est power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags can be used to manipulate the IDE power modes.
    and of course spindown timer

    -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 seconds 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.
    So there is a middle ground, if your drive supports it, hdparm -I will also yeild some interesting information about what features the drive will support. Just turning the power management off seems like a bit of a knee jerk reaction, especially when adjusting the amount of power management applied to the drive should deliver both i.e hdparm -B 196 YMMV.

    I would have thought that spindown timer would be more relevant to apply, one other thing I've never found hard drives tuned to thier maximum throughput in a linux installation (I mainly use Fedora) so an investigation of the udma modes your drive will support may be a worthwhile investment in time see hdparm -X _some_number_here_ (RTFM - first) considering just about everything goes better when you do tune it right.

"Imitation is the sincerest form of television." -- The New Mighty Mouse

Working...