Datastore total space while using ZFS dataset as storage

VictorSTS

Renowned Member
Oct 7, 2019
528
166
68
Spain
Hi,

I'm trying to find out how does PBS get the value of the total capacity of a dataset stored in a ZFS dataset. I'm seeing this:

1666976130611.png

Both datastores are created on a different dataset each, both in the same ZFS pool. Neither has quota. Datastore "VMs" got created first has almost all the zpool capacity as maximum. Now I created dataset "test" and datastore "test". I was expecting to get a total capacity of 19'75TB too, but got aproximately the amount of free space of the zpool at the time.

As data is stored/removed from each dataset/datastore, the total capacity will change acordingly (writing on "VMs" will reduce the available capacity of "test" and so on). ZFS shows the same AVAIL value for each dataset:

Code:
zfs list
NAME               USED  AVAIL     REFER  MOUNTPOINT
rpool             9.21T  12.5T      104K  /rpool
rpool/PBS         5.49T  12.5T     5.49T  /PBS
rpool/PBS02       3.71T  12.5T     3.71T  /PBS02
rpool/test        24.3M  12.5T     24.3M  /rpool/test

- Why does the total capacity of each dataset differs from each other in PBS?
- Shouldn't they show the same value?
- Where does PBS get that value from?

Many thanks in advance.
 
in which directories are the datastores configured?

pbs gathers the usage statistics with the syscall 'statfs64' which returns the data

since datasets are independent units, they show their own 'used' value (instead of the 'global' one) so the 'total' must also be different for the 'available' to make sense

so i guess your first datastore is inside the 'test' dataset, while the second one is in the 'PBS' one

one thing that also happens is TiB (which zfs uses) and TB (which we show) so the numbers from zfs list are smaller
 

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!