Re: InnoDB: Error: tablespace size stored in header is 17024 pages, but
Dear Heikki Many thanks for your reply. On Mon, 3 Jan 2005 20:41:22 +0200 "Heikki Tuuri" <[EMAIL PROTECTED]> wrote: > are you sure that you copied the complete ibdata1 file to the new > place? It is strange how 7 MB can be missing from the file end. I have just checked the tar file I used to do the transfer and sure enough, the file length is right there, but not in my database directory. Obviously I didn't notice any error when I unpacked it, but it is definitely short now. So that (partly) explains what went wrong ... however we have new data in the database now so it is too late to go back tho that copy. > What does the old .err log contain? Any message about disk space > running out? > > The error below probably has not corrupted your tablespace. Best to > run CHECK TABLE on some of your tables, though. I did that on all tables and they all show they are OK. > When ibdata files are created, they are initially written full of > zeros. You can probably fix the error by using another mysqld > installation (or any method that makes a 7 MB zero-filled file) to > create a new ibdata2 file that is 7 MB in size, and add that to the > tablespace. Look from > http://dev.mysql.com/doc/mysql/en/Adding_and_removing.html > how to edit my.cnf then. Thanks. This is what I did: First I created ibdata2 with the command dd if=/dev/zero bs=1M count=7 of=ibdata2 Then I added it to the start of the tablespace path in my.cnf by changing innodb_data_file_path = ibdata1:10M:autoextend to innodb_data_file_path = ibdata2:7M;ibdata1:10M:autoextend Then I shut down: 050105 14:25:57 [Note] /local/own-1/rt/rt-3.2.2/libexec/mysqld: Normal shutdown 050105 14:25:57 InnoDB: Starting shutdown... 050105 14:26:01 InnoDB: Shutdown completed; log sequence number 0 407778847 050105 14:26:01 [Note] /local/own-1/rt/rt-3.2.2/libexec/mysqld: Shutdown complete 050105 14:26:01 mysqld ended ... and restarted MySQL but I got an error: 050105 14:26:04 mysqld started 050105 14:26:05 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 050105 14:26:05 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 407778847. InnoDB: Doing recovery: scanned up to log sequence number 0 407778847 InnoDB: Page directory corruption: supremum not pointed to followed by a page dump and a stack trace. I removed the entry for the new file in the data file path and it has started as it did before. Have I misunderstood your instructions? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: InnoDB: Error: tablespace size stored in header is 17024 pages, but
Ian, are you sure that you copied the complete ibdata1 file to the new place? It is strange how 7 MB can be missing from the file end. What does the old .err log contain? Any message about disk space running out? The error below probably has not corrupted your tablespace. Best to run CHECK TABLE on some of your tables, though. When ibdata files are created, they are initially written full of zeros. You can probably fix the error by using another mysqld installation (or any method that makes a 7 MB zero-filled file) to create a new ibdata2 file that is 7 MB in size, and add that to the tablespace. Look from http://dev.mysql.com/doc/mysql/en/Adding_and_removing.html how to edit my.cnf then. Best regards, Heikki Tuuri Innobase Oy Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables http://www.innodb.com/order.php Order MySQL technical support from https://order.mysql.com/ - Original Message - From: "Ian Grant" <[EMAIL PROTECTED]> Newsgroups: mailing.database.myodbc Sent: Friday, December 31, 2004 5:26 PM Subject: InnoDB: Error: tablespace size stored in header is 17024 pages, but Dear MySQL people I have a question regarding the error: InnoDB: Error: tablespace size stored in header is 17024 pages, but InnoDB: the sum of data file sizes is only 16576 pages which appeared when I upgraded from 4.0.7 to 4.1.7. Somehow I am 448 pages (7M) short of table space. Can I fix this using the procedure outlined in http://archives.neohapsis.com/archives/mysql/2004-q3/3723.html or should I do a dump/restore? Here are the gory details: I was running MySQL Ver 12.22 Distrib 4.0.17 with the following /etc/my.cnf file: [mysqld] user=www datadir=/local/own-1/rt/mysql-data innodb_data_file_path = ibdata1:10M:autoextend Then I built a new MySQL Ver 14.7 Distrib 4.1.7 and decided to do binary logging so I changed /etc/my.cnf to read [mysqld] user=rt datadir=/local/own-1/rt/mysql-data innodb_data_file_path = ibdata1:10M:autoextend # Set buffer pool size to 50-80% of memory set-variable = innodb_buffer_pool_size=512M set-variable = innodb_additional_mem_pool_size=10M # Set the log file size to about 25% of the buffer pool size set-variable = innodb_log_file_size=64M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 # Turn on binary logging and sync set-variable = log_bin=1 set-variable = sync_binlog=1 Then I shut down the old database, copied the data files and deleted the ib_logfile* files and this is what I got in the logs on starting 4.1.7. I was a bit surprised at the 'not shut down normally' message, but hey. ... 041229 14:04:51 mysqld started 041229 14:04:51 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 64 MB InnoDB: Database physically writes the file full: wait... 041229 14:04:53 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 64 MB InnoDB: Database physically writes the file full: wait... 041229 14:04:55 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... InnoDB: Resetting space id's in the doublewrite buffer 041229 14:04:55 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 405584396. InnoDB: Doing recovery: scanned up to log sequence number 0 405584396 041229 14:04:55 InnoDB: Flushing modified pages from the buffer pool... 041229 14:04:55 InnoDB: Started; log sequence number 0 405584396 InnoDB: You are upgrading to an InnoDB version which allows multiple InnoDB: tablespaces. Wait that purge and insert buffer merge run to InnoDB: completion... InnoDB: Full purge and insert buffer merge completed. InnoDB: You have now successfully upgraded to the multiple tablespaces InnoDB: format. You should NOT DOWNGRADE to an earlier version of InnoDB: InnoDB! But if you absolutely need to downgrade, see InnoDB: http://dev.mysql.com/doc/mysql/en/Multiple_tablespaces.html InnoDB: for instructions. 041229 14:04:57 [Warning] mysql.user table is not updated to new password format ; Disabling new password usage until mysql_fix_privilege_tables is run 041229 14:04:57 [Warning] Can't open and lock time zone table: Table 'mysql.time _zone_leap_second' doesn't exist trying to live without them /local/own-1/rt/rt-3.2.2/libexec/mysqld: ready for connections. Version: '4.1.7-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution But now when I start the database I get: 041230 10:04:37 mysqld started InnoDB: Error: tablespace size stored in header is 17024 pages, but InnoDB: the sum of data file sizes is only 16576 pages 041230 10:04:39 InnoDB: Started; log sequence number 0 405783741 041230 10
InnoDB: Error: tablespace size stored in header is 17024 pages, but ...
Dear MySQL people I have a question regarding the error: InnoDB: Error: tablespace size stored in header is 17024 pages, but InnoDB: the sum of data file sizes is only 16576 pages which appeared when I upgraded from 4.0.7 to 4.1.7. Somehow I am 448 pages (7M) short of table space. Can I fix this using the procedure outlined in http://archives.neohapsis.com/archives/mysql/2004-q3/3723.html or should I do a dump/restore? Here are the gory details: I was running MySQL Ver 12.22 Distrib 4.0.17 with the following /etc/my.cnf file: [mysqld] user=www datadir=/local/own-1/rt/mysql-data innodb_data_file_path = ibdata1:10M:autoextend Then I built a new MySQL Ver 14.7 Distrib 4.1.7 and decided to do binary logging so I changed /etc/my.cnf to read [mysqld] user=rt datadir=/local/own-1/rt/mysql-data innodb_data_file_path = ibdata1:10M:autoextend # Set buffer pool size to 50-80% of memory set-variable = innodb_buffer_pool_size=512M set-variable = innodb_additional_mem_pool_size=10M # Set the log file size to about 25% of the buffer pool size set-variable = innodb_log_file_size=64M set-variable = innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=1 # Turn on binary logging and sync set-variable = log_bin=1 set-variable = sync_binlog=1 Then I shut down the old database, copied the data files and deleted the ib_logfile* files and this is what I got in the logs on starting 4.1.7. I was a bit surprised at the 'not shut down normally' message, but hey. ... 041229 14:04:51 mysqld started 041229 14:04:51 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 64 MB InnoDB: Database physically writes the file full: wait... 041229 14:04:53 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 64 MB InnoDB: Database physically writes the file full: wait... 041229 14:04:55 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... InnoDB: Resetting space id's in the doublewrite buffer 041229 14:04:55 InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 405584396. InnoDB: Doing recovery: scanned up to log sequence number 0 405584396 041229 14:04:55 InnoDB: Flushing modified pages from the buffer pool... 041229 14:04:55 InnoDB: Started; log sequence number 0 405584396 InnoDB: You are upgrading to an InnoDB version which allows multiple InnoDB: tablespaces. Wait that purge and insert buffer merge run to InnoDB: completion... InnoDB: Full purge and insert buffer merge completed. InnoDB: You have now successfully upgraded to the multiple tablespaces InnoDB: format. You should NOT DOWNGRADE to an earlier version of InnoDB: InnoDB! But if you absolutely need to downgrade, see InnoDB: http://dev.mysql.com/doc/mysql/en/Multiple_tablespaces.html InnoDB: for instructions. 041229 14:04:57 [Warning] mysql.user table is not updated to new password format ; Disabling new password usage until mysql_fix_privilege_tables is run 041229 14:04:57 [Warning] Can't open and lock time zone table: Table 'mysql.time _zone_leap_second' doesn't exist trying to live without them /local/own-1/rt/rt-3.2.2/libexec/mysqld: ready for connections. Version: '4.1.7-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution But now when I start the database I get: 041230 10:04:37 mysqld started InnoDB: Error: tablespace size stored in header is 17024 pages, but InnoDB: the sum of data file sizes is only 16576 pages 041230 10:04:39 InnoDB: Started; log sequence number 0 405783741 041230 10:04:39 [Warning] mysql.user table is not updated to new password format ; Disabling new password usage until mysql_fix_privilege_tables is run 041230 10:04:39 [Warning] Can't open and lock time zone table: Table 'mysql.time _zone_leap_second' doesn't exist trying to live without them /local/own-1/rt/rt-3.2.2/libexec/mysqld: ready for connections. Version: '4.1.7-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]