LoginSignup
0
0

More than 1 year has passed since last update.

MariaDBを軽率にapt upgradeしたら起動しなくなった件

Last updated at Posted at 2022-04-12

そんなの聞いてないよぉ(つд⊂)ってなったので覚書
10.3.30以上を初めから使ってる場合は影響ないっぽい

追記:MariaDB10.3.31リリースノートには壊れる(壊れてないけど)書いてあった

環境

アップグレード前

Debian 10.9
MariaDB 10.3.2x

アップグレード後

Debian 10.12
MariaDB 10.3.35

アップグレード後のエラーログ

/var/log/mysql/error.log

2022-04-12 14:37:09 0 [Note] InnoDB: Using Linux native AIO
2022-04-12 14:37:09 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-04-12 14:37:09 0 [Note] InnoDB: Uses event mutexes
2022-04-12 14:37:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-04-12 14:37:09 0 [Note] InnoDB: Number of pools: 1
2022-04-12 14:37:09 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-04-12 14:37:10 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-04-12 14:37:10 0 [Note] InnoDB: Completed initialization of buffer pool
2022-04-12 14:37:10 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-04-12 14:37:10 0 [ERROR] InnoDB: corrupted TRX_NO 10002001a69c0f4
2022-04-12 14:37:10 0 [Note] InnoDB: Retry with innodb_force_recovery=5
2022-04-12 14:37:10 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2022-04-12 14:37:10 0 [Note] InnoDB: Starting shutdown...
2022-04-12 14:37:10 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-04-12 14:37:10 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-04-12 14:37:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-04-12 14:37:10 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-04-12 14:37:10 0 [ERROR] Aborting

応急処置

10.3.2xまでダウングレードしてバージョンをホールドする様にしておく

ダウングレード

apt install mariadb-server-10.3=1:10.3.29-0+deb10u1 mariadb-server-core-10.3=1:10.3.29-0+deb10u1

バージョン固定

apt-mark hold mariadb-server-core-10.3 mariadb-server-10.3 mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common

現状の本対応

1.アップグレード前にDB全体のダンプを取る
2.DB初期化する
3.mariadbを10.3.30以上にアップグレードする
4.DBをインポートする

運用中のDBでやりたくないね?

エラーログに出てくる

InnoDB: Retry with innodb_force_recovery=5

これやるとほんとに壊れそう・・・

参考情報

MariaDB10.3.31リリースノート
Bug#996028: #996028 InnoDB: corrupted TRX_NO after upgrading to 10.3.31
fix InnoDB: corrupted TRX_NO after upgrading to 10.3.31

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0