For the record, this is working fine with snap lxd 3.10
sudo nsenter -t $(pgrep daemon.start) -m – /snap/lxd/current/bin/btrfs fi show /var/snap/lxd/common/lxd/storage-pools/default
I solved the problem myself by stopping lxd services (sudo snap stop lxd) but this may be a way to work around this limitation, trying it just now to resize… no it does not work. btrfs says it resizes but it don’t as always.
It’s not pretty. I have not found a way to do that without rebooting. Best I have found is to stop lxd, expand the file with truncate -s, restart the computer, stop lxd, do the btrfs filesystem resize max and it seems to work more or less reliably. If I do it immediately after resizing the file it does not work at all, the new size is not used.
I can understand why using a dedicated device is the recommended option, I used it for all my install after the first one where I picked the default option, I never had any problem like that. I just tolerate this one for now but when I will install everything on a new disk I will get rid of it and do everywhere with dedicated devices The sparse file is the default and it’s pretty easy to setup for beginners but after it’s a pain to manage.