Tablespace is missing for table

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • [Nextcloud Hub 9] (30.0.6)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.58
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx/1.24.0
  • PHP version (e.g, 8.3):
    • PHP 8.3.17
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After upgrading Mariadb 10.4 to 10.11
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • LXD container
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Warning : Tablespace is missing for table ‘nextcloud/oc_group_admin’
Error : Got error 194 “Tablespace is missing for a table” from storage engine InnoDB
error : Corrupt

Warning : Tablespace is missing for table ‘nextcloud/oc_accounts_data’
Error : Got error 194 “Tablespace is missing for a table” from storage engine InnoDB
error : Corrupt

Steps to replicate it (hint: details matter!):

  1. backup mariadb databases on 10.4
  2. launch new container with mariadb 10.11
  3. restore backup

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

Just 1000s of tablespace missing errors for the 2 tables

Can I safely drop the two tables and will Nextcloud recreate them automagically?

Please detail how you backed up and imported the data.

Was it using this approach?

I did the old fashioned backup from 10.4

mysqldump -u root -p  --all-databases > alldb.sql

to the new server:

mysql -u root -p < alldb.sql

I have other databases on it that aren’t giving me any problems

I would re-run the backup with --single-transaction to eliminate the most obvious possibilities (even if it’s not the source of this problem it’s recommended for good reason).

Assuming you’re on the latest patch release of MariaDB 10.4.x and 10.11.x, this is a fairly straightforward endeavor otherwise.

I would also check the mariadb error/container logs to see if there are further clues of something else going on.

I have other databases on it that aren’t giving me any problems

It’s not really possible for Nextcloud itself to cause this problem. The error indicates an underlying issue with how the tables are stored on-disk by MariaDB. Generally corruption or permissions.

I would not expect it to be permissions since you did logical backup and restore rather than moved the underlying files around.

Sadly the old server is gone so rerunning the backup is quite a bit of work.
I will have to setup a new server, restore the backup, make another backup and restore it again :slight_smile:

If there’s no other way then I will have to do it, but I’m hoping dropping the 2 tables and recreating them will fix it as well.

Nextcloud seems to be running fine without being able to read them.

I’m pretty sure the next update will be a problem tho’…

Sooo…

I created a new Nextcloud database on my mariadb server

CREATE USER 'ncloud'@'192.168.x.x' IDENTIFIED BY 'test';
CREATE DATABASE ncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON ncloud.* TO 'ncloud'@'192.168.x.x';
FLUSH PRIVILEGES;
quit;

Downloaded the lastest Nextcloud on my Nextcloud server

cd /var/www/html/test/
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip

Installed a new Nextcloud

cd /var/www/html/nextcloud
sudo -u www-data php occ maintenance:install --database
“mysql” --database-host=“192.168.x.y” --database-name “ncloud” --database-user “ncloud” --database-pass
‘test’ --admin-user “admin” --admin-pass “password”

Set mariadb in repair mode

nano /etc/mysql/my.cnf

added

[mysqld]
innodb_force_recovery = 4

Restarted mariadb

Dropped the 2 offending tables, exported them from the new install and imported them to the old database.

I haven’t seen any errors yet so I’m hoping for the best :slight_smile:

Thanks @jtr for thinking along with me.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.