How to change disk checking (fsck) frequency at boot?
First, figure out where your root partition is using the
df
command which produces this result in my case:Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 30850168 9374588 19908444 33% / /dev/sda8 129636480 52663092 76973388 41% /media/DATASo my root partition (‘
/
‘) is at /dev/sda6
.Then check out your disk checking frequency:
sudo dumpe2fs /dev/sda6 | grep -i "mount count"Where you need to replace
/dev/sda6
with the value that is specific to your root partition. Its output is something like this:dumpe2fs 1.42.13 (17-May-2015) Mount count: 12 Maximum mount count: 26Finally, if I want to increase the frequency to 50:
sudo tune2fs -c 50 /dev/sda6To disable file system integrity check for forever. Type following command
sudo tune2fs -c -1 /dev/sda6To check after 1 month. Type following command
sudo tune2fs -i 1m /dev/sda6List the contents of the filesystem superblock, including the current values of the parameters that can be set via this pro‐gram.
sudo tune2fs -l /dev/sda6Where, again, you might need to replace
/dev/sda6
.
1 comments :