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.



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