Ncdata folder keeps growing, losing a GB every couple of minutes

I have eight users. All the data combined is about 1TB. My Nextcloud NCdata is about 3.5TB big, and still i am running out of space…

I have checked which folders are present in my NCdata folder, it shows my users plus:

  • appdata_oc7k0hcorudy
  • updater_oc7k0hcorudy
  • files_external
    -nextcloud.log
  • ownbackup
    -updater.log

Could somebody help me find out my NCdata folder is running out of space? My NCdata folder is losing about a GB per couple of minutes…

Since the new pre created NC Hyper-V VM uses ZFS, it is not possible to temporarily add an extra virtual hard drive to the NCdata folder. Which is too bad because i have got 6 seperate virtual hard discs now, but this is a problem for later…

Somebody got any ideas why my Nextcloud is eating up the space??

I am moving data from my users to make sure my NC doesnt run out of space :frowning: fast help is very much appreciated :slight_smile:

First step for me would be to find the folder which eats up your space and then dig further whats the reason for this.

@anon99283430

Yes sounds like a plan! But i am a real linux noob… so could you tell me how to do that please? :slight_smile:

There’s plenty of information about such basics linux tasks on “the web”.

Identifying a growing folder is a basic task? Oke…
Thanks for your advice.

I have checked /mnt/ncdata with du -sh
It comes back with 3.3TB so that is correct with regards to my running out of space. But when i do du -sh on every single folder the total is no where near the 3.3TB…

Could someone explain where i should look further?

P.S. i am trying to use “time du -h /mnt/ncdata | tail -n1” but this is taking a very very long time…

Should be nice to be a bully, no ??

Sorry, the common users here are more human.

So, first thing first, we need more info on your server.

Having a growing folder may depends on several things. The most common is the server basic configuration.
Did you used all hdd space as one disk … in that case, your problem may be the logs growing because of error, or simply because you started your apache/nginx server in high verbosity mode.

Check in /var/log/ if you have very large files.

If the growing folder is only related to nextcloud, check is the nextcloud logs are located within that folder. Check also the verbosity of the output.

@stratege1401,

Thanks for your reply.

As far as i know i am using my 6 virtual disks as one disk, because i am using ZFS.

/var/log has only got 3.9G

Like i said before i think i found out that ncdata is really almost 3.5TB. But i cannot seem to find the big files of folder. All my user folders combined are not even 1 TB. So shouldn’t we focus on the ncdata folder?

What do you mean by:

Check also the verbosity of the output.

Although the lmgtfy link is harsh, the message still has some validity to it in my opinion. You should be able to google how to list disk usage… but since i’m not that mean i can give you some help :slight_smile:

sudo du -ah /[PATH_TO_NCDATA] | sort -h -r | head -n 10

replace [PATH_TO_NCDATA] and you should see the 10 biggest folders in descending order. Be warned though! This might take a lot of time depending on your system.

You can find more commands like this here

1 Like

I trying:

sudo du -ah /[PATH_TO_NCDATA] | sort -h -r | head -n 10

Thanks @Gee858eeG

The weird thing is this shows folder sizes from a user, but when i log into this user his Nextcloud i don’t see these files. (Also not in the bin) the command above shows 2.4T for a folder which has only 36GB when i look into the user his nextcloud.

Probably best to delete this user in the CLI?

Ha! Cool, that it helps! And i withdrew my post, cause i overread a previous one of yours…

Alright then, maybe you could try

sudo du -ah /[PATH_TO_NCDATA]/[username] | sort -h -r | head -n 10

Then you can find the big folder within the [username] folder. Then you can keep proceeding with an increasingly more precise path in the du command until you find the actual place where the big amount of data lies and examine it. Maybe it’s not nextcloud itself which is writing there. I would try to figure the real cause of the wasted space and then remove the cause. I suspect removing the user might maybe unnecessary and not resolving your issue

I’m not sure if you mean the user or only the userdata folder. If you run rm -r on the userdata folder then nextcloud wont know that it has been removed and that might cause problems, so you would have to run an occ command to check and repair the database with sudo -u www-data php occ files:scan . You can read more about occ here: Using the occ command — Nextcloud latest Administration Manual latest documentation
I would not recommend to remove the userdata folder before inspecting the cause tho.