fsadm — utility to resize or check filesystem on a device
fsadm utility checks or resizes the filesystem on a device (can be also dm-crypt encrypted device). It tries to use the same API for ext2, ext3, ext4, ReiserFS and XFS filesystem.
- Unmount ext2/ext3/ext4 filesystem before doing resize.
- Bypass some sanity checks.
- Display the help text.
- Resize also given lvm2 logical volume. More volume management functionality is provided with complementary lvresize(8) and the option -r|--resizefs.
- Print commands without running them.
- Be more verbose.
- Answer "yes" at any prompts.
- Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(8).
- Absolute number of filesystem blocks to be in the filesystem, or an absolute size using a suffix (in powers of 1024). If new_size is not supplied, the whole device is used.
On successful completion, the status code is 0. A status code of 2 indicates the operation was interrupted by the user. 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). A status code of 1 is used for other failures.
Resize the filesystem on logical volume /dev/vg/test to 1000 megabytes. If /dev/vg/test contains ext2/ext3/ext4 filesystem it will be unmounted prior the resize. All [y/n] questions will be answered 'y'.
# fsadm -e -y resize /dev/vg/test 1000M
|LVM TOOLS 2.03.14(2) (2021-10-20)||Red Hat, Inc|