fsadm
Resize file systems safely and easily
TLDR
Check a filesystem for errors
Perform a dry-run resize to a specific size (no changes made)
Grow a filesystem to fill the entire device (omit the size)
Resize the filesystem and the underlying logical volume together
For ext2/3/4, unmount and resize offline
SYNOPSIS
fsadm [-C|--nocache] [-h|--help] [-t FSTYPE|--type FSTYPE] [-V|--version] [-v|--verbose] <command> [<args>]
PARAMETERS
-C, --nocache
Skip reading LVM tables from cache (subcommand-dependent)
-h, --help
Display help text and exit
-t FSTYPE, --type FSTYPE
Specify filesystem type (e.g., ext4, xfs); overrides auto-detection
-V, --version
Output version information and exit
-v, --verbose
Enable verbose output (subcommand-dependent)
DESCRIPTION
fsadm is a versatile command-line tool for administering Linux filesystems, particularly those on LVM (Logical Volume Manager) logical volumes. It offers a unified interface for common tasks like resizing filesystems, checking integrity, syncing volumes, and mounting/unmounting.
Supporting filesystems such as ext2/3/4, XFS, GFS2, and OCFS2, fsadm automatically detects the type or allows manual specification via -t. It's invaluable for online operations on mounted filesystems where supported, reducing the need for multiple specialized tools (e.g., resize2fs, xfs_growfs, lvextend).
For example, fsadm resize extends both the LV and filesystem atomically. It requires root privileges and is part of the lvm2 package, making it essential in enterprise storage environments for safe, efficient management without downtime.
CAVEATS
Requires root privileges. Resizing operations risk data loss if insufficient space or unsupported FS; always backup first. Online resize limited to specific filesystems (e.g., no shrink for XFS).
COMMON SUBCOMMANDS
resize <device> [<size>]: Resize LV and FS.
fsck <device>: Check/repair FS.
lvresize, lvsync, mount, umount: LV/FS-specific actions.
EXAMPLE USAGE
fsadm resize /dev/myvg/homevol 50G
Extends LV and FS to 50GB (mounted OK for ext4/XFS).
HISTORY
Introduced in LVM2 (circa 2004) by the LVM development team (Red Hat/Sistina). Evolved to support more filesystems and online operations; current in modern distros like RHEL, Ubuntu.
SEE ALSO
lvm(8), lvresize(8), resize2fs(8), xfs_growfs(8), fsck(8)


