A-A+

ExtMail EMOS dspam “is marked as crashed and should be repaired” 问题解决方法

2014年03月03日 经验分享 暂无评论 阅读 3,907 次

extmail最近发现ExtMail EMOS邮件服务器maillog日志中有大量类似下面的报错:
Feb 25 03:12:02 mailserver dspam[13567]: query error: Table './dspam/dspam_signature_data' is marked as crashed and should be repaired: see sql.errors for more details
Feb 25 03:12:02 mailserver dspam[13567]: query error: Table './dspam/dspam_token_data' is marked as crashed and should be repaired: see sql.errors for more details
Feb 25 03:12:02 mailserver dspam[13567]: query error: Table './dspam/dspam_token_data' is marked as crashed and should be repaired: see sql.errors for more details
上面报错是dspam的MYI文件出现问题了。

结合网上的教程,亲测可行的解决方法如下:
一、SSH登陆邮件服务器,先检查有没有myisamchk工具:
[root@mailserver ~]# cd /usr/bin/
[root@mailserver bin]# ls -l myisamchk
-rwxr-xr-x 1 root root 1756592 Feb 13 03:50 myisamchk

二、确认dspam数据库MYI文件是否存在:
[root@mailserver bin]# cd /var/lib/mysql/dspam/
[root@mailserver dspam]# ls -l *.MYI
-rw-rw----. 1 mysql mysql 1024 Nov 24 2012 dspam_preferences.MYI
-rw-rw----. 1 mysql mysql 3477504 Dec 14 20:22 dspam_signature_data.MYI
-rw-rw----. 1 mysql mysql 2048 Dec 14 20:25 dspam_stats.MYI
-rw-rw----. 1 mysql mysql 75192320 Dec 14 20:25 dspam_token_data.MYI
-rw-rw----. 1 mysql mysql 3072 Nov 24 2012 dspam_virtual_uids.MYI

三、用myisamchk工具修复dspam数据库MYI文件:
[root@mailserver dspam]# myisamchk -r /var/lib/mysql/dspam/dspam_signature_data.MYI
- recovering (with sort) MyISAM-table '/var/lib/mysql/dspam/dspam_signature_data.MYI'
Data records: 4403
- Fixing index 1
Found link that points at 44475245343539200 (outside data file) at 102404928
Found link that points at -4409304410660798464 (outside data file) at 102410096
Found link that points at 8647756808993112064 (outside data file) at 102416656
Found link that points at 44475245343539200 (outside data file) at 149605356
- Fixing index 2
[root@mailserver dspam]# myisamchk -r /var/lib/mysql/dspam/dspam_token_data.MYI
- recovering (with sort) MyISAM-table '/var/lib/mysql/dspam/dspam_token_data.MYI'
Data records: 859373
- Fixing index 1
Data records: 859409
因为我日志中就只有Table './dspam/dspam_signature_data' is marked as crashed and should be repaired以及Table './dspam/dspam_token_data' is marked as crashed and should be repaired这两个,所以我只需要对应的修复dspam_signature_data.MYI和dspam_token_data.MYI这两个文件即可。

如果有其他类似的文件报错,修复原理是一样的。

给我留言

icon_question icon_razz icon_sad icon_evil icon_exclaim icon_smile icon_redface icon_biggrin icon_surprised icon_eek icon_confused icon_cool icon_lol icon_mad icon_twisted icon_rolleyes icon_wink icon_idea icon_arrow icon_neutral icon_cry icon_mrgreen

Copyright © 2009 - 2018 一米居 | All Rights Reserved | Powered By WordPress | Theme Designed By 知更鸟 | 赣ICP备09003747号-2

用户登录

分享到: