LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-31-2010, 05:00 PM   #1
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Rep: Reputation: 16
how to cleanup root file system


Hi everyone;

I have a problem that is probably simple, but have not yet found the answer on any forums or by Googling. First my system specs:

Tyan 2610 motherboard w/ 2 x PIII 933
4 gig PC133 SDRAM
1 x 5 gig hd (system)
4 x 500 gig hds w/ 3Ware 7500 controller set to RAID 5, (1.5 TB) mounted as /home
CentOS 5.3 running my smb and nfs mounts

My problem is that I have run out of space on my / (root) file system, (the 5 gig). Since I am planing to rebuild my file server with larger hard drives, (2 x's 60 gig SATA's set to RAID 1, 6 x's 1.5 TB at RAID 5), within the next 2 months, I would like to try to clean out any unneeded crap rather than adding a hard drive and expanding my root file system. I have done the following:

Removed old unused kernels
cleaned up /var/log/
cleaned up /tmp

I have tried to check my disk space usage with the following commands: (output included)

[root@hydra]$ df -h
\Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
3.9G 3.2G 490M 87% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1.5G 0 1.5G 0% /dev/shm
/dev/sdb1 1.4T 1.1T 340G 76% /home

[root@hydra]$ du -ks /var/* | sort -nr | head
75556 /var/cache
60136 /var/lib
31296 /var/log
30364 /var/clamav
18380 /var/spool
9640 /var/www
224 /var/run
84 /var/webmin
36 /var/lock
32 /var/empty

[root@hydra /]$ du --max-depth=1 -x -h /
8.0K /selinux
0 /misc
8.0K /mnt
78M /lib
0 /net
0 /proc
128M /etc
8.0K /media
132M /opt
5.3M /root
194M /var
2.7G /usr
84K /tmp
29M /sbin
8.0K /srv
4.0K /home
0 /sys
7.2M /bin
2.0K /boot
16K /lost+found
0 /dev
3.2G /

Going into my /usr and running du --max-depth=1 -x -h / gives me this:

[root@hydra usr]$ du --max-depth=1 -x -h /
8.0K /selinux
0 /misc
8.0K /mnt
78M /lib
0 /net
0 /proc
128M /etc
8.0K /media
132M /opt
5.3M /root
194M /var
2.7G /usr
84K /tmp
29M /sbin
8.0K /srv
4.0K /home
0 /sys
7.2M /bin
2.0K /boot
16K /lost+found
0 /dev
3.2G /


I have gone through /var/cache and and /var/log and deleted anything that I felt would not break my OS by deleting, I did not touch /usr yet, (I want to do more research before tampering there!!), but I am still getting this error:

[root@hydra VM Ware]$ rpm -ivh VMware-server-2.0.2-203138.i386.rpm
Preparing... ########################################### [100%]
installing package VMware-server-2.0.2-203138.i386 needs 233MB on the / filesystem

Does anyone have any suggestions on how I can clean up about 300 MB more of disk space?

Thanks

zog

Last edited by zogthegreat; 01-31-2010 at 05:09 PM.
 
Old 01-31-2010, 05:17 PM   #2
funnyG
LQ Newbie
 
Registered: Jun 2004
Location: Germany
Distribution: Slackware 12.2
Posts: 23

Rep: Reputation: 20
Hello zog,

since most of your disk space seems to be occupied by the /usr directory, you might find some software packages that you do not really need anymore. Try to use your package manager to find out the really big software packages installed on your root or use "du" on your /usr directory with the parameters you have used before.

funnyG
 
Old 01-31-2010, 05:54 PM   #3
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi funnyG,

I don't have a GUI installed on my machine. I managed to delete some unused kernel sources under /user/src/kernel that gave me an extra 100 MG. If you have any other suggestions, I would be happy to listen.

Thanks

zog
 
Old 01-31-2010, 06:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well ... I'd be looking at
rpm -qa
and decide whether there's stuff installed you don't need/want.

I find it hard to believe that a headless machine needs 2.7GB
in /usr ...
 
  


Reply



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
i cannot copy a file to a folder in file system with my root account realbezo Linux - Newbie 4 03-03-2009 10:45 PM
System hangs on boot - "Mounting root file system" fails with Via VT6410 enabled Eagleorn Linux - Hardware 3 09-21-2006 12:58 PM
Root file system vishalbutte Programming 1 02-12-2006 04:26 PM
Boot Error: Root file system /dev/root adtomar Linux - Networking 0 12-27-2004 10:50 AM
systemwide bash login shell cleanup file markus1982 Linux - General 2 05-10-2003 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration