commands.sh

lvresize

linux

Change the size of a logical volume. See also: `lvm`.

More info →

Options (3)

-L, --sizeboolean

Change the size of a logical volume to 120 GB

Example: sudo lvresize {{[-L|--size]}} 120G {{volume_group}}/{{logical_volume}}
-r, --resizefsboolean

Extend the size of a logical volume as well as the underlying filesystem by 120 GB

Example: sudo lvresize {{[-L|--size]}} +120G {{[-r|--resizefs]}} {{volume_group}}/{{logical_volume}}
-l, --extentsboolean

Extend the size of a logical volume to 100% of the free physical volume space

Example: sudo lvresize {{[-l|--extents]}} 100%FREE {{volume_group}}/{{logical_volume}}

Examples (4)

Change the size of a logical volume to 120 GB

sudo lvresize [-L|--size] 120G volume_group/logical_volume

Extend the size of a logical volume as well as the underlying filesystem by 120 GB

sudo lvresize [-L|--size] +120G [-r|--resizefs] volume_group/logical_volume

Extend the size of a logical volume to 100% of the free physical volume space

sudo lvresize [-l|--extents] 100%FREE volume_group/logical_volume

Reduce the size of a logical volume as well as the underlying filesystem by 120 GB

sudo lvresize [-L|--size] -120G [-r|--resizefs] volume_group/logical_volume
made by @shridhargupta | data from tldr-pages