rhel与aix中,fsck -f的区别

来源:互联网 发布:java ant pdf 编辑:程序博客网 时间:2024/06/15 20:16

先看redhat中的man fsck.ext4

-f   Force checking even if the file system seems clean.

强制 fsck 检查标记为“clean”的文件系统。

f force


再看AN15中6-8页里关于fsck这一段

The root file system, hd4, is checked by fsck. The option -f means that the file system is checked only if it was not unmounted cleanly during the last shutdown.
This improves the boot performance. If the check fails, LED 555 (FSCK ERROR) is shown

knowledge center的解释

-fPerforms a fast check. Under normal circumstances, the only file systems likely to be affected by halting the system without shutting down properly are those that are mounted when the system stops. The -f flag prompts thefsck command not to check file systems that were unmounted successfully. Thefsck command determines this by inspecting thes_fmod flag in the file system superblock.

This flag is set whenever a file system is mounted and cleared when it is unmounted successfully. If a file system is unmounted successfully, it is unlikely to have any problems. Because most file systems are unmounted successfully, not checking those file systems can reduce the checking time.

进行快速检查。在正常情况下,通过非正确方式关闭系统来停机,受影响的文件系统仅可能是当系统停止时被挂载的那些。 -f 标志会提示 fsck 命令不要检查已经成功被卸载的文件系统。fsck 命令通过检查文件系统超级块中的 s_fmod 标志来决定这件事(是否成功卸载)。
无论文件系统何时被挂载,或当它成功卸载的时候被清除,这个标志都将被设定。如果文件系统被成功的卸载,这不大可能会存在什么问题。因为多数文件系统被成功卸载,不检查这些文件系统能减少检查时间。

f fast