Ready to Start Your Career?

XFS File System - RHEL7

saurabh1809 's profile image

By: saurabh1809

April 20, 2018

Linux works with a very secure file system which is known as ext, but in spite of that, it provides another file system like XFS. Today will explain how it works, and what unique features it has. One of the many questions people often ask is, if Linux has many file systems, then why would we use XFS? Let's take a look.XFS stands for Extended File System, which is highly scalable and performance-based file system, RHEL 7 default file system is XFS.Features of Extended File System:
  • Its provide quick and fast recovery
  • Its support de-fragmentation
  • Its provide quota as well journalization
How To increase XFS File System:
  1. First, we create size 4 GB partition like:
    • # fdisk  /dev/vdb
  2. and change the ID with LVM id 8e
    • # pvcreate  /dev/vdb1
  3. create physical volume
    • # vgcreate  target  /dev/vdb1
  4. create volume group
    • # lvcreate -n  data -L 1G target
  5. create Logical volume
    • # mkfs.xfs  /dev/target/data
  6. format the partition
    • # mkdir   /space
  7. create a directory for mounting
    • # mount  /dev/target/data  /space
  8. mount the partition
    • # df  -h
  9. check the partition, then the partition. Mount it successfully and then increase it.
    • # lvextend  -L  +1G  /dev/target/data  -r
  10. If we use -r option then no need to run resize command.
  11. If you do not use -r option, then run the command.
    • # xfs_growfs   /dev/target/data
    • # df  -h
  12. Check the size of your file system and partition.
That is all I have for now. I hope you learned how to increase XFS file system and understood everything. If you have any questions about what I covered in this post, please comment below and I'll do my best to answer you. Thank you!
Schedule Demo