nextcloud / quota_warning

❗💾 This app sends notifications to users when they reached 85, 90 and 95% of their quota.
https://apps.nextcloud.com/apps/quota_warning
GNU Affero General Public License v3.0
17 stars 12 forks source link

Quota warning mail sent to all users on full data storage disk #35

Open hostingnuggets opened 6 years ago

hostingnuggets commented 6 years ago

Hello,

The disk on my server where I have the storage directory (Nextcloud "data" directory) got full and this triggered the quota warning mail to be sent to all my users. None of these users where actually using their whole quota. I think this is a mistake and this app should have not sent any quota warning mails.

I am using Nextcloud 13.0.5.

nickvergessen commented 6 years ago

unfortunately that is nothing I can really detect, because the user quota is capped with that one too... So if there is no disk space left your user quota is limited to the available disk space.

hostingnuggets commented 6 years ago

@nickvergessen thanks for your quick answer. I see the issue... maybe a "dirty" workaround such as checking the disk space available through the OS (df on Linux) beforehand might do the job? For instance if the OS reports that it is 100% full no quota warnings should be sent at all just to prevent this case.

pierr0t commented 11 months ago

I know this is an old issue (and I guess it is more like an enhancement request) but I'm encountering the same question ... I guess a smarter solution could be:

ThaDaVos commented 5 months ago

This got me really confused - but apparently for me happened the same, my storage disk filled up - but instead of everyone getting the email - random people were getting it

ThaDaVos commented 1 month ago

Is there any progress on a fix?

There are simple PHP API's for it: https://www.php.net/manual/en/function.disk-free-space.php

And perhaps compare it against the giving threshold and total free/used ratio: https://www.php.net/manual/en/function.disk-total-space.php

nickvergessen commented 1 month ago

Is there any progress on a fix?

No

There are simple PHP API's for it

That makes several assumptions on the architecture of the system