Discussion:
Bad SSD drive - what happens with unreadable data
(too old to reply)
p***@bsd4all.org
2019-06-13 11:02:48 UTC
Permalink
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?

Peter
Kenneth D. Merry
2019-06-13 13:34:39 UTC
Permalink
Post by p***@bsd4all.org
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
***@kdm.org
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-scsi
To unsubscribe, send any mail to "freebsd-scsi-***@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
p***@bsd4all.org
2019-06-14 10:25:25 UTC
Permalink
Hi Ken,

Yes I already had changed the time-outs and retries. I ended up using ddrescue out of the ports collection. Despite the amount of read errors I was able to recover the important stuff.

SSD drive is going back under warranty (hopefully). It is less than a year old and hardly used.

Peter
Post by Kenneth D. Merry
Post by p***@bsd4all.org
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
_______________________________________________
freebsd-***@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-scsi
To unsubscribe, send any mail to "freebsd-scsi-***@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jan Martin Mikkelsen
2019-06-14 09:56:15 UTC
Permalink
Hi,

You need to add “sync" to get the unreadable areas filled with zeros. Something like "dd conv=sync,noerror bs=4k” is probably good.

Regards,

Jan.
Post by p***@bsd4all.org
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?
Peter
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-scsi
p***@bsd4all.org
2019-06-14 10:26:56 UTC
Permalink
Hi Jan,

Yes, I noticed the “clone” wasn’t growing during the read errors and read the manual page.But I ended up using ddrescue.

Peter
Post by Jan Martin Mikkelsen
Hi,
You need to add “sync" to get the unreadable areas filled with zeros. Something like "dd conv=sync,noerror bs=4k” is probably good.
Regards,
Jan.
Post by p***@bsd4all.org
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?
Peter
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-scsi
Loading...