• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
    • Troubleshooting
  • OS
    • HPUX
    • Linux
  • Miscellaneous
    • Software & Tools
    • Cloud Services
    • System services
    • Virtualization
  • Certification Preparations
    • AWS Certified Solutions Architect – Associate
    • AWS Certified Solutions Architect – Professional
    • AWS Certified SysOps Administrator – Associate
    • AWS Certified Cloud Practitioner
    • Certified Kubernetes Administrator
    • Hashicorp Certified Terraform Associate
    • Oracle Cloud Infrastructure Foundations 2020 – Associate
  • Tips & Tricks
  • Linux commands
You are here: Home / Disk management

XFS filesystem in Linux

Published: August 18, 2017 | Modified: June 24, 2020



Learn about the XFS filesystem in Linux. An article explaining what is xfs, features, and commands of XFS. Also, how to migrate from EXT to the XFS file system.

Learn XFS filesystem

What is xfs?

XFS is a high-performance file system designed by Silicon Graphics Inc in 1993. It is the default file system in RHEL7. XFS supports parallel IO operations because of its allocation group structure which makes it high performance operating file system. Journaling features helps it in faster data recovery in case of a crash. Lets quickly walk through a few aspects of XFS for your understanding.

Features of XFS

  • Its 64-bit file system with a max file system size of 8EB.
  • Supports metadata journaling which helps in faster data recovery in case of a system crash.
  • It can be extended while mounted and active.
  • It is internally partitioned into allocation groups. 4 different allocation groups available.
  • Directory quotas help to limit quota over the directory tree.
  • Quota journaling avoids quota consistency checks after the crash and hence quicker recovery
  • Extended attributes associated with each file. Those are additional name/value pairs.
  • Online de-fragmentation is supported.
  • It has native backup (xfsdump) & restore (xfsrestore) utilities.

How to upgrade EXT to XFS

The obvious question is how to upgrade from ext4 to xfs? or upgrade from ext3 to xfs etc. We have different ways to upgrade ext file systems but there is no full-proof way to upgrade ext to xfs. You can have below approach to migrate from ext to xfs filesystem –

  1. Create a new xfs file system
  2. Copy over data from old ext file system to xfs using copy or rsync
  3. Remove old ext file system

Commands for XFS file system management

  • Create xfs file system : mkfs.xfs command.
  • Mount xfs file system : No extra switch for mount command
  • Quota management : xfs_quota command
  • Extending file system : xfs_growfs command
  • Repair file system : xfs_repair command
  • Suspend write on file system : xfs_freeze command (-f for suspend, -u for resume)
  • Bakcup : xfsdump command
  • Restore : xfsrestore command
  • Print file system information : xfs_info command
  • De-fragmentation : xfs_fsr command with no argument
  • Debug mode : xfs_db command

We covered few of these commands in detail in our next article.

Conclusion

XFS is a high-performance filesystem available in most Linux distro and as a default in some. We will see the difference between ext3, ext4, and xfs in upcoming articles along with the XFS command in detail.

⇠ Previous article
Upgrade EXT filesystem in Linux (RHEL, CentOS, Ubuntu)
Next article ⇢
Double century! Celebrating 200 posts!

Related stuff:

  • Basics of LVM legends
  • How-to guide: LVM snapshot
  • LVM commands tutorial: Part 3: Logical Volume (lvextend, lvreduce, lvchange)
  • LVM commands tutorial: Part 3: Logical Volume (lvcreate, lvdisplay, lvremove)
  • Move disks/LUN from one server to another without losing data
  • Ultimate guide: swap addition in Linux (LVM, parted)
  • LVM commands tutorial : Part 2 : Volume group (vgcfgbackup, vgcfgrestore, vgchange)
  • LVM commands tutorial : Part 2 : Volume group (vgextend, vgreduce, vgexport, vgimport)
  • Upgrade EXT filesystem in Linux (RHEL, CentOS, Ubuntu)
  • Adding new storage LUN to integrity virtual machine (iVM) in HPUX
  • How to rename volume group
  • LVM commands tutorial: Part 3: Logical Volume (lvsync, lvlnboot)

Filed Under: Disk management Tagged With: how to upgrade ext3 to xfs, how to upgrade ext4 to xfs, what is xfs, xfs commands, xfs file system, xfs file system ubuntu

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2023 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.