xtrabackup does not support ALL_O_DIRECT for innodb_flush_method

Reported by Jacek Zemło on 2011-04-12
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Medium
Alexey Kopytov
1.6
Medium
Alexey Kopytov
2.0
Medium
Alexey Kopytov

Bug Description

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2011. All Rights Reserved.

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

110412 23:31:43 innobackupex-1.5.1: Starting mysql with options: --unbuffered --
110412 23:31:43 innobackupex-1.5.1: Connected to database with mysql child process (pid=26221)
110412 23:31:49 innobackupex-1.5.1: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex-1.5.1
           prints "completed OK!".

innobackupex-1.5.1: Using mysql Ver 14.14 Distrib 5.1.55, for debian-linux-gnu (x86_64) using EditLine wrapper
innobackupex-1.5.1: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

innobackupex-1.5.1: Created backup directory /home/backup/mysql/tmp/2011-04-12_23-31-49
110412 23:31:49 innobackupex-1.5.1: Starting mysql with options: --unbuffered --
110412 23:31:49 innobackupex-1.5.1: Connected to database with mysql child process (pid=26246)
110412 23:31:53 innobackupex-1.5.1: Connection to database server closed

110412 23:31:53 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup --backup --suspend-at-end --target-dir=/home/backup/mysql/tmp/2011-04-12_23-31-49
innobackupex-1.5.1: Waiting for ibbackup (pid=26256) to suspend
innobackupex-1.5.1: Suspend file '/home/backup/mysql/tmp/2011-04-12_23-31-49/xtrabackup_suspended'

xtrabackup Ver undefined Rev undefined for 5.1.55 unknown-linux-gnu (x86_64)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /home/game-mysql/data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = /home/game-mysql/data
xtrabackup: innodb_data_file_path = ibdata1:100M:autoextend
xtrabackup: innodb_log_group_home_dir = /home/game-mysql/data
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 536870912
xtrabackup: Unrecognized value ALL_O_DIRECT for innodb_flush_method
innobackupex-1.5.1: Error: ibbackup child process has died at /usr/bin/innobackupex-1.5.1 line 336.

Related branches

I can confirm that, on debian squeeze with all software straight out of the repo.

Should it even care about the flush method?

Dave Juntgen (djuntgen) wrote :

Getting the same error on FC12 EXT4.

Is there any way to run the server in ALL_O_DIRECT and run xtrabackup with O_DIRECT?

Partha Dutta (pdutta) wrote :

Here is a proposed patch that I think solves the issue. I have not fully tested it yet...

--- xtrabackup.c.orig 2011-05-11 06:54:29.000000000 -0700
+++ xtrabackup.c 2011-05-11 06:54:54.000000000 -0700
@@ -3420,6 +3420,9 @@
  } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
     srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
   fprintf(stderr,"xtrabackup: use O_DIRECT\n");
+ } else if (0 == ut_strcmp(srv_file_flush_method_str, "ALL_O_DIRECT")) {
+ srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
+ fprintf(stderr,"xtrabackup: use O_DIRECT\n");
  } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) {
     srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC;

Gabor Vincze (gabor-vincze) wrote :

Same error, lenny, 1.6-245.lenny

It seems to be important. I have just setup to ALL_O_DIRECT today and as backup is not working this way I have to restart the db again. After you fix another restart needed :(

110622 19:01:13 innobackupex-1.5.1: Connected to database with mysql child process (pid=5072)
110622 19:01:17 innobackupex-1.5.1: Connection to database server closed

110622 19:01:17 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup --defaults-file="/etc/mysql/my.cnf" --backup --suspend-at-end --log-stream --target-dir=./ --throttle=50
innobackupex-1.5.1: Waiting for ibbackup (pid=5082) to suspend
innobackupex-1.5.1: Suspend file '/db_vol/mysql/xtrabackup_suspended'

xtrabackup: suspend-at-end is enabled.
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /db_vol/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 268435456
xtrabackup: Unrecognized value ALL_O_DIRECT for innodb_flush_method
innobackupex-1.5.1: Error: ibbackup child process has died at /usr/bin/innobackupex-1.5.1 line 336.

Gabor Vincze (gabor-vincze) wrote :

Nevermind, a modified my.cnf solved the problem

banyek (banyek) wrote :

Bug appeared again in
xtrabackup_56 version 2.1.4 for MySQL server 5.6.11 Linux (x86_64) (revision id: 656)

[<email address hidden> /home/banyek]# innobackupex /tmp/test/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.

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

131217 14:41:42 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
131217 14:41:42 innobackupex: Connected to MySQL server
IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex: Using mysql server version 5.6.14-56-log

innobackupex: Created backup directory /tmp/test/2013-12-17_14-41-42

131217 14:41:42 innobackupex: Starting ibbackup with command: xtrabackup_56 --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/tmp/test/2013-12-17_14-41-42 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=25593) to suspend
innobackupex: Suspend file '/tmp/test/2013-12-17_14-41-42/xtrabackup_suspended_2'

xtrabackup_56 version 2.1.4 for MySQL server 5.6.11 Linux (x86_64) (revision id: 656)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 2147483648
xtrabackup: Unrecognized value ALL_O_DIRECT for innodb_flush_method
innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex line 416.

Right after commented out the
innodb_flush_method = ALL_O_DIRECT
from /etc/my.cnf it started working.

Alexey Kopytov (akopytov) wrote :

Thanks for the report. I created a separate bug for it: bug #1262078.

Alexey Kopytov (akopytov) wrote :

And I see bug #1261877 now :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers