Nextcloud Jail Reports Different Size Than TrueNAS Core Pool

Nextcloud version: 24.0.4
Operating system and version: FreeBSD 13.1-RELEASE-p1
Nginx version: 1.22.0
PHP version: 8.0.22

The issue you are facing:

The Nextcloud plugin for TrueNAS Core reports 188.99 GB used while TrueNAS reports 397.25 GB used. Both TrueNAS and Nextcloud report the correct available space of 83.31 GB

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Store stuff in Nextcloud
  2. Notice that TrueNAS is complaining that more than 80% of space is used while Nextcloud is reporting 56%


Nextcloud Storage

The output of your Nextcloud log in Admin > Logging:

Almost all of it is identifiable information. Let me know if you need anything from it and I will do my best to remove the identifiers.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 =>
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
  ),
  'passwordsalt' => 'Example',
  'secret' => 'Example',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'Example',
    2 => 'Example',
  ),
  'datadirectory' => '/usr/local/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'Example',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'Example',
  'dbpassword' => 'Example',
  'installed' => true,
  'default_phone_region' => 'US',
  'instanceid' => 'Example',
  'app_install_overwrite' =>
  array (
    0 => 'documentserver_community',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'Example',
  'mail_domain' => 'gmail.com',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'Example',
  'mail_smtppassword' => 'Example',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

I only see access.log and error.log in /var/log/nginx Let me know if you need either of these or any other logs.

This really is a TrueNAS issue rather than Nextcloud, but it sounds like you have allocated 83% of the disk pool and Nextcloud has used 56% of its volume. I can’t see the rest of the details in that pic.

Nextcloud has no knowledge of the disk pool, only the volume where it’s installed. Other disk usage (volumes, snapshots) will affect the free space remaining in the pool.

That makes sense. Is there any way to increase the size of the volume? It used to be larger as recent as earlier this month.

2022-09-04:

2022-09-24:

From shell I can also see that gpart shows the whole disk but the command df -h shows what Nextcloud sees:
Screenshot 2022-09-24 143351

Again, without knowing how you’ve set up the storage pool and what else may be in it, I really can’t say. I don’t do guesswork when it comes to storage.

VMware manages the disks in raid and I made a 500 GB partition and a 16 GB partition from settings for the TrueNAS virtual machine. Once TrueNAS was booted up on the 16 GB partition I setup a storage pool on the 500 GB partition in stripe mode and installed Nextcloud into the storage pool from the plugins page. Would any additional information on the physical machine, TrueNAS, some log or config file, or something else help?

Nextcloud thinks the storage is even smaller now. What could cause this? I might have to shutdown Nextcloud and stop using it if it gets any worse.

That’s pretty strange. You don’t have any other volumes using that pool? Any snapshots?

Sorry for the late reply, it turns out the snapshots took up the missing space. :sweat_smile: It looked like it was only a few bytes per snapshot but they were much bigger than I thought and there were 541 of them. Upon deleting them and expanding the storage pool to use the freed space it is now fixed! Thanks for your help, I really appreciate it.