1.先使用dumpe2fs得到mount幾次後就會fsck filesystem:
lawrence@lawrence-x24:~$ sudo dumpe2fs /dev/sda3 | grep -i mount
dumpe2fs 1.40.8 (13-Mar-2008)
Last mounted on:
Default mount options: (none)
Last mount time: Fri Aug 15 09:03:55 2008
Mount count: 27
Maximum mount count: 35
得到目前mount 27次,並於第35次時會fsck filesystem。
2.使用tune2fs修改Maximum mount count為-1(永不fck):
lawrence@lawrence-x24:~$ sudo tune2fs -c -1 /dev/sda3
tune2fs 1.40.8 (13-Mar-2008)
Setting maximal mount count to -1
lawrence@lawrence-x24:~$ sudo dumpe2fs /dev/sda3 | grep -i mount
dumpe2fs 1.40.8 (13-Mar-2008)
Last mounted on:
Default mount options: (none)
Last mount time: Fri Aug 15 09:03:55 2008
Mount count: 27
Maximum mount count: -1
實際上還有個參數,當經過多久後,也會fsck filesystem:
lawrence@lawrence-x24:~$ sudo dumpe2fs /dev/sda3 | grep -i inter
dumpe2fs 1.40.8 (13-Mar-2008)
Check interval: 15552000 (6 months)
看來預設是6個月,恩這樣倒不錯。
No comments:
Post a Comment