1

I have an issue where my Ubuntu Server (v20.14) cannot fully function because it is out of space on the root. It's so bad, that even attempting to run "apt purge some-image" returns "You don't have enough free space in /var/cache/apt/archives/". "apt update" just fails. I've tried "clean" and "autoclean" and these have nothing left to offer.

All system files are on a single 1TB drive that I once believed was large enough for anything I would ever throw at it. This is primarily a Plex server, with the media files on hard drives under "/mnt".

fdisk -l on the system mount look slike this:

Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
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: gpt
Disk identifier: 7FFD308B-1054-4E65-B1D2-6FE3DFC3F3D5

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048       4095       2048     1M BIOS boot
/dev/sdb2   4096 1953521663 1953517568 931.5G Linux filesystem

df -H returns:

Filesystem            Size  Used Avail Use% Mounted on
udev                  4.1G     0  4.1G   0% /dev
tmpfs                 814M  3.2M  811M   1% /run
/dev/sdb2             984G  954G     0 100% /
tmpfs                 4.1G     0  4.1G   0% /dev/shm
tmpfs                 5.3M  4.1k  5.3M   1% /run/lock
tmpfs                 4.1G     0  4.1G   0% /sys/fs/cgroup
/dev/loop0             59M   59M     0 100% /snap/core18/1885
/dev/loop3             73M   73M     0 100% /snap/lxd/17629
/dev/loop5             32M   32M     0 100% /snap/snapd/9279
/dev/sda1             3.0T  2.0T  835G  71% /mnt/media1
/dev/sdc              3.0T  1.8T  1.1T  65% /mnt/media2
/dev/sdd              4.0T  2.5T  1.3T  67% /mnt/media3
//192.168.4.10/music  3.0T  1.1T  1.9T  37% /mnt/music
tmpfs                 814M  4.1k  814M   1% /run/user/1000

Most of the space appears to be used up in /var/lib.

sudo du -h --max-depth=1 / | sort -h | tail -n 10
... returns ...

10M     /etc
11M     /.cache
43M     /home
302M    /boot
347M    /opt
501M    /snap
906M    /var
5.8G    /usr
7.0T    /
7.0T    /mnt

I have uninstalled Plex (I have a config back-up) and emptied most of /var/logs, /tmp, and /var/tmp, my root folder seems stubbornly stuck on 100% used.

I still have terminal access and, oddly enough, WebMin is fully functional. My media drives are correctly mounted and can accept anything I need to move to them. Any ideas what I can do to free some space, other than rebuild this from scratch?

4
  • See this answer: askubuntu.com/a/912087/855322 Especially, step 6 and beyond..
    – FedKad
    Oct 10, 2020 at 19:34
  • Unmount all your external harddrives, and find out if there is data in any folder under /mnt - my bet is there is ... And if there is, it is an indication that (at some point) an external HD was not mounted, and data was written to the system partition instead. Oct 10, 2020 at 21:41
  • FYI: There are only 12 months in a year, so your release 20.14 (2020-14th.month??) makes no sense. Ubuntu uses the year.month to show the initial release (an easy guide to the age of the software stack used). Are you using Ubuntu?
    – guiverc
    Oct 10, 2020 at 23:16
  • 3
    Does this answer your question? No more disk space: How can I find what is taking up the space?
    – Kulfy
    Oct 20, 2020 at 17:07

1 Answer 1

4

"Any ideas what I can do to free some space?"

It seems that your root system is filled to the brim of 1TB with multimedia files.

My guess is that you're saving files to /mnt/somedir but /mnt/somedir is not actually a mount point for a hard drive so they are truly being stored under /mnt/somedir.

You need to move or remove some of these media files to clear up space on your root file system.

You should review your mount points under /etc/fstab to make sure they are correct.

You can add more storage and move some of the media files off of your root partition to another drive. Or you can just remove/delete some of these files.

You have lots of discretion on which media files to move or delete since your system files should only take up a tiny sliver of 1TB. Don't delete your system files or software - they are not responsible for filling up your storage.

6
  • Why do you say that? The hard drives under /mnt were specifically set up to store the media files. If you are saying that there are some also on the system drive, where would you suggest I look for them? I originally thought it might by in the thumbnails and meta-data used by Plex, but after uninstalling the app and deleting its folders, my space issues did not improve.
    – c0c0c0
    Oct 10, 2020 at 20:48
  • It's is practically impossible for your system files and software to take up 1TB. It would be unusual for it to take over 30GB... This should leave around ~950-970GB of free space. And when I say unusual to be over 30GB, that would be with a desktop environment and a full suite of additional software. Ubuntu server with plex? Absolutely impossible to use 1TB, unless your media is there. You must have made a mistake somewhere mounting other hard drives because it's clear that your media files are encroaching on this hard drive. FYI, /mnt, is a directory under /
    – Nmath
    Oct 10, 2020 at 21:13
  • Well, I certainly agree that there should be no way the system fiels and applications should take up a TB. /mnt, in this case, is only used for mounted drives so it shouldn't be taking up any of the system drive. That said, do you have a suggestion on how I could find the offending files?
    – c0c0c0
    Oct 10, 2020 at 21:17
  • 1
    my guess is that you're saving files to /mnt/somedir but /mnt/somedir is not actually a mount point for a hard drive so they are truly being stored under /mnt/somedir
    – Nmath
    Oct 10, 2020 at 21:26
  • 2
    That is exactly it. I have an empty mount I used for backups on a removable storage device. It has 877GB of files in it from what appears to be a botched backup. Mystery solved. Thanks for your help.
    – c0c0c0
    Oct 10, 2020 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .