skip to Main Content

My Ubuntu 22.04 server is suddenly telling me that "The redo log file "./#innodb_redo/#ib_redo0 size 23289856 is not a multiple of innodb_page_size." My innodb_page_size is 16K, so the error is correct, but I can’t seem to find any advice on how to fix it. I tried moving ib_redo0 out of the way but that didn’t help. Any ideas?

2

Answers


  1. I also encountered this issue. It appeared to be specific to using ZFS on Ubuntu, in my case it was during an upgrade to MYSQL 8.0.30-0ubuntu0.20.04.2.

    Following details in this Ubuntu issue report and this MySQL issue report I was able to come up with a solution that worked in my environment.

    There are 3 commands below to be ran as root or with sudo. You should replace 8192 in the first with the result of <broken_file_size> % <default_page_size>. The default page size is usually 16384 unless modified.
    You may need to replace the #ib_redo0 part of the second command with the broken file reported in the error message.
    These commands are intended to pad out the reportedly invalid file with zeros.

    Perform a backup before running!

    # Gather required zeros to append
    # Will create a "zeros" file in the current directory
    # This has been calculated based upon 23289856 % 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_redo0
    
    # Restart MySQL
    systemctl restart mysql.service
    

    I’d be wary of remaining on ZFS, even if the above fixes things, for the sake of potentially hitting the same issue again.

    Login or Signup to reply.
  2. I had the same Problem in a LXD Container running on ZFS. I had to move it to a different type of storage-pool, e.g. Directory or BTRFS.

    After that the solution of @DanBrown worked for me too.

    Thank you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search