/var seems not enough

peterhou

Verified User
Joined
Dec 9, 2004
Messages
26
Hi
PLS take a look:
Filesystem Size Used Avail Use% Mounted on
/dev/hdc1 99M 6.2M 88M 7% /boot
/dev/hdc2 53G 47G 3.4G 94% /home
/dev/hdc3 9.7G 8.2G 1022M 90% /var
/dev/hdc6 9.8G 1.3G 8.1G 14% /
none 500M 0 500M 0% /dev/shm
This server only has one site.Everything is normal.But the /var used 90% of it's space.
And some setting items:
Apache Log Rotate Size (Megabytes): 5
Keep Number of Apache Log Backups: 5
My site's MySQL has used only about 100M and the log file is not too big.
Why the /var can used 8.2G???
Below is filesystem of the /var:
cache db empty lib local lock log lost+found mail named nis opt preserve run spool tmp www yp
How can I check which is normal???

Regards

peter
 
cd /var
du -sh *

424K cache
4.0K db
8.0K empty
8.0G lib
4.0K local
8.0K lock
90M log
16K lost+found
0 mail
24K named
4.0K nis
4.0K opt
4.0K preserve
100K run
584K spool
4.0K tmp
31M www
28K yp


cd lib
du -sh *


4.0K alternatives
4.0K dhcp
4.0K games
4.0K logrotate.status
8.0K misc
8.0G mysql
20K nfs
4.0K pcmcia
4.0K random-seed
18M rpm
1.7M slocate
4.0K up2date

8.0G mysql

Why??
 
Your mysql log files could be huge. Without seeing what is in /var/lib/mysql it would be hard to really say.
 
If their the database files themselves you'll need to see about moving that directory to a new partition (/home/mysql is usually the default now) or increase your /var partition size.
 
Yes
I've check the mysql and find there are many bin files in it:
84M server-bin.001
194M server-bin.002
9.1M server-bin.003
5.8M server-bin.004
4.8M server-bin.005
34M server-bin.006
296M server-bin.007
709M server-bin.008
19M server-bin.009
25M server-bin.010
54M server-bin.011
70M server-bin.012
28M server-bin.013
97M server-bin.014
172M server-bin.015
57M server-bin.016
50M server-bin.017
105M server-bin.018
49M server-bin.019
9.9M server-bin.020
106M server-bin.021
68M server-bin.022
2.6M server-bin.023
61M server-bin.024
128M server-bin.025
41M server-bin.026
15M server-bin.027
22M server-bin.028
57M server-bin.029
84M server-bin.030
34M server-bin.031
12M server-bin.032
20M server-bin.033
11M server-bin.034
23M server-bin.035
32M server-bin.036
26M server-bin.037
34M server-bin.038
3.1M server-bin.039
18M server-bin.040
15M server-bin.041
6.7M server-bin.042
33M server-bin.043
18M server-bin.044
6.9M server-bin.045
11M server-bin.046
21M server-bin.047
19M server-bin.048
22M server-bin.049
6.3M server-bin.050
7.1M server-bin.051
7.5M server-bin.052
28M server-bin.053
9.5M server-bin.054
17M server-bin.055
5.5M server-bin.056
17M server-bin.057
18M server-bin.058
40M server-bin.059
23M server-bin.060
18M server-bin.061
76M server-bin.062
32M server-bin.063
29M server-bin.064
39M server-bin.065
45M server-bin.066
30M server-bin.067
14M server-bin.068
36M server-bin.069
88M server-bin.070
38M server-bin.071
16M server-bin.072
103M server-bin.073
99M server-bin.074
7.4M server-bin.075
2.0M server-bin.076
29M server-bin.077
752K server-bin.078
2.9M server-bin.079
31M server-bin.080
42M server-bin.081
38M server-bin.082
2.5M server-bin.083
1.2M server-bin.084
4.8M server-bin.085
160K server-bin.086
58M server-bin.087
296K server-bin.088
1.7M server-bin.089
100K server-bin.090
88K server-bin.091
8.0K server-bin.092
856K server-bin.093
100K server-bin.094
5.9M server-bin.095
3.4M server-bin.096
39M server-bin.097
39M server-bin.098
21M server-bin.099
49M server-bin.100
60M server-bin.101
36M server-bin.102
58M server-bin.103
28M server-bin.104
27M server-bin.105
26M server-bin.106
51M server-bin.107
37M server-bin.108
65M server-bin.109
45M server-bin.110
45M server-bin.111
67M server-bin.112
122M server-bin.113
134M server-bin.114
136M server-bin.115
146M server-bin.116
48M server-bin.117
122M server-bin.118
228M server-bin.119
33M server-bin.120
70M server-bin.121
87M server-bin.122
180M server-bin.123
91M server-bin.124
102M server-bin.125
93M server-bin.126
261M server-bin.127
183M server-bin.128
128M server-bin.129
63M server-bin.130
77M server-bin.131
148M server-bin.132
165M server-bin.133
79M server-bin.134
54M server-bin.135
177M server-bin.136
144M server-bin.137
68M server-bin.138
65M server-bin.139
150M server-bin.140
108K server-bin.141

Can I delect them?

Regards

peter
 
The server-bin.xxx files are mysql binary log files. Unless you have a need for them, they can be deleted. A 'RESET MASTER' SQL command should delete all the files and reset the log files.
 
yes disable log-bin in /etc/my.cnf restart mysql then delete the bin files.
 
Thank you for your help.
How can I do A 'RESET MASTER' SQL command?Or some kind of SQL setting
to limit the log file size?

Thanks

peter
 
Yes.It's fine now.thank you.
Filesystem Size Used Avail Use% Mounted on
/dev/hdc1 99M 6.2M 88M 7% /boot
/dev/hdc2 53G 47G 3.4G 94% /home
/dev/hdc3 9.7G 275M 8.9G 3% /var
/dev/hdc6 9.8G 1.3G 8.1G 14% /
none 500M 0 500M 0% /dev/shm

Regards
peter
 
Back
Top