Saturday, February 11, 2012

maximal mount count reached, running e2fsck is recommended

How to check Check interval and Maximum mount count?

# dumpe2fs /dev/sda7 | egrep -i "interval|max"
dumpe2fs 1.41.11 (14-Mar-2010)
Maximum mount count: 20
Check interval: 15552000 (6 months)

# tune2fs -l /dev/sda7 | egrep -i "interval|max"
Maximum mount count: 20
Check interval: 15552000 (6 months)

# tune2fs -l /dev/sda7
tune2fs 1.41.11 (14-Mar-2010)
Filesystem volume name:
Last mounted on: /
Filesystem UUID: d88ec2cf-5271-4d05-9ed8-7d04e3febed2
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 14221312
Block count: 56873216
Reserved block count: 2843660
Free blocks: 30911285
Free inodes: 13924266
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1010
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Mon Jul 5 02:55:45 2010
Last mount time: Mon Feb 7 08:57:44 2011
Last write time: Thu Feb 10 16:14:33 2011
Mount count: 21 <------------------
Maximum mount count: 20 <------------------
Last checked: Mon Dec 13 08:32:29 2010
Check interval: 15552000 (6 months) <------------------
Next check after: Sat Jun 11 08:32:29 2011
Lifetime writes: 393 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 7995828
Default directory hash: half_md4
Directory Hash Seed: 62e0d189-bbb6-4c7c-832c-2069310b9806
Journal backup: inode blocks

What do i need to do?

Nothing unless you have some data corruption but if you want to get rid of your warning message, use the -c and -i settings.
Read more about tune2fs in http://linux.die.net/man/8/tune2fs

# tune2fs -c 100 -i 365 /dev/sda7
tune2fs 1.41.11 (14-Mar-2010)
Setting maximal mount count to 100
Setting interval between checks to 31536000 seconds

# tune2fs -l /dev/sda7 | egrep -i "interval|max"
Maximum mount count: 100
Check interval: 31536000 (12 months, 5 days)

Otherwise, if you need to check your filesystem, make sure to stop everything (I mean: EVERYTHING; except sshd. Look for an older post of mine with a sample output), remount the filesystem as read-only with mount -o remount,ro /dev/sda7 then run fsck -ftv /dev/sda7