Michael Caplan via discuss <discuss@lists.mariadb.org> writes:
I am attempting to create a replica from a MariaDB 10.3.31 master. The replicate is running MariaDB 10.3.39 on the same OS (Ubuntu 20.04) and
1. rsync /var/lib/mysql from master to replica 2. On master: FLUSH TABLES WITH READ LOCK; SHOW MASTER STATUS; 3. On master: Shutdown 4. rerun rsync from master to replica; then restart master 5. Start mariadb on replica
When starting the replica which now has all the master data rsynced over, I am getting the following error repeated over and over again:
2023-12-26 22:14:54 0 [ERROR] InnoDB: Page [page id: space=43077, page number=3] log sequence number 19989139444854 is in the future! Current system log sequence number 19246539202516. 2023-12-26 22:14:54 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
To debug this, I would suggest to compare the rsync copy with the original in step 4, eg. something like: diff --recursive <original> <copy> (after the rerun rsync, but before restarting the master). Most likely, something goes wrong with the rsync not copying everything it should, and this can hopefully help understand what goes wrong. Since the master restarts ok on the original, the most likely explanation is that the copy is not identical. For example, if rsync's "quick check" or --checksum heuristics is used and fails to detect some file modifications. - Kristian.