btrfs disk resize

jameseck

Member
Nov 7, 2020
4
0
6
46
Hi,

I'm doing some testing with a new proxmox server and decided to try out btrfs.
I installed proxmox with btrfs as the root filesystem.
This gave me a local storage called local-btrfs mapped to /var/lib/pve/local-btrfs

I have created a VM and converted it to a template. I then tried to resize (increase) that disk but I get the following error:

qemu-img: Could not open '/var/lib/pve/local-btrfs/images/6000/base-6000-disk-1/disk.raw': Could not open '/var/lib/pve/local-btrfs/images/6000/base-6000-disk-1/disk.raw': Read-only file system
TASK ERROR: command '/usr/bin/qemu-img resize -f raw /var/lib/pve/local-btrfs/images/6000/base-6000-disk-1/disk.raw 8589934592' failed: exit code 1

If I resize the disk before I convert the VM to a template with "qm template", it works fine.
It seems like with btrfs, the subvolume is marked read-only and that prevents the resize.

I have another proxmox server using ZFS storage and I'm able to resize the disks on template VM's without issue so this looks like it may be a bug specific to the usage of btrfs?
 

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!