lvresize

Change the size of a logical volume. See also: lvm. More information: <https://man7.org/linux/man-pages/man8/lvresize.8.html>.

Install

All systems
curl cmd.cat/lvresize.sh
Debian Debian
apt-get install lvm2
Ubuntu
apt-get install lvm2
Alpine
apk add lvm2
Arch Arch Linux
pacman -S lvm2
image/svg+xml Kali Linux
apt-get install lvm2
CentOS
yum install lvm2
Fedora
dnf install lvm2
Windows (WSL2)
sudo apt-get update sudo apt-get install lvm2
Raspbian
apt-get install lvm2
Docker
docker run cmd.cat/lvresize lvresize powered by Commando

Change the size of a logical volume. See also: lvm. More information: <https://man7.org/linux/man-pages/man8/lvresize.8.html>.

  • Change the size of a logical volume to 120 GB:
    lvresize --size 120G volume_group/logical_volume
  • Extend the size of a logical volume as well as the underlying filesystem by 120 GB:
    lvresize --size +120G --resizefs volume_group/logical_volume
  • Extend the size of a logical volume to 100% of the free physical volume space:
    lvresize --size 100%FREE volume_group/logical_volume
  • Reduce the size of a logical volume as well as the underlying filesystem by 120 GB:
    lvresize --size -120G --resizefs volume_group/logical_volume

© tl;dr; authors and contributors