Reported storage total size N* Directory mounts on the same disk

good4y0u

Member
Jan 10, 2019
5
0
6
29
Interesting issue: I believe that by default Proxmox is not able to descern if directories are on the same disk, and therefore counts their total free space multiple times. specficically as N*(# of disks).
How I noticed this: under datacenter summery Proxmox shows my total space as 503.75 GiB of 90.96 TiB.

Some more details:
I have a 20TB usable RAID and a 2TB disk (which isnt in proxmox so ignore), so the used space and the total space are both about ~5x the total space of my disk 20TB

my 20TB RAID is a btrfs mount, located on /mnt/20TB-RAID as a standard disk mount

The directories are
/mnt/20TB-RAID/srv/backups
/mnt/20TB-RAID/srv/images
/mnt/20TB-RAID/srv/containers
/mnt/20TB-RAID/srv/isos
/mnt/20TB-RAID/srv/templates

See the real values below:
root@hostname:~# df -lh
Filesystem Size Used Avail Use% Mounted on
udev 24G 0 24G 0% /dev
tmpfs 4.8G 50M 4.7G 2% /run
/dev/mapper/pve-root 9.6G 5.1G 4.1G 56% /
tmpfs 24G 43M 24G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 24G 0 24G 0% /sys/fs/cgroup
/dev/sda 19T 100G 19T 1% /mnt/20TB-RAID
/dev/fuse 30M 20K 30M 1% /etc/pve
/dev/sdb1 1.8T 51G 1.7T 3% /mnt/2TB-Disk
tmpfs 4.8G 0 4.8G 0% /run/user/0
 
You are right, but what is, if I have 3 Servers and everyone of them has 20TB local space? Then PVE is doing it well.

I think that's the problem here, how can you distinguish if the storage is another one then the one who has the same name?
It might be possible to check it on Shared storages like you check if this is RBD, and the Mons the same and the Pool is the same too. But if you have local storage then it's might be an problem.

But yes, you can enable the checkbox "shared" then PVE know it and normally you have the ability to count it in another way.
 
if you click on the 'gear' symbol on the top right, you can choose which storage gets counted on the dashboard
 
You are right, but what is, if I have 3 Servers and everyone of them has 20TB local space? Then PVE is doing it well.

I think that's the problem here, how can you distinguish if the storage is another one then the one who has the same name?
It might be possible to check it on Shared storages like you check if this is RBD, and the Mons the same and the Pool is the same too. But if you have local storage then it's might be an problem.

But yes, you can enable the checkbox "shared" then PVE know it and normally you have the ability to count it in another way.

To answer this the fix could be as easy as a simple bash script to check the mount point.
here's a command that works:

root@hostname:~# df -P /mnt/20TB-RAID/srv/isos | tail -1 | cut -d' ' -f 1
/dev/sda
root@hostname:~# df -P /mnt/20TB-RAID/srv/images | tail -1 | cut -d' ' -f 1
/dev/sda


That was going to be my original fix/work around . but dcspak's work around works well enough for me. Thank you .
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!