- 论坛徽章:
- 0
|
原帖由 BigNoodle 于 2007-3-14 13:33 发表于 1楼
有个机器文件系统出问题了,想通过fsck进行检测修复,但分区已mount,又没有办法umount,哪位仁兄知道有什么方法,能让系统在启动时先进行检测修复,还望赐教,不胜感激!谢谢大夥儿!
ext2/ext3fs 這類 ?
/etc/fstab 一般配置像是:
- /dev/hda1 / ext3 defaults 0 1
复制代码
其中 1 表示 fsck 順序,每次開機都會跑 fsck.ext3 /dev/hda1 來檢查是否 fs clean,若沒 clean 就會強制檢查。
一般有正常關機 fs 都會處於 clean 情況,那其他方式可以搭配 tune2fs 設定每掛入到達幾次就強制 fsck,甚至距離最近上次掛入時間超過多久也要 check。
建議你 man tune2fs 看一下 -c/-C/-i 這類選項用途有幫助。
- -c max-mount-counts
- Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.
- -C mount-count
- Set the number of times the filesystem has been mounted. If set to a greater value than the max-mount-counts parameter set by the -c option, e2fsck(8) will check the filesystem at the next reboot.
- -i interval-between-checks[d|m|w]
- Adjust the maximal time between two filesystem checks. No postfix or d result in days, m in months, and w in weeks. A value of zero will disable the time-dependent checking.
复制代码 |
|