innodb_buffer_pool_size, innodb_log_file_sizeを変更後に起動しなくなった

CentOS 7.x のサーバーで、メモリを増設したのでMariaDBのDBのチューニングで、「innodb_buffer_pool_size」, 「innodb_log_file_size」の値を変更後、MariaDBが下記のエラーで起動しなくなりました

210113 10:03:17 InnoDB: The InnoDB memory heap is disabled
210113 10:03:17 InnoDB: Mutexes and rw_locks use GCC atomic builtins
210113 10:03:17 InnoDB: Compressed tables use zlib 1.2.7
210113 10:03:17 InnoDB: Using Linux native AIO
210113 10:03:17 InnoDB: Initializing buffer pool, size = 512.0M
210113 10:03:17 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 67108864 bytes
InnoDB: than specified in the .cnf file 0 16777216 bytes!
InnoDB: Possible causes for this error:
 (a) Incorrect log file is used or log file size is changed
 (b) In case default size is used this log file is from 10.0
 (c) Log file is corrupted or there was not enough disk space
 In case (b) you need to set innodb_log_file_size = 48M
210113 10:03:17 [ERROR] Plugin 'InnoDB' init function returned error.
210113 10:03:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
210113 10:03:17 [Note] Plugin 'FEEDBACK' is disabled.
210113 10:03:17 [ERROR] Unknown/unsupported storage engine: InnoDB
210113 10:03:17 [ERROR] Aborting

「InnoDB: Error: log file ./ib_logfile0 is of different size 0~」とあるように、ib_logfile0 のサイズが違うようなメッセージがでているのと、ネットで調べると「ib_logfile0 ib_logfile1 」を削除すると起動するとの記事がありましたので、下記のようにファイルを削除すると、無事にMariaDBが起動できました。

$ sudo rm -f  /var/lib/mysql/ib_logfile1
$ sudo rm -f  /var/lib/mysql/ib_logfile0

$ sudo systemctl restart mariadb

古い記事ではこのような事象がありましたが最近の記事ではなかったので、CentOS 8系のMariaDBではこのような事象は発生しないかもしれません。筆者の環境のCentOS 7のMariaDB 5.5系の情報となります

スポンサーリンク

0
0

LinuxCentOS 7,mariadb,MySQL

Posted by admin