[SOLVED] Datastore usage.

Hi,
Is there a quick way of knowing the disk usage of a datastore, instead of having to use the
Bash:
du
command that can take lot of time and consume lot of I/O?

Regards.
 
When you have your datastore on a seperate partition you can use the df -h command.
Either way you can just take a look in the PBS Webinterface, click on the datastore and see the usage there
 
Yes, I know, but the problem is that I have several datastores in the same partition.
For this scenario, is the du command the only way of getting disk usage of each datastore?
 
Can't test it here as I have my datastores on different zpools, but does the webinterface not show the per-datastore disk usage?
 
Is there a quick way of knowing the disk usage of a datastore,
Just for the case you just did not notice this: selecting any Datastore and then "Summary" the web gui tells me information like this:
Code:
Enabled        Yes
Active        Yes
Content        VZDump backup file
Type        Directory
Usage        3.22% (3.93 GB of 122.30 GB)

So 3.93 GB are used by this one. Or am I wrong?

Best regards
 
Can't test it here as I have my datastores on different zpools, but does the webinterface not show the per-datastore disk usage?
No, it shows the disk partition usage.
I have just tested it and it shows the same disk usage for all the datastores in the same partition.
 
the only way to get per-directory usage is du or some equivalent. as you noticed, that is expensive, so we can't do that all the time in the background ;)
 
The PBS system doesn't keeps track of the datastore usage in the metadata for each datastore?
no. that is non-trivial and expensive as well.. you get a point-in-time view/info when doing GC, that is also displayed in the GUI.
 
If we take a final report of a GC procedure we can see, for example:

Code:
2021-05-26T18:32:40+02:00: Removed garbage: 728.01 GiB
2021-05-26T18:32:40+02:00: Removed chunks: 542153
2021-05-26T18:32:40+02:00: Pending removals: 71.45 GiB (in 34937 chunks)
2021-05-26T18:32:40+02:00: Original data usage: 83.01 TiB
2021-05-26T18:32:40+02:00: On-Disk usage: 2.80 TiB (3.38%)
2021-05-26T18:32:40+02:00: On-Disk chunks: 1939700
2021-05-26T18:32:40+02:00: Deduplication factor: 29.60
2021-05-26T18:32:40+02:00: Average chunk size: 1.52 MiB
2021-05-26T18:32:40+02:00: TASK OK

The On-Disk usage data is the size after the data removed by the GC ?
 
  • Like
Reactions: jec
yes, on-disk refers to the kept chunks which are (still) referenced by indices. it does not include the removed chunks, nor the pending-for-removal chunks. so in your case the usage post-GC is 2.8TB + 71.45GB
 
Ok, then we can use the GC reports for know the used space of each datastore.
Thank you very much for your help.
 
  • Like
Reactions: fabian