Skip to content

[Bug] LXCs volumes can't be resized #52

@JoaGamo

Description

@JoaGamo

Hello!
I'm using:
Plugin: MooseFS PVE 0.1.10 (beta)
Proxmox VE 9.0.10

LXCs with a non-block device moosefs mountpoint can't be resized with the Proxmox GUI/plugin. From Proxmox Tasks, I get the error can't resize this image format when I try to resize a container's rootfs/mp0 partition, like this one: rootfs: mooseFS:193/vm-193-disk-0.raw,size=8G.
As recommended in #50 block devices at the moment shouldn't be used for LXCs, so I didn't confirm the issue there.

In the meantime, I did this workaround to resize the container's volume, anyone may find it useful.

// 32G is my target, bigger than my previous 8G volume. I did not try shrinking.
truncate -s 32G /mnt/pve/moosefs/images/193/vm-193-disk-0.raw
losetup -fP /mnt/pve/moosefs/images/193/vm-193-disk-0.raw
// get loop device
losetup -a | grep vm-193-disk-0
// resize it
parted /dev/loopX resizepart 1 100%
e2fsck -f /dev/loopX
resize2fs /dev/loopX
losetup -d /dev/loopX
// in my case, update `size=8G` in /etc/pve/lxc/193.conf value from 8G to size=32G

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions