Where are is the database stored?

Team,

Over the weekend I have installed MariaDB with Nextcloud - both running in different Docker containers on the same PVE/LXC-container. Both are started with Docker-CLI (see further below) and seem to be working as expected. Meaning I can do a nextcloud login and create files.

According to the log of MariaDB and Nextcloud:
All data is stored in a LVM-volume called /mnt/nas-volume.
Here, there is a folder called mariadb and a folder called nextcloud.

The nextcloud-folder does contain user data.
But none of these folders contain MariaDB files of any kind.

I also checked /opt/docker/mariadb/config and /var/lib/mysqlwithin the MariaDB container. All known folders are empty.

What might be happening?
How do I locate the database(s)?

With warm regards - Will

=====

docker pull linuxserver/mariadb:latest
docker stop mariadb
docker rm mariadb
docker run
–name mariadb
–network host
-v /opt/docker/mariadb/config:/config
-e DATADIR=“/mnt/nas-volume/mariadb”
-e TZ=Europe/Amsterdam
-e PUID=1200
-e PGID=1200
-e MYSQL_ROOT_PASSWORD=“”
-e MYSQL_DATABASE=“mariadb-mouse”
-e MYSQL_USER=“mariadb”
-e MYSQL_PASSWORD=“”
-d
–restart unless-stopped
linuxserver/mariadb

docker pull linuxserver/nextcloud:latest
docker stop nextcloud
docker rm nextcloud
docker run
–name nextcloud
–network host
-v /opt/docker/nextcloud/config:/config
-v /mnt/nas-volume/nextcloud:/data
-e TZ=Europe/Amsterdam
-e PUID=1500
-e PGID=1500
-d
–restart unless-stopped
linuxserver/nextcloud

The databases are stored in /config.

Why would you put -e DATADIR=“/mnt/nas-volume/mariadb” in your docker run when our documentation doesn’t instruct you to?

Did you generate this from chatgpt?

To have the data stored on a different volume then the container and its config… similar to nextcloud, pihole and a few others.

I don’t know where where I picked this up. But it looked promising after the initial run…

So what you’ve done is tell mariadb to store it within a path of the container that you haven’t mapped. Mariadb has zero knowledge of your hosts paths, that’s why you don’t change stuff like that which we have set within the container and purposely not in the readme.

Ok - so what would be a proper mapping then?
Other then storing everything the same folder?

Or is it that all the lsio-containers are using this approach?
Meaning container, config en data are always in the same config folder?

The proper mapping will be as it’s shown in our readme. We defacto use /config as a location to store appdata.

Even though you set the datadir, you still incorrectly set it.