/var allmost ful cause lost+found

Winta

Verified User
Joined
Dec 2, 2003
Messages
21
When i look at my directory structure i see
/dev/hda7 253775 227317 13356 95% /var

when i go to /var i see that the largest dir is lost+found
In this directory
i see this
# ls -altr
total 13
drwx------ 2 root root 12288 Aug 22 2003 .
drwxr-xr-x 21 root root 1024 Feb 19 14:17 ..

Can i remove theze files without harming the system???
How can i prevent this in the future?
 
Hello,

1) I'm not sure any program would be dependant on the files in lost+found.
2) I don't see any files in your ls output.

I do this to check directory filesizes:
Code:
cd /var
du | sort -n
which should show you the biggest directory last.

John
 
The output form this is
651 ./www/html/manual/mod/mod_ssl
786 ./www/html/phpMyAdmin-2.5.0/libraries
894 ./www/html/webmail/tmp/info_zibaya.nl_localhost/inbox
959 ./spool/virtual/zibaya.nl
989 ./lib/slocate
1137 ./www/html/squirrelmail-1.4.2/help
1173 ./cache/man
1325 ./spool/virtual/d-men.nl
1416 ./spool/virtual/lovetodance.nl
1440 ./www/html/webmail/tmp/info_zibaya.nl_localhost/Fotos
2108 ./www/html/webmail/tmp/info_zibaya.nl_localhost/_attachments
2854 ./log/sa
3174 ./www/html/manual/mod
3299 ./cache/apt
3433 ./www/html/phpMyAdmin-2.5.0/lang
4484 ./cache
5117 ./spool/virtual
5505 ./www/html/webmail/tmp/info_zibaya.nl_localhost
5543 ./www/html/phpMyAdmin-2.5.0
5851 ./www/html/manual
6187 ./www/html/squirrelmail-1.4.2/locale
6833 ./www/html/webmail/tmp
7714 ./www/html/webmail
9488 ./log/directadmin
9646 ./www/html/squirrelmail-1.4.2
11093 ./spool/mail
13057 ./log/proftpd
14816 ./state/apt/lists
14817 ./state/apt
14818 ./state
15920 ./lib/rpm
16615 ./spool
21278 ./lib/mysql
29080 ./www/html
29339 ./www
38210 ./lib
77045 ./log/httpd/domains
87482 ./log/httpd
120674 ./log

are there any files that i can remove???
for instance i see files like cron.4 messages.3
etc can i remove these??
 
Last edited:
You want to configure log rotation from the look of that.... edit the domains log rotation within DA, set the main log rotation from

/etc/logrotate.conf

I recommend rotate daily keep backlogs of 2 weeks - may need to shorten that depending on your systems traffic.

You can also clean out your /var/www/html directory safely.

Chris
 
Winta said:
are there any files that i can remove???
for instance i see files like cron.4 messages.3
etc can i remove these??

They are your backlogs (previously rotated logs) there from logrotate - you should have no more than 4..

Chris
 
Back
Top