Get the device wrong and fsadm will happily resize the wrong volume, so the tool forces you to check first, preview second, and apply last. The examples match lvm2 2.03.16-3ubuntu3.2, installed here on Ubuntu. Allow 15 minutes for a read-only check or dry run, and longer for a real resize because you need a maintenance window and a verified recovery plan.
Warning: Resizing storage changes data layout and can make a filesystem or its contents unavailable if the device, size or filesystem type is wrong. Do not substitute a guessed device. Confirm the block device, mount point, filesystem type, free space and backup before you run a command that changes state.
Confirm the binary and package version first. These are ordinary read-only commands and do not need sudo:
$ command -v fsadm
/usr/sbin/fsadm
$ dpkg-query -W -f='${Package} ${Version}\n' lvm2
lvm2 2.03.16-3ubuntu3.2
$ fsadm --help
fsadm: Utility to resize or check the filesystem on a device
fsadm [options] check <device>
- Check the filesystem on device using fsck
fsadm [options] resize <device> [<new_size>[BKMGTPE]]
- Change the size of the filesystem on device to new_size
check runs fsck on the device, resize changes its size.$ man 8 fsadm
Do not infer a logical volume's name from a ticket or hostname. Replace /dev/vgname/lvname below only after checking your own inventory and mount inspection, and stop if the results do not agree:
$ lsblk -f
$ findmnt --source /dev/vgname/lvname
$ stat --printf='%n\n' /dev/vgname/lvname
None of these three alter storage. This checkpoint is where you catch the common error of selecting the whole disk, a partition, a snapshot, or the wrong logical volume.
Run a check against the confirmed device. fsadm invokes the filesystem-specific checker, so expect it to need elevated privileges when it must read the block device or operate around a mount:
$ sudo fsadm check /dev/vgname/lvname
$ printf 'exit status: %s\n' "$?"
exit status: 0
fsck.Read the diagnostic text as well as the numeric status. If status 3 comes back, do not add --force as a reflex: arrange an outage or maintenance boot, unmount the filesystem where appropriate, and rerun the check according to the filesystem's own recovery procedure. The check itself is not a repair guarantee, and a mounted filesystem may limit what can safely be inspected.
Before changing anything, use --dry-run. It prints the commands fsadm would use without running them: a review checkpoint, not a substitute for a backup.
$ sudo fsadm --dry-run --verbose resize /dev/vgname/lvname 1000M
The exact preview depends on the device and filesystem, so do not copy an output transcript from another host as proof. Check that the device path, detected filesystem and requested size are all the ones you intended.
1000M means an absolute size in mebibyte-style units, not "add 1000 MB". Suffixes use powers of 1024.new_size, fsadm uses the whole device.Keep the filesystem's current size and the containing device's size in your change record. A filesystem cannot safely be made larger than the available block device, and shrinking requires enough free space and a filesystem that supports the requested operation. fsadm does not turn an unsafe size into a safe one.
Resizing is the state-changing step. Take or verify a restorable backup, confirm the service using the filesystem is stopped or tolerant of the maintenance window, and make sure you can identify the device from a rescue environment if recovery is needed. There is no generic undo command for a completed resize: restoring data from backup or restoring the storage layout is the recovery path.
For an ext2, ext3 or ext4 filesystem, --ext-offline tells fsadm to unmount it before resizing. That can disrupt services and may fail if another process still has the mount open:
$ sudo fsadm --ext-offline --verbose resize /dev/vgname/lvname 1000M
If the device is an LVM logical volume, --lvresize asks fsadm to resize the logical volume as well as the filesystem:
$ sudo fsadm --lvresize resize /dev/vgname/lvname 1000M
Use that only when the logical-volume change is part of the approved plan. The manual points to lvresize and its --resizefs option for broader LVM workflows. Do not combine storage-layer changes casually: confirm the resulting LV and filesystem sizes after the command.
For a recognisable dm-crypt device, --cryptresize asks fsadm to resize the dm-crypt mapping together with the detected filesystem:
$ sudo fsadm --cryptresize resize /dev/mapper/cryptname 1000M
The mapping must be recognisable by cryptsetup. Confirm the mapping and its backing layers before using this option. An encrypted device adds another boundary to the recovery plan, so keep the required key material and unlocking procedure available before the maintenance window. If the mapping is not the device you inspected, stop rather than trying --force.
After a successful resize, inspect the layers again. These are ordinary read-only checks:
$ lsblk -f
$ findmnt --source /dev/vgname/lvname
$ sudo fsadm check /dev/vgname/lvname
$ printf 'check status: %s\n' "$?"
check status: 0
Compare the reported filesystem size with the approved target, confirm the expected mount is present, and check that the service can read and write its normal data. If the command was interrupted, preserve the diagnostic output and do not immediately repeat a resize until the device state is understood.
--dry-run.lsblk, findmnt and a final fsadm check agree with the intended result.