Root is full

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Root is full

Post by trope » Thu Nov 15, 2018 12:36 am

I received a message (Tara) that root is full. How do I check which files/directories are in root and which files are taking up the space so that I can fix the problem?

Secondly how do I resolve the apparent discrepancy that according to "df -h" the root is 30 GB, but in the Disk Usage Analyzer, it looks like the root is 238.2 GB?

df -h

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M  1.5M  384M   1% /run
/dev/sdb2        30G   28G  734M  98% /
tmpfs           1.9G   38M  1.9G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb1       549M   15M  535M   3% /boot/efi
tmpfs           386M   28K  386M   1% /run/user/1000
/dev/dm-0       687G  210G  443G  33% /media/me/data
Attachments
Screenshot at 2018-11-14 23-32-03.png

User avatar
all41
Level 13
Level 13
Posts: 4998
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Root is full

Post by all41 » Thu Nov 15, 2018 3:24 am

There are two devices/partitions mounted in /media
Navigate to /media or /media/username and right-click on the entries. Under the permissions tab
who is the owner of the devices/partitions mounted there?
root?
Proud to be a supporter and monthly contributor to Mint.

User avatar
administrollaattori
Level 15
Level 15
Posts: 5659
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Root is full

Post by administrollaattori » Thu Nov 15, 2018 3:48 am

LVM is use?

Code: Select all

cat /proc/mdstat
If yes, then clear APT cache and remove old Kernels

Code: Select all

apt clean
https://puolanka.info/goto/to-remove-old-kernels/

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Fri Nov 16, 2018 2:52 pm

Shortly after I made the last post I completely ran out of space (had message that 0 bytes left in root) and then very basic applications stopped working. I tried to restore using timeshift which maybe was not the best idea because I don't know that the process would clear any space in root. I then could not get back into Mint and had to reinstall the OS.

I found out that dm refers to a logical volume and using the Disks utility I can see that it is located on sda, which is a 750 GB hard drive. Root is on sdb. So is the idea that everything has to be mounted somewhere (ie root) even if it is actually located elsewhere, and I was misled by what the Disk Usage Analyzer was showing?

How do I find out what is now stored in root? After the reinstall it shows:

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M  1.5M  384M   1% /run
/dev/sdb2        30G   11G   18G  38% /
tmpfs           1.9G   69M  1.9G   4% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb1       549M   17M  533M   3% /boot/efi
tmpfs           386M   92K  385M   1% /run/user/1000
/dev/dm-0       687G  210G  443G  33% /media/me/data
I am going to start over on a new laptop, is 30G enough for root? Since I reinstalled Mint in the same location unfortunately I don't know what was taking up the space before, but I'm wonder if it was something that wasn't supposed to be there since I use a separate data partition and there's not supposed to be much in /home.

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Fri Nov 16, 2018 2:57 pm

Also, since sda is a 750 GB hard drive, and dm-0 is 687 GB, what happened to the other 63 GB? How do I find this out? Thanks for all the help.

DAMIEN1307
Level 6
Level 6
Posts: 1238
Joined: Tue Feb 21, 2017 8:13 pm
Location: Alamogordo, New Mexico, USA

Re: Root is full

Post by DAMIEN1307 » Fri Nov 16, 2018 3:12 pm

you seem to have quite alot of "media" on your hardrive...94.4% of your entire HD was being used just for "media" before your re-install according to you disk usage analyzer posting.
ORDO AB CHAO

User avatar
Pjotr
Level 20
Level 20
Posts: 11064
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Root is full

Post by Pjotr » Fri Nov 16, 2018 3:19 pm

Did you ever use BleachBit? That software wrecking ball can cause something similar, when you abort it before it has finished.
Tip: 10 things to do after installing Linux Mint 19 Tara
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Fri Nov 16, 2018 4:54 pm

Pjotr wrote:
Fri Nov 16, 2018 3:19 pm
Did you ever use BleachBit? That software wrecking ball can cause something similar, when you abort it before it has finished.
No, I have not used BleachBit.
DAMIEN1307 wrote:
Fri Nov 16, 2018 3:12 pm
you seem to have quite alot of "media" on your hardrive...94.4% of your entire HD was being used just for "media" before your re-install according to you disk usage analyzer posting.
At the top of the disk usage analyzer I posted, I have > 500 GB free space. From the output of "df -h" I posted above, my data partition, which is basically the entire HD, is for some reason mounted on /media/me/data, which I think is mounted under root. Which was exactly my question, I don't understand the linux naming conventions. But since /media/me/data is on sda, and "root" is on sdb, I don't think that "media" has anything to do with the problem of not enough space on root.

So I am back to the original question, how do I find out what is the 11 GB right now on root? So that if it gets bigger in the future I would be able to check what is there? And since sda is a 750 GB hard drive, and dm-0 is 687 GB, what happened to the other 63 GB?

I wonder if the space problem could have been Timeshift. At one point after I rebooted I had the same experience of entering my password and not being able to log into Mint:
viewtopic.php?t=270658#p1519634

