Root partition is almost full

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.0.10.2
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

Since 2022/12/18, I’m receiving diagnosis emails telling me that my root partition is almost full :
[WARNING] Storage / (on device /dev/vda1) has only 1.9 GiB (14%) space remaining (out of 14 GiB). Be careful. on Dec. 18
and this remaining space decreases each day, until today (3 days later):
[WARNING] Storage / (on device /dev/vda1) has only 1.6 GiB (12%) space remaining (out of 14 GiB). Be careful.

I found some topics about that already, but I still don’t know how to fix it :

  • I only have 3 apps on my Yunohost : roundcube, nextcloud, borg (to backup my VPS on another machine)
  • I have not modified anything on my server for more than 1 year now (except regular classic updates)
    So I don’t know why this happens.

I have already run sudo apt autoremove, but it has cleared something like 10 MB :slight_smile:

Here are some bash commands results :

$ df -h
Filesystem                Size  Used Avail Use% Mounted on
udev                      974M     0  974M   0% /dev
tmpfs                     199M  572K  198M   1% /run
/dev/vda1                  15G   13G  1.6G  89% /
tmpfs                     992M   28K  992M   1% /dev/shm
tmpfs                     5.0M     0  5.0M   0% /run/lock
/dev/mapper/vg--150-home  147G   35G  105G  25% /home
tmpfs                     199M     0  199M   0% /run/user/1007
$ sudo fdisk -l


Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x049a5066

Device     Boot Start      End  Sectors Size Id Type
/dev/vda1  *     2048 31457279 31455232  15G 83 Linux


Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/vg--150-home: 150 GiB, 161061273600 bytes, 314572800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Hi!

You’ll want to know what takes the disk space: du -sh /*, then for each big directory (ex: /var): du -sh /var/*.

You might want to clean journal log, /tmp files, apt clean, etc.

In a first time, you can clean your root partition (old kernels no more used and download update packages) with :

sudo apt update
sudo apt autoremove
sudo apt clean

Then 15 GB for the system is not much

ok, thank you.
I understand 15G is not much, now I’ve seen on other topics that 16G was ok, or 32 if you want to install many apps : I have only 3

Thank you for remembering me the du command : it seems that the growing folder is /var/mail
I have to say I did not expect mails to be stored on the root partition.

Is there a safe way to migrate and tell my mail server to use /home/mail for example ?

Thank you (once again) !

Undoubtely you can try just a symbolic link between this 2 dirs ?

ok, good point. So :

  1. sudo mv /var/mail /home/mail
  2. sudo ln -s /home/mail /var/mail

I really do not want to have conflicts with the mail server running at the same time. What would be the steps before and after to stop and restart it, so that I do not move /var/mail while it is writing in this folder ?

$ ls -l /var | grep mail
drwxrwsr-t   8 root      mail     4096 Nov  8  2021 mail

Will I need to chmod the symbolic link ?

@crustyourmind @nicofrand any luck you know the answer ? ^

You can take inspiration from this doc

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.