Resize LXC Root Disk
What is this for
This guide is to show how to resize the root fs of a Proxmox LXC Container
Go to the bottom of this page --->here for the quick way to do this in Proxmox 8.0+
On your proxmox node
List the containers:
pct list
Stop the particular container you want to resize:
pct stop 999
Find out it's path on the node:
lvdisplay | grep "LV Path\|LV Size"
For good measure one can run a file system check:
e2fsck -fy /dev/pve/vm-999-disk-0
Resize the file system:
resize2fs /dev/pve/vm-999-disk-0 10G
Resize the local volume
lvreduce -L 10G /dev/pve/vm-999-disk-0
Edit the container's conf, look for the rootfs line and change accordingly:
nano /etc/pve/lxc/999.conf
Change the line according in the LXC Container Configu file
rootfs: local-lvm:vm-999-disk-0,size=32G >> rootfs: local-lvm:vm-999-disk-0,size=10G
Start the LXC Container:
pct start 999
Enter it and check the new size:
pct enter 999
df -h
Change LXC Root FS size; Proxmox 8.0+
The above is a nice exercise but to really get the root fs of an LXC Container to resize, do the following.
pct stop 999
pct resize 999 rootfs 80G
pct start 999
No comments to display
No comments to display