Error: trying to add tablespace

Asked by Sean Chighizola

I recently performed a mysqldump and restore of a large dataset as some tables were not using individual tablespaces. After this completed, the following day I experienced an error while performing a backup using xtrabackup (std backup managed through cron).

xtrabackup version 1.6.3 for Percona Server 5.1.55
MySQL version: 5.1.38

Error:

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.

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.38, for unknown-linux-gnu (x86_64) using readline 5.1
innobackupex-1.5.1: Using mysql server version Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.

innobackupex-1.5.1: Created backup directory /mnt/hot_backup/new
111207 11:04:06 innobackupex-1.5.1: Starting mysql with options: --defaults-file='/etc/my.cnf' --password='xxxx' --unbuffered --
111207 11:04:06 innobackupex-1.5.1: Connected to database with mysql child process (pid=1449)
111207 11:04:11 innobackupex-1.5.1: Connection to database server closed

xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data/database/db_data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = /data/database/db_data
xtrabackup: innodb_data_file_path = ibdata1:2000M:autoextend
xtrabackup: innodb_log_group_home_dir = /data/database/db_data
xtrabackup: innodb_log_files_in_group = 3
xtrabackup: innodb_log_file_size = 157286400
xtrabackup: use O_DIRECT
111207 11:04:11 InnoDB: Warning: allocated tablespace 24, old maximum was 9
InnoDB: Error: trying to add tablespace 8 of name './database/table1.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 8 of name './mysql/inventory.ibd' already exists in the tablespace
InnoDB: memory cache!
innobackupex-1.5.1: Error: ibbackup child process has died at /usr/bin/innobackupex-1.5.1 line 336.

I was not able to find any related posts and Google searched yielded no results. Any feedback is appreciated.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Percona XtraBackup moved to https://jira.percona.com/projects/PXB Edit question
Assignee:
No assignee Edit question
Solved by:
Sean Chighizola
Solved:
Last query:
Last reply:
Revision history for this message
Alexey Kopytov (akopytov) said :
#1

That means the data is corrupted, i.e.there are multiple tablespaces with the same id. I'm fairly sure trying to access those tables from the server will lead to the same error.

Revision history for this message
Sean Chighizola (sean-chighizola) said :
#2

Thanks for the update. I am able to access the tables via PK and secondary key lookups w/o errors. The table contained static data so the fix I implemented was backing up the table, dropping and restoring it. Thereafter the backups worked as expected.