Open joshqou opened 1 day ago
Tablespace is missing for table
This is an issue at the database level (i.e. with the underlying *.ibd
files). This isn't something Nextcloud can cause nor, unfortunately, fix.
The resolution on that other issue wasn't really a "fix" per se. They dropped (deleted) the messed up table, re-added empty tables by re-running the db migrations, and crossed their fingers. Since it was Text session data, it was transient in nature so they presumably didn't care about the data itself (I'm surmising).
A restore though is the only way to get the data back.
In a production environment the appropriate solution is likely to be:
Given my instance is currently unusable, and nextcloud's documentation on such an event is basically just "restore from backup lol", I've got a few resolution options I can think of however I don't know how to go ahead with any of them.
I'd suggest
If you're lucky it's a filesystem (OS level) permissions issue or something like. There are various things that can cause it, such as botched restores or moves, buggy MariaDB version, network storage problems, using with WSL, etc. You'll have to use your favorite search engine and poke around since we're not equipped to provide hands-on support through this channel (outside the scope of bugs in Nextcloud itself).
This is an issue at the database level. This isn't something Nextcloud can cause nor, unfortunately, fix.
The resolution on that other issue wasn't really a "fix" per se. They dropped (deleted) the messed up table, re-added empty tables by re-running the db migrations, and crossed their fingers. Since it was Text session data, it was transient in nature so they presumably didn't care about the data itself (I'm surmising).
I'm aware, however I'd prefer to know what exactly the corrupted tables are used for before going ahead since Nextcloud is still partially functional. So completely wiping Nextcloud may not be necessary if the damaged tables aren't necessary or contain replaceable data.
If you're lucky it's a filesystem (OS level) permissions issue or something like. There are various things that can cause it, such as botched restores or moves, buggy MariaDB version, network storage problems, using with WSL, etc. You'll have to use your favorite search engine and poke around since we're not equipped to provide hands-on support through this channel (outside the scope of bugs in Nextcloud itself).
Sadly doesn't seem to be. All the permissions (unix & SELinux) seem to be fine and no other databases were effected. Nextcloud and mariadb are both using local storage on the same machine and it isn't the only database-heavy service using it. If it was a db-originated/hardware issue, other services would've probably been affected too
I'd prefer to know what exactly the corrupted tables are used for before going ahead since Nextcloud is still partially functional [..] if the damaged tables aren't necessary or contain replaceable data
That's a gray area. However:
textprocessing_tasks
is for queuing AI/Text processing tasks: https://github.com/search?q=repo%3Anextcloud%2Fserver%20textprocessing_tasks&type=code
accounts_data
is used AFAIK for storing account related data in a more search friendly fashion. I'm not sure what will happen when this is out-of-sync with the accounts
table: https://github.com/search?q=repo%3Anextcloud%2Fserver+accounts_data&type=code
notifications
is pretty much what it sounds like: https://github.com/nextcloud/notifications/blob/master/lib/Migration/Version2004Date20190107135757.php
If it was a db-originated/hardware issue, other services would've probably been affected too
If only it were that simple. :)
That's a gray area. However:
I'm aware. I've backed up the other readable tables in case trying to remake the broken ones breaks anything.
textprocessing_tasks
is for queuing AI/Text processing tasks: https://github.com/search?q=repo%3Anextcloud%2Fserver%20textprocessing_tasks&type=code
accounts_data
is used AFAIK for storing account related data in a more search friendly fashion. I'm not sure what will happen when this is out-of-sync with theaccounts
table: https://github.com/search?q=repo%3Anextcloud%2Fserver+accounts_data&type=code
notifications
is pretty much what it sounds like: https://github.com/nextcloud/notifications/blob/master/lib/Migration/Version2004Date20190107135757.php
So textprocessing_tasks
and notifications
should behave properly if dropped and "migrated"?
Accounts data does seem a bit more important but it as you mentioned, it seems to duplicate data from the main accounts
table. I'd have presumed that nextcloud would freshen up the accounts_data
table if it was out of sync but I can't see any code which would do such. Nextcloud being functional despite the table being corrupt does give me some hope.
If only it were that simple. :)
🫠
⚠️ This issue respects the following points: ⚠️
Bug description
Upgraded from 28 to 30 (28 -> 29, 29 -> 30) and nextcloud seems to have mutelated several of it's tables.
The upgrade from 28 to 29 seems to have corrupted the tables as the logs show the errors after the upgrade.
The tables mariadb can't read are as follows:
The tables are completely unreadable, can't even see their schemas using
SHOW CREATE TABLE
. Other tables in nextcloud's database & other databases seem to be fine.All tables return the following from
mariadb-check
I am able to login as a local admin account, however all of my oidc-connected accounts fail to login.
I have tried using innodb recovery however that didn't work, the tables seem to be completely dead.
Tried using
occ maintenance:repair --include-expensive
andocc db:add-missing-indices
.I have also looked at #46130 and nextcloud/text/5950 however the resolution is specific to another table being corrupted and doesn't explain how the actions taken works.
Given my instance is currently unusable, and nextcloud's documentation on such an event is basically just "restore from backup lol", I've got a few resolution options I can think of however I don't know how to go ahead with any of them.
oidc_user
backed accounts into regular local ones without losing data?Steps to reproduce
Expected behavior
n/a
Nextcloud Server version
30
Operating system
Other
PHP engine version
PHP 8.3
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
https://gist.github.com/joshqou/5095ccc3a1ea78c4c17c2ea7eba09542
Additional info
OS is Fedora 40 Server