We are running multiple Percona MySQL servers (8.0.x versions) and are backing them up regurarly. Some of the preparation of full backups on instances are failing (not all time, but some), giving us the following error message:
2024-10-03T12:05:14.733958-00:00 0 [Note] [MY-012201] [InnoDB] Checked 15055 files
2024-10-03T12:05:14.753836-00:00 0 [Note] [MY-012208] [InnoDB] Completed space ID check of 15057 files.
2024-10-03T12:05:14.762477-00:00 0 [Note] [MY-012955] [InnoDB] Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M
2024-10-03T12:05:14.795773-00:00 0 [Note] [MY-012957] [InnoDB] Completed initialization of buffer pool
2024-10-03T12:05:14.805786-00:00 0 [Note] [MY-011951] [InnoDB] page_cleaner coordinator priority: -20
2024-10-03T12:05:14.805964-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20
2024-10-03T12:05:14.806082-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20
2024-10-03T12:05:14.806118-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20
2024-10-03T12:05:14.936301-00:00 0 [ERROR] [MY-012962] [InnoDB] The redo log file ./#innodb_redo/#ib_redo0 size 8397824 is not a multiple of innodb_page_size
2024-10-03T12:05:14.936360-00:00 0 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted at srv0start.cc[1926] with error Generic error.
2024-10-03T12:05:14.937827-00:00 0 [ERROR] [MY-011825] [Xtrabackup] innodb_init(): Error occured
2024-10-03T12:05:14.938452-00:00 0 [ERROR] [MY-012962] [InnoDB] The redo log file ./#innodb_redo/#ib_redo0 size 8397824 is not a multiple of innodb_page_size
2024-10-03T12:05:14.938469-00:00 0 [ERROR] [MY-011825] [Xtrabackup] Unable to validate the redo log files at the end of prepare
Version info:
xtrabackup version 8.0.35-30 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 6beb4b49)
mysql Ver 8.0.35-27 for Linux on x86_64 (Percona Server (GPL), Release 27, Revision 2f8eeab2)
The backups are going to NFS mount.
[Actual workaround is to restart the full backup (xtrabackup --backup), then run prepare again (xtrabackup --prepare)]
Yep. That’s odd. What is your innodb_redo_log_capacity set to? Make sure it is a multiple of 16K. After that, try taking a backup locally and prepare locally. If that works, perhaps there is an issue going to NFS.
The actual server has 512M configured for innodb_redo_log_capacity.
I’ve run test towards NFS and local targets:
run backup-test towards NFS storage: 6 failed out of 14
run backup-test towards local storage: 0 failed out of 91
So for now it seems to be an NFS problem. As we don’t have enough space locally, we must use NFS.
My question: can #innodb_redo folder be separated from the backup itself during the backup-prepare stages?
PXB will store its own copy of them with the backup.
Well, that’s the point: seems that during --prepare some times #innodb_redo folder contents are messed up on NFS folder. The question in more detailed format:
we want to have the backup on NFS
we want to do prepare there (same folder)
can we separate #innodb_redo folder from the backup/prepare folder to have it in local disk?
Looks like PXB can read innodb parameters from my.cnf:
You might be able to create a [xtrabackup] section in my.cnf and specify innodb_log_group_home_dir. You could also simply try xtrabackup --innodb_log_group_home_dir=/local/disk/path ...
I’ve tried many parameters and configuration settings, but couldn’t manage to get #innodb_redo folder out of the prepared data directory. The only change was that #innodb_temp could be replaced.
I’ve updated the --prepare command (took out defaults and credentials to avoid collisions):
I see lots of references to this parameter in the code:
This could be a bug, OR, you can’t override the parameters on the CLI. Try changing this parameter in my.cnf for both [mysqld] section, and [xtrabackup] section and see if PXB picks it up. You are in uncharted waters, so there will be lots of testing on your side for this unusual setup.
Redo log files reside in the #innodb_redo directory in the data directory unless a different directory was specified by the innodb_log_group_home_dir variable. If innodb_log_group_home_dir was defined, the redo log files reside in the #innodb_redo directory in that directory.
I’ve tried to set that parameter using the following methods:
command line parameter to xtrabackup command (--innodb-log-group-home-dir)
Looks like it. Please open a bug report at https://jira.percona.com and include as much detail as you can, including a repeatable test case with all parameters that you are using. Our engineering team will take a look.
Looks like it. Please open a bug report at https://jira.percona.com and include as much detail as you can, including a repeatable test case with all parameters that you are using. Our engineering team will take a look.
That’s all you can do, unless you can fix the code yourself Our engineering team will take a look at it, someone will attempt to reproduce it and confirm, then it will be prioritized for an engineer to take a look.