bad sectors.

Discussion in 'all things UNIX' started by The Red Moon, Mar 28, 2016.

  1. The Red Moon

    The Red Moon Registered Member

    Joined:
    May 17, 2012
    Posts:
    3,872
    I use xubuntu linux and today my disk drive announced 300 bad sectors on my drive.Could somebody please advise on how i rectify this please.I have no experience with fixing disk errors.

    Thank You.
     
  2. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    You can't "fix" them, but Linux can mark them as known bad. For ext4 filesystems, use 'e2fsck -c'. As with any fsck invocation, only do this when the filesystem is unmounted or read-only mounted. If possible, do it from a live medium.

    Also, if possible, you should start shopping around for a replacement hard disk. My experience (at least with older IDE drives) is that, when they start showing bad sectors, they're getting ready to die.
     
  3. The Red Moon

    The Red Moon Registered Member

    Joined:
    May 17, 2012
    Posts:
    3,872
    Many thanks.
    Which live medium would you suggest.?
     
  4. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    The Xubuntu install medium should work fine, as would anything reasonably up to date.
     
  5. amarildojr

    amarildojr Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    1,989
    Location:
    Brasil
    Your hard-drive has spare sectors, but these usually don't go beyond 200.

    You should see if you have the "Disks Utility" (gnome-disk-utility) installed, and if it's not installed then please install it. Then do a complete SMART scan (this takes 3.5h on my 1TB drive). This will give a definitive answer to:
    • How many sectors are bad;
    • How many spare sectors you have;
    • Other problems;

    Please note: once the bad sectors number is high (more than 100 sectors) the drive could be pretty much digging it's own grave. I've only seen one drive that stopped getting more bad sectors, and that was an old drive (2001).

    To me, once a drive gets bad sectors, it's time to replace it STAT, because it may fail in a year or in a week.

    And remember, treat your drive as it's a baby: don't shake it, don't kick it, don't let it vibrate, don't let if fall. Personally I put cushioning all around it's grip to prevent damage.
     
  6. The Red Moon

    The Red Moon Registered Member

    Joined:
    May 17, 2012
    Posts:
    3,872
    okay thanks.
    yes i have the gnome disk utility installed.I have just attempted a self -test and it has failed(read).I did attempt to restore a system image earlier but that too failed.Seems to be a problem reading the disk.The computer seems to function ok and the SMART data does not indicate any problems.
    i tried to run a clam av scan earlier too and it also said that it could not scan any files.
     
  7. amarildojr

    amarildojr Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    1,989
    Location:
    Brasil
    Did any error message appear?

    If the drive is dying, the more you stress it the less it will last. Your drive is facing problems, so don't stress it like that, not until we know what is going on.

    But how could you know if the test failed?

    Any error message at all?
     
  8. AutoCascade

    AutoCascade Registered Member

    Joined:
    Feb 16, 2014
    Posts:
    626
    Location:
    United States
    I'd make sure everything is backed up and start looking for a replacement. Mine lasted a few weeks after it started failing the self test which I ran after bad sectors came up on boot.