Linux "fsadm" Command Line Options and Examples
utility to resize or check filesystem on a device
fsadm utility checks or resizes the filesystem on a device. It tries to use the same API for ext2, ext3, ext4, ReiserFS and XFS filesystem..
fsadm [options] check device
fsadm [options] resize device [new_size]
Command Line Options:
Unmount ext2/ext3/ext4 filesystem before doing resize.
fsadm -e|--ext-offline ...
Bypass some sanity checks.
fsadm -f|--force ...
Display the help text.
fsadm -h|--help ...
Print commands without running them.
fsadm -n|--dry-run ...
Be more verbose.
fsadm -v|--verbose ...
Answer "yes" at any prompts.
fsadm -y|--yes ...
Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by crypt‐setup(8).new_size[B|K|M|G|T|P|E]Absolute number of filesystem blocks to be in the filesystem, or an absolute size using a suffix (in powers of 1024). Ifnew_size is not supplied, the whole device is used.DIAGNOSTICSOn successful completion, the status code is 0. A status code of 2 indicates the operation was interrupted by the user. A statuscode of 3 indicates the requested check operation could not be performed because the filesystem is mounted and does not support anonline fsck(8). A status code of 1 is used for other failures.EXAMPLESResize the filesystem on logical volume /dev/vg/test to 1000 megabytes. If /dev/vg/test contains ext2/ext3/ext4 filesystem it willbe unmounted prior the resize. All [y/n] questions will be answered 'y'.fsadm -e -y resize /dev/vg/test 1000MENVIRONMENT VARIABLESTMPDIR The temporary directory name for mount points. Defaults to "/tmp".DM_DEV_DIRThe device directory name. Defaults to "/dev" and must be an absolute path.
fsadm -c|--cryptresize ...