Author Topic: Less and less free disk space in /  (Read 786 times)

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Less and less free disk space in /
« on: May 01, 2011, 06:13:19 AM »
I am not sure if it is a normal thing in PCLOS. My root partition's free disk space is getting smaller daily. I notice that every a few days around 100MB free space is gone. I already have /tmp in RAM, a separate partition for /home, and do Bleachbit cleanup daily both in normal and root user.

Is it also partly due to that I perform system update in Synaptic almost every day?

About a month ago I have around 6.7GB free space in / (13GB in total), now it is only 5.0GB. When I reboot after a few days' use, it would usually go up 100MB.

I checked the folders in / one by one for their size, and found that the largest is /usr, which accounts about 4.2GB. then there is /var 1.5GB, /proc 1GB, /opt 850MB

Maybe I should not worry about this

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15309
  • ┌∩┐(◕_◕)┌∩┐
Re: Less and less free disk space in /
« Reply #1 on: May 01, 2011, 06:28:17 AM »
How do you have Synaptic set for post install?  

Is it to keep downloaded rpm's or to delete them?

You could try something like this from a Konsole (as root)

du -s -h /usr/*

The above will show size of each folder under usr

du -s -h /var/*

The above will show size of each folder under var

If you run them daily and note the sizes you'll be able to see which folders are increasing in size. (you can modify the commands for any folders you want to check)

Edit:

If you wanted you could pipe the results to a text file by doing

du -s -h /usr/* > usr-size

The above will list the folder sizes in a document named usr-size and will be in your /home folder  (again modify filename etc to suit)
« Last Edit: May 01, 2011, 06:33:45 AM by menotu »
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #2 on: May 01, 2011, 07:08:19 AM »
How do you have Synaptic set for post install?  

Is it to keep downloaded rpm's or to delete them?

You could try something like this from a Konsole (as root)

du -s -h /usr/*

The above will show size of each folder under usr

du -s -h /var/*

The above will show size of each folder under var

If you run them daily and note the sizes you'll be able to see which folders are increasing in size. (you can modify the commands for any folders you want to check)

Edit:

If you wanted you could pipe the results to a text file by doing

du -s -h /usr/* > usr-size

The above will list the folder sizes in a document named usr-size and will be in your /home folder  (again modify filename etc to suit)

Hi thanks for your information.
I tried using
Quote
du --max-depth=1 -h | sort -n
in /usr
and the results are:

1.7G    ./lib
2.1M    ./lib32
2.3G    ./share
4.5G    .
12K     ./etc
16K     ./X11R6
34M     ./games
35M     ./include
43M     ./local
55M     ./sbin
65M     ./src
152K    ./libexec
390M    ./bin
808K    ./uclibc

in /var, it is as below:

1.4G    ./log
1.6G    .
4.0K    ./empty
4.0K    ./games
4.0K    ./local
4.0K    ./nis
4.0K    ./opt
4.0K    ./preserve
4.0K    ./yp
12K     ./lock
50M     ./cache
123M    ./lib
124K    ./spool
296K    ./run
644K    ./db

in /var/log, I notice these three files are much bigger than others:
user.log
messages
syslog

the three together use 1.3GB space. is it normal?

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15309
  • ┌∩┐(◕_◕)┌∩┐
Re: Less and less free disk space in /
« Reply #3 on: May 01, 2011, 07:21:13 AM »
That does seem big.

Mine currently shows:

user.log = 401.1K
messages = 392.4K
syslog = 482.5K
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #4 on: May 01, 2011, 07:29:40 AM »
That does seem big.

Mine currently shows:

user.log = 401.1K
messages = 392.4K
syslog = 482.5K
mine:
user.log = 449.6M
messages = 452.3M
syslog = 456.7M

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #5 on: May 01, 2011, 07:34:07 AM »
What can I do with them? Can they be removed? Or I have to just leave them there?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Less and less free disk space in /
« Reply #6 on: May 01, 2011, 07:46:57 AM »
You can open them as root and clear the contents.
« Last Edit: May 02, 2011, 03:55:28 AM by Neal »

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #7 on: May 01, 2011, 07:49:52 AM »
You can open them as root and clear the contents.

Thank you all for your help.
I used

echo "" > /var/log/syslog
...

to clear these files. Now they are only less than 200KB each.
If they get too big in the future, I think I can just clear them again.  :)
« Last Edit: May 02, 2011, 03:55:44 AM by Neal »

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #8 on: May 01, 2011, 02:58:42 PM »
I cleared these files, but later I find that their sizes are still growing very fast.
Now they are almost 40MB already.
I am afraid after a few days I will have to clear them again.
Is there a way to stop they from growing this fast?

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3992
Re: Less and less free disk space in /
« Reply #9 on: May 01, 2011, 04:12:13 PM »
Logs growing abnormally fast usually indicates errors or warnings about a problem being logged frequently. Are there any messages in these logs which are filling them up. Maybe there is something wrong which is causing excessive logging and ought to be fixed.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline zhangyou

  • Full Member
  • ***
  • Posts: 50
Re: Less and less free disk space in /
« Reply #10 on: May 01, 2011, 04:30:26 PM »
I remember about a few weeks ago I started another post asking about some questions regarding making my laptop as a wireless AP

and I was suggested to log some iptables activities by running

Quote
iptables -I FORWARD -j LOG


and

Quote
tail -n 20 /var/log/syslog


From the output I see a lot of entries of Shorewall

I am not sure if it is a related issue

The other thread is here:
http://www.pclinuxos.com/forum/index.php/topic,89626.msg750810.html#msg750810

Now when I open the /var/log/syslog I still see a lot of lines of Shorewall messages.
Maybe I need to stop the IPTABLES logging? How to do that?