I’m running Nextcloud in a Docker container on my primary drive, but I have a separate 1TB SSD that is dedicated solely to storing Nextcloud data. However, when I check the storage details within Nextcloud, it reports only 890GB of usable space.
Disk Details:
Running df -h on my server shows that the SSD (/dev/sda1) is 953.9GB.
Nextcloud reports 890.11GB of usable space for this partition.
Nextcloud version: 29.0.1.1
Operating system and version : Ubuntu Server 23
PHP version: 8.2.20
The Nextcloud serverinfo app does not use the total disk size as listed in the size column of the df -h command. Instead, it uses the df -TPk output to determine “Used” and “Available” space and calculates the file system size based on the sum of these two values.
The ext4 file system reserves a portion of disk space for administrative purposes, which is not included in the ‘used’ and ‘available’ space reported by df. This reserved space is intended to prevent file system fragmentation and ensure that critical system operations can continue even when the disk is nearly full.
To calculate the size of the reserved blocks and convert it into human-readable formats (KB, MB, and GB), you can use the following script: