| Author |
Message |
Vlad Mfk *nix forums beginner
Joined: 19 Jul 2006
Posts: 7
|
Posted: Wed Jul 19, 2006 7:19 pm Post subject:
/var FS full. What can be erased?
|
|
|
I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
Here is what "df -h" shows:
srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 248M 24K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 232M -4.5M 102% /var
devfs 1.0K 1.0K 0B 100% /var/named/dev
What else can be deleted ? Please help.
Kind regards,
Vlad Menshov |
|
| Back to top |
|
 |
the other guy *nix forums beginner
Joined: 13 May 2005
Posts: 23
|
Posted: Wed Jul 19, 2006 7:32 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
Vlad Mfk <freelance@voliacable.com> wrote:
| Quote: | I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
|
freebsd rotates logfiles as needed, see newsyslog
What else is in your /var/? Maybe some mysql databases?
in /var/ do a
# du -hs *
so you can see what directory holds the data.
Peter
--
http://www.boosten.org
Mail: peter at boosten dot org |
|
| Back to top |
|
 |
bas *nix forums addict
Joined: 09 Jun 2005
Posts: 79
|
Posted: Wed Jul 19, 2006 7:37 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
Do you know what is taking up the space? What do you get if you cd to
/var and type du, or do
du | sort -n +0 |
|
| Back to top |
|
 |
Chronos *nix forums Guru Wannabe
Joined: 30 Sep 2005
Posts: 174
|
Posted: Wed Jul 19, 2006 7:45 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
After replacing Vlad Mfk with a small shell script on Wednesday 19 Jul
2006 20:19, the following appeared on stdout:
| Quote: | srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 248M 24K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 232M -4.5M 102% /var
devfs 1.0K 1.0K 0B 100% /var/named/dev
What else can be deleted ? Please help.
|
cd /var && du -h . | less (the dot is literal, not a part of my post's
punctuation). Look through the output to see where the largest use of
the filesystem is. Don't touch /var/db/pkg if you can help it; your
pkgtools rely on information in that directory.
--
Chronos |
|
| Back to top |
|
 |
Vlad Mfk *nix forums beginner
Joined: 19 Jul 2006
Posts: 7
|
Posted: Wed Jul 19, 2006 8:37 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
Peter Boosten wrote:
| Quote: | Vlad Mfk <freelance@voliacable.com> wrote:
I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
freebsd rotates logfiles as needed, see newsyslog
What else is in your /var/? Maybe some mysql databases?
in /var/ do a
# du -hs *
so you can see what directory holds the data.
Peter
|
srv002# du -hs *
2.0K account
6.0K at
10K backups
4.0K crash
4.0K cron
8.8M db
2.0K empty
2.0K games
2.0K heimdal
578K ipa
54K log
6.0K mail
4.0K msgs
45K named
2.0K preserve
32K run
2.0K rwho
226M spool
2.0K tmp
20K yp
srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 248M 12K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 236M -7.8M 103% /var
devfs 1.0K 1.0K 0B 100% /var/named/dev
i'm installing mysql server, it needs alot of space for logging, so we
need to remove everything that is not exclusively needed. what is the
/var/spool directory ?
Vlad |
|
| Back to top |
|
 |
Vlad Mfk *nix forums beginner
Joined: 19 Jul 2006
Posts: 7
|
Posted: Wed Jul 19, 2006 8:37 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
bas wrote:
| Quote: | Do you know what is taking up the space? What do you get if you cd to
/var and type du, or do
du | sort -n +0
|
Here is sorted output. I skipped the beginning of the output.
srv002# du | sort -n +0
..
..
..
..
22 ./db/pkg/libiconv-1.9.2_1
22 ./db/pkg/libslang-1.4.9
22 ./db/pkg/libtool-1.5.10_1
22 ./db/pkg/pkgconfig-0.17.2
22 ./named/etc/namedb
24 ./db/pkg/chkrootkit-0.45
24 ./db/pkg/portscanner-1.2_1
24 ./db/pkg/unrar-3.43,3
26 ./db/pkg/bsdiff-4.2
26 ./db/pkg/freebsd-sha256-20050310
26 ./db/pkg/ipa-1.3.6
26 ./db/pkg/ldconfig_compat-1.0_8
26 ./db/pkg/libtool-1.5.22_2
26 ./db/pkg/lzo-1.08_1,1
26 ./db/pkg/pkg_trackinst-1.2.1
26 ./db/pkg/portsnap-0.9.1
26 ./named/etc
28 ./db/pkg/portmanager-0.2.9_4
28 ./db/pkg/portupgrade-20041226_4
30 ./db/pkg/mc-4.6.0_15
30 ./db/pkg/mysql-client-5.0.22
30 ./db/pkg/openvpn-2.0_3
32 ./run
34 ./db/pkg/ruby18-bdb1-0.2.2
36 ./ipa/total
36 ./ipa/total-downstream
36 ./ipa/total-upstream
36 ./ipa/user1
36 ./ipa/user1-downstream
36 ./ipa/user1-upstream
36 ./ipa/user10
36 ./ipa/user11
36 ./ipa/user2
36 ./ipa/user3
36 ./ipa/user4
36 ./ipa/user5
36 ./ipa/user6
36 ./ipa/user7
36 ./ipa/user8
36 ./ipa/user9
38 ./db/pkg/mysql-server-5.0.22
40 ./db/pkg/glib-2.6.5
45 ./named
54 ./db/pkg/gettext-0.14.4_1
54 ./log
276 ./db/pkg/perl-5.8.6_2
314 ./db/pkg/python-2.4.1_1
314 ./db/pkg/ruby-1.8.2_3
442 ./db/pkg/linux_base-6.1_6
578 ./ipa
630 ./db/mysql/mysql
3274 ./db/mysql
4222 ./db/pkg
8990 ./db
231556 ./spool/clientmqueue
231570 ./spool
241341 .
what is in /var/spool directory ? |
|
| Back to top |
|
 |
Steven G. Kargl *nix forums Guru Wannabe
Joined: 02 Dec 2003
Posts: 146
|
Posted: Wed Jul 19, 2006 9:14 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
In article <e9m565$6c6$1@behemoth.volia.net>,
Vlad Mfk <freelance@voliacable.com> writes:
| Quote: | 226M spool
i'm installing mysql server, it needs alot of space for logging, so we
need to remove everything that is not exclusively needed. what is the
/var/spool directory ?
|
This is where email and print jobs are stored until either
a user reads her email or the print job is sent to the
printer. I'm guessing that you haven't rerouted root's
email to someone who actually reads email. See /etc/aliases.
--
Steve
http://troutmask.apl.washington.edu/~kargl/ |
|
| Back to top |
|
 |
Tim Judd *nix forums beginner
Joined: 06 Jun 2006
Posts: 19
|
Posted: Wed Jul 19, 2006 11:11 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
Vlad Mfk wrote:
| Quote: | I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
Here is what "df -h" shows:
srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 248M 24K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 232M -4.5M 102% /var
devfs 1.0K 1.0K 0B 100% /var/named/dev
What else can be deleted ? Please help.
Kind regards,
Vlad Menshov
|
Why would he have two devfs on his system? one I know that's mounted
under /dev is correct, but what's this /var/named/dev ?
maybe an extra line that's not needed in /etc/fstab? I don't know, I
want to know!
--TJ |
|
| Back to top |
|
 |
Chronos *nix forums Guru Wannabe
Joined: 30 Sep 2005
Posts: 174
|
Posted: Wed Jul 19, 2006 11:19 pm Post subject:
Re: /var FS full. What can be erased?
|
|
|
After replacing Tim Judd with a small shell script on Thursday 20 Jul
2006 00:11, the following appeared on stdout:
| Quote: | Why would he have two devfs on his system? one I know that's mounted
under /dev is correct, but what's this /var/named/dev ?
|
BIND now runs chrooted as standard, so it needs its own devfs
mountpoint. If you have a look at /etc/namedb, you will find it is now
a symlink to /var/named/etc/namedb.
--
Chronos |
|
| Back to top |
|
 |
Bill Vermillion *nix forums Guru Wannabe
Joined: 22 Feb 2005
Posts: 298
|
Posted: Thu Jul 20, 2006 1:45 am Post subject:
Re: /var FS full. What can be erased?
|
|
|
In article <e9m565$6c6$1@behemoth.volia.net>,
Vlad Mfk <freelance@voliacable.com> wrote:
| Quote: | Peter Boosten wrote:
Vlad Mfk <freelance@voliacable.com> wrote:
I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
freebsd rotates logfiles as needed, see newsyslog
What else is in your /var/? Maybe some mysql databases?
in /var/ do a
# du -hs *
so you can see what directory holds the data.
Peter
srv002# du -hs *
2.0K account
6.0K at
10K backups
4.0K crash
4.0K cron
8.8M db
2.0K empty
2.0K games
2.0K heimdal
578K ipa
54K log
6.0K mail
4.0K msgs
45K named
2.0K preserve
32K run
2.0K rwho
226M spool
2.0K tmp
20K yp
srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 248M 12K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 236M -7.8M 103% /var
devfs 1.0K 1.0K 0B 100% /var/named/dev
i'm installing mysql server, it needs alot of space for logging, so we
need to remove everything that is not exclusively needed. what is the
/var/spool directory ?
|
If you read the mysql directions you can use variable to put
the data anywhere you wish. Since you have the most free room
on /usr, you could put the data in a directory on that filesystem.
Your 'spool' directory is quite large. Check under that to see
what sub-directory is using the most room. It may be some mail
that is stuck or generating a lot of messages.
Bill
--
Bill Vermillion - bv @ wjv . com |
|
| Back to top |
|
 |
Tim Judd *nix forums beginner
Joined: 06 Jun 2006
Posts: 19
|
Posted: Thu Jul 20, 2006 3:46 am Post subject:
Re: /var FS full. What can be erased?
|
|
|
Chronos wrote:
| Quote: | After replacing Tim Judd with a small shell script on Thursday 20 Jul
2006 00:11, the following appeared on stdout:
Why would he have two devfs on his system? one I know that's mounted
under /dev is correct, but what's this /var/named/dev ?
BIND now runs chrooted as standard, so it needs its own devfs
mountpoint. If you have a look at /etc/namedb, you will find it is now
a symlink to /var/named/etc/namedb.
|
makes sense |
|
| Back to top |
|
 |
andreas@klemm.apsfilter.o *nix forums beginner
Joined: 03 Jul 2006
Posts: 4
|
Posted: Thu Jul 20, 2006 7:27 am Post subject:
Re: /var FS full. What can be erased?
|
|
|
In article <e9m0ja$316$1@behemoth.volia.net>,
Vlad Mfk <freelance@voliacable.com> writes:
| Quote: | I've already deleted all /var/tmp and checked /var/log file sizes. The
logs are very small. Btw, what's the correct way to clean log files? As
far as I know it cannot be just deleted. Right ?
Here is what "df -h" shows:
srv002# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 248M 101M 127M 44% /
/dev/da0s1e 248M 24K 228M 0% /tmp
/dev/da0s1f 30G 1.6G 26G 6% /usr
/dev/da0s1d 248M 232M -4.5M 102% /var
What else can be deleted ? Please help.
|
off-topic but a small hint concerning filesystem layout.
I think your system's filesystems like /, /tmp and /var
are too small.
I see that you have diskspace but only create a relatively
huge /usr.
/tmp could also be a memory filesystem, feeded by swap space,
this helps not wasting even more space for /tmp. so you can make
swap reasonable big for big processes eating up much memory
and at the same time use it for /tmp, so that the swap is not
"totally lost" but of good use for /tmp ;-)
Another thing I see is, that /usr is quite big.
Imagine, some of your bsd system's files got toast somehow and
you want to restore /usr to sanitize your OS.
If /usr is that big and mixed with files of your users and
files of the ports collection /usr/local,
well then I think it might last a very long time to restore.
Another thing is, that I personally do not want to have
big file movements on system partitions.
If you have heavy I/O and file creation and deletion on /usr
and the system crashes, then I have personally a better feeling,
if I know that there was not much traffic on system partitions
needed to boot and run my Unix installation, so that its very very
unlikely, that the superblock gets into inconsistent state.
Usually he doesnt do but then you have an extra safety belt.
Therefore many people prefer having a small root "/" and
partition the filesystems.
I also prefer to have a reasonable /usr.
Look here an excerpt of my partitioning on 2 discs:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad6s1a 989M 55M 855M 6% /
/dev/ad6s3d 3.9G 1.8G 1.8G 49% /var
/dev/ad6s1d 3.9G 1.6G 2.0G 44% /usr
/dev/ad6s3e 3.9G 832M 2.7G 23% /usr/X11R6
/dev/ad6s3f 5.8G 2.8G 2.5G 53% /usr/local
/dev/ad6s3g 24G 14G 7.8G 65% /home
/dev/ad4s3d 52G 42G 5.1G 89% /data
/dev/ad6s3h 38G 8.0K 35G 0% /export
procfs 4.0K 4.0K 0B 100% /proc
linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc
/dev/md0 496M 214K 456M 0% /tmp
devfs 1.0K 1.0K 0B 100% /dev
devfs 1.0K 1.0K 0B 100% /var/named/dev
to make /usr independend of ports collection I give me the
luxury of having separate filesystems for /usr/local and /usr/X11R6.
I could have used another hierarchy for ports collection than
/usr/.... but ... I feared to stumble over ports that might not
be prefix clean. Therefore this personal tradeoff.
Andreas ///
--
http://www.64bits.de
http://www.apsfilter.org
http://people.FreeBSD.org/~andreas |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|