This forum has been archived. All content is frozen. Please use KDE Discuss instead.

corrupted akonadi database

Tags: None
(comma "," separated)
User avatar
kirviq
Registered Member
Posts
2
Karma
0
OS

corrupted akonadi database

Mon Apr 02, 2018 10:00 am
Hi

I somehow got my akonadi database corrupted in a very bad way. The table parttable is broken so badly that the mariadb process crashes when I try to access it. I tried stopping aknonadi, manually starting the mariadb from commandline and then to analyze/fix the problem:

checking:
Code: Select all
MariaDB [akonadi]> check table parttable;
ERROR 2013 (HY000): Lost connection to MySQL server during query

server crashed

maybe just fixing works?
Code: Select all
MariaDB [akonadi]> optimize table parttable;
+-------------------+----------+----------+-------------------------------------------------------------------+
| Table             | Op       | Msg_type | Msg_text                                                          |
+-------------------+----------+----------+-------------------------------------------------------------------+
| akonadi.parttable | optimize | note     | Table does not support optimize, doing recreate + analyze instead |
| akonadi.parttable | optimize | error    | Got error 64 'Temp file write failure' from InnoDB                |
| akonadi.parttable | optimize | status   | Operation failed                                                  |
+-------------------+----------+----------+-------------------------------------------------------------------+
3 rows in set, 1 warning (21.82 sec)

at least the server is still alive

maybe copying the data?
Code: Select all
MariaDB [akonadi]> create table fix like parttable;
Query OK, 0 rows affected (0.02 sec)

MariaDB [akonadi]> -- I better try to copy it in chunks.
MariaDB [akonadi]> insert fix select * from parttable limit 0, 100000;
Query OK, 100000 rows affected (3.72 sec)
Records: 100000  Duplicates: 0  Warnings: 0

MariaDB [akonadi]> -- At least some rows are still accessible.
MariaDB [akonadi]> insert fix select * from parttable limit 100000, 50000;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Somewhere beyond row 100000 the problems start.

The table contains ~233000 rows and it's not just one that's broken. I guess dropping all tables and reconfiguring everything from scratch should work and I won't loose my emails. But that's a lot of work. (I've already done this once last year). What data does the parttable contain? Can it be reconstructed if I drop just this one table?

Any help or insights would be really appreciated.
User avatar
kirviq
Registered Member
Posts
2
Karma
0
OS

Re: corrupted akonadi database

Wed May 09, 2018 7:08 pm
Since no one was able to tell me what the parttable is for, I started more destructive recovery methods.

For everyone with similar problems:
  • I tried truncating the parttable (or more precisely deleting and recreating it). This lead to akonadi no longer starting up.
  • I tried to delete the entire db_data directory. Akonadi was starting up even less.
  • I deleted (well, moved) the entire ~/.local/share/akonadi directory. Akonadi is starting up. All settings, accounts, etc. still seem to be in place. Akonadi is currently reindexing all email folders. All read/unread information seem to be ok. Don't know yet about calendars, contacts, etc.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], ourcraft