[pbs-devel] [PATCH proxmox-backup v3 2/3] expose the unpriviliged total in the api and use it in the GUI

Matthias Heiserer m.heiserer at proxmox.com
Thu Jul 28 15:28:37 CEST 2022


On 26.07.2022 15:44, Daniel Tschlatscher wrote:
> Until now, the total size for a datastore was reported as the total
> space on the filesystem. On ext4 filesystems this number will not
> match the observed behaviour when some amount of blocks are reserved
> though, as the proxmox-backup-proxy uses the unpriviliged 'backup'
> user. Therefore backup-ing new data would fail, even though the GUI
> still displays that X% of the datastore is free.
> I think using the unpriviliged total makes more sense as it
> communicates to the user how much they can actually still store on the
> datastore, rather than the full total of which some part might not be
> usable.
> 
> This will also not lead to issues in the GUI when the reserved space
> is written to, because the value reported by statfs will automatically
> increase accordingly.
> I.e. when the unprivliged space is full and a 500MB file is written by
> the root user, the fields for "unpriv_total" and "used" will both
> increase by this amount, simply keeping the usage at 100%.
> 
> Note: I've opted to create a new field in the API result for the
> unpriviliged total of the datastore, as overwriting the existing total
> might break compatibility for users who retrieve the actual datastore
> disk size this way.
It's "privileged" :)

Looks good to me. I filled up the datastore on a pbs, and it said "Full".

Tested-by: Matthias Heiserer <m.heiserer at proxmox.com>






More information about the pbs-devel mailing list