Smartctl does not work - checking for HD spins
Hi,
I have read several reports now about problems with feisty and gutsy excessively spinning down the harddrive, causing the possibility of severe wear and tear (http://ubuntudemon.wordpress.com/200...ve-killer-bug/). I installed smartmontools, and issued the $ sudo smartctl -a /dev/sda1 command to see how often the disk was spinning. I received the following output, saying my device doesn't support SMART. I am not well versed with the command line or its messages. Does anyone have any comment on this as to whether I simply cannot use this utility, or if I have any other option to see how often my drive is spinning? Laptop mode is disabled in /etc/default/acpi-support - I did check that. Also, since my battery is shot, I only use AC power when running my laptop, but I have heard that on some occasions, the bios controls this function (or the hd firmware). I am not sure if this problem affects me, but it would be nice to know. Many thanks. **************** tferero@ubuntu:~$ sudo smartctl -a /dev/sda1 Password: smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Device: ATA SAMSUNG MP0402H Version: YQ20 Serial number: S03WJ10L783528 Device type: disk Local Time is: Sat Oct 27 07:39:49 2007 EDT Device does not support SMART Error Counter logging not supported [GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on'] Device does not support Self Test logging *************** |
I am interested in this issue for my own notebook. Within the next couple of days I will probably posting on the System76 forum on ubuntuforums.org about this issue. I am certainly not an expert, but I can tell you what I have found so far on an edgy installation.
First, I already knew that from checking a data sheet that my drive was a (P)ATA aka IDE drive and I would expect it to be compatible with SMART. Yet running smartctl -i /dev/sda said it was not. What I found was I needed to tell smartctl that is was an ATA device and not SCSI: Code:
smartctl -d ata -i /dev/sda I hope this if helpful. |
blackhole54, this was very helpful. Starting with your command, I arrived at:
$sudo smartctl -d ata -a /dev/sda1 | grep Load_Count_Cycle I seem to be averaging about 5 spins per minute. Can you offer comment as to how this is? Too much or about right? I am not sure what is normal for disk spins. If this is too high, what do I do next? For something like this, I really need step-by-step instructions that offer some insight as to what is being done. This seems like it could be a huge issue, especially for newbies who have very little experience with the types of fixes this might require (e.g., editing special files and command line entries). I am very comfortable with both, as long as I know what to do. Thanks again for the help you gave. |
The questions you are asking relate to why I am going to try to get some answers from System76 who sold me the computer (with edgy eft preloaded). I am as new to this load count thing as you are. According to the article (which I only read a day or two ago) and the data sheet for my disk drive and my (lack of?) understanding, it sounds to me like my drive should have died about a week or two ago. :( (OK, I am playing fast and loose with statistics.) And my computer is less than a year old. :( :( My average is several a minute like yours.
If I had any sage advice concerning this, I'd give it. |
I've been looking around. This might help, but I have a question or two for anyone who has the answer (questions follow):
From this website: http://ubuntudemon.wordpress.com/200...ve-killer-bug/ These instructions: ********* Laptop Hardrive Killer Bug is worse than I thought : http://ubuntudemon.wordpress.com/200...han-i-thought/ The (ugly) fix : Disable laptop-mode in /etc/default/acpi-support. And $sudo laptop_mode stop If your Load_Cycle_Count is still increasing fast then : $ sudo hdparm -B 255 /dev/sda $ sudo hdparm -S 0 /dev/sda To make these hdparm commands permanent follow both of these instructions : https://bugs.launchpad.net/ubuntu/+s...95/comments/25 https://bugs.launchpad.net/ubuntu/+s...95/comments/14 and don’t forget to include “hdparm -S0 /dev/sda” in this last fix Also don’t forget to : $sudo chmod +x 99-hdd-spin-fix.sh *********** My questions: 1. From the second instruction reference link in the above instructions, I am told to: "make a file named "99-hdd-spin-fix.sh". The important thing is starting with "99"." --how do I make this type of file? 2. Regarding the last line in the above instructions: what is this line about? I know chmod sets access, but the '+x' is what I don't know about. Thanks! |
Quote:
Code:
sudo install 99-hdd-spin-fix.sh /etc/acpi/suspend.d/ I would think it would be a little bit cleaner to install only one copy of the file and then create symlinks to it. But that is a little more advanced, so unless you are already comfortable doing such things you might want to just stick with three files. Quote:
====== As I understand the instructions from the two launchpad links, those are two ways for accomplishing the same thing. So you probably don't want to do both of them. But you should test that whatever you implement accomplishes what you wish. |
Backhole54, many thanks for those very clear instructions. I ended up posting another related entry in hardware exploring this problem in more detail. I don't normally cross-post in a forum, but this q&a was originally about smartctl more than the problem at the time I wrote it.
I have spent some time reading the man pages on smartctl, and in the Kubuntu IRC, and still no resolve on the load cycle issue. I followed the temporary hdparm commands as suggested in the help I pasted above, and I went into my bios and disabled the power management - still no change in the load cycle readings. I even tweaked the -B and -S settings after learning what they really did - nothing made a difference. Another curious thing is that smartctl says I have 28,000 hrs on my harddrive, which is a physical impossibility since I have only had it about 8 months (unless it wasn't new like it was supposed to be when I got it). Around midnight last night, after spending time scouring the man pages on smartctl, I began to wonder if the smartctl software displays the text load cycle in hours, but my hardrive firmware is actually reporting minutes. From there, I wonder if the load cycle readings are doubled: load/unload reading as an output of 2 loads, rather than a single instance. The man pages do indicate that some drive manufacturers program the smart drives to have differing outputs, compared to others. Additionally, I don't hear my drive doing anything. I am beginning to wonder, with so many people experiencing this problem, if the smartctl program is misreporting the info somehow. I intend to email them a report to see about that. I am especially perplexed that the temporary command lines to suspend power management and spin times had no affect, according to the smartctl output. If you are interested in my output, you can see it in my other post. I notice that pasting the url doesn't seem to work, but I only have a few posts/threads, so you can get to it my clicking on my username pretty quickly in this thread post. |
tferero,
Your observations from the man apes are germane. But I would doubt counts get arbitrarily doubled, but I can't say for sure. I have posted my results in the System76 forum over at UbuntuForums here if you are interested. (System76 sold me the systems with Ubuntu pre-installed. I am hoping to get their take on this situation.) The quick summary is Code:
hdparm -B255 /dev/sda ===== I don't know why you had trouble posting a URL for your post. You obviously posted other URLs w/o problem. To combat spam, LQ does restrict people with very low post counts, but I would think you would be well beyond that by now. I've looked at your other post but at this time I don't have a response. (Maybe after some rest -- I am getting tired too.) But here is a hint on making your posts more readable: whenever you post computer output (such as the output of smartctl, wrap it in "code tags" which will cause everything to line up right. You can do this by highlighting the text and clicking the hash mark (#) above the box you are editing. You can also type them in manually. (Just observe the tags the hash mark icon adds.) |
Thanks for the '[code]' tip - that made the post much nicer!
I will be watching your post on Ubuntu to see what develops. Also, I emailed the people at smartmontools to see if this could be a software issue. At this point, it feels to me like either Smartmon is not reporting the info correctly or it is a problem with the firmware itself. Power management is definitely off for me at all levels, and I am not hearing my drive click all the time, like I might expect to. As far as the strange number of usage hours I am getting, I do believe that Samsung reports in minutes or even half-minutes, but I haven't been able to confirm that yet. The Smartmontools website indicates that this is the case with other drives. All very strange, IMHO. If I get a response from Smartmon that offers a clue to the problem, I will summarize it here. |
Quote:
EDIT: BTW, for anybody else following this, that other thread is here EDIT2: A moderator has closed that other thread so we are back to this one. tferero, if you think this thread really should be in the hardware forum, you can use the "report" button to request a moderator to move it. |
lazlow,
I can't speak for the OP, but I know on my machine typically very little is swapped out and I would be surprised that it swaps much. (As I haven't had that computer running right now, I can't give you vmstat output that would mean much.) Yet, on average that machine was incrimenting Load_Cycle_Count 3 times a minute. I would imagine most of this has to do with logging. I know for example that NetworkManager would typically be logging at least every other minute. I believe there are other services that frequently log as well. In edgy eft (and probably later incarnations) syslog by default is set up to log everything at all levels (including, as I understand it, debug) except for security info. |
Blackhole54: The thread can stay here, no problem by me. The title may seem a bit misleading for the direction of the conversation, but that's ok. The mods are there to keep the boards neat 'n clean - no sense going against the sensible advice :)
Lazlow: if you are still following this thread, I am running a Dell Latitude C610, with 128MBs of RAM. Definitely it has to work harder because of that. But honestly, I don't hear the drive clicking or making noise all that often, so this whole issue of the Smartctl output puzzles me. |
Quote:
On the Ubuntu Forum thread, sombody who bought the same type (I think) computer at about the same time as I bought mine reports an average load count that is about 1/30 mine even though it has approximately the same number of hours. I don't understand that at all. While I did not upgrade from edgy, this person did upgrade edgy -> fiesty -> gutsy. Now with gutsy this person is reporting load counts incrimenting at about 200/hr which is about what mine was before I set disk power management to "255." |
Another Newbie
Quote:
Just have started using Ubuntu. I'm an AutoCAD guy so I've never considered Linux until recently I loaded it (dual boot) on my Toshiba M65. I love the look and feel, but I'm concerned what I'm reading about hard drives. I typed the "vmstat" as recommended and both si and so columns show 0! I just booted into Ubuntu. Is this a running total or just for the present boot? Also, I'm clueless about many things at this point. I created the "99-hdd-spin-fix.sh" file and have it in my "Home Folder". I tried going to "Applications>Add/Remove" and can't seem to get to it to install from there. I also went into the Terminal and typed the "sudo install 99-hdd-spin-fix.sh" commands just as shown into the 3 locations. I first am asked for my password, then after I enter it I get the following message: "install: cannot stat '99-hdd-spin-fix.sh': No such file or directory" I'm rather literate in Windows XP but clueless here. Any help will be much appreciated! ubuntu.michael |
Quote:
Code:
man vmstat Before you go altering the behavior of your computer, I would suggest you download the smartmontools package and use smartctl to see what figures are being reported for your drive. Using an analogous procedure to what I showed above, consult its man page for details. (BTW, in this usage man is short for manual -- as in a reference manual.) Quote:
Quote:
EDIT: BTW, the Bash shell (which you are probably using in your terminal) has a feature called "tab completion." Assuming the file really does exist in your current directory (but perhaps you misnamed it), and if it is the only file that starts with "99" (a likely situation), then when you type the command and get to the filename, you can just type "99" and hit the tab key and Bash will fill in the rest of the filename for you. Very handy. |
All times are GMT -5. The time now is 02:56 AM. |