Planet33
Level 1
Level 1
Posts: 12
Joined: Thu Oct 04, 2018 1:19 pm

Re: Root is full

Post by Planet33 » Sat Nov 17, 2018 12:46 am

How often is time shift making back ups? I use timeshift manually to avoid backups eating up to much space.

You can check if a timeshift image is the 11GB. The timeshift images are hidden and are stored as root. You have to go through timeshift to see them. The image I have is somewhere around that. I’ve only created one image thus far. Very much in a learning process myself.

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Sat Nov 17, 2018 1:36 am

It was 11 GB when I last posted but now it is already up to 13 GB. I am not running Timeshift on this new system.

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M  1.5M  384M   1% /run
/dev/sdb2        30G   13G   16G  44% /
tmpfs           1.9G   33M  1.9G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb1       549M   17M  533M   3% /boot/efi
tmpfs           386M   72K  385M   1% /run/user/1000
/dev/dm-0       687G  210G  443G  33% /media/me/data
Is there no way to check what is in /dev/sdb2? It doesn't seem possible. I don't see anything called "sdb2" in the file manager.

User avatar
Pjotr
Level 20
Level 20
Posts: 11064
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Root is full

Post by Pjotr » Sat Nov 17, 2018 7:26 am

Installed any Flatpaks?
Tip: 10 things to do after installing Linux Mint 19 Tara
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Sat Nov 17, 2018 12:09 pm

Pjotr wrote:
Sat Nov 17, 2018 7:26 am
Installed any Flatpaks?
No, I have not used Flatpaks.

Surely there is a linux command to see what files/directories are in sdb2, and sort them by size?? Seems like a very basic function.

User avatar
phd21
Level 17
Level 17
Posts: 7514
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Root is full

Post by phd21 » Sat Nov 17, 2018 1:02 pm

Hi trope,

I just read your post and the good replies to it. Here are my thoughts on this as well.

Did you "put /tmp on tmpfs" in ram memory? If so, disable that, reboot, and see if you still have a problem.

Speed up your Mint 19! - Easy Linux tips project
https://sites.google.com/site/easylinuxtipsproject/3
How to undo tmpfs
8.1. Do you wish to undo tmpfs? Then copy/paste this line into the terminal:

Code: Select all

sudo rm -v /etc/systemd/system/tmp.mount
Press Enter. Type your password when prompted; your password will remain entirely invisible, not even dots will show when you type it, this is normal. Afterwards, reboot your computer.

Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
Flemur
Level 16
Level 16
Posts: 6287
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Root is full

Post by Flemur » Sat Nov 17, 2018 1:55 pm

trope wrote:
Fri Nov 16, 2018 4:54 pm
From the output of "df -h" I posted above, my data partition, which is basically the entire HD, is for some reason mounted on /media/me/data, which I think is mounted under root. Which was exactly my question, I don't understand the linux naming conventions. But since /media/me/data is on sda, and "root" is on sdb, I don't think that "media" has anything to do with the problem of not enough space on root.
That's a shortcoming of the filesystem structure inherited from Unix: the highest level of **everything** (/home=user data, and /mnt or /media="data data") is parallel to the OS, e.g. /usr, /lib, /etc etc.

/mnt = a data partition:

Code: Select all

$ sudo du / -d 1  
12948	/bin
268	/root
...
53297072	/mnt
...
Adding "-x" = -x, --one-file-system = "skip directories on different file systems", fixes it:

Code: Select all

sudo du /  -x -d 1
With "find" it's...different, of course:

Code: Select all

 -xdev  Don't descend directories on other filesystems.
so if you're looking for some system file with "the" in the name

Code: Select all

sudo find / -xdev -name "*the*"
won't look thru all the files on /mnt
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
Flemur
Level 16
Level 16
Posts: 6287
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Root is full

Post by Flemur » Sat Nov 17, 2018 2:02 pm

trope wrote:
Sat Nov 17, 2018 1:36 am
It was 11 GB when I last posted but now it is already up to 13 GB. I am not running Timeshift on this new system.

Code: Select all

/dev/sdb2        30G   13G   16G  44% /
Is there no way to check what is in /dev/sdb2? It doesn't seem possible. I don't see anything called "sdb2" in the file manager.
It's called "/"

This will tell you about file usage on sdb2, for just one directory level down:

Code: Select all

sudo du /  -x -d 1
or get fancy and sort it:

Code: Select all

sudo du /  -x -d 1 | sort -n 
The most common **system** (not user) places to get bloated are
/boot = too many kernels
/var/log = giant log file(s) from some error that keeps repeating. <-- Your symptoms imply this one
/var/cache/apt/archive = the .deb files you've been updating from.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Planet33
Level 1
Level 1
Posts: 12
Joined: Thu Oct 04, 2018 1:19 pm

Re: Root is full

Post by Planet33 » Sat Nov 17, 2018 2:46 pm

sdb2 appears to be your linux installation mount point. So looking at the file system folder files should give you an idea.

