Not enough free space

Nextcloud version: 14.0.4
Operating system and version: 18.04.1
Apache or nginx version: Apache 2.4
PHP version: 7.2

The issue you are facing:
Attention - newbie here…
When I try to upload a big file the interface tells me, that there is only ~30 MB left.
Actually this is not possible. There sould be around 40 GB of free space. Once I tried to upload a file which was a few GB, but I accidentally interrupted the upload after a few minutes.
I checked the path /mnt/ncdata/ where all the data is stored. I found a lot of files inside of the user of whom I was trying to upload the files. There where a LOT of ~10 MB big files stored. I deleted them all and restarted the whole appliance. Now I’m still facing the same problem.

Somehow I think, that there are some cached files or something, which are hanging in the 4th dimension.

df command shows this:

Please help me :frowning:

better use “du -h”, this shows the allocation in KB/MB/GB…

It looks like your Nextcloud data directory is in /mnt/ncdata. (What is an ncdata filesystem? I’m a Nextcloud novice myself, what kind of “device” is this?)

The /mnt/ncdata partition has 29312 * 1KB blocks free. Is equal to 29312/1024 = 28.625 MB.

One should also not simply delete files from the data partition, only via Nextcloud itself or a WebDAV client…

Your root directory (/) has a total of 40GB, of which roughly 34GB are still free. There is apparently your Nextcloud installation, (maybe /srv/www/…) and the database (maybe /var/lib/mysql, postgres,…) but not the WebDAV files…

In short: Your ncdata is much too small.

PS: after /mnt/… only temporary filesystems are mounted. Take another mountpoint (but that’s not the error) e.g. /data/ncdata etc…

PPS: My english is not so good…

Translated with

Hi and thank your for your answer.
Here is a better view of the specs:

I downloaded a pre-configured appliance with a disk space of 40 GB, which is running on a vmware environment. I have never changed something on it.

In the first step I didn’t want to erase the data direclty from the partition, but since I haven’t found any data on the accounts (I have access to all of them) I tried and searched over there.

Do you know how I can extend the the volume size of ncdata?

Best regards.

Hello again,

first of all: I don’t know much about Nextcloud yet and have only been using it for half a year. I decided a few days ago to write a better FritzBox implementation than carddav2fb, so I registered here. I am NC-noob myself…
So maybe it’s better to wait for better answers.

This appliance is an official Nextcloud appliance? I have no idea what it’s all about. Where did you load it from?

I understand the line

ncdata ..... ..... .... 50% /mnt/ncdata

not. I don’t know any file system “ncdata”. At the place (first column) there is normally the device file, so something like /dev/sda1, /dev/mapper… or host:xx for remote hosts (nfs, sshfs). Or if there is no device (for virtual file systems like tmpfs or proc) just the name of the driver (I think). Accordingly, ncdata is a special virtual file system. But I haven’t heard anything about it (which means nothing. I’m an NC-noob).

You can do the following (read it completely, at the end is a simpler solution):

!!! Attention: Everything not tested, written down fast !!!

  1. Stop the VM.

  2. Make yourself a copy of the virtual machine as backup.

  3. If you think not necessary, jump to 1. :slight_smile:

  4. Create a new disk for your VM.

  5. Boot the VM and log in as root.

  6. Find out which device file the new hard disk has. ls -l /dev/sd* /dev/hd* Shows you possible disks. sda is the first sdb is the second, etc. If there is no SCSI emulation in the kernel it should be hda and hdb etc… Since your new disk is not partitioned yet, there are no more device files. Assuming the system is on the first partition of sda, then there is sda1 and so on. Your new one should be sdb and there is no sdb1! yet! Try gdisk -l /dev/sdb. If you get a message that no partition table exists it is probably the right one. Compare the output also with gdisk -l /dev/sda. There one should be displayed…

At this point you now know the device file of your new virtual hard disk. I now assume “/dev/sdb” for examples. Exchange it for your found device file. If you are not sure, stop here :wink: (and ask again)

  1. Check if the directory ‘/data/’ exists. If not, create the directory /data/ with mkdir /data/. If yes, report again or take another one (/data1) and remember it.

  2. Partition your new hard drive with gdisk /dev/YOUR_NEW_HD or see if you do it from the desktop. You only need one partition, take the whole disk.

  3. Format the new partition with mkfs.ext4 (or mkfs.xfs) mkfs.ext4 /dev/YOUR_NEW_HD1. Note the ‘1’, i.e. ‘/dev/sdb1’. sd = scsi-disk, b stands for second disk and 1 for first partition of the second disk.

  4. Test it with mount /dev/YOUR_NEW_HD1 /data and ls -l /data. There should now be a lost+found directory.

  5. unmounte them again umount /data

  6. To automatically mount it at boot time, edit the file ‘/etc/fstab’ and insert the following line
    (!!! Attention: With a defective fstab the VM will not be able to boot anymore !!!):

/dev/YOUR_NEW_HD1 /data ext4 data=ordered,nofail 0 2
  1. Test the automatic mount with mount -a
    df -h /data should give something of ‘Mounted on /data’. If it didn’t work just ‘/’ instead of ‘/data’

If everything works out:

  1. Stop the apache: service apache2 stop (or with systemctl)

  2. cp -a /mnt/ncdata /data/
    This copies the ncdata directory from /mnt/ to /data/ including all file attributes, owner, etc…

  3. In Nextcloud change the data directory to the new one. I have to see for myself how this works :slight_smile: I did this once by link, but it’s suboptimal. The directory is somewhere in config.php…

Found: in your config.php there is this line:

  'datadirectory' => '/srv/www/htdocs/nextcloud/data',

change it to

  'datadirectory' => '/data/ncdata',

My config is under '/srv/www/htdocs/nextcloud/config`. Possibly the Nextcloud installation is somewhere else with you.

  1. restart the Apache: service apache2 start

  2. test…

  3. reboot

  4. test…

If you use the VM only for Nextcloud you can skip that with the new disk and only create the directory /data.
Then you need to start at point 13. You still have 34GB free. Somewhere at Nextcloud I would set up a limit of 25-30 GB. So that the system doesn’t drive in front of the wall if you upload too much. With your own hard disk this (rather) can’t happen.


Translated with

Again, I have no idea of a file system called ‘ncdata’. Maybe this appliance did it that way and this virtual file system is always as large as the storage space set by Nextcloud. In this case it would be enough to change the size of Nextcloud (admin).

Otherwise I can’t think of a reason for this.