LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 10-19-2007, 04:54 AM   #1
rwhitworth
Member
 
Registered: Dec 2002
Location: Guildford, UK
Posts: 43

Rep: Reputation: 15
Disk full - what do I do now?


Running SUSE 10.2, with a well-established and stable system.

Somehow, and unexpectedly, my root partition has become full.

/home is on a separate partition with plenty of space, so that isn't the problem.

I can no longer run KDE - it just bombs out back to the log-in screen.

The question is: what should I look for to throw away, and regain some disk space?

Last edited by rwhitworth; 10-19-2007 at 06:26 AM.
 
Old 10-19-2007, 04:59 AM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Look in /var/log for excessively large log files. Perhaps a find command mixed with du might give you an idea of which your worst offenders are. Something like:
Code:
find / -exec du {} \; | sort -nr | head -n20
will give you your top 20 largest directories. Change the / in the find command to a specific directory, such as /var, for example.
 
Old 10-19-2007, 05:11 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,776

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
If you are not in the habit of clearing out cache folders and old logs, it's time to do some housecleaning.

Boot into runlevel 3.

In your home folder, run 'ls -a | less'. Look for the hidden folders (.kde, .thumbnails, etc). Look into all of the hidden folders for cache folders, and empty them. .thumbnails doesn't have folders; all the files are cached files. Delete them.

Then cd to /var/log. If you have logrotate working, you will have old rotated logs you can delete. Look for .gz, .old, and similar logs you can delete.

For the rest of the logs, run 'ls -l' and take note of the file sizes. Large logs can be cleared with '/dev/null > filename' which empties the named file.

After you have created a bit of room for kde to load the necessary files in /tmp, you should be able to 'init 5' and get back into GUI mode.
 
Old 10-19-2007, 06:25 AM   #4
rwhitworth
Member
 
Registered: Dec 2002
Location: Guildford, UK
Posts: 43

Original Poster
Rep: Reputation: 15
Good suggestions, but...

I've checked the log files, and there is nothing large in there.

Caches, etc, are in the /home partition, and that isn't the one that is full (unless there are some other caches elsewhere)?

What next?
 
Old 10-19-2007, 06:53 AM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,776

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
/tmp

Delete .tmp files. Also delete things that seem to be temporary in nature. Leave alone folders which pertain to users, sockets, etc.
 
Old 10-19-2007, 07:33 AM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
The usual offender for filespace usage is /var, which contains "variable" (i.e. data) files, used for databases, caches and so on.

Since you didn't say what software the box runs, I don't know if we're talking about a database server or web+email workstation, so that makes it hard to guess exactly what might be taking up space on your disk.

You can find out how much disk space a directory takes up, including subdirectories, by running
Code:
du -sh /var
(replace /var with the directory you want to look at).

/var/log contains log files that grow over time; you can use logrotate to truncate and delete them periodically if that's your problem.

Hope that's of some help,

—Robert J Lee

Edit: You may want to run
Code:
du /var/log/ | sort -nr | less
This will take a while but it will list the largest directories/subdirectories so you can see where your space is going. Press q to exit less.

Last edited by rjlee; 10-19-2007 at 07:36 AM.
 
Old 10-20-2007, 09:10 AM   #7
rwhitworth
Member
 
Registered: Dec 2002
Location: Guildford, UK
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks for the suggestions, but I ended up with a more radical solution. I've started afresh with a clean Suse 10.3 install, and given it much more space this time.

Because all my data is on a separate partition, it wasn't too painful to restart with a clean install.
 
Old 10-20-2007, 10:00 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,374
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Quote:
Originally Posted by rwhitworth View Post
I ended up with a more radical solution.
Bit of a shame to pass up on such an opportunity, innit? First of all that was totally unnecessary (different ways to fix it where given) and secondly you managed to *not* learn more about *why* this happened and *how* to manage it properly...
 
Old 10-21-2007, 01:19 AM   #9
Scribbler
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
Actually, his solution was probably inevitable in the long run.

One quirk of the openSuSE installation, is that it defaults to a smaller root partition and a large (actually...Huge in comparison) /home partition. It also defaults to the root and /usr on the same partition... which is where a lot of SuSE users get hungup since most packages installed will fill that partition rapidly.

People new to linux, or simply inattentive users, don't realize that if they are installing linux on a machine used as a desktop workstation (as opposed to building a network server) then they should either A) have a large root partion if /usr is sharing the partition and a somewhat smaller /home partition, or B) have a small root partion, a moderately sized /usr partition, and a /home partion. Of course it's usually nice to keep /var on a separate partition as well other directories, but on a home desktop environment, that usually gets to be pretty moot.

openSuSE's installation really should give you different proposals based on what you'll be using the machine for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk full... cactusface Linux - Newbie 5 08-02-2007 03:48 PM
disk full when it isn't pete-wilko Linux - Newbie 14 06-17-2006 10:36 AM
disk stats not updating after deletion of file.. disk full joecool118 Linux - General 2 04-10-2006 12:23 PM
Logged out saying disk is full ... learner01 Linux - Newbie 1 01-29-2006 02:22 AM
df shows disk almost full, can't see why mhath Linux - General 6 12-14-2005 08:55 PM


All times are GMT -5. The time now is 11:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration