/var has only 116MB free space

after I run this command
Code:
portmaster -D -r libgcrypt
I see after long time compile my
Code:
/var
partition full ,
this is is my
Code:
df -h
you can see
Code:
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s1a    484M    278M    167M    62%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1d    989M    550M    360M    60%    /tmp
/dev/ad10s1f    137G    105G     21G    83%    /usr
/dev/ad10s1e    1.9G    1.7G    116M    94%    /var
and you see I set 1.9GB for var partition.
So I run
Code:
ncdu
and I see this
Code:
                                                                                        233.4MiB [##########] /db                         
.  94.0MiB [####      ] /log
.  66.7MiB [##        ] /tmp
    7.4MiB [          ] /account
.   1.9MiB [          ] /spool
.   1.2MiB [          ] /qmail
so many space is full by
Code:
/db
so I go to
Code:
/db
and I see this
Code:
128.5MiB [##########] /pkg
   35.8MiB [##        ] /sup
   28.4MiB [##        ] /clamav
   26.9MiB [##        ] /tripwire
so many space use by
Code:
/pkg
and I go to
Code:
/pkg
and I see this
Code:
39.8MiB [##########]  pkgdb.db
    1.4MiB [          ] /teTeX-texmf-3.0_6
    1.3MiB [          ] /webmin-1.510_1
    1.2MiB [          ] /zope-3.3.1
    1.2MiB [          ] /plone3-3.1.7_2
    1.2MiB [          ] /netbeans-6.8
    1.1MiB [          ] /ruby-1.8.7.248_2,1
    1.0MiB [          ] /zope210-2.10.11
  904.0kiB [          ] /tikiwiki-3.1
  808.0kiB [          ] /icon-bluecurve-theme-7.0.0_3
  732.0kiB [          ] /boost-libs-1.43.0_1
  666.0kiB [          ] /qt4-doc-4.6.3
  666.0kiB [          ] /openoffice.org-3.2.1
  634.0kiB [          ] /foomatic-db-20090530_1
  620.0kiB [          ] /jdk-1.6.0.3p4_17
  618.0kiB [          ] /tex-texmflocal-1.9
  602.0kiB [          ] /gnome-icon-theme-2.30.3
  602.0kiB [          ] /gnome-themes-extras-2.22.0_8
  554.0kiB [          ] /joomla15-1.5.18
  474.0kiB [          ] /icons-tango-0.8.90_1
  456.0kiB [          ] /claws-mail-themes-20100514
  440.0kiB [          ] /python26-2.6.5_1
  430.0kiB [          ] /firefox-3.5.11,1
  420.0kiB [          ] /moinmoin-1.9.2_4
  410.0kiB [          ] /xfce4-wm-themes-4.6.0
  394.0kiB [          ] /perl-threaded-5.8.9_3
  384.0kiB [          ] /openssl-1.0.0_2
  382.0kiB [          ] /gnome-games-2.30.2_1
  378.0kiB [          ] /gnome-themes-2.30.2
  362.0kiB [          ] /diablo-jdk-1.6.0.07.02_9
  362.0kiB [          ] /gnome-applets-2.30.0_3
  346.0kiB [          ] /zope-2.7.9_3
  334.0kiB [          ] /libxul-1.9.2.8
  330.0kiB [          ] /gnome-user-docs-2.30.1
  316.0kiB [          ] /python24-2.4.5_6
  292.0kiB [          ] /libX11-1.3.3,1
  288.0kiB [          ] /docbook-xsl-1.75.2
  282.0kiB [          ] /p5-DateTime-Locale-0.45
  266.0kiB [          ] /evolution-2.30.3
  256.0kiB [          ] /squirrelmail-1.4.21
  250.0kiB [          ] /gimp-app-2.6.10,1
  248.0kiB [          ] /apache-ant-1.7.1
  220.0kiB [          ] /gnutls-2.8.6_2
  220.0kiB [          ] /qt-3.3.8_12
  220.0kiB [          ] /mailman-2.1.12
so I see many space use by these packages and db.



so this is my questions

why I have these packages and db files?
Can I delete all of them for have free spaces ?
which app make this db files ?
 
Your /var partition is almost 2GB and your pkgdb is only taking up a small part of that. Something else is filling up your /var partition. Try the following:

# cd /var
# du -hs *

Also, don't use the
Code:
 tag for everything, it makes your post too long and spaced out.  There's [cmd] and [file] too.
 
jem said:
Your /var partition is almost 2GB and your pkgdb is only taking up a small part of that. Something else is filling up your /var partition. Try the following:

# cd /var
# du -hs *

Also, don't use the
Code:
 tag for everything, it makes your post too long and spaced out.  There's [cmd] and [file] too.[/QUOTE]

I run that command and this is output 
[CODE]var # du -hs *
7.4M	account
2.0K	agentx
3.5M	amavisd
8.0K	at
2.0K	audit
 22K	backups
448K	cache
8.0K	crash
 14K	cron
310M	db
2.0K	empty
2.0K	games
2.0K	gdm
2.0K	heimdal
 58K	lib
 17M	log
4.0K	mail
2.0K	mediatomb
4.0K	msgs
 12K	munin
 48K	named
 10K	net-snmp
2.0K	preserve
1.4M	qmail
112K	run
2.0K	rwho
 45M	spool
 72M	tmp
 22K	yp
many space use by db
 
/var has a total of 1.9GB of space, of which /var/db is only using 310MB.

Disk usage by all of the subdirectories in /var only adds up to about 460MB. Something else is using up all the space, but it's not /var/db.

Have you deleted any large log files recently, and not restarted the program that created them?
 
You need to discover what is using nearly 1.5GB of space in /var. The fstat() command might help with this, but I'm not familiar with its use.
 
This will show you the biggest directory:
# du -sk /var | sort -n
 
SirDice said:
Oh, oeps.. try # du -sk /var/* | sort -n

this is output
Code:
/var # du -sk /var/* | sort -n
2	/var/agentx
2	/var/audit
2	/var/empty
2	/var/games
2	/var/gdm
2	/var/heimdal
2	/var/mediatomb
2	/var/preserve
2	/var/rwho
4	/var/mail
4	/var/msgs
8	/var/at
8	/var/crash
10	/var/net-snmp
12	/var/munin
14	/var/cron
22	/var/backups
22	/var/yp
48	/var/named
58	/var/lib
114	/var/run
448	/var/cache
1438	/var/qmail
3564	/var/amavisd
7546	/var/account
17996	/var/log
46034	/var/spool
73576	/var/tmp
316272	/var/db
 
There isn't much else you can remove. Whatever you do do NOT remove anything in /var/db/. If you do the system won't know what packages are installed anymore. That specific directory is used by all the pkg_tools.
 
SirDice said:
There isn't much else you can remove. Whatever you do do NOT remove anything in /var/db/. If you do the system won't know what packages are installed anymore. That specific directory is used by all the pkg_tools.

Can I delete other thing in /var and do not delete /var/db ?
 
mfaridi said:
Can I delete other thing in /var and do not delete /var/db ?

There's almost nothing in there so it'll be rather pointless.
 
Okay. see /var/db... you *may* have subdirectories there which have lots of files that can be deleted. (Varies by machine so I cannot tell you which ones...)
 
This still doesn't explain why a 1.9GB filesystem is almost full even though it only contains 460MB of files.
 
You probably have a deleted file in /var/ being written to, so the space hasn't been freed yet. You can try sysutils/lsof to track down the file and restart the application that's writing to it.

Restarting is also usually effective in this case.
 
A service is probably eating up space on /var. Try restarting each running service and determine which one triggers a drastic increase in space on /var. In my case, it is snmpd, but damned if I know why...that's why I'm poking around in here:)
 
I had a similar problem with the /var partition. Just like you, I set 2 GB. After a few weeks, I saw message that /var partition is full, and the [CMD=]$ dh -h[/CMD] command showed 108% of Capacity! So I removed the /var/tmp directory, but it did not help. I added to the /etc/rc.conf file, this option;
Code:
cleanvar_enable="YES"
Till now I have no problem. [CMD=]$ df -h[/CMD]
Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1d    1.9G    157M    1.6G     9%    /var
Maybe this will be helpful for You?
Remember, portmaster has some interesting functions, like e.g
Code:
-d  always clean distfiles
-B  prevents creation of the backup package for the installed port
-i  interactive update mode -- ask whether to rebuild ports
-P|--packages
	 use packages, but build port if not available
o portmaster(8)
 
Note that cleanvar_enable only does its thing if you boot the machine. For a workstation that's regularly shutdown and restarted this might be fine. For a server that's hardly (if ever) rebooted it might not have the desired effect.
 
Yes SirDice, You are right, but mfaridi does not wrote if it is a production server or whatever. Or I'm blind. ;)
True, on workstation which cannot be restarted it is not a good option.
 
Back
Top