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.
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 (
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 –
- Create a new xfs file system
- Copy over data from old ext file system to xfs using copy or rsync
- Remove old ext file system
Commands for XFS file system management
- Create xfs file system :
- Mount xfs file system : No extra switch for
- Quota management :
- Extending file system :
- Repair file system :
- Suspend write on file system :
- Bakcup :
- Restore :
- Print file system information :
- De-fragmentation :
xfs_fsrcommand with no argument
- Debug mode :
We covered few of these commands in detail in our next article.
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.