Skip to content

Instantly share code, notes, and snippets.

@ssddanbrown
Created August 1, 2022 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssddanbrown/3f62ff0091e813aa3d08f596497db702 to your computer and use it in GitHub Desktop.
Save ssddanbrown/3f62ff0091e813aa3d08f596497db702 to your computer and use it in GitHub Desktop.
MySQL 8.0.30-0ubuntu0.20.04.2 & ZFS Fix
# BACKUP & SNAPSHOT BEFORE USE
# Files starting with hashes are just comments
# Gather required zeros to append
# Will create a "zeros" file in the current directory
# This has been calculated based upon 2007040 % 16384 = 8192 or <broken_file_size> % <default_page_size>
dd if=/dev/zero bs=1 count=8192 of=./zeros
# Append zeroes to invalid file
cat zeros >> /var/lib/mysql/#innodb_redo/#ib_redo6
# Restart MySQL
systemctl restart mysql.service
@ssddanbrown
Copy link
Author

For context, you'll need to at least replace 8192 with the result of <broken_file_size> % <default_page_size>. The default page size is usually 16384 unless modified.
You'll also need to replace the #ib_redo6 part of the second command with the broken file reported in the error message.

This was put together after reading this Ubuntu error report and this MySQL error report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment