External File System Tools (Demo)

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hello cybrarians and welcome back to
00:00
the Linux+ course here in Cybrary.
00:00
I'm your instructor Rob Gills.
00:00
In today's lesson we're going to be
00:00
discussing XFS file system tools.
00:00
Upon completion of today's lesson,
00:00
you'll be able to understand
00:00
the XFS file system commands.
00:00
We're going to use the commands xfs_info,
00:00
xfs_repair and xfs_admin.
00:00
The xfx_info command is what we use to
00:00
display file system metadata for an XFS file system.
00:00
This is going to be common to something we
00:00
would see the EXT tuned to FS.
00:00
The xfs_repair command is used to
00:00
check and repair an XFS file system.
00:00
That's going to be equivalent to E2FSCK,
00:00
which we would see on an EXT file system.
00:00
We can use the xfs_admin command
00:00
to change the label on a file system.
00:00
With that, let's go ahead
00:00
and check this out with some demo time.
00:00
[NOISE]
00:00
Here we are back in our CentOS environment.
00:00
The xfs_info command is
00:00
used to display XFS file system metadata.
00:00
We're going to do this on CentOS because if you recall,
00:00
we still have that XFS partition mounted for dev/sdc1.
00:00
Let's go ahead and run the command xfs_info
00:00
[NOISE] on dev/sdc1.
00:00
Now that we've run that command, we can
00:00
see all of the metadata for this.
00:00
In fact, this looks very similar to what we see when
00:00
we create the file system for the first time,
00:00
because it displays all the same metadata
00:00
about the file system being created.
00:00
That is all you need to know about the xfs_info command.
00:00
Let's move on and check out the next one.
00:00
Our next command is going to be the xfs_repair command.
00:00
In order to do a repair on an XFS file system,
00:00
just like on the EXT file system,
00:00
we need to unmount it first and we do
00:00
an unmount using the umount command.
00:00
Remember, umount not
00:00
unmount and we're going to umount, mount XFS.
00:00
Now that file system has been
00:00
unmounted and we can run a repair on
00:00
it with xfs_repair [NOISE] on dev/sdc1.
00:00
We can see that that went through pretty quickly.
00:00
Now, keep in mind normally in FSCK or
00:00
an xfs_repair will take a little bit longer.
00:00
These are one gig file systems with nothing on them,
00:00
so it's really quick,
00:00
but that's just sort of a demo of how
00:00
you would run xfs_repair.
00:00
Now we can move on and do our next command.
00:00
Our final command here is going to be
00:00
using the xfs_admin command.
00:00
For the purposes of our demo,
00:00
we're going to use xfs_admin to add a file system label.
00:00
In order to relabel our XFS permission,
00:00
we'd have to unmount it.
00:00
We've already done so here.
00:00
What we can do is run XFS admin, xfs_admin,
00:00
and use the capital L option dash capital
00:00
L. We're going to call
00:00
this XFS because we're super creative.
00:00
We're going to call our XFS file system XFS.
00:00
That is the label we're going to give
00:00
it and we're going to label
00:00
dev/sdc1 to indicate that that is an XFS file system.
00:00
Now that label has been
00:00
created and we can remount the file system
00:00
as dev/sdc1 [NOISE] is mounted to mount XFS.
00:00
We can see the label using
00:00
the Beale KID command just as we did with the EXT.
00:00
In fact we can see our EXT forward label is still here.
00:00
But now we also have an XFS label applied
00:00
to dev/sdc1 which is our XFS file system.
00:00
That is all we really need to know about
00:00
using the XFS admin command.
00:00
But keep in mind here,
00:00
you can use a label or
00:00
a UUID over this path through the file system,
00:00
the device that it's on, the partition
00:00
that it's on in order to
00:00
set up a persistent mount in SCFS tab.
00:00
I'd still caution you on directly use
00:00
a UUID if you're going to add it into SCFS tab,
00:00
but a label is an option.
00:00
But with that, in this lesson we covered
00:00
common XFS file system commands which
00:00
are xfs_info, xfs_repair and xfs_admin.
00:00
Thank you so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next