Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29893

SST fails when having datadir set to a symlink to actual data directory

    XMLWordPrintable

Details

    Description

      When having datadir pointing at a symbolic link to the actual data directory instead of the data directory itself an SST attempt using the mariabackup method fails on the --move-back step as the data directory still contains files like "ibdata1".

      Looks as if the data directory purging step early in the SST workflow fails to detect that there are actual files still present in the data directory, wrongly interpreting a symbolic link as an empty directory.

      How to reproduce:

      • Install a node without wsrep settings at first
      • shut down the node
      • move its datadir from /var/lib/mysql to e.g. /data/mysql
      • make /var/lib/mysql a symlink to /data/mysql
      • do not change datadir=... yet
      • add galera specific wsrep_* settings, using mariabackup as SST method
      • start up the node

      The node will start to perform a SST, but will fail at the mariabackup --move-back step with e.g.:

          node-2: Oct 26 10:45:31 node-2 -innobackupex-move[2476]: [00] 2022-10-26 10:45:31 Error: Move file ibdata1 to /var/lib/mysql/ibdata1 failed: Destination file exists
          node-2: Oct 26 10:45:31 node-2 mariadbd[1922]: 2022-10-26 10:45:31 0 [ERROR] WSREP: Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script.
      

      This seems to have started with MariaDB 10.3, with 10.2 I can see the datadir being purged and SST succeeding even when using a symlink for datadir

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.