# man > fsadm(8)

---
type: CommandReference
command: fsadm
mode: man
section: 8
source: man-pages
---

## Quick Reference

- `fsadm [options] check device` — run filesystem check on device
- `fsadm [options] resize device [new_size]` — resize filesystem on device

## Name

fsadm — utility to resize or check filesystem on a device

## Synopsis

**fsadm** [_options_] **check** _device_
**fsadm** [_options_] **resize** _device_ [_new_size_]

## Options

- `-e, --ext-offline` — unmount ext2/ext3/ext4 filesystem before resize
- `-f, --force` — bypass some sanity checks
- `-h, --help` — display help text
- `-n, --dry-run` — print commands without running them
- `-v, --verbose` — be more verbose
- `-y, --yes` — answer "yes" at any prompts
- `-c, --cryptresize` — resize dm-crypt mapping together with filesystem (device must be recognizable by [cryptsetup(8)](https://www.chedong.com/phpMan.php/man/cryptsetup/8/markdown))
- _new_size_[**B**|**K**|**M**|**G**|**T**|**P**|**E**] — absolute number of filesystem blocks or absolute size with suffix (powers of 1024); if omitted, whole device is used

## Environment Variables

- `TMPDIR` — temporary directory for mount points (default: `/tmp`)
- `DM_DEV_DIR` — device directory path (default: `/dev`, must be absolute)

## Examples

Resize the filesystem on logical volume `/dev/vg/test` to 1000 megabytes, unmount ext filesystem if needed, and answer 'y' to all prompts:

shell
fsadm -e -y resize /dev/vg/test 1000M
## Exit Codes

- 0 — successful completion
- 1 — other failures
- 2 — operation interrupted by user
- 3 — requested check could not be performed because filesystem is mounted and does not support online [fsck(8)](https://www.chedong.com/phpMan.php/man/fsck/8/markdown)

## See Also

[**lvm**(8)](https://www.chedong.com/phpMan.php/man/lvm/8/markdown), [**lvresize**(8)](https://www.chedong.com/phpMan.php/man/lvresize/8/markdown), [**lvm.conf**(5)](https://www.chedong.com/phpMan.php/man/lvm.conf/5/markdown), [**fsck**(8)](https://www.chedong.com/phpMan.php/man/fsck/8/markdown), [**tune2fs**(8)](https://www.chedong.com/phpMan.php/man/tune2fs/8/markdown), [**resize2fs**(8)](https://www.chedong.com/phpMan.php/man/resize2fs/8/markdown), [**reiserfstune**(8)](https://www.chedong.com/phpMan.php/man/reiserfstune/8/markdown), [**resize_reiserfs**(8)](https://www.chedong.com/phpMan.php/man/reiserfs/8/markdown), [**xfs_info**(8)](https://www.chedong.com/phpMan.php/man/info/8/markdown), [**xfs_growfs**(8)](https://www.chedong.com/phpMan.php/man/growfs/8/markdown), [**xfs_check**(8)](https://www.chedong.com/phpMan.php/man/check/8/markdown), [**cryptsetup**(8)](https://www.chedong.com/phpMan.php/man/cryptsetup/8/markdown)