Lvreduce

From wikieduonline
Jump to navigation Jump to search

lvreduce - Reduce the size of a logical volume

Shrinking is not supported on a GFS2 or XFS file system


Examples[edit]

Reduce to a total size of 1GB:

  • TOTAL 1GB: lvreduce --resizefs -L 1GB vg01/lvol1
Example:
lvreduce --resizefs -L 4TB VG_NAME/LV_NAME
Do you want to unmount "/srv" ? [Y|n] y
fsck from util-linux 2.31.1
Resizing the filesystem on /dev/mapper/VG_NAME-LV_NAME to 1073741824 (4k) blocks.
The filesystem on /dev/mapper/VG_NAME-LV_NAME is now 1073741824 (4k) blocks long.
 Size of logical volume VG_NAME/LV_NAME changed from <6.00 TiB (1572863 extents) to 4.00 TiB (1048576 extents).
 Logical volume VG_NAME/LV_NAME successfully resized.

Related commands:

See also[edit]

Advertising: