filesystem check

A category for tips and tricks or off-topic things
Post Reply
jeanmarc
Posts: 1866
Joined: Thu Aug 29, 2013 7:16 am

filesystem check

Post by jeanmarc » Sat Oct 12, 2019 9:55 am

Hi,
If you wish to fsck the root partition, just do touch /forcefsck then reboot.
You can also do that on each each reboot or x times using tune2fs.
Check :

Code: Select all

tune2fs -l /dev/sda1 | grep Last
tune2fs -l /dev/sda1 | grep Mount
tune2fs -l /dev/sda1 | grep Max
Set the value tune2fs -c 1 /dev/sda1 (each reboot)
To allow that you must allow the fscheck in /etc/fstab

Code: Select all

[root@i3 ~]# more /etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda1
UUID=77e17ea7-e091-433a-8524-dda21fd19612	/         	ext4      	rw,relatime,data=ordered	0 1
The last number should be 1 or 2. 0 is disabled, 1 higher priority for root partition and 2 the others partitions.
Be carefull when editing fstab, make a copy as it could screw your system :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest