See the content

Ubuntu 8.04 and lifetime of hard drives

The case for reducing the lifetime of hard drives for notebooks, has caused a lot of noise and mistrust of the users of Ubuntu. The issue arose in Ubuntu 7.04, but after a few reports and even a test that I did, I can say that in Ubuntu 8.04 continue to be affected by the problem. In this link [1] you can get all the information about the problem.

In my particular case after you install Ubuntu 8.04, believed to be immune to the problem.

But desencargo of conscience decided to do a test and figured the life of my HD is more than 7 years. But that's why it is a hitachi [2] that this query, according to the manufacturer is life three times longer than other manufacturers. While any of notebook HD supports 200,000 cycles of discharging the recording head of the hard drives hitachi supports 600,000 cycles. The test was in an interval of 30 minutes in use where I did a count of less than 20 cycles. But how had not yet convinced me I did a new test with an interval of approximately 2 hours, with the note almost at rest and to my sad surprise nearly 1000 cycles!! So I had no doubt completely disable this feature of my HD. I noticed that there was a small increase in temperature of 2 degrees of work, but totally within the normal range.

For those who have a laptop with Ubuntu and does not know exactly what to do, I created a little script to do the test and inform the estimated useful life of the disc. Follow the instructions in the script (hdd-life-util.sh) below which we will complete the test within a one hour, the idea is to let it stand for about thirty minutes during the test. And if the result is not satisfactory run the script hdd-spin-fix.sh, adapted from Alex's Weblog [1], which completely disables the ability to download reading by the head of energy management.

  #! / bin / bash 
  # 
  # Hd-life-util.sh - Checks the estimated useful life of a notebook for HD 
  # 
  # Author: S. Wanderson  Kings 
  # ------------------------------------------------- ------------ 
  # This script tests and calculates the useful life of notebook computers with HD at the Ubuntu 8.04 LTS. 
  # 
  # Details on this issue: 
  # Http://tutolivre.net/ubuntu-804-ea-vida-util-dos-hds 
  # Http://alexblog.eeol.org/linux/aumentando-a-vida-util-dos-hds/ 
  # 
  # Using: 
  # $ Chmod + x hd-life-util.sh 
  # $ Sudo. / Hd-life-util.sh 
  # 
  # 
  # It is pre-requisite to have the package installed smartmontools: 
  # $ Sudo aptitute install smartmontools 
  # ------------------------------------------------- ------------ 
  # 
  # History: 
  # 
  # V0.1 2008-06-13, Wanderson S.  Reis: 
  # - Performs the original version for a test interval of 60 minutes 
  # 
  # License: GPL. 
  # 

  CICLOS_ESTIMADOS = 200,000 
  CICLOS_RESTANDO = 0 
  CYCLES = 0 
  dev / sda DISK = / dev / sda 
  which  smartctl ` _smartctl = `` which smartctl 

  $DISCO  | grep  Load_Cycle_Count 1 > / dev / null $ _smartctl a $ DISK | grep Load_Cycle_Count 1> / dev / null 

  "$?" if [ "$?"  = "1"] 
  then 
    echo "Your disc ($ DISK) does not have the ability to download from head to read" 
    echo "So do not worry;)." 
    exit 0 
  fi 

  $_smartctl -A $DISCO  | grep  Load_Cycle_Count | awk -F " " '{print $10}' ` L0 = `$ _smartctl a $ DISK | Load_Cycle_Count grep | awk-F" " '(print $ 10)'` 

  sleep 3600 

  $_smartctl -A $DISCO  | grep  Load_Cycle_Count | awk -F " " '{print $10}' ` L1 = `$ _smartctl a $ DISK | Load_Cycle_Count grep | awk-F" " '(print $ 10)'` 

  expr $L1  - $L0 ) CYCLES = $ (L1 expr $ - $ L0) 

  "$CICLOS"  = "0" ] ; then if [ "$ CYCLES" = "0"]; then 
      echo "There were, change. It is likely that the action is already disabled." 
  else 

      expr $CICLOS_ESTIMADOS  - $L1 ) CICLOS_RESTANDO = $ (expr CICLOS_ESTIMADOS $ - $ L1) 
      expr $CICLOS_RESTANDO / $CICLOS ) VIDA_UTIL_HORA = $ (expr $ CICLOS_RESTANDO / $ CYCLES) 
      expr $VIDA_UTIL_HORA / 8 ) VIDA_UTIL_DIAS = $ (expr $ VIDA_UTIL_HORA / 8) 

      echo "Cycles of remaining useful life of the disc: $ CICLOS_RESTANDO" 
      echo "useful life remaining total (hours): $ VIDA_UTIL_HORA" 
      echo "useful life in days (average of 8 hours of use): $ VIDA_UTIL_DIAS" 
  fi 
  exit 0 

If your HD is a hitachi change the variable CICLOS_ESTIMADOS to 400,000 or 500,000. To find the manufacturer of your disk run in the terminal:

$ Sudo smartctl-a / dev / sda | grep "Model"

Low following the script that disables the ability to download the head reading from the hd.

  #! / bin / bash 

  # Hdd-spin-fix.sh 
  # Adapted from: http://alexblog.eeol.org/linux/aumentando-a-vida-util-dos-hds/ 

  PARAM = 255 
  dev / sda HD = / dev / sda 

  > 99 -hdd-spin-fix.sh echo '#! / bin / bash "> 99-hdd-spin-fix.sh 
  >> 99 -hdd-spin-fix.sh echo "hdparm-B $ $ PARAM HD">> 99-hdd-spin-fix.sh 

  -hdd-spin-fix.sh chmod + x 99-hdd-spin-fix.sh 

  ! -f / etc / acpi / suspend.d / 99 -hdd-spin-fix.sh ] ; then if [!-f / etc / acpi / suspend.d / 99-hdd-spin-fix.sh]; then 
      -hdd-spin-fix.sh / etc / acpi / suspend.d / cp 99-hdd-spin-fix.sh / etc / acpi / suspend.d / 
  fi 

  ! -f / etc / acpi / resume.d / 99 -hdd-spin-fix.sh ] ; then if [!-f / etc / acpi / resume.d / 99-hdd-spin-fix.sh]; then 
      -hdd-spin-fix.sh / etc / acpi / resume.d / cp 99-hdd-spin-fix.sh / etc / acpi / resume.d / 
  fi 

  ! -f / etc / acpi / start.d / 99 -hdd-spin-fix.sh ] ; then if [!-f / etc / acpi / start.d / 99-hdd-spin-fix.sh]; then 
      -hdd-spin-fix.sh / etc / acpi / start.d / mv 99-hdd-spin-fix.sh / etc / acpi / start.d / 
  fi 

  exit 0 

Comment on their experiences and expectations with respect to this issue and how much has shaken the confidence of users in Linux and especially in Ubuntu.

[1] - http://alexblog.eeol.org/linux/aumentando-a-vida-util-dos-hds/
[2] - http://www.hitachigst.com/hdd/support/5k160/5k160.htm



BuscaPé, leader compared to prices in Latin America

Also read:

9 Comments

  1. William

    Caracas!! Mine is over 309,000

    Permalink Published on 18-Jun-08 at 14:52 | Permalink
  2. wasare

    William,

    Followed his comment in Alex's Weblog and its situation is really very strange!

    My laptop is exactly equal to his and my drive is hitachi because I changed to increase capacity. I think you should make detailed research on technical details of its HD (by manufacturer and model), probably has more ability to cycles of loading / unloading of the head of reading. The best advice at this time is to becape immediately and not wait for signs of failure, they may not appear.

    Permalink Published on 18-Jun-08 at 17:43 | Permalink
  3. John Santana

    Hello, William.

    I tried to run your script but gives the following error:

    joe @ ubuntu: ~ $ sudo. / hd-life-util.sh
    grep: 1: File or directory does not exist
    . / hd-life-util.sh: 36: gt: not found
    . / hd-life-util.sh: 36: / dev / null: Permission denied

    How can I fix this error?

    Permalink Published on 05-Aug-08 at 11:35 a.m. | Permalink
  4. wasare

    John,

    Possible causes of errors are:

    - Your disc is not supported property "Load_Cycle_Count"
    - When you copy the script got misspelled where I might be with this: & gt; should be well:>
    - The interpreter's default ubuntu (dash) is not compatible with the controls, try running $ sudo bash

    Permalink Published on 05-Aug-08 at 12:10 p.m. | Permalink
  5. Mario

    I read your comment, I have a doubt

    I am installing Debian 4.0 on my HP v6210 not br

    Debian can reduce the life of HD ultil this not

    If you can answer thank

    Permalink Published on 15-Aug-08 at 1:20 | Permalink
  6. wasare

    Mario,

    I did not hear no reports of this problem with Debian. Everything indicates that it was a unique case of Ubuntu, but just to make doubt and take the tests proposed conclusions.

    Another important thing about this type of note is the recall of HP: http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01319037&lc=pt&cc=br&lang=pt&product=3432960&dlc=pt

    A number of my notebook is in the recall, but so far not produced any symptoms.

    Permalink Published on 15-Aug-08 at 7:40 | Permalink
  7. Machizu

    wasare, my note is a Microboard Innovation SR, 120GB HD. Installed the Ubuntu 8.04 yesterday. I have a question about your story: disabling this feature, the useful life of HD increases? What this feature after good? Thank you.

    Permalink Published on 22-Aug-08 at 15:03 | Permalink
  8. wasare

    Machizu,

    Not exactly ... it just prevents a possible degradation in time of the useful life of the disc.

    You can get more details about this issue at:

    http://alexblog.eeol.org/linux/aumentando-a-vida-util-dos-hds/

    Permalink Published on 22-Aug-08 at 15:39 | Permalink
  9. Hello, I just lost a hd and I'm almost convinced it was ubuntu and this issue, to make use of the script noticed that in half an hour he made an average of 73 cycles, I do not know if this is good or bad .... Not wanting to lose another hd :)

    VLW

    Permalink Published on 01-Nov-08 at 14:32 | Permalink

Submit a Comment

Your email will never be published or disclosed to third parties. Required fields are marked *