XFS, ext4 and VFAT Filesystems
Three filesystems, three mkfs commands, and one asymmetry that matters: XFS cannot be shrunk. ext4 is shrunk here to prove the contrast, and VFAT is shown silently ignoring a chmod - because it has no concept of Unix permissions at all.
File Systems Guide 37 of 67 Intermediate
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 16 min
XFS is RHEL's default for / and has been since RHEL 7. It can grow while mounted and can never shrink - there is no xfs_shrink and no shrink option to xfs_growfs. That single fact should decide how generously you size a volume.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
This guide includes
Use this when choosing a filesystem for a volume you may have to grow later. This matters because XFS cannot be shrunk - so the asymmetry between the three decides your sizing before you format anything at all.
- preparing three volumes to format
- creating XFS, and reading what mkfs reports back
- creating ext4, and the space it quietly holds back
- creating VFAT, which has no permissions at all
- finding the difference that actually decides your sizing
Before you start
- A volume group with about 1.2 GB free -
guide 33builds one. - The session creates and removes three logical volumes and three mount points.
-
Three volumes to format
-
XFS
-
ext4, and the space it holds back
-
VFAT has no permissions
-
The difference that decides your sizing