Those files should be viewable via home folder on desktop>file system>I have about a dozen folders there and if I right click them I can look at each ones size in properties. Again, I'm new to this as well so if I'm just stating the obvious...

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

Re: Root is full

Post by trope » Sun Nov 18, 2018 2:17 pm

Planet33 wrote:
Sat Nov 17, 2018 2:46 pm
sdb2 appears to be your linux installation mount point. So looking at the file system folder files should give you an idea.

Those files should be viewable via home folder on desktop>file system>I have about a dozen folders there and if I right click them I can look at each ones size in properties. Again, I'm new to this as well so if I'm just stating the obvious...
Flemur wrote:
Sat Nov 17, 2018 2:02 pm
trope wrote:
Sat Nov 17, 2018 1:36 am
It was 11 GB when I last posted but now it is already up to 13 GB. I am not running Timeshift on this new system.

Code: Select all

/dev/sdb2        30G   13G   16G  44% /
Is there no way to check what is in /dev/sdb2? It doesn't seem possible. I don't see anything called "sdb2" in the file manager.
It's called "/"

This will tell you about file usage on sdb2, for just one directory level down:

Code: Select all

sudo du /  -x -d 1
or get fancy and sort it:

Code: Select all

sudo du /  -x -d 1 | sort -n 
The most common **system** (not user) places to get bloated are
/boot = too many kernels
/var/log = giant log file(s) from some error that keeps repeating. <-- Your symptoms imply this one
/var/cache/apt/archive = the .deb files you've been updating from.
Yes, quite right, these last commands are very close to me finding out where the space is being used. Is there a shortcut command so I do not have to right click on every folder to check its size, in multiple top-level folders? Eg, I would like to know the largest files and subdirectories under "/".

I did not understand your second to last post, but would be interested, eg, what does it mean that " the highest level of **everything** (/home=user data, and /mnt or /media="data data") is parallel to the OS, e.g. /usr, /lib, /etc etc". My understanding is that there are 2 ways to look at everything, where the data is actually stored, and where it is mounted?

User avatar
Flemur
Level 16
Level 16
Posts: 6287
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Root is full

Post by Flemur » Sun Nov 18, 2018 3:00 pm

trope wrote:
Sun Nov 18, 2018 2:17 pm
Yes, quite right, these last commands are very close to me finding out where the space is being used. Is there a shortcut command so I do not have to right click on every folder to check its size, in multiple top-level folders? Eg, I would like to know the largest files and subdirectories under "/".
Don't bother with a file-browser, it's too slow.

This will show you all the files in your OS, sorted by size:

Code: Select all

sudo du /  -ax | sort -n 
...and the containing directories will be at the end.

This will show you all the directories in your OS, sorted by size:

Code: Select all

sudo du /  -x | sort -n 
This one will show the top-level directories using the most space:

Code: Select all

sudo du /  -x -d 1 | sort -n 
-a = show all files, not just directories.
-d 1 = go down one directory level
-x = stay on the file system (= the same partition...don't look in partitions mounted to, say, /mnt or /media). Of course that can cause you problems if /home or /boot are a separate partitions.

You can also

Code: Select all

sudo du /var   | sort -n 
sudo du /boot  | sort -n 
to just look at /var or /boot.
I did not understand your second to last post, but would be interested, eg, what does it mean that " the highest level of **everything** (/home=user data, and /mnt or /media="data data") is parallel to the OS, e.g. /usr, /lib, /etc etc". My understanding is that there are 2 ways to look at everything, where the data is actually stored, and where it is mounted?
Where it's mounted is what counts because that's how you access the files; say your OS is on /dev/sda1, and your data (movies and music, etc) is on /dev/sda2: the two partitions are "parallel" to each other (one does not contain the other), but when you mount sda2 to, say, /mnt/data, now it *is* "under" "/", along with /usr and the rest of the OS, and simple operations (like "find" or "du") will look in /usr and /mnt...because they're both under "/".

Edit:
Your "/" is /dev/sdb2, mounted to "/"
your data is /dev/dm-0, mounted to "/media/me/data"

In windows, I think, this isn't an issue: an added D: partition (e.g. an ntfs-formatted sda2 parition for data) isn't mounted under "C:", like "C:\D:", so when you look for files in C: it doesn't include D:, and vice-versa (though their actual searching might be weird...probably). Windows has some point ("My Computer") that is "above" both C: and D:.

But in linux the equivalent of D:, say sda2 with data and no OS, gets mounted to some mount-point that's under "/"...because everything is under "/". "/" = "My Computer"
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

trope
Level 3
Level 3
Posts: 194
Joined: Tue Feb 19, 2013 1:10 pm

[SOLVED] Re: Root is full

Post by trope » Tue Nov 20, 2018 1:41 pm

Thanks, I solved it, these commands are great.

The file manager only shows the size of non-hidden files! So I was getting totally wrong information. Using the commands you posted I found 5 GB of hidden files from a dropbox-like service.

Post Reply

Return to “Newbie Questions”