05-31-2017, 06:46 PM
Questions:
Is fsck already configured to run after a certain amount of time or number of mounts?
If so, what command will show this?
If not, how do I configure fsck to run and fix errors after a certain number of mounts?
Is fsck configured to run and fix errors after a forced shutdown?
If not, how do I configure fsck to to run and fix errors after a forced shut down?
Should fsck be configured to run for these cases on a separate /home partition?
What I want to accomplish:
- fsck to auto run on /dev/sda1 and /dev/sda3 after so many boots and automatically fix errors.
- fsck to auto run on /dev/sda1 and /dev/sda3 after a forced shut down and automatically fix errors.
I'm running linux lite 3.4. I've been trying to figure out if fsck is already comfigured to run for the above cases, but I'm just not sure.
Also, my thinking is that, since /sda3 is a data partition with its own file system, and it mounts at boot, then fsck should be run on this part as well - please correct me if I'm wrong.
I don't know if it's necessary, but I'm including some output I've been looking at. All output is default from installation, I haven't change anything.
I'm still a newbie at this, and your help and information is greatly appreciated as I want to learn, and I want to learn to do it right.
Contents of /etc/init/mountall:
Code:
script
. /etc/default/rcS || true
[ -f /forcefsck ] && force_fsck="--force-fsck"
[ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"
...
end script
Contents of /etc/default/rcS:
Code:
# automatically repair filesystems with inconsistencies during boot
#FSCKFIX=no
Contents of /etc/fstab:
Code:
# / was on /dev/sda1 during installation
UUID=... / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=... /home ext4 defaults 0 2
Contents of /proc/mounts:
Code:
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda3 /home ext4 rw,relatime,data=ordered 0 0
Output of tune2fs -l /dev/sda1:
Note: Last checked date value equals date and time of installation.
Code:
Errors behavior: Continue
Mount count: 91
Maximum mount count: -1
Last checked: Mon May 8 08:12:12 2017
Check interval: 0 (<none>)
Output of tune2fs -l /dev/sda3
Note: Last checked date value equals date and time of installation.
Code:
Errors behavior: Continue
Mount count: 98
Maximum mount count: -1
Last checked: Mon May 8 08:12:12 2017 (during installation)
Check interval: 0 (<none>)
Contents of /var/log/boot.log:
Note: boot.log shows a modified date of today.
Code:
/dev/sda1: clean, 217267/1638400 files, 1317759/6553600 blocks