1

I've got three drives one for /home, one for backups in /mnt, and a Nvme drive for boot which is showing as full. I have no idea whats filling it. So far I've tried all the clear/cleaning commands I can find but only managed to clear about 5% of the drive. I'm not sure where or what else to check.

Heres the df -h output and partitions list:

df -h: https://pastebin.com/aTB4KcsB

df -ha: https://pastebin.com/JnFBpgMT

sudo du /* -sch: https://pastebin.com/PhHShWHg

Lmk if you need more

Lorenz Keel
  • 8,362
  • 8
  • 36
  • 49
Geekmakes
  • 21
  • 5
  • 2
    use Disk Usage Analyzer / `baobab` (GUI) or `ncdu` (CLI) to find what is eating up your space. – pLumo Sep 04 '20 at 20:31
  • If you recently deleted any large files, try running `sync && sync && sync`. Or maybe try rebooting the system. – Terrance Sep 04 '20 at 20:38
  • Check /var/log - when a partition suddenly grows, it's usually logs. You can also use `du /path/to/check` to find display disk usage. Next, find out what's spamming the logs, and search for a fix. – Artur Meinild Sep 04 '20 at 20:38
  • Deleted the whole /var/log file and got about 5% of space. – Geekmakes Sep 04 '20 at 20:43
  • For du don't use -h. It doesn't sort by size. Use `du / -x -d5| sort -n` This wll put your greedy directories at the bottom of the list. You can dig deeper by searching the greedy directories themselves. – Stephen Boston Sep 04 '20 at 20:43
  • `/var/log` is a directory, not a file. There are different log files in that dir that you should have a look at. If the log files are unusually large, it doesn't really help to delete them, you must find out what's causing the issue. – Artur Meinild Sep 04 '20 at 20:47
  • Alright, here's the output: https://pastebin.com/zdvpJ4Mz Still new to this so not sure whats safe to remove. – Geekmakes Sep 04 '20 at 20:47
  • Looks like that's nowhere near the 220 GB used. – Artur Meinild Sep 04 '20 at 20:50
  • The mounts at /mnt and /home totally hide what's really in the root under those directories. umount what's there and use du on the exposed /home and /mnt – ubfan1 Sep 04 '20 at 21:44
  • not sure I follow @ubfan1 – Geekmakes Sep 04 '20 at 21:55
  • See https://unix.stackexchange.com/questions/4426/access-to-original-contents-of-mount-point for another way to check what's under the mount. If your /home without a mount was full, a mount might make more space available, but does not free up the original contents, which still take up space, invisibly. – ubfan1 Sep 04 '20 at 22:01
  • `baobab` is a tool with a graphical user interface for this purpose. See [this link](https://askubuntu.com/questions/929165/disk-usage-on-ubuntu-find-the-largest-sized-directory-or-file/929203#929203) – sudodus Sep 05 '20 at 12:53

2 Answers2

1

I umounted the backup from /mnt/backup and then checked /mnt/backup if there was any data left sure enough the 200gbs showed up. After removing that the server started right up Thanks for the help y'all :D

Geekmakes
  • 21
  • 5
0

You can use ncdu to find out which folder(s) is/are using so much disk space:

sudo apt install ncdu
ncdu /

This will scan your root partition (it may take a few minutes), and then display all directories in / and how much disk space the contents of each directory consumes. You can descend into the directories that take up a lot of disk space to pinpoint the exact directories you're looking for.

Malte Skoruppa
  • 12,856
  • 5
  • 56
  • 65
  • I can't seem to install anything atm, all I'm getting is "E: Unable to locate package ncdu " – Geekmakes Sep 04 '20 at 20:40
  • You don't need ncdu, you can use `du /path` – Artur Meinild Sep 04 '20 at 20:45
  • du /path "du: cannot access '/path': No such file or directory" – Geekmakes Sep 04 '20 at 20:56
  • 1
    @Geekmakes If you can't install anything, that seems to be an entirely different problem. You may want to create a separate question for that. `ncdu` is a tool that will calculate the disk usage of each directory recursively, allowing you to look for the directory that's taking up a lot of space very comfortably. What Arthur is likely refering to is the fact that in principle, you can du the same with `du` - albeit much less comfortably. You shouldn't enter `/path` literally, but rather the path you want to have a closer look at. That would probably be `/` in your case, i.e., `du /`. – Malte Skoruppa Sep 04 '20 at 21:02
  • Got ncdu installed, https://pastebin.com/eMeK73pS may have not entered the right directory. Only showing 46mb? – Geekmakes Sep 04 '20 at 21:14
  • @Geekmakes When you run ncdu, try running it as `ncdu -x /` so that it doesn't cross over to other file systems and only pulls from the root drive. – Terrance Sep 07 '20 at 15:23