1

I'm new to the linux file system and need help. I have four partitions on my disk:

  • /boot is 1GB (/dev/sdb1)
  • /swap is 2GB (/dev/sdb2)
  • / is 10GB (/dev/sdb3)
  • /home is 227GB (/dev/sdb4)

My root folder is almost full and I keep getting a warning message. I have two questions regarding this file system:

  1. Is the root partition supposed to keep filling up past 10GB?
  2. Is the way my disk partitioned correct?

I've seen suggestions of using the command apt-get autoremove --purge to clean up some space in the root folder. It removed 76MB and my root folder is still 90% full. I saw this post: What do I do when my root filesystem is full? but I didn't understand what the person who answered was trying to accomplish with the other commands. I ran them and had no idea what I was looking for or doing.

Note: I have windows installed on a separate hard drive. I don't know if that has anything to do with it, but I have the option of running ubuntu or windows when I start up my computer.

OS: Ubuntu 20.04

Update: Alright I'm not sure why I had a separate partition for my /home folder but that's what was recommended on some article's tutorial when I first installed ubuntu. That's also where I was recommended 10GB for the root ( / ) folder, which is nowhere near enough. I've since installed a fresh image of ubuntu and left the drive allocation on default. Now, everything is in the root ( / ) folder except for a Microsoft reserved partition and the EFI system partition (since I have windows installed on another disk and use dual boot). Thanks for the feedback

notAdev313
  • 11
  • 3
  • 2
    There's a difference between REAL Filesystem Root Directory (/) and the Root User's Account Directory (/root). The latter is almost always empty on an Ubuntu system, since the root account login is disabled. Be super-clear in your question about which one you are talking about. – user535733 Mar 12 '21 at 17:21
  • What is /root supposed to be? and where is /? – Rinzwind Mar 12 '21 at 17:25
  • You probably did not mean /root, right? You meant / instead, right? The command lsblk -e 7 could clarify this. Please edit your question and include the command's output in the text body. – Levente Mar 12 '21 at 17:25
  • 2
    Opinion: A separate /boot partition is generally needed only for encrypted installs. A separate /swap partition is generally needed only for hibernation (most folks use swapfiles nowadays). Both those uses can risk data loss on a dual-boot system if (accidentally) misused, so they seem unnecessary. The Ubuntu Desktop installer's defaults are sane, safe, and sensible for most users precisely to avoid such confusion. – user535733 Mar 12 '21 at 17:30
  • Anyways, assuming that you meant /, as in root filesystem and not the root user's home directory, then the answer is yes, 10GB for the root filesystem is definitely too small. The actually used space in my / (root filesystem) is now 14GB. I see that the disk is small overall and you are trying to save space, but I still would say anything below 30GB (still considered extremely tight space) for the root filesystem is just postponing a similar overfill in the future. – Levente Mar 12 '21 at 17:54
  • You haven't said what OS & release you're talking about, esp. the system installed. The recommended minimum for Ubuntu Desktop for example is 25GB and has been since before Ubuntu 17.10 (ie. all releases post 17.04). https://help.ubuntu.com/community/Installation/SystemRequirements Please provide details (edit your question & correct) – guiverc Mar 12 '21 at 21:39
  • Yes sorry I meant " / " not " /root ". Thank you all for your inputs! I'm going to attempt to resize the partition or just do a fresh install – notAdev313 Mar 14 '21 at 05:12

1 Answers1

1

This is usually because /var is not on its own partition. Most logs get written there and if / is too small then just normal system activity will fill up the root filesystem with logs.

However, you can find out where the space has been used by running something like:

du -sh /*

If /var, you can put it in its own partition, figure out which logs are balooning and fix the cause(s), or just get aggressive about rotating your logs frequently.

AgentSmith
  • 21
  • 3