Hi,
I’m trying to understand a bit more how btrfs is working. I would like to use external commands btrfs, for example btrfs subvolume show <path>, but I don’t understand what path I’m supposed to provide to the command.
A more concrete thing is I would like to see quotas defined on btrfs volumes.
/var/snap/lxd/common/lxd/storage-pools/poolbt/ is entirely empty.
LXD 3.5 (snap installed). Ubuntu 18.04.
Storage pool created with lxc storage create poolbt btrfs source=/dev/vdc.
The snap has its own mount namespace, making your btrfs mounts invisible from the host.
You can get into the namespace with nsenter -t $(pgrep daemon.start) -m at which point btrfs subvolume show /var/snap/lxd/common/lxd/storage-pools/poolbr/ should work.
Hum. the nsenter -t $(pgrep daemon.start) -m command works. I’m in the namespace. /var/snap/lxd/common/lxd/storage-pools/poolbt/ is accessible.
But as I’m in the namespace, btrfs binary is not available. -bash: btrfs: command not found
I’ve tried to copy the binary in my home folder, that seems accessible from the ns, but when I launch it, I have a lib error. Probably not the good way… ./btrfs: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory
Reading nsenter man’s page didn’t help me a lot. I have to admit that I’m also highly ignorant about namespaces…