Proxmox LVM Automatic Full Resize Script
Overview
This script automatically resizes the root logical volume on a Proxmox host to utilize the full capacity of the underlying disk. It is designed for systems using the default LVM layout on /dev/vda.
The script performs the following steps:
- Checks prerequisites (root access, disk, and LVM tools).
- Installs
growpartif it is not present. - Expands the
/dev/vda3partition. - Resizes the LVM physical volume.
- Extends the root logical volume (
/dev/pve/root) to use all free space. - Resizes the filesystem to make the additional space available.
The script gracefully handles cases where the partition or logical volume is already at maximum size and provides informative output messages.
Prerequisites
- You are logged in to your Proxmox host via SSH as the
rootuser. - Your Proxmox installation uses the default LVM storage layout on
/dev/vda.
Usage
Run Directly from Gitea
curl -fsSL https://gitea.virtnet.bond/Joey/pve-lvm-automatic-full-resize/raw/branch/main/script.sh | bash
Notes
The script is safe to run multiple times; it will detect if partitions or logical volumes are already at maximum size.
Ensure you have proper backups before modifying partitions or LVM volumes.
Compatible with Debian-based Proxmox hosts.
License
This script is provided "as-is" without warranty. Use at your own risk.
Description
Languages
Shell
100%