Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partition command
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Sun Sep 30, 2012 12:09 pm    Post subject: Partition command Reply with quote

Hi all,
I hope I got the correct forum. I have a Linux 2.6.34-gentoo-r1 server which worked fine the last months. That changed yesterday.

I opened /var/log/mysql/mysqld.err and saw

10:48:55 [ERROR] /usr/sbin/mysqld: Disk is full writing './mysqld-bin.000387' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing $

and also

df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda5 456G 5.3G 428G 2% /

udev 10M 160K 9.9M 2% /dev

/dev/sda6 459G 431G 4.9G 99% /var

shm 2.0G 0 2.0G 0% /dev/shm


Can you give the full command to increase /dev/sda6 459G 431G 4.9G 99% /var


Edit: I deleted some files. I hope that helps for some days. If you have the command, please post.
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Sun Sep 30, 2012 2:36 pm    Post subject: Reply with quote

I don't run a server, but 459G seems like a huge amount of space for /var to fill up. I would look for something else wrong, such as a runaway server writing into /var/log

du -sh /var/* | sort -h

will tell you which directory is taking up so much space & you can investigate further from there.
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4635
Location: Saint Amant, Acadiana

PostPosted: Sun Sep 30, 2012 9:02 pm    Post subject: Reply with quote

Are all logs rotated properly?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Mon Oct 01, 2012 4:51 pm    Post subject: Reply with quote

Thanks for help. I'm a Linux noob so I don't know what the adminstrator did (logs).

I got that results:
du -sh /var/* | sort -h

0 /var/mail
4.0K /var/state
8.0K /var/empty
8.0K /var/lock
16K /var/lost+found
24K /var/spool
60K /var/run
11M /var/cache
23M /var/tmp
35M /var/db
433M /var/www
47G /var/log
378G /var/lib
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Oct 01, 2012 6:30 pm    Post subject: Reply with quote

Kaliroxx

378G for /var/lib is quite large - you should dig a little deeper
Code:
du -sh  /var/lib/* | sort -h

or
Code:
du -xaBG /var/lib/* | awk '$1 >= 20'

which will list files >= 20gig.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4635
Location: Saint Amant, Acadiana

PostPosted: Mon Oct 01, 2012 8:16 pm    Post subject: Reply with quote

And 47 GB of logs is no better.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Tue Oct 02, 2012 4:07 pm    Post subject: Reply with quote

Ok it is:

du -sh /var/lib/* | sort -h

176K /var/lib/init.d
368K /var/lib/rkhunter
379G /var/lib/mysql


du -xaBG /var/lib/* | awk '$1 >= 20'

2G /var/lib/mysql/mysqld-bin.000156
2G /var/lib/mysql/mysqld-bin.000157
2G /var/lib/mysql/mysqld-bin.000158
2G /var/lib/mysql/mysqld-bin.000159
2G /var/lib/mysql/mysqld-bin.000160
2G /var/lib/mysql/mysqld-bin.000161
2G /var/lib/mysql/mysqld-bin.000163
2G /var/lib/mysql/mysqld-bin.000164
2G /var/lib/mysql/mysqld-bin.000165
2G /var/lib/mysql/mysqld-bin.000166
2G /var/lib/mysql/mysqld-bin.000167
2G /var/lib/mysql/mysqld-bin.000168
2G /var/lib/mysql/mysqld-bin.000169
2G /var/lib/mysql/mysqld-bin.000170
2G /var/lib/mysql/mysqld-bin.000171
2G /var/lib/mysql/mysqld-bin.000172
2G /var/lib/mysql/mysqld-bin.000173
2G /var/lib/mysql/mysqld-bin.000174
2G /var/lib/mysql/mysqld-bin.000175
2G /var/lib/mysql/mysqld-bin.000176
2G /var/lib/mysql/mysqld-bin.000177
2G /var/lib/mysql/mysqld-bin.000178
2G /var/lib/mysql/mysqld-bin.000179
2G /var/lib/mysql/mysqld-bin.000180
2G /var/lib/mysql/mysqld-bin.000181
2G /var/lib/mysql/mysqld-bin.000182
2G /var/lib/mysql/mysqld-bin.000183
2G /var/lib/mysql/mysqld-bin.000185
2G /var/lib/mysql/mysqld-bin.000186
2G /var/lib/mysql/mysqld-bin.000187
2G /var/lib/mysql/mysqld-bin.000188
2G /var/lib/mysql/mysqld-bin.000189
2G /var/lib/mysql/mysqld-bin.000190
2G /var/lib/mysql/mysqld-bin.000191
2G /var/lib/mysql/mysqld-bin.000192
2G /var/lib/mysql/mysqld-bin.000193
2G /var/lib/mysql/mysqld-bin.000194
2G /var/lib/mysql/mysqld-bin.000195
2G /var/lib/mysql/mysqld-bin.000196
2G /var/lib/mysql/mysqld-bin.000197
2G /var/lib/mysql/mysqld-bin.000198
2G /var/lib/mysql/mysqld-bin.000199
2G /var/lib/mysql/mysqld-bin.000200
2G /var/lib/mysql/mysqld-bin.000201
2G /var/lib/mysql/mysqld-bin.000202
2G /var/lib/mysql/mysqld-bin.000203
2G /var/lib/mysql/mysqld-bin.000204
2G /var/lib/mysql/mysqld-bin.000205
2G /var/lib/mysql/mysqld-bin.000206
2G /var/lib/mysql/mysqld-bin.000207
2G /var/lib/mysql/mysqld-bin.000208
2G /var/lib/mysql/mysqld-bin.000209
2G /var/lib/mysql/mysqld-bin.000210
2G /var/lib/mysql/mysqld-bin.000211
2G /var/lib/mysql/mysqld-bin.000212
2G /var/lib/mysql/mysqld-bin.000213
2G /var/lib/mysql/mysqld-bin.000214
2G /var/lib/mysql/mysqld-bin.000215
2G /var/lib/mysql/mysqld-bin.000216
2G /var/lib/mysql/mysqld-bin.000217
2G /var/lib/mysql/mysqld-bin.000218
2G /var/lib/mysql/mysqld-bin.000219
2G /var/lib/mysql/mysqld-bin.000220
2G /var/lib/mysql/mysqld-bin.000221
2G /var/lib/mysql/mysqld-bin.000222
2G /var/lib/mysql/mysqld-bin.000223
2G /var/lib/mysql/mysqld-bin.000224
2G /var/lib/mysql/mysqld-bin.000225
2G /var/lib/mysql/mysqld-bin.000226
2G /var/lib/mysql/mysqld-bin.000228
2G /var/lib/mysql/mysqld-bin.000230
2G /var/lib/mysql/mysqld-bin.000231
2G /var/lib/mysql/mysqld-bin.000232
2G /var/lib/mysql/mysqld-bin.000233
2G /var/lib/mysql/mysqld-bin.000234
2G /var/lib/mysql/mysqld-bin.000235
2G /var/lib/mysql/mysqld-bin.000236
2G /var/lib/mysql/mysqld-bin.000237
2G /var/lib/mysql/mysqld-bin.000238
2G /var/lib/mysql/mysqld-bin.000239
2G /var/lib/mysql/mysqld-bin.000240
2G /var/lib/mysql/mysqld-bin.000241
2G /var/lib/mysql/mysqld-bin.000242
2G /var/lib/mysql/mysqld-bin.000243
2G /var/lib/mysql/mysqld-bin.000244
2G /var/lib/mysql/mysqld-bin.000245
2G /var/lib/mysql/mysqld-bin.000246
2G /var/lib/mysql/mysqld-bin.000247
2G /var/lib/mysql/mysqld-bin.000248
2G /var/lib/mysql/mysqld-bin.000251
2G /var/lib/mysql/mysqld-bin.000252
2G /var/lib/mysql/mysqld-bin.000253
2G /var/lib/mysql/mysqld-bin.000254
2G /var/lib/mysql/mysqld-bin.000255
2G /var/lib/mysql/mysqld-bin.000256
2G /var/lib/mysql/mysqld-bin.000257
2G /var/lib/mysql/mysqld-bin.000258
2G /var/lib/mysql/mysqld-bin.000259
2G /var/lib/mysql/mysqld-bin.000260
2G /var/lib/mysql/mysqld-bin.000261
2G /var/lib/mysql/mysqld-bin.000262
2G /var/lib/mysql/mysqld-bin.000263
2G /var/lib/mysql/mysqld-bin.000264
2G /var/lib/mysql/mysqld-bin.000265
2G /var/lib/mysql/mysqld-bin.000266
2G /var/lib/mysql/mysqld-bin.000267
2G /var/lib/mysql/mysqld-bin.000268
2G /var/lib/mysql/mysqld-bin.000269
2G /var/lib/mysql/mysqld-bin.000270
2G /var/lib/mysql/mysqld-bin.000271
2G /var/lib/mysql/mysqld-bin.000272
2G /var/lib/mysql/mysqld-bin.000273
2G /var/lib/mysql/mysqld-bin.000274
2G /var/lib/mysql/mysqld-bin.000275
2G /var/lib/mysql/mysqld-bin.000276
2G /var/lib/mysql/mysqld-bin.000277
2G /var/lib/mysql/mysqld-bin.000278
2G /var/lib/mysql/mysqld-bin.000281
2G /var/lib/mysql/mysqld-bin.000282
2G /var/lib/mysql/mysqld-bin.000283
2G /var/lib/mysql/mysqld-bin.000284
2G /var/lib/mysql/mysqld-bin.000285
2G /var/lib/mysql/mysqld-bin.000286
2G /var/lib/mysql/mysqld-bin.000287
2G /var/lib/mysql/mysqld-bin.000289
2G /var/lib/mysql/mysqld-bin.000290
2G /var/lib/mysql/mysqld-bin.000291
2G /var/lib/mysql/mysqld-bin.000292
2G /var/lib/mysql/mysqld-bin.000293
2G /var/lib/mysql/mysqld-bin.000294
2G /var/lib/mysql/mysqld-bin.000295
2G /var/lib/mysql/mysqld-bin.000296
2G /var/lib/mysql/mysqld-bin.000297
2G /var/lib/mysql/mysqld-bin.000298
2G /var/lib/mysql/mysqld-bin.000299
2G /var/lib/mysql/mysqld-bin.000300
2G /var/lib/mysql/mysqld-bin.000301
2G /var/lib/mysql/mysqld-bin.000302
2G /var/lib/mysql/mysqld-bin.000303
2G /var/lib/mysql/mysqld-bin.000304
2G /var/lib/mysql/mysqld-bin.000305
2G /var/lib/mysql/mysqld-bin.000306
2G /var/lib/mysql/mysqld-bin.000307
2G /var/lib/mysql/mysqld-bin.000308
2G /var/lib/mysql/mysqld-bin.000309
2G /var/lib/mysql/mysqld-bin.000310
2G /var/lib/mysql/mysqld-bin.000311
2G /var/lib/mysql/mysqld-bin.000312
2G /var/lib/mysql/mysqld-bin.000313
2G /var/lib/mysql/mysqld-bin.000314
2G /var/lib/mysql/mysqld-bin.000315
2G /var/lib/mysql/mysqld-bin.000316
2G /var/lib/mysql/mysqld-bin.000317
2G /var/lib/mysql/mysqld-bin.000318
2G /var/lib/mysql/mysqld-bin.000319
2G /var/lib/mysql/mysqld-bin.000320
2G /var/lib/mysql/mysqld-bin.000321
2G /var/lib/mysql/mysqld-bin.000322
2G /var/lib/mysql/mysqld-bin.000323
2G /var/lib/mysql/mysqld-bin.000324
2G /var/lib/mysql/mysqld-bin.000325
2G /var/lib/mysql/mysqld-bin.000326
2G /var/lib/mysql/mysqld-bin.000327
2G /var/lib/mysql/mysqld-bin.000328
2G /var/lib/mysql/mysqld-bin.000329
2G /var/lib/mysql/mysqld-bin.000330
2G /var/lib/mysql/mysqld-bin.000331
2G /var/lib/mysql/mysqld-bin.000332
2G /var/lib/mysql/mysqld-bin.000333
2G /var/lib/mysql/mysqld-bin.000334
2G /var/lib/mysql/mysqld-bin.000335
2G /var/lib/mysql/mysqld-bin.000336
2G /var/lib/mysql/mysqld-bin.000337
2G /var/lib/mysql/mysqld-bin.000338
2G /var/lib/mysql/mysqld-bin.000339
2G /var/lib/mysql/mysqld-bin.000340
2G /var/lib/mysql/mysqld-bin.000341
2G /var/lib/mysql/mysqld-bin.000342
2G /var/lib/mysql/mysqld-bin.000343
2G /var/lib/mysql/mysqld-bin.000344
2G /var/lib/mysql/mysqld-bin.000345
2G /var/lib/mysql/mysqld-bin.000346
2G /var/lib/mysql/mysqld-bin.000347
2G /var/lib/mysql/mysqld-bin.000348
2G /var/lib/mysql/mysqld-bin.000349
2G /var/lib/mysql/mysqld-bin.000350
2G /var/lib/mysql/mysqld-bin.000351
2G /var/lib/mysql/mysqld-bin.000352
2G /var/lib/mysql/mysqld-bin.000353
2G /var/lib/mysql/mysqld-bin.000354
2G /var/lib/mysql/mysqld-bin.000355
2G /var/lib/mysql/mysqld-bin.000356
2G /var/lib/mysql/mysqld-bin.000357
2G /var/lib/mysql/mysqld-bin.000358
2G /var/lib/mysql/mysqld-bin.000359
2G /var/lib/mysql/mysqld-bin.000360
2G /var/lib/mysql/mysqld-bin.000361
2G /var/lib/mysql/mysqld-bin.000362
2G /var/lib/mysql/mysqld-bin.000363
2G /var/lib/mysql/mysqld-bin.000364
2G /var/lib/mysql/mysqld-bin.000365
2G /var/lib/mysql/mysqld-bin.000366
2G /var/lib/mysql/mysqld-bin.000367
2G /var/lib/mysql/mysqld-bin.000368
2G /var/lib/mysql/mysqld-bin.000369
2G /var/lib/mysql/mysqld-bin.000370
2G /var/lib/mysql/mysqld-bin.000371
2G /var/lib/mysql/mysqld-bin.000372
2G /var/lib/mysql/mysqld-bin.000373
2G /var/lib/mysql/mysqld-bin.000374
2G /var/lib/mysql/mysqld-bin.000375
2G /var/lib/mysql/mysqld-bin.000376
2G /var/lib/mysql/mysqld-bin.000377
2G /var/lib/mysql/mysqld-bin.000378
2G /var/lib/mysql/mysqld-bin.000379
2G /var/lib/mysql/mysqld-bin.000380
2G /var/lib/mysql/mysqld-bin.000381
2G /var/lib/mysql/mysqld-bin.000382
2G /var/lib/mysql/mysqld-bin.000383
2G /var/lib/mysql/mysqld-bin.000384
2G /var/lib/mysql/mysqld-bin.000385
2G /var/lib/mysql/mysqld-bin.000394
379G /var/lib/mysql


du -sh /var/log/* | sort -h

1.2M /var/log/wtmp
101M /var/log/messages
15G /var/log/apache2
33G /var/log/nginx
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Wed Oct 03, 2012 12:21 am    Post subject: Reply with quote

For those mysql files, a forum search turns up threads like this: http://forums.gentoo.org/viewtopic-t-658799-start-0-postdays-0-postorder-asc-highlight-mysqldbin.html

For those big logs, I would read them and see if it looks like something is wrong with apache and nginx and the logs are being flooded with error messages. If they are just really old, as Jaglover pointed out, they need to be rotated (emerge logrotate).
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Wed Oct 03, 2012 9:50 am    Post subject: Reply with quote

du -sh /var/log/nginx/* | sort -h
...
29G /var/log/nginx/localhost.access_log



du -sh /var/log/apache2/*
15G /var/log/apache2/access_log
...

I tried to open both with nano but they seem to be too large. So I can't check if there are errors inside.

Update: I download them via FTP and try to open them on my local system. Correct way?
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Wed Oct 03, 2012 11:49 am    Post subject: Reply with quote

nano is an editor - you don't need to open them with that.

use less, in a terminal:

less /var/log/whatever
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Thu Oct 04, 2012 6:03 pm    Post subject: Reply with quote

Ah ok. I looked at
less /var/log/apache2/access_log

and saw a lot of GETs and Urls in at. But no errors. (How) Can I delete the file and apache2 starts a new one? Or do I have to make something else?
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4241

PostPosted: Thu Oct 04, 2012 8:17 pm    Post subject: Reply with quote

look for df -i too, plenty little small files burn inode number
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Thu Oct 04, 2012 8:50 pm    Post subject: Reply with quote

Code:
rm /var/lib/mysql/mysqld-bin.0*
I've done it often
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 477
Location: Arlington, TX, US

PostPosted: Fri Oct 05, 2012 12:18 am    Post subject: Reply with quote

Kaliroxx wrote:
Ah ok. I looked at
less /var/log/apache2/access_log

and saw a lot of GETs and Urls in at. But no errors. (How) Can I delete the file and apache2 starts a new one? Or do I have to make something else?


emerge logrotate and set it up to rotate your logs so this happens automatically.
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Fri Oct 05, 2012 1:52 pm    Post subject: Reply with quote

DONAHUE wrote:
Code:
rm /var/lib/mysql/mysqld-bin.0*
I've done it often


Are you sure that these files are not needed? Maybe your server does not need them? But my one?

Quote:
emerge logrotate and set it up to rotate your logs so this happens automatically.

I don't know enough about Linux to do so.

Edit:
Maybe I could to that: http://linux-howto-guide.blogspot.de/2009/10/mysqld-bin-logs-problem.html
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2447
Location: Germany

PostPosted: Fri Oct 05, 2012 2:06 pm    Post subject: Reply with quote

If you're not doing anything other than standard webserver / mysql / php stuff on this box, you may be better off with a managed server, if you're unwilling to learn how to set it up properly.

If you're willing to learn, start with logrotate and mysql configuration especially regarding binary logs, which you may not need, provided you've set up a proper backup solution.

You really have to know more about Linux to run a server.
Back to top
View user's profile Send private message
Kaliroxx
n00b
n00b


Joined: 30 Sep 2012
Posts: 9

PostPosted: Sat Oct 06, 2012 12:24 pm    Post subject: Reply with quote

Quote:
rm /var/lib/mysql/mysqld-bin.0*

Works fine for me :) But I had to restart mysql.


Quote:
If you're not doing anything other than standard webserver / mysql / php stuff on this box, you may be better off with a managed server, if you're unwilling to learn how to set it up properly.

In the last four years I was able to do everything on the project except server administration. That's why I have a server admin for this. But he is in vacation. I know how to restart the system and how to change the nameserver ip to reroute the users to the backup server.

Quote:
If you're willing to learn, start with logrotate and mysql configuration especially regarding binary logs, which you may not need, provided you've set up a proper backup solution. You really have to know more about Linux to run a server.

100% agree. I bought some books at Amazon now and I will try to learn it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum