-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
19 RC2 - Space usage is shown incorrectly #21002
Comments
cc @GretaD ? |
this is an interesting bug, because normally you should not have an hover tooltip, also the total space is in bracket. And here it shown in % where it should not. I have to check it out, because on 18th and lasted dev master version its shown correctly. thank you @dragon988 for the report |
i wrongly assumed you were talking about the user quota. So @dragon988 i think your problem is related to this one: #16943, can you please double check if this is your case by trying to reproduce #16943? |
Yes, this is what I'm referring to. External storage is disabled. Attached images. |
The admin area also always shows the correct quota settings. It's the user end that has issues. |
Related/Same issue: #10693 In my case it has nothing to do with an external storage but I think I need to mention, that I am using btrfs as filesystem! I had a look at the file where the quota calculation comes from. server/lib/private/legacy/OC_Helper.php Lines 521 to 558 in 2bc4094
Correct command to get the estimated free filesystem size when using btrfs: df -h does not give the correct free filesystem size when using btrfs: I replaced server/lib/private/legacy/OC_Helper.php Line 553 in 2bc4094
with 'total' => $free, and had a look in the files app in firefox to see whats happening. It gives me back a new "total" of 21.6GB ![]() This value is far too small and wrong for the $free variable! It should be 727.20GB... Because of this small value $total is smaller than $quota so that server/lib/private/legacy/OC_Helper.php Line 533 in 2bc4094
Conclusion: server/lib/private/legacy/OC_Helper.php Line 526 in 2bc4094
does not give back the correct value for $free. Unfortunately I don't have the skills do correct this calculation. Can someone have a look please? Thanks! |
@dragon988 Is it possible, that your CephFS is acting similar to my BTRFS and therefore we have the same problem? Can you check the $free variable like I did and compare it to the actual free space on your disk? |
My problem has been resolved for some time and I'm currently using 19.0.2. I've kept this ticket open for you. df -h does give the correct output for me. |
@ggeorgg I'm curious on what version of btrfs you are using along with distro. Have you filed a bug report upstream? |
I am currently using Open Suse Leap 15.2 with kernel version 5.3.18. By the way, I found an interesting behaviour: When I use the web UI of nextcloud and upload a small text file by drag and drop, the total space in the left bottom gets updated to the correct value. When I reload the page, it reverts back to the wrong value... Does the function "free_space(...)" really use "df -h" to get the free space of the filesystem? Would it be possible to include a switch to use "btrfs filesystem usage /" when using btrfs as filesystem? How does this work? |
Ok. I guess we rely on the php function disk_free_space in here server/lib/private/Files/Storage/Local.php Line 372 in 41d95d9
In another github conversation (osclass/Osclass#533 (comment)) I found "we should not rely on this function on Linux BTRFS filesystems". I think the market share of BTRFS still increases. For example Fedora will now have BTRFS as default filesystem. (https://itsfoss.com/btrfs-default-fedora/). As BTRFS is a very nice filesystem it would be good to have a solution for this problem. Otherwise I guess I will have to use a more common setup... I am not even sure if we really need the $free filesystem space to calculate the $total variable. In my opinion it is the task of the administrator to make sure the assigned quota values do not exceed the $free space... |
cc @icewind1991 |
I got in contact with the php bug mailing list but didn't get an answer until now... |
Looks like php needs to use the function static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) defined in https://elixir.bootlin.com/linux/v5.2.21/source/fs/btrfs/super.c#L2032 when the filesystem is btrfs. |
Looks like the problem is gone for me with latest NextcloudPi image and Nextcloud 20.0.4 update. |
Based on zedocrob's comment I am closing this. Feel free to open a new issue if you should still experience this on NC21.0.2 or above. Thanks! |
Setup:
SSD for installation, CephFS for the data folder.
Nginx + HAProxy
7.4 PHP-FPM
Postgresql DB
19 RC2 Nextcloud - fresh install
Linux
There are no errors in the nextcloud.log and I'm not sure what other information is useful here.
Hi there!
Seems to be a typo here:
The correct wording should be 1.4TB of 8TB used. The percentage calculated appears to be correct.
The text was updated successfully, but these errors were encountered: