lxd icon indicating copy to clipboard operation
lxd copied to clipboard

"Unable to find quota group" when getting volume size

Open OhSoGood opened this issue 4 years ago • 5 comments

Hi All

I'm on Debian 10, kernel 5.10, LXD 4.18 with btrfs storage (btrfs 5.4.1). The command lxc storage volume list local:default -ctnU returns the message Error: Unable to find quota group because of the 'U' option (I got that command from https://github.com/lxc/lxd/issues/7708 ). Unless I forgot, I'v never set any quota anywhere. Do I miss something or is that a bug? Thanks for your help!

PS: I found another issue with the same message (https://github.com/lxc/lxd/issues/5842) but I am not sure it is related.

OhSoGood avatar Sep 17 '21 07:09 OhSoGood

Hmm, qgroup should be setup the first time you set a size limit on a root device of one of your containers on btrfs. Did you do that already?

If so, then we need to figure out what could have unconfigured it. If you haven't, then we should look into why we're not detecting this and just returning 0 for everything.

stgraber avatar Sep 17 '21 17:09 stgraber

Hi Stephen. My containers are small ones on huge SSDs, so I have never felt the need to set size limits. So in my case the relevant action would be "we should look into why we're not detecting this and just returning 0 for everything." Thank you

OhSoGood avatar Sep 18 '21 10:09 OhSoGood

Ok, cool. Can you try to set a size limit on one of them? Just doing that should initialize the qgroup, you can then unset the limit.

stgraber avatar Sep 18 '21 14:09 stgraber

I set "size: 120GB" in the profile used by the container and close it,

devices:
  root:
    path: /
    pool: default
    size: 120GB
    type: disk

But when saving the profile, I got this message: Project: default, Instance: cloud-alpine: Failed to update device "root": Failed to get subvol information: Failed to run: btrfs subvolume show /var/snap/lxd/common/lxd/storage-pools/default/containers/cloud-alpine: ERROR: quota query failed: Success

If I manually run btrfs subvolume show /var/snap/lxd/common/lxd/storage-pools/default/containers/cloud-alpine, I get the CT specs and the snapshot list but at the end there is the message ERROR: quota query failed: No such file or directory.

Am i doing something wrong?

OhSoGood avatar Sep 20 '21 21:09 OhSoGood

Sorry for the delay. Your own btrfs subvolume show isn't running in the correct namespace.

You'd need something like nsenter --mount=/run/snapd/ns/lxd.mnt /snap/lxd/current/bin/btrfs subvol show /var/snap/lxd/common/lxd/storage-pools/default/containers/cloud-alpine

stgraber avatar Apr 08 '22 21:04 stgraber

@OhSoGood do you have an update for this? Thanks

tomponline avatar Oct 24 '22 19:10 tomponline

Thank you Tom for your feedback. The issue is an old one now (we are on Debian 11 with LXD 5.6). I cannot pitifully remember when and how it was solved.

OhSoGood avatar Oct 25 '22 12:10 OhSoGood