XFS Filesystem 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 »

Video Transcription
00:00
>> Hello, Siberians and welcome back to
00:00
the Linux plus course here in Siberia.
00:00
I'm your instructor Rob Gills,
00:00
and into 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 XLS file system commands.
00:00
We're going to use the commands xfs_info,
00:00
xfs_repair, and xfs_admin.
00:00
The xfs_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 EXT like tuned to FS.
00:00
They xfs_repair command is used to
00:00
check and repair an XFS file system.
00:00
That's going to be equivalent to ETFSCK,
00:00
which we would see on an EXT file system,
00:00
and we can use the xfs_admin
00:00
commands to change the label on a file system.
00:00
With that, let's go ahead and check
00:00
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
00:00
>> command xfs_info on def SDC 1.
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
00:00
>> 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 u mount command.
00:00
Remember, u mount not unmount,
00:00
and we're going to u mount XFS.
00:00
Now that file system has been
00:00
unmounted and we can run a repair on it
00:00
with XFS underscore repair [NOISE] on dev, SDC 1.
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 a demo of how you would run FXS 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
00:00
>> to add a file system label.
00:00
>> In order to relabel or XFS permission,
00:00
we'd have to unmounted.
00:00
We've already done so here.
00:00
What we can do is run 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's the label we're going to give it,
00:00
and we're going to label dev SDC1 to
00:00
indicate that that is an XFS file system.
00:00
Now that label has been created and we
00:00
can mount the file system as
00:00
Dev CC1 is mounted to mount XFS.
00:00
We can see the label using
00:00
the blkid command just as we did with the X key.
00:00
In fact we can see our EXT for label is still here,
00:00
but now we also have an XFS label applied to dev SDC1,
00:00
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 to the file system,
00:00
the device that it's on to the partition that it's on,
00:00
in order to set up a persistent mount in FCFS tab.
00:00
I'd still caution you and direct you to use
00:00
a UUID if you're going to add it into FCFS 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 are xfs_info,
00:00
xfs_repair, and xfs_admin.
00:00
Thank you so much for being here,
00:00
and I look forward to seeing you in the next lesson.
Up Next
Instructed By
Similar Content