Using symbolic links in innodb_log_group_home_dir and custom datadirs makes SST fail

Description

:q1

When changing Mysql dirs, and using a symbolic link path for "innodb_log_group_home_dir" (which does not end with a trailing "/") makes SST fail. For example:

Symbolic link:

ln -s /mysqldb/innologs/ /var/lib/mysql/innologs

Using:

  1. innodb_log_group_home_dir = /var/lib/mysql/innologs/ # does work

  2. innodb_log_group_home_dir = /var/lib/mysql/innologs # does NOT work

 

The error comes because SST does not remove ib_logfile from a previous execution, i.e the following does NOT show on mysql log:

removed ‘/mysqldb/innologs/ib_logfile1’

removed ‘/mysqldb/innologs/ib_logfile0’

And innobackup.move.log

innobackupex version 2.3.10 based on MySQL server 5.6.24 Linux (x86_64) (revision id: bd0d4403f36)
Error: Move file ib_logfile0 to /var/lib/mysql/innologs/ib_logfile0 failed: Destination file exists

 

 

In order to reproduce, follow this steps:

  1. Pre-requisite:

  1. ib_logfiles MUST exist on innodb_log_group_home_dir , as what is fail is the removal for a new SST

 

  1. Create custom dirs and symbolic link:
    mkdir /mysqldb/
    mkdir /mysqldb/data/
    mkdir /mysqldb/innodata
    mkdir /mysqldb/cluster/
    mkdir /mysqldb/innologs/
    chown mysql:mysql -R /mysqldb/
    ln -s /mysqldb/innologs/ /var/lib/mysql/innologs
    chown -h mysql:mysql /var/lib/mysql/innologs/

# Add to config:

[mysqld]
datadir = /mysqldb/data
innodb_data_home_dir = /mysqldb/innodata
wsrep_data_home_dir = /mysqldb/cluster

  1. Check with both parameters:

  1. innodb_log_group_home_dir = /var/lib/mysql/innologs/ # does work

  1. innodb_log_group_home_dir = /var/lib/mysql/innologs # does NOT work

 

  1. Stop Mysql, remove grstate to force SST and restart Mysql

  1. ib_logfiles must exist on the new directory for this to fail, so you need to execute twice or manually copy the files

systemctl stop mysql
rm -fr /var/lib/mysql/grastate.dat
rm -fr /mysqldb/cluster/grastate.dat

systemctl start mysql

 

 

 

Environment

None

AFFECTED CS IDs

234805

Smart Checklist

Activity

Julia Vural March 4, 2025 at 9:27 PM

It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.

Lalit Choudhary October 5, 2018 at 2:34 PM

 

mysql logs:

 

 

Lalit Choudhary October 5, 2018 at 1:22 PM

Hi Carlos,

Thank you for the report.

Validated as described. 

Won't Do

Details

Assignee

Reporter

Priority

Smart Checklist

Created August 30, 2018 at 11:05 PM
Updated March 4, 2025 at 9:27 PM
Resolved March 4, 2025 at 9:27 PM