Hi Dallas,
I checked in with one of our developers on how all of this works, and wanted to supply a bit more information, for future reference on related questions.
First, of all, as
noted in the documentation, the total amount of
available storage shown on the Global Settings page is determined by a value set in one of AtoM's configuration files. Specifically, this is set in the
config/app.yml file, via the
upload_limit variable. If this value is set to -1, then there is no set limit in AtoM on the max file size, and AtoM's settings will just say "
Unlimited".
Note that upload file sizes can be limited by other installation variables, such as the PHP execution limits, and individual repository upload limits - see this previous forum post for further links:
In terms of how AtoM actually calculates the size of the files:
First, it's important to note that this calculation is only based on the uploads directory in AtoM - so it does not include uploaded finding aids for example, which (somewhat confusingly), are stored in AtoM's downloads directory. Additionally, if you are using a URL to link a digital object in AtoM, AtoM will not store a copy of the master digital object - it will generate local derivatives (such as a thumbnail and reference display copy, but it will just save the URL to the master, rather than copying and storing it.
Another thing to note: if you have deleted your duplicate repositories and their related descriptions, then it is also possible that the attached digital objects have been deleted as well.
When calculating the total space used, AtoM is relying on PHP functions to get the value. Specifically, the call is made in the code here:
It uses a function called getDirectorySize, which is here:
These operations make use of the following PHP function:
I don't see any changes in this PHP function in recent versions, so I don't think there is a regression there. As far as I'm aware, the application cache and the index are not involved in this operation as well, so I don't think the usual maintenance tasks would change anything. If you are seeing inaccurate or unexpected amounts, the only theories I have at this point are:
- There could be a permissions issue that is preventing the function from properly calculating and returning the correct value. You can always try resetting the permissions to what AtoM needs by running the following: sudo chown -R www-data:www-data /usr/share/nginx/atom
- It can take a while for this calculation to be run if you have a lot of digital objects. You could try waiting a bit and doing a hard refresh on the settings page to see if the used total changes.
Another option, for an independent check, would be to run a calculation against the uploads folder yourself via the command line. You could do this for example with the following command:
- du -sh /usr/share/nginx/atom/uploads/
Alternatively, to see the size of all of AtoM's subdirectories (including both uploads and downloads), you could navigate to AtoM's root installation directory (typically /usr/share/nginx/atom if you have followed our recommended instructions) and then run:
See:
Hope this helps!
Regards,