MariaDB down after creating symlink from old to new datadir

I recently tried moving my datadir to a new, larger drive, in a RAID 1 enclosure. The method I used was this one, essentially creating a symlink in my existing datadir that instead pointed to my new drive, which all the current contents copied over to it.

That part worked well enough, but after I was done, MariaDB was down. It’s likely because I missed a step and didn’t realize that the db end of things needed some attention as well.

Here is some info about the setup:

NextcloudPi version v1.52.4
NextcloudPi image NextCloudPi_RaspberryPi_v1.52.2.img
OS Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount yes
USB devices sda sdb sdc
datadir /media/myCloudDrive/ncdata/data
data in SD no
data filesystem btrfs
data disk usage 1.3T/3.7T
rootfs usage 11G/118G
swapfile /var/swap
dbdir /var/lib/mysql
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service down
Redis service up
HPB service down
Postfix service up
Internet check ok

Here is the latest output from journalctl -u mariadb

Nov 13 21:57:06 nextcloudpi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 3038.
Nov 13 21:57:06 nextcloudpi systemd[1]: Stopped MariaDB 10.5.21 database server.
Nov 13 21:57:06 nextcloudpi systemd[1]: Starting MariaDB 10.5.21 database server...
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] Starting MariaDB 10.5.21-MariaDB-0+deb11u1 source revision bed70468ea08c2>
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: Cannot find checkpoint record at LSN (1,0xbff5)
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [ERROR] mariadbd: Aria recovery failed. Please run aria_chk -r on all Aria table>
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [ERROR] Plugin 'Aria' init function returned error.
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It m>
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no ef>
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Uses event mutexes
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Number of pools: 1
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Using ARMv8 crc32 instructions
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Using Linux native AIO
Nov 13 21:57:26 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:26 0 [Note] InnoDB: Initializing buffer pool, total size = 2013265920, chunk size = 1>
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: Completed initialization of buffer pool
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: 128 rollback segments are active.
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the fil>
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: 10.5.21 started; log sequence number 22232887599; transaction id >
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] Plugin 'FEEDBACK' is disabled.
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [Note] InnoDB: Buffer pool(s) load completed at 231113 21:57:27
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some>
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [ERROR] Failed to initialize plugins.
Nov 13 21:57:27 nextcloudpi mariadbd[528534]: 2023-11-13 21:57:27 0 [ERROR] Aborting
Nov 13 21:57:27 nextcloudpi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 21:57:27 nextcloudpi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 13 21:57:27 nextcloudpi systemd[1]: Failed to start MariaDB 10.5.21 database server.

This seems to just repeat over and over.

It looks like something related to “Aria” is an issue but I’m not sure what. A quick search elsewhere suggests deleting all aria_log* files, which seems innocuous enough. But I’m hoping to get some feedback here before trying that.

I have run aria_chk -r as recommended in the log, but I don’t believe it did anything other than list out the options and usage

Following up on this…

I ended up deleting the one aria_log* file and rebooting. There was no change, though a new log file with the next sequential number was created.

I then ran aria_chk -r again. As before, there didn’t seem to be any action undertaken, but just that the list of options was displayed. Maybe I was mistaken but it really didn’t look like anything happened!

I rebooted again, with no change.

Then I started and stopped the mariaDB service service mariadb stop then service mariadb start. Reboot again, and lo and behold the system info on the web interface reports that MariaDB is up.

Then turn maintenance mode off and reboot again, and now HBP is back up too. So I seem to be back in business.

But it’s not clear what happened and what fixed it. I would have expected the many reboots I did over the past few days would have started the mariadb service. Maybe aria_chk -r did more than I thought it did.

If anyone else has comments about what had happened it would be appreciated.

There are some automatic recover options enabled by default:

Luckily it was some Aria meta table, and not a Nextcloud InnoDB data table :slightly_smiling_face:.

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