Hello and welcome to this presentation from Pluralsight. My name is Andrew Mallett and I'm here to help you
through the module "Maintaining a Linux File System." And this is all going to make up part of our LPI Level
2 certification and the 201 exam.
In particular, we'll be looking at objective 203.2, Maintaining a Linux File System.
In doing so, we can break this into three separate modules. First of all, we're going to take a look at the
tools and utilities used to manipulate ext2, ext3, and ext4 file systems or our generic extended file systems.
Then we can start looking at some of the tools and utilities used to manage and manipulate the XFS file
system and then we can take a look at the awareness of the Better FS or the btrfs.
We will take it a little bit beyond just an awareness and we'll look at a little bit more detail at the
Better FS.
The first things we're going to take a look at is just the FS Check utility.
So of course, as the name suggests, we can run file system checks with this.
So, file systems need to be unmounted to be checked. During the boot phase of a machine, the file system
check can take place as we run from our initialization RAM disc before we mount our file systems.
The generic program FS Check is part of our util-linux package and we're going to find this on pretty much
every system. And we can see with the importance of its location being /sbin/fsck.
We also have for the XFS file system fsck.xfs. So this is, in fact, a wrapper program that is supplied as
part of the xfsprogs or the package used to install our utilities to manage and format XFS file systems.
And similarly, we have an fsck.btrfs and that's a wrapper program used to run, then, the file system check on
BTRFS file systems. And, again, that comes with the btrfs-progs package.
And I haven't made a mistake on this side. It's just the slight inconsistencies that you can see within the
names: xfsprogs without the hyphen and then the hyphen in the btrfs package name.
We can also force a file system check on boot. And if we create a file at the root of the file system called
"forcefsck," then during the next boot, a forced file system check will be implemented.
Once the check is complete, the file itself then is deleted, so it's a once-only event.
We have to then create the file and we can do that just with the sodu command and sodu and touch as we see here.
If we want to look at checking our file systems, let's move now to a CentOS 7 machine and looking at how we
can perform some basic file system checks.