BUG: trouble setting quota for user Nextcloud

The updating of the quota wasn’t working for some time, but updating via ‘occ’ worked fine, do I hadn’t taken the time to write up a bug report just yet.

But now things have taken a turn for the worst. My (admin) account is set 20 20Gb, it uses 8.7Gb and when I check via ‘occ’ all is well, but I can no longer add data to my account. Upon logging in to the web interface I saw that the web interface thinks I only am allowed to use 2Gb. More over, an other users shows my quota! But that user has a default quota of 200MB?

This I have tried to fix it:

  • Alter all default quota to hard set quota of 200MB (changing ‘occ usage-report:generate’ that quota record from ‘200 MB’ to ‘209715200’ (bytes) => no effect
  • altering various quota’s
    that of me (the admin), even larger, smaler, keeps saying 2Gb
    that of the (new) client, larger, smaller, keeps showing my usage and that 2Gb quota…
    that of the only other user who has a 2Gb quota, changed it to 3Gb, that does take affect (as intended, just for that user…)
  • removing all shares to other accounts => no effect
  • as a last resort I have even tried to remove the account of the new client (was a demo account, it will become live after the holiday) showing my quota info => no effect

I have read of some quota problems with S3, might that be it? Is S3 not good enough built into Nextcloud to use? Or is there something wrong with my admin account?

2 Likes

There was an update to 24.0.3 and I have installed that update, hoping it might fix my problem.

I am not completely sure, but the web interface does now update the quota (checked via ‘occ user:setting [user name] files quota’)
But still the front end (and everywhere else that counts) keeps using that darn 2Gb (website, windows sync client) OCC does give the quota set by website/occ :-/

The strangest thing… I started to remove synchronization of data to my computer and remove the files and migrate it to the newly created personal account… guess what quota is OK now!?

I have the distinct impression it has something to do with S3 somewhere …
I fear S3 isn’t really the way to go… I think I’m going to have to revert to “old style”… maybe I’ll mount S3 as a drive… that might just give me the benefits of S3 and the redundancy of the HDD-config of Nextcloud…

Also, I have the distinct impression the updating/reading of quota has something to do with caching… maybe opcache?

I was having issues changing quotas while cron was running. At least, I think that’s what was causing the issues. I would raise my quota in the web UI or from occ but the web UI showed the old/smaller value and still said I was exceeding my quota, and I couldn’t create any new files. Once cron.php was done, everything started working again. That cron.php instance was purging 100s of GB of data from trashes, so it took a while. Maybe it locks some changes while it runs?

I’m running Nextcloud server version 24.0.3.

It’s time for an update to this :wink:

The problem became that big that I decided to build a migration tool for S3 to LOCAL.
The problem is that I have active users… and when you have thousands of files an gigabytes of data migration either way costs a lot of (down)time…

The script I built can do a “pre sync” (without going to maintenance mode) and then a final sync (with downtime). But that only syncs the data that has changed since the previous sync… so downtime was a mater of seconds :slight_smile:

That script is here: all data copied, but nextcloud has lost everything · Issue #6 · lukasmu/nextcloud-s3-to-disk-migration · GitHub

Later on I built the exact opposite, a script that has the same “pre sync capability” but then from LOCAL to S3. All worked perfectly without the crappy quota problem until a few days ago…

I wanted to fix this, since a “fix” of migrating hence and forth from and to S3 isn’t much of a solution… and I found a “Quick and Dirty” fix!

take a look here: [Bug]: quota S3 storage wrong WITH Q&D FIX! · Issue #34422 · nextcloud/server · GitHub

I also found the cause of altered quotas not beeing visible in the webinterface…

To conclude, I hope a real software engineer at NextCloud replaces my band aid with a better one, (but my Q&D fix works, so I’m ‘saved’ for now :wink: )