Won't Do
Details
Assignee
UnassignedUnassignedReporter
Carlos TutteCarlos TutteAffects versions
Priority
Low
Details
Details
Assignee
Unassigned
UnassignedReporter
Carlos Tutte
Carlos TutteAffects versions
Priority
Smart Checklist
Smart Checklist
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
: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:
innodb_log_group_home_dir = /var/lib/mysql/innologs/ # does work
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:
Pre-requisite:
ib_logfiles MUST exist on innodb_log_group_home_dir , as what is fail is the removal for a new SST
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
Check with both parameters:
innodb_log_group_home_dir = /var/lib/mysql/innologs/ # does work
innodb_log_group_home_dir = /var/lib/mysql/innologs # does NOT work
Stop Mysql, remove grstate to force SST and restart Mysql
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