# XtraBackup prepare - ib\_redo0 size is not a multiple of innodb\_page\_size

**URL:** <https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177>\
**Category:** Percona XtraBackup\
**Tags:** mysql\
**Created:** [October 7, 2024, 10:39am UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177 "2024-10-07T10:39:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 7, 2024, 10:39am UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/1 "2024-10-07T10:39:37Z")

</div>

Hello,

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)]

What can be wrong?

Thanks,  
Bence

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 7, 2024, 2:04pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/2 "2024-10-07T14:04:39Z")

</div>

8397824/(16\*1024) = 512.5625

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.

---

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 9, 2024, 1:48pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/3 "2024-10-09T13:48:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 9, 2024, 4:05pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/4 "2024-10-09T16:05:45Z")

</div>

During the backup process, the redo logs can be in a different location. PXB will store its own copy of them with the backup.

---

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 9, 2024, 10:47pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/5 "2024-10-09T22:47:43Z")

</div>

> 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?

Example command:

```sh
xtrabackup-debug \
  --defaults-file="/etc/my_${_db_instance}.cnf" \
  --socket=/var/lib/mysql1/${_db_instance}/mysql.sock \
  --user="backup" --password="***" \
  --parallel=2 \
  --prepare \
  --target-dir="${FOLDER_ON_NFS}" \
  --debug="d:f:F:L:n:P:t:i:o,/tmp/prepare.trace"

```

So is it possible to have `#innodb_redo` folder not with the backup, but in another folder (on local disk)?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 9, 2024, 11:12pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/6 "2024-10-09T23:12:26Z")

</div>

Looks like PXB can read innodb parameters from my.cnf:

> **[Percona XtraBackup - The xtrabackup command-line options](https://docs.percona.com/percona-xtrabackup/8.0/xtrabackup-option-reference.html#innodb-miscellaneous)**
>
> Here you can find all of the command-line options for the xtrabackup binary.

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 ...`

---

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 14, 2024, 9:55am UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/7 "2024-10-14T09:55:26Z")

</div>

Hello,

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):

```sh
xtrabackup-debug \
  --parallel=2 \
  --prepare \
  --target-dir="<DB_BACKUP_DIR>" \
  --redo-log-arch-dir="<LOCAL_DIR>/${_redo_log_arch_dir}" \
  --innodb-data-home-dir="<LOCAL_DIR>/${_innodb_data_home_dir}" \
  --innodb-undo-directory="<LOCAL_DIR>/${_innodb_undo_directory}" \
  --innodb-log-group-home-dir="<LOCAL_DIR>/${_innodb_log_group_home_dir}" \
  --temp-tablespaces-dir="<LOCAL_DIR>/${_temp_tablespaces_dir}" \
  --fifo-dir="<LOCAL_DIR>/${_fifo_dir}" \
  --debug="d:f:F:L:n:P:t:i:o,<LOCAL_DIR>/prepare.trace"

```

The only folder which has content in it during the prepare was the one set with `--temp-tablespaces-dir`

`#innodb_redo` is created in the data directory - this can be seen in the debug/trace output as well:

```auto
T@0: xtrabackup-debug: my_lib.cc: 303: 1: >my_stat
T@0: xtrabackup-debug: my_lib.cc: 305: 1: | my: path: './#innodb_redo' stat_area: 0x7fff4d89cb70 MyFlags: 0
T@0: xtrabackup-debug: my_lib.cc: 314: 1: | error: Got errno: 2 from stat
T@0: xtrabackup-debug: my_lib.cc: 1: <my_stat
T@0: xtrabackup-debug: my_mkdir.cc: 45: 1: >my_mkdir
T@0: xtrabackup-debug: my_mkdir.cc: 46: 1: | enter: dir: ./#innodb_redo
T@0: xtrabackup-debug: my_mkdir.cc: 1: <my_mkdir

```

So question remained open: is it possible to have `#innodb_redo` folder not with the backup, but in another folder (on local disk)?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 14, 2024, 5:25pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/8 "2024-10-14T17:25:30Z")

</div>

I see lots of references to this parameter in the code:

> **[Build software better, together](https://github.com/search?q=repo%3Apercona%2Fpercona-xtrabackup%2Binnodb_log_group_home_dir&type=code)**
>
> GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

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.

---

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 21, 2024, 12:25pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/9 "2024-10-21T12:25:39Z")

</div>

I’ve done some testing.  
As MySQL documentation shows, that parameter should do what we want:

- [MySQL :: MySQL 8.0 Reference Manual :: 17.14 InnoDB Startup Options and System Variables, innodb\_log\_group\_home\_dir](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_log_group_home_dir)
- [MySQL :: MySQL 8.0 Reference Manual :: 17.6.5 Redo Log](https://dev.mysql.com/doc/refman/8.0/en/innodb-redo-log.html)

> 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`](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_log_group_home_dir) variable. If [`innodb_log_group_home_dir`](https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_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`)
- through .cnf file:
  - `[xtrabackup]` block, `innodb_log_group_home_dir` parameter
  - `[mysqld]` block, `innodb_log_group_home_dir` parameter

The latest test was run with the following .cnf and command:

```sh
xtrabackup-debug \
  --defaults-file="${MAIN_DIR}/xtrabackup-mysql.cnf" \
  --parallel=2 \
  --prepare \
  --target-dir="${_backup_baseDir}" \
  --innodb-log-group-home-dir="<LOCAL_DIR>/${_innodb_log_group_home_dir}" \
  --debug="d:f:F:L:n:P:t:i:o,<LOCAL_DIR>/prepare.trace"

```

```auto
[xtrabackup]
innodb_log_group_home_dir = <LOCAL_DIR>/innodb_log_group_home_dir

[mysqld]
innodb_log_group_home_dir = <LOCAL_DIR>/innodb_log_group_home_dir

```

Neither of them helped, so it seems that PXB doesn’t pick up that parameter.  
What type of test should I run?

_ **Can we say that this is a bug in Percona Xtrabackup?** _

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 21, 2024, 3:36pm UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/10 "2024-10-21T15:36:51Z")

</div>

> [@bentse](#):
>
> Neither of them helped, so it seems that PXB doesn’t pick up that parameter.
> 
> _ **Can we say that this is a bug in Percona Xtrabackup?** _

Looks like it. Please open a bug report at [https://jira.percona.com](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.

---

<div class="post-metadata">

**Author:** ![bentse](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bentse](https://forums.percona.com/u/bentse)\
**Post date:** [October 22, 2024, 7:51am UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/11 "2024-10-22T07:51:17Z")

</div>

> Looks like it. Please open a bug report at [https://jira.percona.com](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.

I’ve opened the ticket: [[PXB-3392] xtrabackup doesn’t pick up --innodb-log-group-home-dir config parameter - Percona JIRA (atlassian.net)](https://perconadev.atlassian.net/browse/PXB-3392)  
Is there anything I can do about it or from this point Percona Team will assign that ticket to somebody?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [October 22, 2024, 11:52am UTC](https://forums.percona.com/t/xtrabackup-prepare-ib-redo0-size-is-not-a-multiple-of-innodb-page-size/34177/12 "2024-10-22T11:52:15Z")

</div>

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.
