Learn about XFS filesystem in Linux. Article explaining what is xfs, features and commands of XFS. Also, how to migrate from EXT to XFS file system.
What is xfs?
XFS is high performance file system designed by Silicon Graphics Inc in 1993. Its is default file system in RHEL7. XFS supports parallel IO operations because of its allocation groups structure which makes it high performance operating file system. Journaling features helps it in faster data recovery in case of crash. Lets quickly walk through few aspects of XFS for your understanding.
Features of XFS
- Its 64-bit file system with max file system size of 8EB.
- Supports metadata journaling which helps in faster data recovery in case of system crash.
- Can be extended while mounted and active.
- It is internally partitioned into allocation groups. 4 different allocation groups available.
- Directory quotas helps limiting quota over directory tree.
- Quota journaling avoids quota consistency checks after 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
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 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 : 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 will see these commands in detail in our upcoming articles.
XFS is high performance filesystem available in most Linux distro and as a default in some. We will see difference between ext3, ext4 and xfs in upcoming articles along with XFS commands in detail.