Mount points for btrfs subvolumes are not separated in lxcs. But should they ?

Problem/Question

I have a proxmox server with several lxc containers . These mount their storage from subvolumes of a disk under btrfs.
Examle:

/dev/sda /mnt/recordings btrfs rw,noatime,ssd,space_cache,subvolid=1167,subvol=/data/recordings 0 0
/dev/sda /mnt/music_export btrfs rw,noatime,ssd,space_cache,subvolid=1429,subvol=/data/music_export 0 0
/dev/sda /mnt/video btrfs rw,noatime,ssd,space_cache,subvolid=1432,subvol=/data/video 0 0
/dev/sda /mnt/audio btrfs rw,noatime,ssd,space_cache,subvolid=1428,subvol=/data/audio 0 0
/dev/sda /mnt/assets btrfs rw,noatime,ssd,space_cache,subvolid=1427,subvol=/data/assets 0 0
/dev/sda /mnt/text btrfs rw,noatime,ssd,space_cache,subvolid=1431,subvol=/data/text 0 0
/dev/sda /mnt/photo btrfs rw,noatime,ssd,space_cache,subvolid=1430,subvol=/data/photo 0 0
/dev/sda /mnt/technical btrfs rw,noatime,ssd,space_cache,subvolid=2789,subvol=/data/technical 0 0

In this case netdata show only /mnt/text

This is technically correct, because these subvolumes don’t have quota and indeed the full capacity of the volume /dev/sda is available.

It would be not better to show this capacity for every mountpoint (Or would it). But it seems random that just `text’ is shown here.

As I understand it the purpose of btrfs subvolumes is to separate several chunks of data and i wanted to make it visible which kind of data can be handled by which lxc container.

How do you handle sutuations like this ?

i think this collector controls this stuff: netdata/collectors/diskspace.plugin at master · netdata/netdata · GitHub

@Manolis_Vasilakis any idea on above?

@NorbertK hi. Let’s see cat /proc/self/mountinfo

Voilà:

1229 1228 0:37 /data/recordings /mnt/recordings rw,noatime master:52 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1167,subvol=/data/recordings
1230 1228 0:37 /data/music_export /mnt/music_export rw,noatime master:58 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1429,subvol=/data/music_export
1231 1228 0:37 /data/video /mnt/video rw,noatime master:54 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1432,subvol=/data/video
1232 1228 0:37 /data/audio /mnt/audio rw,noatime master:64 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1428,subvol=/data/audio
1233 1228 0:37 /data/assets /mnt/assets rw,noatime master:56 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1427,subvol=/data/assets
1234 1228 0:37 /data/text /mnt/text rw,noatime master:60 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1431,subvol=/data/text
1235 1228 0:37 /data/photo /mnt/photo rw,noatime master:50 - btrfs /dev/sda rw,ssd,space_cache,subvolid=1430,subvol=/data/photo
1236 1228 0:37 /data/technical /mnt/technical rw,noatime master:62 - btrfs /dev/sda rw,ssd,space_cache,subvolid=2789,subvol=/data/technical

Are these all entries or you showed only BTRFS ones?

Anyway, I think that is because of Ignore Bind Mounts. It was requested in [Bug]: the disk usage should not measure bind mounts · Issue #14666 · netdata/netdata · GitHub.

These are the entries for btrfs only.

I read the issues and it is indeed difficult to decide what the best way to represent these mounts would be.

These are btrfs subvolumes without any quota, so each of them could theretically grow to the maximal available space . If I would have used quota it would of course be quite interesting to know how much is left :wink:

This problem might be unsolvalbe because I use bindmounts for the lxc containers

Thanks a lot for your help !