Incorrect usage of external HDD space

Hello all,

I’m running NextcloudPi on a RPI4 with a 500GB external hard drive (which the system logs as 463GB), but after uploading approximately 274GB of content Nextcloud is now telling me that all 463GB are full…

How can 200GB disappear like that? Does Nextcloud create some sort of temporary files when uploading that I can delete somehow?

I’m pretty new to Nextcloud and Linux so please bear with me if I’m missing something obvious here.


1 2

This is normal. The size of the drive is 500,000,000,000 bytes which converts to roughly 465 GiB (one of the units is displayed colloquially).

I’m not sure about temporary files, but it does store version history for files. Could be something odd happened there.

Can you confirm the space usage with df -h ?

Thanks for the reply, here it is.


So the space is definitely in use… Try going to the data folder and running du -hx. This will show the amount of disk space being used by each file. Maybe that will shed some light on it.

Do you mean the ncdata folder on the external hard drive? Whenever I try to access it I get the message -bash: cd: ncdata: Permission denied.

How can I gain access to the folder? Sorry I’m a complete Linux newbie and it’s all a bit overwhelming as of now :slight_smile:

Ok so I worked out how to access the folder as root (that was educational!).

There are actually two folders in the hard drive, one is ncdata which holds 277GB of all the uploaded files, and a second folder labelled ncdata-04-02-20 which holds the remaining 185GB. Picture below of what the files on this second folder look like. The question now is if it’s safe to delete this folder.

You should not manually make any changes under ncdata.

You can use the occ utility to remove old file versions.

So I followed the command:

sudo -u www-data php occ versions:cleanup

and it cleared 1.8GB of space in the hard drive, but the ncdata-04-02-20 folder is still there and taking 185GB of space. Am I missing something here?

So ncdata-04-02-20 is not under ncdata, is that right? I wonder if that’s not actually part of Nextcloud’s data.

Yes correct, ncdata and ncdata-04-02-20 are both on the root of the hard drive.

The files in this second folder appear to be backups and it’s why I was wondering if I was able to simply delete the folder.

Also not sure if this has any bearing on anything, but I have been uploading the files via the Windows desktop client (because for some reason I was unable to upload files larger than 2GB through the browser) and it threw a bunch of errors during the upload, although all the files uploaded so far seem to be absolutely fine.

Ok, so if it’s not in the web root or the data folder, it probably doesn’t belong to Nextcloud. I haven’t used the Pi version so I’m not sure if it makes some kind of backup. Maybe someone who knows more about the Pi version can chime in.

Let’s hope someone can shed some light on this, I don’t want to delete anything without being sure.

Many thanks for all your help so far though!

Looks like that could be a backup or snapshot made with one of the ncp tools.
You can view and manage these from ncp-web at https://local-IP:4443

This is the weird thing, I haven’t got any automatic backups enabled and I certainly haven’t done any manual backups either.

This is what my NCP panel looks like:

When nc-upgrade-nc runs, it creates a backup (without data), in case upgrade fails, it will auto restore from it.

Btw your screenshot does not show the same page as mine, yours is nc-backups-auto settings page, from left menu. Mine is the backups overview and manager page, you get when clicking the backups & snapshots icon from top menu.

You mean by clicking the Backups folder icon at the very top? Nothing happens when I click mine, but perhaps because I haven’t got any automatic backups set up?

In any case, I have now deleted the ncdata-02-04-20 folder and freed up 185GB of space in the hard drive. Nextcloud seems to run absolutely fine and none of my files seem to have been affected at a first glance.

Maybe this folder is a backup for the upgrade as you suggest, but would be good to know for sure.

I will carry on uploading my remaining files and will report here if another similar folder is created in the meantime.

Yes, it can be bit slow in loading initially.

So just as a final update, I was able to upload the remainder of my files and Nextcloud is running without issues. That odd folder hasn’t appeared again but I now know where to look if large chunks of free space disappear from the hard drive.

The solution seems to be as simple as deleting the folder as far as I can gather.

Thanks for the help fixing this issue guys, really appreciate it!