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

#2 InnoDB: Operating system error number 2 in a file operation and InnoDB: Cannot open datafile for read-only upon startup on datadir restored from full backup

    XMLWordPrintable

Details

    Description

      Note: Patches for MDEV-18201 and MDEV-18184 should already be in the tree, according to git history.

      10.4 10.4 edba047080

      2019-01-16 23:41:23 0 [Note] InnoDB: New log files created, LSN=37159799
      2019-01-16 23:41:23 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test/#sql-5c90_11.ibd' OS error: 71
      2019-01-16 23:41:23 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
      2019-01-16 23:41:23 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``test`.`#sql-5c90_11``. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
      ...
      

      Full error log is attached as mysql.err

      The backup datadir before prepare can be found here:
      ftp://ftp.askmonty.org/public/mdev18309-backup_before_prepare.tar.gz

      The backup log is attached as mbackup_backup.log

      To reproduce, unpack the backup datadir, adjust the path to the plugin dir and the encryption key file and run

      bin/mariabackup --prepare --target-dir=`pwd`/backup_before_prepare
      bin/mariabackup --copy-back --target-dir=`pwd`/backup_before_prepare --datadir=`pwd`/data 
      

      and start the server with

      --innodb-encrypt-tables --innodb-encrypt-log --innodb-encryption-threads=4 --aria-encrypt-tables=1 --encrypt-tmp-disk-tables=1 --file-key-management --file-key-management-filename=/home/travis/mariadb-toolbox/data/keys.txt --plugin-load-add=file_key_management --innodb-compression-algorithm=zlib --innodb-page-size=8K
      

      I have no information yet whether it affects earlier versions.

      Notes on the origin of the report


      Please note it's not necessarily reproducible this way.

      https://travis-ci.org/elenst/travis-tests/jobs/480418805
      Tests: elenst-dev 23f517b6dba9c7b542e279d6ab9b1b24c578d6ab
      Toolbox: c826c29aaabaf8bc9ba9363b7a9c6427ee9f5810

      perl ./runall-new.pl --basedir=/home/travis/server --vardir=/home/travis/logs/vardir --duration=350 --threads=4 --seed=1547681839 --reporters=Backtrace,ErrorLog,Deadlock --skip-gendata --gendata-advanced --views --grammar=conf/mariadb/generic-dml.yy --redefine=conf/mariadb/bulk_insert.yy --mysqld=--log_output=FILE --mysqld=--max-statement-time=20 --mysqld=--lock-wait-timeout=10 --mysqld=--loose-innodb-lock-wait-timeout=5 --mysqld=--loose-debug_assert_on_not_freed_memory=0 --filter=/home/travis/mariadb-toolbox/travis/10.4-combo-filter.ff --mysqld=--innodb-encrypt-tables --mysqld=--innodb-encrypt-log --mysqld=--innodb-encryption-threads=4 --mysqld=--aria-encrypt-tables=1 --mysqld=--encrypt-tmp-disk-tables=1 --mysqld=--file-key-management --mysqld=--file-key-management-filename=/home/travis/mariadb-toolbox/data/keys.txt --mysqld=--plugin-load-add=file_key_management --mysqld=--innodb-compression-algorithm=zlib --mysqld=--innodb-page-size=8K --engine=InnoDB --scenario=MariaBackupFull --redefine=conf/mariadb/alter_table.yy --redefine=conf/mariadb/modules/admin.yy --redefine=conf/mariadb/versioning.yy --redefine=conf/mariadb/sequences.yy
      

      Test log is attached as trial.log

      Attachments

        1. trial.log
          46 kB
        2. mbackup_backup.log
          20 kB
        3. mysql.err
          7 kB

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 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.