[SOLVED] Unable to resize (increase) LXC container disk

ateshabaev

New Member
Jan 7, 2023
4
0
1
I have Proxmox 7.2-11 and two LXC containers, one per environment - dev (101) and prod (100).

Dev container has 60GB disk size and prod is 100GB.

I have connected Storage Box from Hetzner in order to have backups for each container. I tried to do test run of backup job and it failed on dev container with rsync error 11. After some Googling I was able to find out that it happened due to storage limitation. dev container had 55% of used disk and it's not enough to do backup before it's moved to external storage.

ERROR: Backup of VM 101 failed - command 'rsync --stats -h -X -A --numeric-ids -aH --delete --no-whole-file --sparse --one-file-system --relative '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' /proc/2142499/root//./ /var/tmp/vzdumptmp3219863_101' failed: exit code 11
INFO: Failed at 2023-01-06 22:31:36

I tried to increase storage of dev container via Proxmox GUI:
  1. I stopped dev container
  2. Opened "Datacenters" -> selected 101 (dev) container -> opened "Resources" tab "Volume action" -> "Resize" and typed "40G" to make total of "100GB"
  3. Started dev container
After dev container started, I opened "Summary" and value for "Bootdisk size" was still 60GB, even though I set it to be "100GB".

A lot of Googling and reading forum topics here I wasn't able to find appropriate solution to my problem and this is why I'm writing here. I didn't apply any of the instructions that I've met as they weren't matching my case. Also, I didn't want to break existing and working dev environment.

I would like to mention that I am quite new to Proxmox.

Configurations:

VMID Status Lock Name
100 running prod.domain.io
101 running dev.domain.io

rch: amd64
cores: 8
features: nesting=1
hostname: dev.domain.io
memory: 10240
nameserver: 8.8.8.8 8.8.4.4
net0: name=eth0,bridge=vmbr0,firewall=1,gw=xx.xx.xx.254,hwaddr=02:00:00:94:2b:ed,ip=xx.xx.xx.xx/32,type=veth
onboot: 1
ostype: debian
rootfs: local:101/vm-101-disk-0.raw,size=100G
searchdomain: google.com
swap: 10240
unprivileged: 1

arch: amd64
cores: 12
features: nesting=1
hostname: prod.domain.io
memory: 32768
nameserver: 8.8.8.8 8.8.4.4
net0: name=eth0,bridge=vmbr0,firewall=1,gw=xx.xx.xx.254,hwaddr=02:00:00:29:66:ec,ip=xx.xx.xx.xx/32,type=veth
onboot: 1
ostype: debian
rootfs: local:100/vm-100-disk-0.raw,size=100G
searchdomain: google.com
swap: 32768
unprivileged: 1

Filesystem Size Used Avail Use% Mounted on
udev 32G 0 32G 0% /dev
tmpfs 6.3G 1.8M 6.3G 1% /run
/dev/md3 20G 5.3G 14G 29% /
tmpfs 32G 49M 32G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/md2 988M 172M 750M 19% /boot
/dev/mapper/vg-data 857G 87G 727G 11% /var/lib/vz
/dev/nvme1n1p1 511M 168K 511M 1% /boot/efi
/dev/fuse 128M 20K 128M 1% /etc/pve
//uXXXXXX.your-storagebox.de/backup 5.0T 30G 5.0T 1% /mnt/pve/hetzner-storage-box
tmpfs 6.3G 0 6.3G 0% /run/user/0
 
Last edited:
Issue with resizing is now resolved.

I had to use the following step again:
  1. Opened "Datacenters" -> selected 101 (dev) container -> opened "Resources" tab "Volume action" -> "Resize" and typed "40G" to make total of "100GB"
But I only increased disk by 1GB and it properly changed. It seems to increase previous values (40GB) + added 1GB.
 
Hi, is it possible to decrease the size? I realized my LXC is too big for its needs, I would like to resize from 128Gto 32GB.
 
No, not out of the box. This has to be done manually and there is always the chance to corrupt your data (which is why it is not supported...). Especially when using LVM or qcow2. Shouldn't be that bad when using ZFS.
 
Last edited:
No, not out of the box. This has to be done manually and there is always the chance to corrupt your data (which is why it is not supported...). Especially when using LVM or qcow2. Shouldn't be that bad when using ZFS.
My LXC is a docker compose, on LVM. I have found this, but honestly I agree with you.
I might try to reinstall my LXC, it might be not so long as there's just a stack with 2 containers at the moment.
Any tips? :D
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!