Skip to content
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

Quota is incorrect, seems related to external storage #10817

Closed
ashgoodman opened this issue Aug 23, 2018 · 9 comments
Closed

Quota is incorrect, seems related to external storage #10817

ashgoodman opened this issue Aug 23, 2018 · 9 comments
Labels
1. to develop Accepted and waiting to be taken care of bug feature: external storage

Comments

@ashgoodman
Copy link

Steps to reproduce

  1. Set quota
  2. Attach external storage (in this case Amazon S3)
  3. Watch quota become wrong

My quote is 50GB, I have about 7GB used

It says my quota is 13.1GB with just over 600MB used

quota

Expected behavior

Quota should be correct regardless of whether external storage is used

Actual behavior

Quota becomes wrong after attaching external storage

Server configuration

Operating system:
Ubuntu 18.04 on Digital Ocean
Web server:
apache
Database:
MySQL
PHP version:
7+
Nextcloud version: (see Nextcloud admin page)
13.0.5
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh
Where did you install Nextcloud from:
Snap using this process: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-nextcloud-on-ubuntu-18-04
Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #4730 (Storage), #3789 (External storage), #4348 (External storage quota), #6529 (External storage issue), and #8363 (enabling external storage).

@ashgoodman ashgoodman changed the title Quote is incorrect, seems related to external storage Quota is incorrect, seems related to external storage Aug 23, 2018
@ashgoodman
Copy link
Author

ashgoodman commented Aug 23, 2018

Confirmed, it is not registering files on S3 as part of my quota

I looked at the folder for S3 on my local device and it was 7.3 gigs while entire Nextcloud folder including the S3 was 7.9 or roughly 600MB difference (the amount it shows as my actual quota

@ashgoodman
Copy link
Author

Did a fresh install from snap on Ubuntu Server 18.04
Enabled 'quota_include_external_storage' => true,

Desktop client (Uuntu 18.04 Desktop) registers correct quota
Browser window for nextcloud install shows correct quota for primary storage but not external

@JasonRaveling
Copy link

We have a similar setup except I'm not using external storage. I'm experiencing the same quota problem. It is intermittent.

@crouthamela
Copy link

I have my Nextcloud running on a DO Droplet, 25GB storage, running via the Docker Compose file. I have two users, set them to 10GB each for quota. Usage on my primary user shows 3.1 of 5.6GB used in the web interface.

@JasonRaveling
Copy link

For my situation, I think I've discovered the problem. After running df -h I found that the docker container was hogging up a ton of space for no apparent reason. Nextcloud was compensating for my lack of available storage on the drive. I assume this is intended.

Pruning docker (Collabora is the only container running on my server) cleaned up a bit of that. But also removing it and then pulling it again works too. At least in my situation, it seems to be an issue with the Collabora docker container.

@rotational467
Copy link

rotational467 commented May 26, 2019

I can reproduce this issue, as well as the intermittent nature of it. My configuration is as follows:

Ubuntu 18.04 x64 (AWS)
Nextcloud 16.0.1 / latest Production

External storage: Yes, local ext4 volume

Nextcloud data folder has been moved from default to /opt/nextcloud. Everything is well configured and working properly (extremely well, it's an excellent product). Users' primary storage is /opt/nextcloud/data/username. On a separate volume, a folder has been created for each user, /ncdata/username. The appropriate folder is mounted as a Local External Storage exclusively for each user (this is basically bulk storage for pictures).

Users have unlimited quotas set.
'quota_include_external_storage' => true, is set in config.php.
enable_functions = disk_free_space,disk_total_space, is set in php.ini.

On the User Personal Info screen, the total disk consumption for all of the user's files in both locations is correct:
user settings

On the main Files screen, only the files in the user's primary storage are counted:
files

I have seen the counter on the main Files screen show the full 5GB at once or twice, but it did not persist for long before reverting to the primary files usage only.

Please let me know if there's any diagnostic info that I could provide that might be helpful.

Update: I was doing some cleaning and server maintenance, and needed to unmount the volume used for External Storage and change the mount point. After finishing up and re-activating the external storage in Nextcloud, the mail Files screen usage counter was temporarily accurate. Steps taken:

  1. Volume unmounted in operating system
  2. Volume re-mounted under different mount point
  3. Nextcloud external storage updated to reflect new mount point
  4. Browse from Settings to Files screen and see that usage indicator is correct:
    working files
  5. Go to Settings -> Personal Info. Usage indicator is correct.
  6. Return to Files. Usage indicator is now incorrect, again showing only files on primary storage:
    broken files

@guillaumelamirand
Copy link

Hello,

I have the same behavior on my installation. I am using nextcloud inside docker container, I mount a local directory as external storage and the usage on main page is wrong but the one in Personal Info is valid.

@szaimen szaimen closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: external storage
Projects
None yet
Development

No branches or pull requests

8 participants