Lvreduce

From wikieduonline
Revision as of 10:26, 7 January 2020 by Welcome (talk | contribs) (→‎Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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

scan: pvscan vgscan
LVM: lvs lvmscan lvm fullreport lvmreport lvmconfig lvmdump lvmcheck lvm dumpconfig
Scan: pvs vgs lvs pvscan vgscan
PV: pvcreate pvremove pvscan pvremove pvscan pvs pvchange pvck pvdisplay pvresize
LV: lvdisplay lvcreate lvremove, lvresize, lvextend, lvreduce, lvrename
VG: vgdisplay,vgcreate,vgremove, vgextend, vgreduce, vgscan, vgchange, vgrename, vgcfgbackup, vgcfgrestore, vgimportclone, vgck
Check commands: pvck vgck

Advertising: