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."
Ubuntu (Score:2, Funny)
Re: (Score:2)
The Ubuntu (Score:3, Insightful)
Re: (Score:3, Informative)
Re:The Ubuntu (Score:5, Funny)
Re:The Ubuntu (Score:5, Informative)
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)
Re:The Ubuntu (Score:5, Informative)
Re:The Ubuntu (Score:5, Funny)
Re: (Score:3, Interesting)
Re:The Ubuntu (Score:5, Informative)
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)
Re:The Ubuntu (Score:5, Insightful)
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, Funny)
Then you must be a real masochist to keep hanging around here.
Re:The Ubuntu (Score:5, Insightful)
Re:The Ubuntu (Score:4, Insightful)
Re:The Ubuntu (Score:4, Interesting)
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)
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: (Score:3, Insightful)
Laptop-mode solves the problem one way, without changing underlying apps, by making the write cycles bursty.
But what if you could receive a message to know that the drive had just spun up, so you could batch-commit a bunch of data and maybe do some speculative read operations?
Similarly, if you hit "Save" you really want to bypass any caching, you want it to spin up right now.
Not all disk operations are created equal.
Re:The Ubuntu (Score:5, Informative)
# -B 255 doesn't work for me
sda_args="-B 254 -S 60"
to
# redo hdparm settings on resume
after running
The key thing here is to run hdparm on boot *and* on resume
Ubuntu FOUND the problem (Score:5, Interesting)
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)
HD Tune and Speedfan are among the better utils:
http://www.hdtune.com/ [hdtune.com]
http://www.almico.com/speedfan.php [almico.com]
Re:Ubuntu FOUND the problem (Score:4, Informative)
You can set that as high as you want, and the drive will still use its internal setting to sleep more frequently if it is configured to. All the windows setting does is set how long Windows will wait before sending an explicit command to the drive to tell it to sleep.
Nice guess though.
Ubuntu (Score:4, Funny)
Re:Ubuntu (Score:4, Funny)
Re:Ubuntu (Score:4, Funny)
no problem, really! (Score:5, Funny)
Re:no problem, really! (Score:5, Informative)
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.
Re:no problem, really! (Score:4, Insightful)
I'd say it's more of hard drive manufacturer issue. I have 3 notebooks all running Ubuntu, and the one with a Hitachi HD had this problem, but the other two with Fujitsu HD's didn't. Luckily it took about 5 seconds to fix it. If the manufacturer set a realistic cycle this wouldn't be an issue. Ubuntu is just telling the hard drive to do it's thing, and unfortunately the hardware is set to commit suicide it seems.
Re: (Score:3, Insightful)
Prevent damage?? (Score:5, Funny)
Once they control the fire and get the backup server online, maybe I'll be able to RTFA.
Thanks for slashdotting launchpad, guys. (Score:2, Informative)
Re: (Score:2)
Re:Thanks for slashdotting launchpad, guys. (Score:5, Funny)
Much as I love debian (Score:2)
It just kinda sits there and hangs during install. Which is a shame as I love the debian OS in general.
Comment removed (Score:5, Informative)
MOD UP PLEASE (n/t) (Score:2)
Re: (Score:3, Interesting)
AHA! :D (Score:4, Funny)
^_^
Re:AHA! :D (Score:5, Insightful)
Re: (Score:3, Interesting)
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)
Re: (Score:2)
Windows Sysadmin here
(this will not make myself some friends here
Re: (Score:2)
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.
Re: (Score:2)
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)
Gasp!
Re: (Score:2)
Seriously though, Linux (in all/most its incarnations) is damn good.
Fast, stable and really usefull (sp?)
But I've always been a windows user, gamer, etc. It just doesn't do it for me, but that's ok, to each his own right?
^_^
Re: (Score:2)
Ubuntu? (Score:5, Insightful)
Isn't this what is supposed to happen? (Score:5, Insightful)
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_.
Old news??? (Score:5, Informative)
Effects on Dell/Ubuntu OEM? (Score:4, Interesting)
Re: (Score:2)
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.
Re:Effects on Dell/Ubuntu OEM? (Score:5, Funny)
Re: (Score:3, Funny)
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.
This thread sucks... (Score:3, Insightful)
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?
Re:This thread sucks... (Score:4, Informative)
> 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.
Missing the point... (Score:4, Insightful)
Re: (Score:2)
its all really just a big foam finger blame pointing game
Selected Excerpts (Score:5, Informative)
When switching to battery power,
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
3) copy this file to 3 locations:
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
Re:Selected Excerpts (Score:5, Interesting)
Add "-o noatime" to the filesystems in
noatime by itself doesn't make a difference (Score:3, Informative)
Re: (Score:3, Interesting)
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
Not Entirely Accurate (Score:5, Insightful)
# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=false
Re: (Score:2)
It is Entirely Accurate that this is a Bug.
Read some of the Ubuntu forums (Score:5, Informative)
Cheap test.. (Score:5, Informative)
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
echo `sudo smartctl -a
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.
Maybe this explains (Score:2, Interesting)
Mandriva? (Score:2)
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?
Saving Power Has a Cost (Score:4, Interesting)
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.
So Ubuntu can ruin hardware? (Score:3, Interesting)
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
From the horses mouth (Score:5, Informative)
Matthew garret, who runs the laptop testing team. Read this, instead of just spreading FUD.
What about iPods? (Score:2)
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.
Similar issue with new WD10EACS desktop drive (Score:3, Insightful)
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
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)
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
This is not an Ubuntu problem. Read the references (Score:5, Informative)
=====================
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
function laptop_mode_enable {
$HDPARM -S $SPINDOWN_TIME
$HDPARM -B 1
}
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
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.
Re:This is not an Ubuntu problem. Read the referen (Score:3, Informative)
http://mjg59.livejournal.com/77672.html [livejournal.com]
noatime & nodiratime (Score:3, Insightful)
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
Don't use -B 255, use -B 254 instead (Score:5, Informative)
This shows on all three laptops that the load counts increases by 1 to 4 every minute.
Now I issued:
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:
did prevent any more load/unload cycles from happening.So in summary:
Not Just Ubuntu (Score:3, Informative)
hdparm -B 255 (Score:3, Informative)
but there is more, power mode status
and of course spindown timer 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.
Re:wow, I had Ubuntu kill a laptop hard drive . . (Score:2)
Re: (Score:2, Funny)
Re: (Score:3, Informative)
Time to try the fix, once the site comes back up from oblivion.
Re: (Score:3, Informative)
It shows two screens, and you can dual screen it or switch screens from the control panel. You may have to restart X for changes to take effect, however it is much better than it used to be. I had no problems selecting the right resolution for my computer (1280x1024).
AS for the hard drive throttling, that could be a serious issue, and one I am sure they will try to fix asap, especially with a Long Term Su
Re: (Score:2, Funny)
Re: (Score:2, Funny)
Re: (Score:2)
And those "edits" are more complicated than the edits you typically make in your "letter to mom" wordprocessing document?
Geez.
Look, if you don't understand the format of xorg.conf, that's fine. Admit you don't know how things work. Admittedly, there's lots to know, but it can be simple or complicated, depending on the
Re: (Score:2)
Re: (Score:2)
Even assuming this bug effected you 2 weeks ago and taking it to its maximum impact this bug still probably wouldn't have killed your drive in such a short time. My immediate suspicion is a faulty drive.
How exactly is the drive hosed?
Re: (Score:2)
No. (I haven't read TFA because it's still slashdotted, but...) Apparently the article says it cycles the power too quickly, which leads to premature failure. Not screwing the drive up immediately, but wearing it out too soon.
If the drive screwed up immediately upon installing Ubuntu in a dual boot with a copy of Windows that had been used some already, I'd put mone
Re: (Score:2)
This includes:
-Downtime until you get a replacement
-Time to set up replacement back to the state of the old machine
-Annoyance of having to file warranty claim, package laptop and send it out (or drive to whatever local shop can do replacements)
-Bugs when replacement differs from old machine in negative ways (which you will of course be told is official
Re: (Score:2)
Yes, I know that you should have a redudancy system and save important documents multiple places. But the typical user doesn't know this.
Re: (Score:3, Insightful)
Ah, here it is [slashdot.org] -- sticky keys, not broken hinge, but still. You might want to give that cute gal in Canada a call back.
Re: (Score:2, Funny)
fudmuffin (Score:4, Insightful)
Re:Confused.... (Score:4, Funny)
I can't find the Uncheck Crappy Authors option.
Re:Ubuntu? Slashdot! (Score:5, Funny)
Re:My experience (Score:4, Informative)
far more useful in SMART are the VALUE WORST THRESH and TYPE columns. Since Load_Cycle_Count is an Old_age value, and the THRESH is 0, it means that it starts at 100 and goes down as the drive ages. When it reaches 0 it means the drive manufacturer believes that is roughly equivalent to the useful duty life of the drive.
Currently yours is on 86, so it's actually only down 14%, which gives you nearly 3 more years of likely life from it. That is about typical of modern laptops afaics.
A far more useful test here would be to run the same test on Ubuntu and Windows on the same hardware (there is a smartctl port at http://hdparm-win32.dyndns.org/hdparm/ [dyndns.org] )
Given that Ubuntu does not change the disk power management settings in your BIOS and/or hard disk firmware, the only variable here is whether or not Windows overrides those settings with more or less conservative values than the existing defaults (and of course it's possible that your OEM pre-installs with other settings than Windows would natively choose on a vanilla install).
For all of the screaming and wailing about Ubuntu killing disks I have not seen a single post anywhere where anyone has posted any kind of hard data that Ubuntu is behaving in any way differently to other operating systems. Ergo this is still very very much unproven - unless anyone can link to something that says otherwise?
Cheers,
Re:My experience (Score:4, Informative)