Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 7
    Keep in mind, that the multiple passes are not for erasing the data. They are necessary to find certain errors on your disk. Otherwise you might not find all bad blocks. Consider the case where a bit is always stuck at 1. If you only did test with the 0xff-pattern, you would not be able to find this error. Since badblocks is not designed to erase the data, but to find bad blocks, multiple passes is not considered to be excessive.
    – Slizzered
    Commented May 5, 2015 at 11:41
  • 1
    @Slizzered Thanks, that's useful to consider. Shouldn't two passes be sufficient in that case? 0xff and 0x00. Commented May 5, 2015 at 12:09
  • 1
    @Slizzered Thinking about it, I suppose that wouldn't cover the case where writing a 1 would fail, but the bit already has a 1, but I can't think of a scenario where 3 passes would be insufficient (0xff, 0x00, 0xff again) Commented May 5, 2015 at 12:13
  • 3
    Actually you got it a bit wrong, I think. Writing itself can not be checked against failure. It writes 0xff and immediately checks if there is 0xff written by reading the location from disk. So the stuck 0 is ruled out. Then, it does the same with 0x00 to rule out the stuck 1 error. so 1 pass with each pattern is sufficient. The other ones (alternating pattern of 0 and 1) are against bits that stick together (if I set bit N to 1, bit N+1 also goes to 1 as a result of the error)
    – Slizzered
    Commented May 5, 2015 at 12:17