Re: 9/24 メンテナンスのお知らせ : Scheduled Downtime
Posted:
2012年9月24日(月) 02:43
by しゃむ
@ 進捗・作業ログ
3:06 作業ファイルバックアップ・コピー
3:31 ファイルコピー完了
3:36 check start
> myisamchk --sort_buffer_size=4G --key_buffer_size=4G --read_buffer_size=512M --write_buffer_size=512M --tmpdir=/mnt/hdd2/mysql/tmp/ /mnt/hdd2/mysql/repair/hawkeye.MYI
Checking MyISAM file: /mnt/hdd2/mysql/repair/hawkeye.MYI
Data records: 169685783 Deleted blocks: 90764856
myisamchk: warning: 14 clients are using or haven't closed the table properly
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 169685781 keys of 169685783
- check record links
myisamchk: error: Found wrong record at 17258815420
MyISAM-table '/mnt/hdd2/mysql/repair/hawkeye.MYI' is corrupted
Fix it using switch "-r" or "-o"
3:53 check finished, table corrupted
3:54 fix start
> myisamchk --sort_buffer_size=4G --key_buffer_size=4G --read_buffer_size=512M --write_buffer_size=512M --tmpdir=/mnt/hdd2/mysql/tmp/ -r /mnt/hdd2/mysql/repair/hawkeye.MYI
- recovering (with sort) MyISAM-table '/mnt/hdd2/mysql/repair/hawkeye.MYI'
Data records: 169685783
- Fixing index 1
Key 1 - Found wrong stored record at 17258815420
- Fixing index 2
- Fixing index 3
myisamchk: Unexpected eof found when reading file '/mnt/hdd2/mysql/tmp/STEne6yI' (Errcode: 175)
myisamchk: error: 175 when fixing table
MyISAM-table '/mnt/hdd2/mysql/repair/hawkeye.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
4:20 fix error
4:29 fix start again
> myisamchk --sort_buffer_size=4G --key_buffer_size=4G --read_buffer_size=512M --write_buffer_size=512M --tmpdir=/mnt/hdd2/mysql/tmp/ -o /mnt/hdd2/mysql/repair/hawkeye.MYI
- recovering (with keycache) MyISAM-table '/mnt/hdd2/mysql/repair/hawkeye.MYI'
Data records: 169685776
Key 1 - Found wrong stored record at 17258815420
15:00 fix completed
15:15 remove old tables
> rm -rf /var/lib/mysql/minecraft/hawkeye.*
15:15 copy tables
> cp -r /mnt/hdd2/mysql/repair/* /var/lib/mysql/minecraft/
> sync
15:41 copy finished
15:41 recovery systems
所有者・権限変更
> chown mysql. /var/lib/mysql/minecraft/hawkeye.*
> chmod 660 /var/lib/mysql/minecraft/hawkeye.*
mysqlサーバ起動
> /etc/init.d/mysqld start
データ整合性チェック OK
crontabスケジューリング復旧
> crontab -e
15:56 check table
> myisamchk --sort_buffer_size=4G --key_buffer_size=4G --read_buffer_size=512M --write_buffer_size=512M --tmpdir=/mnt/hdd2/mysql/tmp/ /mnt/hdd2/mysql/repair/hawkeye.MYI
Checking MyISAM file: /mnt/hdd2/mysql/repair/hawkeye.MYI
Data records: 169685783 Deleted blocks: 90764856
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check record links
16:03 check completed
16:04 システム再起動
16:13 プラグイン更新
16:22 my.cnfチューニング
16:23 システム再起動・BIOS設定
16:40 ネットワーク機器再起動
17:00 ルータ接続障害発生のためルータ初期化・再設定
17:30 動作・設定確認
17:40 ポート解放
17:40にメンテナンスは終了しました
Re: 9/24 メンテナンスのお知らせ : Scheduled Downtime
Posted:
2012年9月24日(月) 02:44
by しゃむ
-- 作業メモ --
■必要関係ファイル
hawkeye.frm
hawkeye.MYD
hawkeye.MYI
●メインデータベース:
/var/lib/mysql/minecraft/
●退避先:
/mnt/hdd2/mysql/backup/
●myisamchk作業先:
/mnt/hdd2/mysql/repair/
●TMPDIR:
/mnt/hdd2/mysql/tmp/
--tmpdir=/mnt/hdd2/mysql/tmp/
Re: 9/24 メンテナンスのお知らせ : Scheduled Downtime
Posted:
2012年9月24日(月) 02:45
by しゃむ
-- 作業メモ --
hawkeye DDL:
CREATE TABLE `hawkeye` (
`data_id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(255) NOT NULL,
`player_id` int(11) NOT NULL,
`action` int(11) NOT NULL,
`world_id` varchar(255) NOT NULL,
`x` double NOT NULL,
`y` double NOT NULL,
`z` double NOT NULL,
`data` varchar(500) DEFAULT NULL,
`plugin` varchar(255) DEFAULT 'HawkEye',
PRIMARY KEY (`data_id`),
KEY `player_action_world` (`player_id`,`action`,`world_id`),
KEY `x_y_z` (`x`,`y`,`z`)
) ENGINE=MyISAM AUTO_INCREMENT=404960117 DEFAULT CHARSET=utf8;