I have searched the forum, and have found a very similar post for reducing the size of LXC containers on Proxmox, but I want to do the opposite & increase the LXC container size. I will explain what I have done so far and explain the issue I'm having here.
I'm trying to increase the size of a 170GB LXC container to be 200GB in size. I have done the following so far:
Unfortunately, I still do not see the new size reflected within the actual LXC. The commands lvdisplay, lvs, and lsblk all show this LXC container to now be 200GB in size. What do I need to run inside the container or on the proxmox-VE shell to expand it to the 200GB space which was allocated? Thanks for any help with this as I'm stumped what else needs to be done.
I'm trying to increase the size of a 170GB LXC container to be 200GB in size. I have done the following so far:
List the containers:
pct list
Stop the particular container you want to increase:
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
Increase the file system:
resize2fs /dev/pve/vm-999-disk-0 200G
Increase the local volume using lvresize
lvresize --size 200G volume_group/logical_volume
Edit the container's conf, look for the rootfs line and change accordingly:
nano /etc/pve/lxc/999.conf
rootfs: local-lvm:vm-999-disk-0,size=170G >> rootfs: local-lvm:vm-999-disk-0,size=200G
Start it:
pct start 999
Enter it and check the new size:
pct enter 999
df -h
Unfortunately, I still do not see the new size reflected within the actual LXC. The commands lvdisplay, lvs, and lsblk all show this LXC container to now be 200GB in size. What do I need to run inside the container or on the proxmox-VE shell to expand it to the 200GB space which was allocated? Thanks for any help with this as I'm stumped what else needs to be done.