1 (edited by 0x000015 2018-12-19 12:52:16)

Topic: [SOLVED] InnoDB: Error: invalid tablespace flags in tablespace

- iRedMail version (check /etc/iredmail-release): 0.9.7 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: Debian 9 GNU/Linux (Stretch)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No


I recently recovered from a power outage and I've been stuck with a MySQL error regarding

Status: "InnoDB: Error: invalid tablespace flags in tablespace ./iredapd/greylisting_tracking.ibd (table iredapd/greylisting_tracking)" 

And since then I've been unable to start mysql or access my webmail interface.

Full listing from SystemCTL

● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: signal) since Tue 2018-12-18 04:21:36 UTC; 1s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 16253 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
  Process: 16177 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 16170 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 16166 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
 Main PID: 16253 (code=killed, signal=ABRT)
   Status: "InnoDB: Error: invalid tablespace flags in tablespace ./iredapd/greylisting_tracking.ibd (table iredapd/greylisting_tracking)"

Any help would be appreciated to reduce downtime

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED] InnoDB: Error: invalid tablespace flags in tablespace

If only the sql table "iredapd.greylisting_tracking" has this issue, the quickly solution might be:

- Remove files of this table in MySQL database directory.
- Start mysql service.
- Re-create this table (you can copy the sql commands from /opt/iredapd/SQL/iredapd.mysql).

If there're many sql tables with this issue, it's a different story.

3

Re: [SOLVED] InnoDB: Error: invalid tablespace flags in tablespace

ZhangHuangbin wrote:

If only the sql table "iredapd.greylisting_tracking" has this issue, the quickly solution might be:

- Remove files of this table in MySQL database directory.
- Start mysql service.
- Re-create this table (you can copy the sql commands from /opt/iredapd/SQL/iredapd.mysql).

If there're many sql tables with this issue, it's a different story.

Thanks for the helping me! I fixed it by deleting greylisting_tracking.ibd in /var/lib/mysql/iredapd
and then MySQL started right up.
Marking this as solved

4

Re: [SOLVED] InnoDB: Error: invalid tablespace flags in tablespace

Please make sure you re-created removed sql table(s).