원인 : 이미지 전체백업이후 VM을 강제로 종료하면서 발생증상 : DB 테이블이 손상되서 데이타를 읽을수 없음
# MYSQL 에러 메세지
# tail -n100 -f /usr/local/mysql/data/localhost.err
131211 12:38:47 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:47 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:47 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:48 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:48 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:48 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:48 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:48 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:49 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:49 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:50 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_documents' is marked as crashed and should be repaired
131211 12:38:50 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
131211 12:38:50 [ERROR] /usr/local/mysql/bin/mysqld: Table './XXXXXX/xe_counter_log' is marked as crashed and should be repaired
해당 Database 로 들어가서
mysql> repair table xe_counter_log;
+--------------------------+--------+----------+----------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+--------------------------+--------+----------+----------------------------------------------+
| XXXXXX.xe_counter_log | repair | warning | Number of rows changed from 144945 to 144912 |
| XXXXXX.xe_counter_log | repair | status | OK |
+--------------------------+--------+----------+----------------------------------------------+
2 rows in set (25.41 sec)
※ 테이블이 손상되는 증상은 아래와 같은 예기치 않는 문제로 인하여 발생됩니다.
- tbl_name.frm 변경에 대한 락이 걸린 경우
- tbl_name.MYI (Errcode: nnn) 파일을 찾을 수 없는 경우
- 예상치 못한 파일 종료
- 저장 파일의 충돌
- table handler로 부터 오류 nnn을 받았을 때