LXC Container Bootdisk size issue.

mediocre

New Member
Nov 27, 2024
3
1
3
So i have a container that has a drive set to 107tb.
1758734996799.png

It shows the bootdisk is 100tb in the gui while the container is turned off. However, when the container starts the proxmox gui updates itself to only showing 50TB and the container only sees 50TB in df -h.
1758735099213.png

lsblk shows the full 107tb from inside the container:
1758735158547.png

So does the .conf for the container:
1758735508740.png


Trying to resize the container again in proxmox gui fails:

/dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0: ***** FILE SYSTEM WAS MODIFIED *****
/dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0: 92521/3355443200 files (4.0% non-contiguous), 9074135037/13421772800 blocks
resize2fs 1.47.0 (5-Feb-2023)
inodes (7222714368) must be less than 4294967295
resize2fs: Cannot create filesystem with requested number of inodes while trying to resize /dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0
Please run 'e2fsck -fy /dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0' to fix the filesystem
after the aborted resize operation.
Resizing the filesystem on /dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0 to 28890890240 (4k) blocks.
Failed to update the container's filesystem: command 'resize2fs /dev/rbd-pve/79c3d362-0620-43a6-ab0c-803ad9e3474d/nvme/vm-255-disk-0' failed: exit code 1

TASK OK

Trying to extend the partition in the container gives:
1758735335344.png

Any advice would be appreciated. This container was seeing all 107tb before being restored to an earlier snapshot.
 
The container was created with a bytes-per-inode ratio of 16384. This is not enough for a larger volume as this would require 7222714368 inodes, but ext* supports only up to 4294967295.
As there is no way to choose the filesystem on container creation, you should use mountpoints.

I could also imagine that mounting the container on the host, making a backup of the files, formatting it with proper ratio (or xfs) and then copying back the files might work. But that's just an idea, which might have some unknown side-effects too.
 
Last edited: