应该周期性地用badblocks 命令检查坏块 它输出找到的所有坏块的编号的列表。列表给fsck 记录在文件系统数据结构中, 使操作系统存储数据时不使用这些坏块。举例:
如果badblocks报告一个块已经使用,e2fsck 将试着将此块移到其他地方。如果该块真的坏了,而不是在坏块边缘,文件内容可能丢失。$
badblocks /dev/fd0H1440 1440 > bad-blocks
$
fsck -t ext2 -l bad-blocks /dev/fd0H1440
Parallelizing fsck version 0.5a (5-Apr-94)
e2fsck 0.5a, 5-Apr-94 for EXT2 FS 0.5, 94/03/10
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Check reference counts.
Pass 5: Checking group summary information.
/dev/fd0H1440: ***** FILE SYSTEM WAS MODIFIED *****
/dev/fd0H1440: 11/360 files, 63/1440 blocks
$