← Back to team overview

mylvmbackup-discuss team mailing list archive

InnoDB recovery doesn't work

 

Hi,

today I've noticed that the InnoDB recovery doesn't work at all. MySQL
is started and prints out some errors about invalid arguments, and the
error log says that it has no permission to read the data files,
whereever they may be. Here's my call:

sudo PASSWORD=rootpass mylvmbackup --vgname=apollo3 --lvname=root
--backuptype=none --extra_flush_tables --relpath=var/lib/mysql
--innodb_recover --keep_mount --lvsize=1G --skip_hooks

I'm on Ubuntu 10.4 with the standard MySQL package.

Hostname and volume group name: apollo3
Logical volume name: root, mounted at /
MySQL data dir: /var/lib/mysql

Here's the output from the command:

> 20100901 17:20:27 Info: Connecting to database...
> 20100901 17:20:27 Info: Flushing tables (initial)...
> 20100901 17:20:27 Info: Flushing tables with read lock...
> 20100901 17:20:27 Info: Taking position record into /tmp/mylvmbackup-backup-20100901_172027_mysql-Zjcn3z.pos...
> 20100901 17:20:27 Info: Running: lvcreate -s --size=1G --name=root_snapshot /dev/apollo3/root
> File descriptor 4 (socket:[72962]) leaked on lvcreate invocation. Parent PID 17228: /usr/bin/perl
>   Logical volume "root_snapshot" created
> 20100901 17:20:27 Info: DONE: taking LVM snapshot
> 20100901 17:20:27 Info: Unlocking tables...
> 20100901 17:20:27 Info: Disconnecting from database...
> 20100901 17:20:27 Info: Mounting snapshot...
> 20100901 17:20:27 Info: Running: mount -o rw /dev/apollo3/root_snapshot /var/cache/mylvmbackup/mnt/backup
> 20100901 17:20:28 Info: DONE: mount snapshot
> 20100901 17:20:28 Info: Copying /tmp/mylvmbackup-backup-20100901_172027_mysql-Zjcn3z.pos to /var/cache/mylvmbackup/mnt/backup-pos/backup-20100901_172027_mysql.pos...
> 20100901 17:20:28 Info: Recovering InnoDB...
> 20100901 17:20:28 Info: Running: echo 'select 1;' | mysqld_safe --socket=/tmp/mylvmbackup.sock --pid-file=/var/run/mylvmbackup_recoverserver.pid --log-error=/tmp/mylvmbackup_recoverserver.err --datadir=/var/cache/mylvmbackup/mnt/backup/var/lib/mysql --skip-networking --skip-grant --bootstrap --skip-ndbcluster --skip-slave-start
> 100901 17:20:29 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
> 100901 17:20:29 mysqld_safe Logging to '/tmp/mylvmbackup_recoverserver.err'.
> 100901 17:20:29 mysqld_safe Starting mysqld daemon with databases from /var/cache/mylvmbackup/mnt/backup/var/lib/mysql
> 100901 17:20:29 mysqld_safe mysqld from pid file /var/run/mylvmbackup_recoverserver.pid ended
> 20100901 17:20:29 Info: DONE: InnoDB recovery on snapshot
> 20100901 17:20:29 Info: Copying /etc/mysql/my.cnf to /var/cache/mylvmbackup/mnt/backup-pos/backup-20100901_172027_mysql_my.cnf...
> 20100901 17:20:29 Info: Backuptype none selected, not doing backup... DONE
> 20100901 17:20:29 Info: Cleaning up...
> 20100901 17:20:29 Info: Not removing mount as requested by configuration
> 20100901 17:20:29 Info: LVM Usage stats:
> 20100901 17:20:29 Info:   LV            VG      Attr   LSize Origin Snap%  Move Log Copy%  Convert
> 20100901 17:20:29 Info:   root_snapshot apollo3 swi-ao 1,00g root     0,04                        
> 20100901 17:20:29 Info: Not removing snapshot as requested by configuration

(Don't mind the late system time, NTPd doesn't work anymore after the VM
was suspended.)

Here's the contents of /tmp/mylvmbackup_recoverserver.err:

> 100901 17:20:29 mysqld_safe Starting mysqld daemon with databases from /var/cache/mylvmbackup/mnt/backup/var/lib/mysql
> 100901 17:20:29 [Warning] Can't create test file /var/cache/mylvmbackup/mnt/backup/var/lib/mysql/apollo3.lower-test
> 100901 17:20:29 [Warning] Can't create test file /var/cache/mylvmbackup/mnt/backup/var/lib/mysql/apollo3.lower-test
> 100901 17:20:29 [Note] Plugin 'FEDERATED' is disabled.
> 100901 17:20:29  InnoDB: Operating system error number 13 in a file operation.
> InnoDB: The error means mysqld does not have the access rights to
> InnoDB: the directory.
> InnoDB: File name ./ibdata1
> InnoDB: File operation call: 'open'.
> InnoDB: Cannot continue operation.
> 100901 17:20:29 mysqld_safe mysqld from pid file /var/run/mylvmbackup_recoverserver.pid ended

Any idea?

-- 
Yves Goergen - mail & jabber im: yves@xxxxxxxxxxxxxxx
http://unclassified.de - Web-Labor, HD-Fotogalerie, Webhosting
Diese Nachricht ist standardkonform mit OpenPGP digital signiert.

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups