[Sussex] Fedora Core 5 - lossing disk space

Brendan Whelan b_whelan at mistral.co.uk
Tue Jan 30 17:24:47 UTC 2007


Thanks to all those who responded  - I had looked in the log directory but
not specifically in the http section. Once I have found that the logs were
full it was fairly easy to get everything back in action but I have to track
down the cause. Just in case it happens again, below are my notes.



Brendan



Problem - Full disk and database damaged



Tracking down where disk space is being consumed and getting MySQL back in
action



Connect to the server, in my case with "putty"



Stopped the database and apache:

service mysqld stop

service httpd stop



Find which device is full



df -h



In my case is was the main volume so I simply set myself to the highest
level:



cd ..



sudo du -xk | sort -rn | less



It revealed that the /var/log/httpd directory contained lots of messages.



Listing the directory showed that the error_logs were huge.



Cleared the logs (I will investigate the cause when the system is quiet.)



Restarted the MySQL

service mysqld start



Check the database tables:



cd /var/lib/mysql/my_project..

myisamchk *.MKI



Two tables listed as damaged, repaired as follows:



myisamchk -r -q my_table_name...



Repeated the above for other projects.



Restarted apache:



service mysqld start











More information about the Sussex mailing list