Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.1.26, 10.2.8, 10.3.1, 10.4.0, 10.2.25, 10.5.0, 10.8.0, 10.6.0, 10.7.0, 10.9.0
-
None
-
$ rpm -qa | grep MariaDB
MariaDB-common-10.2.25-1.el7.centos.x86_64
MariaDB-client-10.2.25-1.el7.centos.x86_64
MariaDB-server-10.2.25-1.el7.centos.x86_64
MariaDB-backup-10.2.25-1.el7.centos.x86_64
MariaDB-compat-10.2.25-1.el7.centos.x86_64
$ rpm -qf /usr/bin/innochecksum
MariaDB-server-10.2.25-1.el7.centos.x86_64
$ rpm -qa | grep MariaDB MariaDB-common-10.2.25-1.el7.centos.x86_64 MariaDB-client-10.2.25-1.el7.centos.x86_64 MariaDB-server-10.2.25-1.el7.centos.x86_64 MariaDB-backup-10.2.25-1.el7.centos.x86_64 MariaDB-compat-10.2.25-1.el7.centos.x86_64 $ rpm -qf /usr/bin/innochecksum MariaDB-server-10.2.25-1.el7.centos.x86_64
Description
I want to check a table for possible corruption and find any bad pages.
This works but stops on the first page:
# innochecksum -v SomeTable.ibd
|
|
Variables (--variable-name=value)
|
and boolean options {FALSE|TRUE} Value (after reading options) |
--------------------------------- ----------------------------------------
|
verbose TRUE
|
count FALSE
|
start-page 0 |
end-page 0 |
page 0 |
strict-check crc32
|
no-check FALSE
|
allow-mismatches 0 |
write crc32
|
page-type-summary FALSE
|
page-type-dump (No default value) |
per-page-details FALSE
|
log (No default value) |
leaf FALSE
|
merge 0 |
Fail: page::35896414 invalid |
Exceeded the maximum allowed checksum mismatch count::1 current::0 |
#
|
It is not clear how to show all pages so I look at the man page.
This has different options compared to those listed above using -v
· -?, --help
|
· -c, --count
|
· -d, --debug
|
· -e num, --end-page=#
|
· -i, --per-page-details
|
· -I, --info
|
· -l, --leaf
|
· -m num, --merge=#
|
· -p num, --page-num=#
|
· -s num, --start-page
|
· -u, --skip-corrupt
|
· -v, --verbose
|
· -V, --version
|
I tried this:
# innochecksum -c -u SomeTable.ibd
|
innochecksum: unknown option '-u'
|
So trying the following to scan for all bad pages, but not sure it will work.
# innochecksum --verbose=TRUE --allow-mismatches=1 SomeTable.ibd
|
Suggestion:
- I have not checked against 10.4 or 10.3 binaries as this server has an older version. Is this fixed there?
- at least for newer versions ensure that the man page and command line output is consistent
- provide some examples of real life usage, or provide a url if the docs are online only.
- I was looking for a way to:
- check if the table might be corrupt (it seems to be)
- find the affected pages and how many are affected by this
- potentially find a way to copy out the data safely to a new system or new .ibd file with correct structure but with bad pages removed. (this clearly removes data and may lead to issues but MariaDB will not allow me to touch the table as it is.)
Context:
I saw the following error message:
2019-09-13 9:52:03 140376553817856 [Note] InnoDB: Uncompressed page, stored checksum in field1 0, calculated checksums for field1: crc32 0, innodb 171676754 |
1, page type 17855 == INDEX.none 3735928559, stored checksum in field2 0, calculated checksums for field2: crc32 0, innodb 157941122, none 3735928559, page |
LSN 148843 2136225981, low 4 bytes of LSN at page end 2136225981, page number (if stored to page already) 35896414, space id (if created with >= MySQL-4.1.1 |
and stored already) 3379096 |
2019-09-13 9:52:03 140376553817856 [Note] InnoDB: Page may be an index page where index id is 3589980 |
2019-09-13 9:52:03 140376553817856 [Note] InnoDB: Index 3589980 is `PRIMARY` in table `some_db`.`SomeTable` |
2019-09-13 9:52:03 140376553817856 [Note] InnoDB: It is also possible that your operating system has corrupted its own file cache and rebooting your compute |
r removes the error. If the corrupt page is an index page. You can also try to fix the corruption by dumping, dropping, and reimporting the corrupt table. Yo |
u can use CHECK TABLE to scan your table for corruption. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forci |
ng recovery.
|
2019-09-13 9:52:03 140376553817856 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in |
a case of widespread corruption, dump all InnoDB tables and recreate the whole tablespace. If the mysqld server crashes after the startup or when you dump t |
he tables. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery. |
2019-09-13 9:52:03 140376553817856 [ERROR] Slave SQL: Error 'Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB' on query. Defau |
lt database: 'some_db'. Query: <removed>, Gtid 0-188055117-23162684442, Internal MariaDB error code: 1030 |
Attachments
Issue Links
- is caused by
-
MDEV-11939 innochecksum mistakes a file for an encrypted one (page 0 invalid)
- Closed
- is duplicated by
-
MDEV-31363 innochecksum man page options do not match available options.
- Closed
- links to