Ad Widget

Collapse

Corrupted InnoDB table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brhunt
    Member
    • Feb 2013
    • 50

    #1

    Corrupted InnoDB table

    My zabbix server had a hard crash after a power outage.

    The MySQL process hangs up on starting now. The Error.Log file shows this message: [ERROR] [MY-011906] [InnoDB] Database page corruption on disk or a failed file read of page.

    I have tried to start mysql with different Innodb_force_recovery levels but nothing seems to help.

    Unfortunately we cannot restore any of the databases/tables.

    Are there any other recovery steps to try?

    Or, can I uninstall/reinstall MariaDB without losing all of my zabbix configuration data? I don't care about the history, but would like to be able to save all monitored devices/items.

    Thanks.

    Bryan Hunt

  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    If I were in your situation, the next thing I would try would be

    Code:
    mysqlcheck --check --databases zabbix
    mysqlcheck --repair --databases zabbix
    If the "check" tells you *which* table(s) is/are corrupted, there may be things that can be done to get you up and running, even if '--repair' can't fix it. For example, if it's the history_uint table that's the only corrupt table, then it's likely going to be possible to remove that table and recreate it as an empty table. You lose the history data specifically stored in that table, but the rest of your install would be fine.

    I hope you plan on starting a database backup regimen after you get this issue resolved.

    Comment

    • brhunt
      Member
      • Feb 2013
      • 50

      #3
      Tim,

      Thanks for the response.

      Can I run mysqlcheck without the daemon running? MySQL hangs up on start, never gets to the running state.

      Thought that I had a backup running, turns out not-so-much.

      Bryan

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Originally posted by brhunt
        Can I run mysqlcheck without the daemon running? MySQL hangs up on start, never gets to the running state.
        I was afraid you might run into that, but I thought it was worth a try.

        What's the exact version of MariaDB you're using, and what numeric innodb_force_recovery=N values have you tried? Have you tried that option via the command line, or only in a config file?

        Comment

        • brhunt
          Member
          • Feb 2013
          • 50

          #5
          Tim,

          I thought that I was running MariaDB on this server, but looks like just MySQL community version.

          root@zabbix5:/home/zabbixadmin# dpkg --get-selections | grep mariadb
          root@zabbix5:/home/zabbixadmin# dpkg --get-selections | grep mysql
          libmysqlclient21:amd64 install
          mysql-client install
          mysql-client-8.0 install
          mysql-client-core-8.0 install
          mysql-common install
          mysql-server install
          mysql-server-8.0 install
          mysql-server-core-8.0 install
          php-mysql install
          php7.4-mysql install
          zabbix-server-mysql install
          root@zabbix5:/home/zabbixadmin#


          I believe that I have tried force_recovery 1 through 6. Only through the config file. How would I do that on CLI?

          Thanks.

          Bryan​

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #6
            I had hoped that one of those values would work, but according to this Percona blog article about InnoDB database corruption, innodb_force_recovery values 4-6 have been broken for a while: https://www.percona.com/blog/dealing...d-innodb-data/

            I don't know what else you can try, other than perhaps the innodb tools mentioned at the end of that Percona article.

            Good luck!

            Comment

            • brhunt
              Member
              • Feb 2013
              • 50

              #7
              Tim,

              Thanks again. I believe that a reinstall is going to be required.

              Thanks.

              Bryan

              Comment

              Working...