No, what I meant is that user quota reporting when inside of a user namespace just doesn’t appear to be properly supported in the Linux kernel. I don’t recall seeing any recent changes which would change that, though testing a recent 6.5 kernel would probably be a good idea.
Most likely the ioctl used to retrieve the quotas just returns uid/gid straight from the filesystem itself, appearing unshifted as you’re seeing.
Though note that if you run a much more recent kernel (6.1 or higher I’d say), then LXD/Incus will be able to use VFS idmap instead of manual uid/gid shifting, this would likely result in the quota data to line up too.
Will have a look at VFS idmap. Will it handle/convert a container filesystem which already has shifted uid’s?
An other option for now would be to run the container without shifted uid’s?
option:
LXD_SHIFTFS_DISABLE=1 in your lxd daemon’s environment to disable shiftfs
Not sure if I can disable it per container, so I could sync to a new container with shiftfs disabled.
Not sure if/how I can revert the shifted sate of the exiting filesystem.
LXD_SHIFTFS_DISABLE=1 would actually do the opposite of what you want.
shiftfs and now VFS idmap allow for in-kernel shifting of uid/gid rather than having them re-written on the filesystem.
As for converting an existing container, it can be done with this trick: