# disk problem - controller or disk defect?

## menschmeier

A few weeks ago my backup disk died, now the internal disk makes some trouble.  :Sad: 

I rad out the SMART informations but I can not say it the disk is defect or something else. Can someone help interpreting the data:

 *Quote:*   

> # smartctl --all /dev/sda
> 
> smartctl version 5.38 [x86_64-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
> 
> Home page is http://smartmontools.sourceforge.net/
> ...

 

Thanks for your support.

----------

## eccerr0r

To me it looks like an UNCorrectable 16 sector read at LBA 22657937 according to the error log.  Probably a bad sector showed up.  Might want to check your power supply/cables too, as they can cause weird errors to show up.  Oh laptops? too bad, can't do hardware swaps to narrow down issues.  :Sad: 

Your SMART data looks like it's still healthy despite the scary numbers (due to byte ordering most likely) but there probably was at least one sector remapped already post-manufacturer... but that's just a guess.

----------

## menschmeier

Ok, a bad sector. I am using XFS can this be fixed by software somehow? I mean is it possible to deactivated this/these sectors?

----------

## DirtyHairy

Depending to the value you attribute to your data, it might be a wise choice to get a new disk, clone the contents of the old one and swap it. Your harddrive might still have years of happy scrappy life ahead, but the error you are observing might also be a messenger of more serious trouble in the near future, and once you have found out, it will be too late.

----------

## madchaz

xfs tools should have a fix utility that can mark the bad sectors as such. 

However, bad sectors do have a tendency to spread sometimes, so unless this is an "old" issue, I would suggest getting a new drive and moving your data to it. If you want to keep the disk, give it a try for a while after and see what happens. I wouldn't trust it anymore

----------

## thegeezer

for those that are interested i gleaned this from another forum

197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1 

if this is anything other than zero it is trying to auto remap the bad sector.    

hard drives will/should try to remap sectors that they can't read... of course reading garbage is still 'reading' so it is a bit subjective.  could always load up GRC spinrite to kill i mean detect and repair the disk.

----------

## eccerr0r

Yes, this would match up with the sector it's having problems reading.

Hard drives can't actually remap sectors they can't read (maybe sectors it could read with difficulty...then okay...) this would imply it would silently corrupt your data.  I'd rather have an error than have some bits suddenly disappear without warning.

Here's another idea:  Most hard drives will remap on *writing* sectors.  When a sector is rewritten, it means the data on the sector is trash anyway so it can use a fresh sector.  Of course if the bad sector ended up in a spot where shared data is stored (like metadata) and read-modify-writes are  needed, that sector now destroyed and quite possibly multiple files' data is gone.

But if willing to take that risk, you can use hdparm to force a sector write - and force the hard drive to remap.  There's a reason why the hdparm man pages say "EXTREMELY DANGEROUS" -- because it is!

You could

```
hdparm --write-sector 22657937 /dev/sda
```

THIS IS VERY DANGEROUS!!!  Treat this as if you were to badblocks -w on the disk, because badblocks -w will also induce sector remapping for that bad sector too.

Backup your drive before you try this, because you don't know what data sector you're about to randomly overwrite (unless you figured out what file/directory/... this sector belongs to...)

----------

## menschmeier

OK, I bought a new disk yesterday - a seagate, I hope this one will work longer the the fujitsu I had ...

Now I am doing a new installation of the system. I do it manually, so because I have the world file I can easily do an emerge -e world ... Now it is almost done ....

----------

