LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2005, 11:01 AM   #1
rpersaud
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
Unhappy Running out of disk space


I am new to Linux, and have setup LAMP on Mandrake 8.1 on a 8 GB harddrive, that was already partitioned by someone (unknown).

I also have Jakarta Tomcat installed, and normally, I would delete the log files from both Apache2 and Tomcat to get more available space on the root partition. Lately, the disk space becomes less available I haven't been able to identify why - but its not related to the log files from Apache2 or Tomcat since they're all deleted.

Searching google and related forums here didn't help me. So, using suggestions from related posts here to provide yall with information:

#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 3.4G 3.2G 88M 98% /
none 62M 0 61M 0% /dev/shm
/dev/sda6 4.7G 923M 3.8G 19% /home

#fdisk -l
Disk /dev/scsi/host0/bus0/target2/lun0/disc: 255 heads, 63 sectors, 1106 cylinde
rs
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id
System
/dev/scsi/host0/bus0/target2/lun0/part1 * 1 446 3582463+ 83
Linux
/dev/scsi/host0/bus0/target2/lun0/part2 447 1107 5304585 5
Extended
/dev/scsi/host0/bus0/target2/lun0/part5 447 477 248976 82
Linux swap
/dev/scsi/host0/bus0/target2/lun0/part6 478 1107 5055546 83
Linux

#cat /proc/partitions
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse runni
ng use aveq

8 0 8887080 scsi/host0/bus0/target2/lun0/disc 7881228 9173654 13634930
8 28455420 3959908 4838074 70658512 5166798 0 40578600 33626688
8 1 3582463 scsi/host0/bus0/target2/lun0/part1 7637227 8852597 1319192
82 25834850 3064757 3859108 55641816 8397221 0 37465370 34232581
8 2 1 scsi/host0/bus0/target2/lun0/part2 0 0 0 0 0 0 0 0 0 0 0
8 5 248976 scsi/host0/bus0/target2/lun0/part5 79046 186036 2120656 58
9230 37960 147639 1578072 2239500 0 807620 2831560
8 6 5055546 scsi/host0/bus0/target2/lun0/part6 164950 134990 2309298 2
033370 857191 831327 13438624 37480420 0 13825760 39514420

I hope this helps, if not, please advise on how I may better help myself resolve this issue. Thanks!~
 
Old 05-17-2005, 02:08 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Welcome to LQ.

Try using du to find what directories are using all of your space:
du -hs /tmp
du -hs /var
du -hs /usr
etc

You could check them all at the same time with:
cd /
du -hs *

but the ones I gave at the top are the most likely. Once you find one that is obviously bigger than it should be you can cd into that directory and repeat the procedure for the directories below it.
 
Old 05-17-2005, 02:50 PM   #3
rpersaud
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for responding!

FYI, I find this site extremely helpful by just browsing.

Using the du -hs * suggestion above, it shows that my /usr folder is 1.7G. Using the same command in this folder, I yield these results:

102M bin
4.0K etc
20K games
26M include
368M lib
44K libexec
362M local
16M sbin
538M share
165M src
0 tmp

What I need to know is what am I allowed to delete here without affecting any other part of the Linux OS? Should I delete lib, share, and parts of local? I know that I place most of my 3rd party applications such as mysql, php, tomcat, and apache under /usr/local.

Or to further complicate the issue, how can I find out what keeps "growing" in size under /usr? Other than to monitor the /usr directory to see which directory changes in size over a period of time. Thanks,
 
Old 05-17-2005, 03:25 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You have quite a large source (src) dir which could probably be emptied. You could probably scap your man pages as well and just look them up online, man also keeps a preformatted copy which could always be deleted regardless.

Monitoring the size is about the only way to see it change.
 
Old 05-17-2005, 03:48 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
If /var/cache is in the same filesystem, It might contain cached rpm files. Also, search your system for core files. They can be deleted. The lilo setup section of drakeconf (mcc) has an option to empty /tmp when rebooting.
 
Old 05-17-2005, 05:08 PM   #6
rpersaud
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Strange Events

When I stopped Tomcat, Apache2, and MySql, the disk space went from 99% filled to 58% filled on /.

I must say that my disk space problems sound more connected with LAMP?

Otherwise, thanks for all the advice so far! I've tried each of them , from emptying src, man, etc. Thanks!
 
Old 05-18-2005, 02:57 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Which directory gained the space when you shut those services off?
 
Old 05-18-2005, 05:19 PM   #8
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
here is a very small and simple graphical display for du - it's helpful to get a visual read on what's taking space and where:

http://xdiskusage.sourceforge.net/
 
Old 05-18-2005, 08:05 PM   #9
brainiac
Member
 
Registered: Jan 2005
Location: middle of a cornfield, IL
Distribution: Kanotix HD Install, Debian Testing, XP Pro,Vista RC1
Posts: 145

Rep: Reputation: 15
Thanks for xdiskusage, I have been looking for something like this for a while.
 
  


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
KDE login problems. Running out of disk space maloncu Linux - Newbie 4 09-08-2005 06:12 PM
Running out of disk space... clean up possible? donv2 Linux - Newbie 3 04-19-2005 03:48 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM
Running out of disk space ann_tulip18 Linux - Newbie 33 07-11-2003 12:45 AM
Disk space wastage 73 GB Hard disk rajgopalhg Linux - Hardware 2 10-18-2002 04:41 PM


All times are GMT -5. The time now is 04:23 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration