PBS 3.1-2 wrong datastore information sshfs

popallo

Well-Known Member
Jul 2, 2019
36
6
48
France
apacher.eu
Hello everyone !

To explain the context, I use a hetzner storage box for storing the backups I make for different PVE nodes. It works very well.
Previously, I mounted the storage box in CIFS but as I sometimes had disconnections, this generated numerous entries in kern.log and I found myself having to restart the PBS.

In short, I used SSHFS instead of CIFS and I no longer have this problem. The assembly is carried out via auto.fs by following this tutorial:
https://community.hetzner.com/tutorials/setup-autofs-mount-storagebox

It works but I end up with an inconsistent display on PBS.

In fact, it tells me that the datastore is 250TB while I have a 1TB storage box.

1705415002099.png

A "df -h" also shows that the mount point is 1tb.
1705415023064.png


I suspect that the storage boxes are CEPH type storage or equivalent, so for my part I just obtain a quota, but I cannot find why the display under PBS is incorrect.

I had 1TB displayed in CIFS.

Anyone have an idea or a clue?

Note that the PBS works in an LXC container with the FUSE option.

Any help or clue will be highly appreciated :) thanks.
 
Hi!
could you try executing `stat -f .` on the datastore and post the result?
 
  • Like
Reactions: popallo
Hi!
could you try executing `stat -f .` on the datastore and post the result?
Thank you for the feedback.

Of course, here is the result of the command:

Bash:
backup@pbs:/mnt/datastore# stat -f .

   File: "."

     ID: 0 Name: 255 Type: fuseblk

Block size: 131072 Fundamental block size: 512

Blocks: Total: 2074776029 Free: 748854998 Available: 748854998

Inodes: Total: 750095161 Free: 748854998
 
Hi,
we calculate the total/used/available storage using the output of `stat -f .` (eg Blocks Total * Block size).
We could try to patch this, so that the size is calculated using Blocks Total * Fundamental Block Size—which in your case results to `1062.28 GB`— which is roughly correct (this could also be kinda random, because the `Fundamental Block Size` in ceph was (ie is in your case probably) the PAGE_CACHE_SIZE).
Although it seems that this will not be possible anymore as ceph now sets Fundamental Block Size = Block Size. (Bug: https://tracker.ceph.com/issues/3793, kernel commit: https://git.kernel.org/pub/scm/linu.../?id=92a49fb0f79f3300e6e50ddf56238e70678e4202).

I think this looks more like this ceph bug: https://tracker.ceph.com/issues/55090, which would be an issue regarding the quote.

Out of curiosity, could you post the output of `df -a` on the datastore?
 
Last edited:
  • Like
Reactions: popallo
Thank you for taking the time to add all these details.

Here is the result of df -ah:

Bash:
datastore:                             990G  633G  358G  64% /mnt/datastore

We see here that I have what is expected.
 
Hmm, I looked into the source code of `df` and it seems like they also use the `f_frsize` (Fragmented block size) parameter instead of the `f_bsize` (Block size). I'll get out a patch now and see what the others say :)
 
  • Like
Reactions: popallo
Hmm, I looked into the source code of `df` and it seems like they also use the `f_frsize` (Fragmented block size) parameter instead of the `f_bsize` (Block size). I'll get out a patch now and see what the others say :)
Great news :)

And if I can be a crash test server or beta tester, I would be very pleased.
 
  • Like
Reactions: ggoller
Hi folks,

I also have the problem and I'm very happy to find out that it's already solved :)

Would you have any news about your patch integration @ggoller ?

Regards,
 
Hi @ggoller and thks for the feedback.

Do you think there is something to do after the update to apply the effects of the patch?

I ask this because I have just updated the pbs and unfortunately, after restarting the server, I still see the same information concerning the storage (see my comments above).

After apt update && apt upgrade :

Setting up proxmox-widget-toolkit (4.1.5) ...
Setting up proxmox-backup-docs (3.1.5-1) ...
Setting up proxmox-backup-client (3.1.5-1) ...
Setting up proxmox-backup-server (3.1.5-1) ...

Bash:
$ df -h

pbs:                             968G  868G  101G  90% /mnt/pbs

Under pbs:

1712306977154.png

Thank you in advance for your help.
 
The patch has only been merged into the current master branch. The next release would be in a few (2-3) weeks. Otherwise you can also clone the source code and build it yourself!
 
  • Like
Reactions: unam and popallo
Hi guys,

I just upgraded to latest 3.2.2 but the problem does not looks to be solved.
Or maybe the patch was not integrated in the current release ?

Regards,
 
Hi!
the patch should be integrated in this release...
Could you please post some information about the problematic datastore? Backing storage, `stat -f .` output, if ceph or zfs the quota etc.
 
Hi, same thing for me. Latest version of PBS (3.2.2) and same problem with wrong datastore size under pbs.

With df -h :
Bash:
5.0T  953G  4.1T  19%

Under PBS :
1714053868031.png

With stat -f:
Bash:
stat -f .
  File: "."
    ID: 0        Namelen: 255     Type: fuseblk
Block size: 131072     Fundamental block size: 512
Blocks: Total: 10587981953 Free: 8590751412 Available: 8590751412
Inodes: Total: 8591775918 Free: 8590751412

The datastore is a Hetzner storage box, mount with sshfs for me.
 
  • Like
Reactions: unam
Hi, thanks for you reply.

Is there any hope that this commit will be in the next release ?
 

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!