Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-710

LP #1382347: Include innodb_log_group_home_dir and innodb_undo_directory as special variables supported by sst_special_dirs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Jaime Sicam last update 05-11-2014 11:06:14

      Currently, xtrabackup-v2 fails when innodb_log_group_home_dir or innodb_undo_directory is set

      Tested on PXC 5.6.20/CentOS 6:

      Joiner my.cnf:
      [mysqld]
      user=mysql

      1. Disabling symbolic-links is recommended to prevent assorted security risks
        symbolic-links=0

      user=mysql

      1. Path to Galera library
        wsrep_provider=/usr/lib64/libgalera_smm.so
      1. Cluster connection URL contains the IPs of node#1, node#2 and node#3
        wsrep_cluster_address=gcomm://192.168.1.80,192.168.1.81,192.168.1.82
      1. In order for Galera to work correctly binlog format should be ROW
        binlog_format=ROW
      1. MyISAM storage engine has only experimental support
        default_storage_engine=InnoDB
      1. This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
        innodb_autoinc_lock_mode=2
      1. Node #2 address
        wsrep_node_address=192.168.1.81
      1. SST method
        wsrep_sst_method=xtrabackup-v2
      1. Cluster name
        wsrep_cluster_name=my_centos_cluster
      1. Authentication for SST method
        wsrep_sst_auth="sstuser:s3cret"

      datadir=/var/lib/mysql
      innodb_data_home_dir=/var/lib/mysql-innodb
      innodb_log_group_home_dir=/var/lib/mysql-innodb/logs
      #innodb_undo_directory=/var/lib/mysql-innodb/logs

      innodb_file_per_table
      [mysqld_safe]
      log-error=/var/log/mysqld.log
      pid-file=/var/run/mysqld/mysqld.pid

      [sst]
      sst_special_dirs=1

      Donor my.cnf:
      [mysqld]
      user=mysql

      1. Disabling symbolic-links is recommended to prevent assorted security risks
        symbolic-links=0

      user=mysql

      1. Path to Galera library
        wsrep_provider=/usr/lib64/libgalera_smm.so
      1. Cluster connection URL contains the IPs of node#1, node#2 and node#3
        wsrep_cluster_address=gcomm://192.168.1.80,192.168.1.81,192.168.1.82
      1. In order for Galera to work correctly binlog format should be ROW
        binlog_format=ROW
      1. MyISAM storage engine has only experimental support
        default_storage_engine=InnoDB
      1. This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
        innodb_autoinc_lock_mode=2
      1. Node #3 address
        wsrep_node_address=192.168.1.82
      1. SST method
        wsrep_sst_method=xtrabackup-v2
      1. Cluster name
        wsrep_cluster_name=my_centos_cluster
      1. Authentication for SST method
        wsrep_sst_auth="sstuser:s3cret"

      datadir=/var/lib/mysql
      innodb_data_home_dir=/var/lib/mysql-innodb
      innodb_log_group_home_dir=/var/lib/mysql-innodb/logs
      #innodb_undo_directory=/var/lib/mysql-innodb/logs

      innodb_file_per_table

      [sst]
      sst_special_dirs=1

      [mysqld_safe]
      log-error=/var/log/mysqld.log
      pid-file=/var/run/mysqld/mysqld.pid

      Test:
      [root@pxc2 mysql]# service mysql restart
      Shutting down MySQL (Percona XtraDB Cluster) ERROR! MySQL (Percona XtraDB Cluster) PID file could not be found!
      ERROR! MySQL (Percona XtraDB Cluster) is not running, but lock file (/var/lock/subsys/mysql) exists
      Starting MySQL (Percona XtraDB Cluster)......State transfer in progress, setting sleep higher
      ......... ERROR! The server quit without updating PID file (/var/lib/mysql/pxc2.pid).
      ERROR! MySQL (Percona XtraDB Cluster) server startup failed!
      ERROR! Failed to restart server.

      Logs:
      cat /var/lib/mysql/.sst/innobackup.move.log

      InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
      and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.

      This software is published under
      the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

      Get the latest version of Percona XtraBackup, documentation, and help resources:
      http://www.percona.com/xb/p

      IMPORTANT: Please check that the move-back run completes successfully.
      At the end of a successful move-back run innobackupex
      prints "completed OK!".

      innobackupex: Error: Original InnoDB log directory '/var/lib/mysql-innodb/logs' does not exist! at /usr//bin/innobackupex line 2141.

      Error log:
      WSREP_SST: [INFO] Cleaning the existing datadir and innodb-data/log directories (20141016 12:31:53.054)
      removed directory: `/var/lib/mysql-innodb/logs'
      removed `/var/lib/mysql/gvwstate.dat'
      WSREP_SST: [INFO] Evaluating socat -u TCP-LISTEN:4444,reuseaddr stdio | xbstream -x; RC=( ${PIPESTATUS[@]} ) (20141016 12:31:53.137)
      2014-10-16 12:32:36 16914 [Note] WSREP: 0.0 (pxc3): State transfer to 1.0 (pxc2) complete.
      2014-10-16 12:32:36 16914 [Note] WSREP: Member 0.0 (pxc3) synced with group.
      WSREP_SST: [INFO] Preparing the backup at /var/lib/mysql//.sst (20141016 12:32:47.878)
      WSREP_SST: [INFO] Evaluating innobackupex --no-version-check --apply-log $rebuildcmd ${DATA} &>${DATA}/innobackup.prepare.log (20141016 12:32:47.897)
      rm: cannot remove `/var/lib/mysql//innobackup.prepare.log': No such file or directory
      rm: cannot remove `/var/lib/mysql//innobackup.move.log': No such file or directory
      WSREP_SST: [INFO] Moving the backup to /var/lib/mysql/ (20141016 12:33:03.580)
      WSREP_SST: [INFO] Evaluating innobackupex --defaults-file=/etc/my.cnf --no-version-check --move-back --force-non-empty-directories ${DATA} &>${DATA}/innobackup.move.log (20141016 12:33:03.594)
      WSREP_SST: [ERROR] Cleanup after exit with status:1 (20141016 12:33:05.472)
      WSREP_SST: [INFO] Removing the sst_in_progress file (20141016 12:33:05.475)
      2014-10-16 12:33:05 16914 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '192.168.1.81' --auth 'sstuser:s3cret' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf' --parent '16914' '' : 1 (Operation not permitted)
      2014-10-16 12:33:05 16914 [ERROR] WSREP: Failed to read uuid:seqno from joiner script.
      2014-10-16 12:33:05 16914 [ERROR] WSREP: SST failed: 1 (Operation not permitted)
      2014-10-16 12:33:05 16914 [ERROR] Aborting

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: