Insufficient Space Available, likely partition issue, help needed

Hi,

I’m using Nextcloud installed in a Ubuntu VM in a QNAP NAS.
I’m currently facing an issue with nextcloud not using the 6TB allocated and giving a insufficient space available error after 2.8TB uploaded.
After searching the site I found this thread which looks similar to what I’m currently experiencing but can’t be sure. Not sure how to solve it either.

I’m not a Linux user and have this set up only by following guides so it’ll be very much appreciated if I could get some instructions on how to solve this.

image
image
These are the

df -h

lsblk

outputs

It appears you have run out of room on your root filesystem (/) .

I do not use LVM but you can expand the storage of your root filesystem if you do a search for ‘Ubuntu LVM’ there should be a guide to show you how. You just need to expand it.

Lets see…

https://packetpushers.net/ubuntu-extend-your-default-lvm-space/

That link should help you figure it out.

Thanks for the help, seems like this is indeed the cause.
I have a few additional questions though.

  • As I understand it, I mounted the actual NAS disks to the VM. That’s why the actual 6T space did not appear in the VM when I used the df -h command. What is the space in the root filesystem used for? some kind of temporary space?

  • If that’s the case, why have the space run out after all this time? Is there some kind of temp files left behind that I have to clean up periodically?

Sorry for all the questions, just trying to better understand how nextcloud works so I can fix this by myself when it happens again.

It appears that you are running NC thru a snap type setup. While I know next to nothing about snap it appears that all your storage is within snap. Which is located on your root partition. So, Whatever you uploaded is stored there and has filled it. I really do not think temp files would take up so much space under normal circumstances.

I run NC on Debian and not a snap ap. Snap is something ubuntu came up with which I really do not care for. To me its a duplication of dependencies to run NC and overly complicates things.

Hi Svelten,

Let me see if I can help :slight_smile: (Apologies in advance for a long, complicated post)

What is the space in the root filesystem used for? some kind of temporary space?

The root filesystem (i.e. “/”) is your Ubuntu: that space is used for the operating system, and (I think; see below) your Nextcloud. The 63G volume it’s in is 100% full (…which is a problem: things will stop working when Linux runs out of space).

Within root ("/") there are various locations for temporary data; the most important ones are /tmp and /var/tmp, which are “global” i.e. they’re used by the system as a whole (or rather: by lots of things, not by individual users/applications etc.) You’ll probably find that /tmp is purged (wiped) on reboot, but /var/tmp is not - it’s persistent. (This varies somewhat between different Linux distros - and Unix-type operating systems more generally - and you can change it if you want to).

The good news is that Ubuntu is installed in a Logical Volume, rather than directly in a disk partition :slight_smile: This is helpful: Logical Volume Management (LVM) allows you to do things like take point-in-time snapshots (useful for making consistent backups, or giving you a “safety net” you can revert to if things go wrong).

LVM also allows you to combine different bits of storage into one logical whole. So in your case, you could use it to extend/expand the root filesystem, to give Ubuntu more space:

  1. create a new virtual disk (in your hypervisor i.e. in the QNAP software) then
  2. format the new virtual disk as an LVM Physical Volume, then
  3. extend the “ubuntu–vg-ubuntu–lv” Logical Volume into it

…which would give Ubuntu more than 63G.

Side note
At the risk of complicating things (sorry) -

By the looks of things, what you’ve got is a default Ubuntu install, with (almost) everything in one Logical Volume. This is fine - and if you’re not familiar with Linux, I would stick with that for now - but there are good arguments for dividing the system up into separate Logical Volumes e.g. having different LVs for /tmp (the main global/system temp directory; see above), /home (which is for system users’ - not Nextcloud users’ - home folders), /var (“variable data”…which probably includes your Nextcloud; I think the default Nextcloud location is /var/www/nextcloud) etc. This is something to bear in mind for the future, maybe.

I think the main reason you’ve run out of space is that your Nextcloud is in the same Logical Volume as Ubuntu itself. (If Nextcloud was outside “ubuntu–vg-ubuntu–lv”, I’d expect to see another volume in the screenshot, with something in the “Mounted on” column indicating where it was mounted by Ubuntu).

So what you could do is make a new virtual disk, then transfer Nextcloud to that. Note that this will require several individual steps - making a new virtual disk, formatting it as an LVM Physical Volume (in Ubuntu), transferring Nextcloud from its current location (probably in /var; see above) to that etc etc etc - which may mean a fair bit of research on your part. Also - important! - you should definitely back everything up if you’re going to try any of this (particularly if you haven’t done it before).

I hope that helps; best of luck.

P.S. To echo what coffee412 said: snaps are a bit of a “double edged sword”, really. They can definitely be useful for desktop installations…but IMHO they’re less useful for server installations. That’s just my 2 cents, though. (See also flatpak, which is the same kind of thing…)

1 Like

Hi,

Thanks for the detailed reply.
I’ve discovered a few more things about my issue since then.

As you mentioned, the Nextcloud installation is in the same LVM as Ubuntu.
The issue was that I was syncing a bunch of very large files at the same time, and it was interrupted midway.
I tried to force a re-sync after that, and since the nextcloud’s uploads folder is in the same LVM, it just kept filling the space without clearing the previous temp files.
Currently the error has been resolved by expanding the LVM as coffee412 has said.

Looking through the other threads, seems like moving nextcloud to a different disk is indeed the better solution. I’ll try to look into how to achieve that.

Another thing I have an issue now with is that I cannot seem to access the nextcloud folder itself.
I tried to use the cd command to go into and check the uploads folder but it returns a permission denied message.
Do you by any chance know what is the issue here?

Hi Svelten.

I tried to use the cd command to go into and check the uploads folder but it returns a permission denied message.
Do you by any chance know what is the issue here?

I’m guessing you don’t have permissions; it’s probably owned by www-data (i.e. the webserver user).

If you need to “do stuff” to that folder, you should be able to do it using sudo.

If you need to actually “go into” that folder, you could switch users to root i.e. sudo su (…then enter your password)

(I’m assuming you’re a member of sudoers, which is a pretty safe assumption).

Hope that helps