Solved: root partion full?

If none of the more specific forums is the right place to ask

Solved: root partion full?

Postby No_windows » 2020-03-20 13:32

Jessie and Xfce

I started having problems with browser windows crashing and deleting cookies and such wasn't working. Then Synaptic didn't want to run, and I got "buss error" when starting it from a terminal window. I decided to reboot, even though I hate "fixing" things like that. It didn't work... I couldn't log in to my user account. I got an error about tmp being full. I tried logging in graphically as root, and was able to do that. I used Bleachbit and gained a little bit of space.... took / down from 100% to 99%.

I can now log into my user account, but / is way too high at 99%. It used to be around 1/2.

Google was giving my very old advice, and I think it was basically what Bleach-bit took care of... stuff related to apt/Synaptic.

How can I knock down this root partition?
Last edited by No_windows on 2020-03-20 17:06, edited 1 time in total.
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby CwF » 2020-03-20 14:29

How many old kernels are still installed?
CwF
 
Posts: 720
Joined: 2018-06-20 15:16

Re: root partion full?

Postby 4D696B65 » 2020-03-20 15:55

as root
Code: Select all
apt clean
User avatar
4D696B65
 
Posts: 2474
Joined: 2009-06-28 06:09

Re: root partion full?

Postby No_windows » 2020-03-20 16:22

4D696B65 wrote:as root
Code: Select all
apt clean


I got "invalid command clean"

I did an apt-get clean earlier, and it didn't do much.... still sitting at 99%
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby No_windows » 2020-03-20 16:23

CwF wrote:How many old kernels are still installed?


This change in capacity used was fairly sudden, I think. I don't think it's kernels, but how would I check that to be sure?
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby No_windows » 2020-03-20 16:27

A quick Google search yielded a way to check kernels.... looks like just one

Code: Select all
root@Holly:/home/buck# dpkg --list | grep linux-image
ii  linux-image-3.16.0-4-amd64            3.16.51-3                                   amd64        Linux 3.16 for 64-bit PCs
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby 4D696B65 » 2020-03-20 16:58

perhaps a runaway log? check /var/log/ it happened to me a long time ago..
User avatar
4D696B65
 
Posts: 2474
Joined: 2009-06-28 06:09

Re: root partion full?

Postby Head_on_a_Stick » 2020-03-20 17:01

https://packages.debian.org/jessie/ncdu

Be careful with it though, very easy to wreck your system by deleting critical files.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12296
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: root partion full?

Postby wizard10000 » 2020-03-20 17:05

Nobody recommended ncdu?

:mrgreen:

Install ncdu, run from terminal, enjoy the ncurses goodness.
Last edited by wizard10000 on 2020-03-20 17:06, edited 1 time in total.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 153
Joined: 2019-04-16 23:15
Location: southeastern us

Re: root partion full?

Postby No_windows » 2020-03-20 17:05

4D696B65 wrote:perhaps a runaway log? check /var/log/ it happened to me a long time ago..


I think I found it.... a file called "testfile" in root. It was over 5gb, and I took the chance of simply deleting it..... capacity restored!

I think it's from running this:
Code: Select all
time dd if=/dev/zero of=/root/testfile bs=3G count=3 oflag=direct


I had no idea it would keep the file. I found it on a site detailing a server I just acquired.

Thanks for all the help!
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby No_windows » 2020-03-20 17:10

Head_on_a_Stick wrote:https://packages.debian.org/jessie/ncdu

Be careful with it though, very easy to wreck your system by deleting critical files.


This machine will be going down soon, as I've recently acquired another computer that will be getting Buster... or possibly MX. I didn't want to lose my current machine beforehand, However. I'll poke around this machine with ncdu, and maybe even break it purposely, after I've "moved".
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Re: root partion full?

Postby wizard10000 » 2020-03-20 18:09

No_windows wrote:
Code: Select all
time dd if=/dev/zero of=/root/testfile bs=3G count=3 oflag=direct


Most excellent you got it fixed.

Wiz' PSA of the day: If you don't know what it's supposed to do don't do it.

:mrgreen:

No_windows, no disrespect; I'm really trying to share learnings with users and lurkers and not you in particular. You were just the unfortunate person who starting me thinking :)

Mistakes are excellent teaching tools if you choose to leverage them. If we look at the command above there are two real issues.

One, dd is pulling data from /dev/zero and writing zeroes to the hard drive <ignorethispart> but there's nothing in the dd string that gives dd any clue at all about when it's supposed to stop writing data so it decided to continue to write data until your root partition was full. </ignorethispart>

edit: I didn't thoroughly understand the command I cited above and God(dess) got me for that (see HoaS' comment below). Follow your own advice, Wiz.

:)

Two, there's also nothing in the command string that would tell the system to remove the file it had created.

Terry Lambert's words:

It is not Unix' job to stop you from shooting your foot,
if you should decide to do so it is Unix' job to deliver Mr. Bullet to Mr. Foot
in the most efficient way it knows.


Okay. apologies if I sound preachy and I'm about to quit doing that :wink:

Every single one of us has made this mistake; almost all of us have made it many, many times. Understand what the command does before you execute it. If you don't make the effort to understand it may very well turn out okay, it might cause Catastrophic Breakage and you have all the power here.

Think Russian Roulette. Am I gonna spin the cylinder before I pull the trigger or am I gonna take the bullet out first? :mrgreen:

One other thing that might help immensely and then I'll get off my soapbox is Back Your Stuff Up Before You Edit It. Almost all Linux text editors support automatically creating a backup of any file you edit and if you can put it back the way it was before you started messing with it you can do pretty much anything you want :mrgreen:

cheers -
Last edited by wizard10000 on 2020-03-20 18:52, edited 2 times in total.
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 153
Joined: 2019-04-16 23:15
Location: southeastern us

Re: root partion full?

Postby Head_on_a_Stick » 2020-03-20 18:15

wizard10000 wrote:there's nothing in the dd string that gives dd any clue at all about when it's supposed to stop writing data

Well actually there is:
Code: Select all
bs=3G count=3

So it would have stopped at a mere 9GiB of zeros.

+1 for everything else you said though :)
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12296
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: root partion full?

Postby wizard10000 » 2020-03-20 18:42

Head_on_a_Stick wrote:So it would have stopped at a mere 9GiB of zeros.


Oops.

:roll:

I think God(dess) does that to me on purpose to keep me humble; I can get a little preachy :D
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 153
Joined: 2019-04-16 23:15
Location: southeastern us

Re: Solved: root partion full?

Postby No_windows » 2020-03-21 12:02

Here's a dumber thing I did apparently. In my rush to delete un-needed things I deleted my Thunderbird profile and wiped out all my old emails. I was deleting files from packages that I've uninstalled. I think it was labeled as icedove. I could use my 5 year old profile from when I installed Jessie, but I probably won't.
No_windows
 
Posts: 505
Joined: 2015-08-05 03:03

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable