LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-07-2016, 03:32 PM   #1
rohitchauhan
Member
 
Registered: Nov 2010
Distribution: RedHat
Posts: 97

Rep: Reputation: Disabled
Different mount checking values for 2 same size HDDs


Hi guys,

I was just trying to mess with my RHEL 6.7 VM server and while formatting I noticed that two same size attached HDDs are showing different messages which is:

For sdb:
This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

For sdc:
This filesystem will be automatically checked every 31 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

I wonder why there is this difference of 28 and 31 mount values ?

Any explanation ?

Thanks in advance.

More details:

[root@linuxtest ~]# mkfs.ext4 /dev/mapper/sdb1_vg-sdb1_lv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65024 inodes, 260096 blocks
13004 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.


[root@linuxtest ~]# mkfs.ext4 /dev/mapper/sdc_vg-sdc_lv
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65024 inodes, 260096 blocks
13004 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@linuxtest ~]#

[root@linuxtest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sdb1_vg-sdb1_lv
985M 1.3M 932M 1% /sdb
/dev/mapper/sdc_vg-sdc_lv
985M 1.3M 932M 1% /sdc
 
Old 01-07-2016, 07:44 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Guess: Mkfs does this on purpose so that not all filesystems are checked at the same time. The man page for tune2fs talks about staggering max-mount-counts, which points in this direction.

If I am right though, this purpose is defeated by the 180 days horizon. Typical servers aren't rebooted every week.

Last edited by berndbausch; 01-07-2016 at 07:48 PM.
 
Old 01-07-2016, 09:13 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That's a (very) old version of e2fsprogs. Several years go (2011) this all changed so that the limits are ignored now by default. If a check is needed at any time a ext4 (at least) f/s is mounted, it will run automagically. The old behaviour can be forced by a mke2fs.conf option. Here is a quote from the current manpage that explains the different numbers the OP queried.
Quote:
enable_periodic_fsck
This boolean relation specifies whether periodic filesystem checks should be enforced at boot time. If set to true, checks will be forced
every 180 days, or after a random number of mounts. These values may be changed later via the -i and -c command-line options to tune2fs(8).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Checking variable against multiple values ksushants Linux - Newbie 6 03-02-2011 09:27 AM
soft RAID (mirror) on Debian with different HDDs size jtag Linux - Server 3 04-18-2010 02:51 PM
[SOLVED] LVM2 on F10 - reduce LVM size and remove 2 HDDs ArfaSmif Linux - General 8 04-12-2010 01:55 AM
checking for null values from config file? zerointeger Programming 1 10-12-2005 11:29 AM
Checking for repeat values techrolla Programming 4 12-09-2003 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration