Extended File System (ext) is one of a series of native #202202060057. There are mainly three of the versions is still active: ext2, ext3 and ext4.
#Journaling
Note: Only ext3 and ext4 can access this feature
To enable journaling feature on ext2, see #Tuning.
Get Information
dumpe2fs
allow us to obtain file system information such as turned on file system features, file system state, inode count, block count, last checked and check interval.
It can be used when the file system is mounted.
Tuning
tune2fs
allow us to adjust the file system settings such as:
-
-j
to add a journal (effectively turning ext2 into ext3) -
-i
to set the check interval forfsck
-
-c
to set the maximum number of times the disk may be mounted without a check -
-C
to set the number of times the disk has been mounted -
-m
and-r
to define reserved disk space in percentage or blocks for root
However, this must be done in an unmounted file system in order to prevent data corruption.
Debugging
debugfs
allow us to debug the file system interactively. However, this must be done in an unmounted file system in order to prevent data corruption.
There are multiple commands that could be helpful:
-
stats
to display information similar todumpe2fs
-
stat
to show the indoe information for a file or directory -
lsdel
to list deleted inodes -
undelete
to restore the file by referring to its inode number -
write
to extract a file from the file system
We could use regular commands such as cd
, rm
and touch
in the debugging environment too.