Nextcloud breaks MariaDB on Install

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
tenorable
Posts: 3
Joined: Wed Jan 17, 2018 5:23 am

Nextcloud breaks MariaDB on Install

Post by tenorable » Tue Jul 09, 2019 3:20 am

I've set up my pi webserver to host two personal sites using Lighttpd. I've changed my lighttpd.conf to point to my usb drive that has the site files. I've set my dietpi_userdata to the USB drive using the dietpi-software drive manager, and edited the fstab to auto mount the USB. All permissions seem to be correct. Webserver and mariaDB (installed as part of the LLMP) were working, that is loading. Then I install Nextcloud using dietpi-software, and install exited with error due to mariaDB not starting.

Here is the systemctl readout:

● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-07-08 18:23:31 CDT; 56s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 7249 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
(code=exited, status=1/FAILURE)
Process: 7154 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: 7147 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exit
ed, status=0/SUCCESS)
Process: 7142 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exite
d, status=0/SUCCESS)
Main PID: 7249 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Jul 08 18:23:29 web-pi systemd[1]: Starting MariaDB 10.1.38 database server...
Jul 08 18:23:31 web-pi mysqld[7249]: 2019-07-08 18:23:31 1996218160 [Note] /usr/sbin/mysqld (mysqld
10.1.38-MariaDB-0+deb9u1) starting as process 7249 ...
Jul 08 18:23:31 web-pi mysqld[7249]: 2019-07-08 18:23:31 1996218160 [Warning] Can't create test file
/var/lib/mysql/web-pi.lower-test
Jul 08 18:23:31 web-pi systemd[1]: mariadb.service: Main process exited, code=exited, status
=1/FAILURE
Jul 08 18:23:31 web-pi systemd[1]: Failed to start MariaDB 10.1.38 database server.
Jul 08 18:23:31 web-pi systemd[1]: mariadb.service: Unit entered failed state.
Jul 08 18:23:31 web-pi systemd[1]: mariadb.service: Failed with result 'exit-code'.

This is my second attempt at this. First time, Nextcloud and the servers worked fine, but data was being stored to the sd card, not the USB, so when I moved the userdata folder mariaDB broke, i.e. failed to load. Thought presetting everything would keep it from breaking, but didn't work.

Is this the problem? The link is wrong?
lrwxrwxrwx 1 mysql mysql 26 Jul 8 18:21 mysql -> /mnt/dietpi_userdata/mysql
I tried creating a new symlink to the USB dietpi_userdata, but when I tried to install Nextcloud again, it failed, again. It seems to only want to link to /mnt/dietpi_userdata/mysql regardless of where you have put your userdata.

Help....

rasputin
Posts: 11
Joined: Sun Jun 23, 2019 1:49 pm

Re: Nextcloud breaks MariaDB on Install

Post by rasputin » Sat Jul 20, 2019 2:56 pm

@tenorable

Did I understand right, that you try to move the mysql/mariadb data diretory (usually /var/lib/mysql) to your USB drive?

Regards, rasputin

Post Reply