With the -n flag ("non-destructive read-write mode"), badblocks does the following sequence in every iteration:
- read data
- write test pattern (test pattern is ~0 (0xffff in 32-bit int))
- read test pattern
- compare test pattern
- write data
It will try to write back the original data when terminated with the following signals:
- SIGHUP
- SIGINT
- SIGPIPE
- SIGTERM
- SIGUSR1
- SIGUSR2
Killing it with SIGKILL is dangerous because you have, at best, 3/4 chance of corrupting your disk (the only safe state to SIGKILL is when it does read data).
No comments:
Post a Comment