Comment: Re:The usual (Score 1) 297
1. smartctl -AH
Get an initial baseline report.2. mke2fs -c -c
Perform a read/write test on the drive.3. smartctl -AH
Get a final report to compare to the initial report.
"mke2fs -c -c" is running badblocks -s -w for you.
If you want more to stare at, you can also add -v , or specify your own test patterns with (multiple) -t options. ( -t 0xCAFEBABE -t 0xDEADBEEF or whatever)
Badblocks does fill a full disk with the pattern, then read it all back confirming no changes.
This does miss flaky devices that, for example are writing over other parts of themselves. (Fake USB flash drives that misreport their size have been known to do this.)
Not sure what a good test would be... first thing that comes to mind is:
- openssl enc -rc4 -nosalt -K 0 -iv 0 <
/dev/zero > /dev/sdXX - openssl enc -d -rc4 -nosalt -K 0 -iv 0 <
/dev/sdXX | tr -d '\0' | wc -c (should return '0' w/o errors)