From the course: CompTIA Linux+ (XK0-005) Cert Prep

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Create and repair XFS filesystems

Create and repair XFS filesystems - Linux Tutorial

From the course: CompTIA Linux+ (XK0-005) Cert Prep

Create and repair XFS filesystems

- [Instructor] Creating and repairing XFS formatted file systems is not that different than ext file systems. We can use mkfs and specify XFS to create the file system and then use xfs_repair instead of fsck to fix them. Let's reformat our /dev/vgdata/lvdata logical volume as XFS. Make sure it is not mounted first. If it is, unmount it. Now format the volume. We need to pass the -f option to force the format or it will give us an error message due to it already having a file system from a previous exercise. Type in sudo mkfs -t xfs -f, for false, /dev/vgdata/lvdata, and hit Enter. now verify with lsblk -f. (keyboard keys clicking) To repair an XFS formatted file system, use xfs_repair. There won't be any issues with our new file system but let's run the repair anyway. Type in sudo xfs_repair /dev/vgdata/lvdata and hit Enter. Other tools that may be of use with the XFS file system are xfs_admin, which allows us to change…

Contents