Fsck
From Notes_Wiki
<yambe:breadcrumb>Filesystem or partition tools</yambe:breadcrumb>
fsck
Checking ext3 partitions for disk errors
We can use following command to check ext3 partitions for disk errors / surface scan for bad blocks:
e2fsck -c -c -k -v -C 0 <partition_device_name>
Here:
- -c : To call badblocks for surface scan
- -c : Repeated to indicate non-destructive read-write tests
- -k : Preserve previous list of bad blocks
- -v : Verbose
- -C 0 : To print progress on file descriptor. For some strange reason 0 causes output to be sent on screen.
Note:
- It is advisable to use e2fsck in above format so that it calls 'badblocks' internally, and we should avoid calling program badblocks directly.