Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2019 09:34:39 -0400
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        peter.blok@bsd4all.org
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: Bad SSD drive - what happens with unreadable data
Message-ID:  <20190613133439.GE66314@mithlond.kdm.org>
In-Reply-To: <C13683A4-B5CB-43B9-84EC-1E18BD88D63E@bsd4all.org>
References:  <C13683A4-B5CB-43B9-84EC-1E18BD88D63E@bsd4all.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 13, 2019 at 13:02:48 +0200, peter.blok@bsd4all.org wrote:
> Hi,
> 
> I have a bad SSD drive. If I read it with dd and conv=noerror, what happens with the unreadable areas? Does it fill with zeroes, or does the driver still copy what it was able to read?
> 
> I???m getting ATA status 51 back, many blocks in a row. Followed by chunks of readable data, followed by unreadable data.
> 
> Is there a modepage or something else to tell the drive to pass on the bad data?
> 
> Any other ideas?

You might try the recoverdisk(1) utility.  It is designed for that sort of
situation.

One of the recommendations in the recoverdisk(1) man page is to lower the
retry count for the disk driver you're using, so you don't wind up retrying
a lot in situations where the drive itself has tried and failed to read the
data.

In looking at the source, it appears tht it will only write out the blocks
it is able to read successfully.  IMO, it would be good to have at least an
option to write zeros in output file in the areas where the reads failed.

Ken
-- 
Kenneth Merry
ken@kdm.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190613133439.GE66314>