Re: Disk error only shows up in selftest

Roger James <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
On 31/01/14 18:10, Gregory Sloop wrote:
>
> RJ> Has anyone come across this before? I have a disk that only shows
> RJ> an uncorrectable bad read sector in seltests. Reading and writing
> RJ> the same sector via the OS (Ubuntu 13.10) does not produce any
> RJ> failures. The outcome of this is that I cannot get the disk to
> RJ> reallocate the sector. Just to check my maths I ran a dd to read
> RJ> every sector of the disk. This ran without any failures, a self
> RJ> test run immediately afterwards showed the same failing sector again!
>
> RJ> Any ideas anyone?
>
> You say you read and _write_, but then say you use dd to *read* the
> whole disk...
>
> A read won't force a re-allocation. So, if you really only *read* the
> affected sector, it will leave the data there, and not handle a
> re-allocation, and thus subsequent reads of that same sector will
> fail [unless it's not totally unreadable.]
>
> Writing to it will force a re-allocation, [unless it's able to
> successfully write to it.]
>
> So, it sounds like you need to get any data off that sector that you
> need, if possible, and then write it. Provided it fails the write, it
> should force a re-allocation.
>
> HTH
>
> -Greg
>
Greg,

The read test I did with DD was to check if I had made a mistake in
calculating the fs block number to write to force the realloc. I was
hoping that the OS should report an error when an attempt was made to
read the bad sector. I just looked again and realised I had made a
stupid error when calculating the fs block number (forgot it was a GPT
partition table). I guess my read tests just had the bad luck to work
and not show up the error. I have some vague memory that the linux disk
handlers employ some sort of low level data recovery strategy on failed
reads that the self test routines probably do not employ.

Roger




------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.