Badblocks: Difference between revisions

 
Line 6: Line 6:
ETA is approximately 1 day per 4 terabytes.
ETA is approximately 1 day per 4 terabytes.
<pre>
<pre>
badblocks -wsv -b 4096 /dev/sdg
badblocks -wsv -b 4096 -t 0x55 -o badblocks.txt /dev/sdg
</pre>
</pre>
* <code>-w</code> do a destructive write test
* <code>-w</code> do a destructive write test
Line 13: Line 13:
* <code>-b ''num''</code> block size. Use 4096 typically.
* <code>-b ''num''</code> block size. Use 4096 typically.
* <code>-p ''num''</code> do ''num'' iterations. Typically 1 is sufficient.
* <code>-p ''num''</code> do ''num'' iterations. Typically 1 is sufficient.
* <code>-t ''test_pattern''</code> Test pattern. Select from [random,
* <code>-t ''test_pattern''</code> Test pattern. Can be random. E.g. 0x55
* <code>-o ''file''</code> output badblocks to a file


To save the list of bad blocks, you need to run <code>e2fsck</code> or <code>mkfs.ext4</code>:
To save the list of bad blocks, you need to run <code>e2fsck</code> or <code>mkfs.ext4</code>: