Bad SSD drive - what happens with unreadable data

Kenneth D. Merry ken at kdm.org
Thu Jun 13 13:34:51 UTC 2019


On Thu, Jun 13, 2019 at 13:02:48 +0200, peter.blok at 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 at kdm.org


More information about the freebsd-scsi mailing list