Changing the Frequency of File System Checking for Ext File Systems
Note:
The following procedure applies to Ext file systems only. XFS file systems, which are the default file system type in Oracle Linux 9, detect errors automatically and don't require periodic file system checks at boot time.
To change the number of mounts before the system automatically checks the file system for consistency, use the following command syntax:
sudo tune2fs -c mount_count device
In the previous command, device specifies the block device that corresponds to the file system.
A mount_count of 0
or -1
disables automatic checking, based on
the number of mounts.
Tip:
Specifying a different mount_count value for each file system reduces the probability that the system checks all the file systems at the same time.
To specify the maximum interval between file system checks, use the following command syntax:
sudo tune2fs -i interval[unit] device
In the previous command, unit can be d for days, w for weeks, or m for months.
The default unit is d (for days). An interval of
0
disables checking, based on the time that has elapsed after the last
check. Even if the interval is exceeded, the file system isn't checked until it's next
mounted.
For more information, see the tune2fs(8)
manual page.