System Grab Bag

View all man pages from Ubuntu (or from all projects)

Name

fsadm \(em utility to resize or check filesystem on a device

Synopsis

fsadm [ options ] checkdevice

fsadm [ options ] resizedevice [ new_size ]

Description

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 ,ReiserFSand XFSfilesystem.

Options

-e | --ext-offlineUnmount ext2/ext3/ext4 filesystem before doing resize.

-f | --forceBypass some sanity checks.

-h | --helpDisplay the help text.

-l | --lvresizeResize also given lvm2 logical volume. More volume management functionality is provided with complementary lvresize(8) and the option -r | --resizefs.

-n | --dry-runPrint commands without running them.

-v | --verboseBe more verbose.

-y | --yesAnswer "yes" at any prompts.

-c | --cryptresizeResize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(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). If new_size is not supplied, the whole device is used.

Diagnostics

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.

Examples

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

Environment Variables

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.

See Also

  1. lvm(8),
  2. lvresize(8),
  3. lvm.conf(5),
  4. fsck(8),
  5. tune2fs(8),
  6. resize2fs(8),
  7. reiserfstune(8),
  8. resize_reiserfs(8),
  9. xfs_info(8),
  10. xfs_growfs(8),
  11. xfs_check(8),
  12. cryptsetup(8)