FSADM(8)

πŸ’– FSADM(8) β€” the girlies' guide to resizing and checking filesystems πŸ’–

okay so bestie, this is fsadm from the System Manager's Manual. Yes it's a real man page about real grown-up sysadmin stuff, and yes I'm about to make it make sense. πŸŽ€


✨ NAME ✨

fsadm β€” the lil utility that resizes or checks a filesystem sitting on a device. πŸ‘‘


🌸 SYNOPSIS 🌸

fsadm [options] check device
fsadm [options] resize device [new_size]

Short. Sweet. Two moods: check the vibe or resize the vibe. That's it, that's the whole thing. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So the fsadm utility checks or resizes the filesystem on a device β€” and plot twist, that device can also be a dm-crypt encrypted device, because it's inclusive like that. πŸ”

It tries to use the same API for ext2, ext3, ext4, ReiserFS and XFS filesystems. One utility, five filesystems, one API. It's giving "I don't play favourites". πŸ’–


πŸ’… OPTIONS πŸ’…

The full menu, no skips, no skimming. Every single flag is here and every single one matters, fr fr.

  • -e|--ext-offline β€” Unmount the ext2/ext3/ext4 filesystem before doing the resize. Like clearing the table before you redecorate. ✨
  • -f|--force β€” Bypass some sanity checks. Bestie, sanity checks exist for a reason, but sometimes you just gotta. 😭
  • -h|--help β€” Display the help text. Your friendly lil "what does this do again" button. 🫢
  • -l|--lvresize β€” Also resize the given lvm2 logical volume. And heads up: more volume management functionality is provided with the complementary lvresize(8) and the option -r|--resizefs. So if you want the fuller menu, go look over there. πŸ‘€
  • -n|--dry-run β€” Print the commands that would change devices without actually running them. It reads filesystem geometry and performs the available read-only checks. It does not mount or unmount filesystems. Offline checks of mounted filesystems, and ReiserFS checks that may replay the journal, are skipped with a warning. And real talk: a successful dry run does not guarantee that a later resize will succeed. πŸ™ˆ
  • -v|--verbose β€” Be more verbose. More words. More lore. More of everything you wanted to know. πŸ—£οΈ
  • -y|--yes β€” Answer "yes" at any prompts. Unattended-mode icon behaviour, honestly. βœ…
  • -c|--cryptresize β€” Resize the dm-crypt mapping together with the filesystem detected on the device. Important: the dm-crypt device must be recognizable by cryptsetup(8). No cryptsetup recognition, no party. πŸ”
  • new_size[B|K|M|G|T|P|E] β€” This is either the absolute number of filesystem blocks that should be in the filesystem, or an absolute size using a suffix (and those suffixes are in powers of 1024, bestie, so don't come at it with 1000). If new_size is not supplied, the whole device is used. Simple as. πŸ“

😭 DIAGNOSTICS 😭

The exit codes, aka "how did it go":

  • On successful completion, the status code is 0. Slay. πŸŽ‰
  • A status code of 2 indicates the operation was interrupted by the user. That was you. You did that. πŸ’€
  • A status code of 3 indicates the requested check operation could not be performed because the filesystem is mounted and does not support an online fsck(8). Rude, honestly.
  • A status code of 1 is used for other failures. The classic "something else went wrong" bucket. πŸ™ƒ

🌈 EXAMPLES 🌈

Okay real scenario: resize the filesystem on logical volume /dev/vg/test to 1000 MiB. If /dev/vg/test contains an ext2/ext3/ext4 filesystem, it will be unmounted prior to the resize. And all [y/n] questions will be answered 'y'. 😌

fsadm -e -y resize /dev/vg/test 1000M

Look at that. One line. Unmounted, resized, and every prompt pre-answered. Main character command behaviour. πŸ‘‘


🧚 ENVIRONMENT VARIABLES 🧚

The little settings that live in your shell and whisper to fsadm:

  • TMPDIR β€” the temporary directory name for mount points. Defaults to "/tmp". 🏠
  • DM_DEV_DIR β€” the device directory name. Defaults to "/dev" and must be an absolute path. Absolute means absolute, bestie, no shortcuts. ⭐

🫢 SEE ALSO 🫢

The friend group, in their little clusters:


quick reminder, bestie: everything above is straight from the actual manual β€” the flags, the numbers, the paths, the exit codes, all of it. I just made it cute. Don't @ me if you skip the sanity checks, that's between you and -f. πŸ’–

and that's the page πŸŽ€ β€” brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2) dated 2026-10-27. mwah, go resize something responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from