Which type of installation will let me move mariaDB database and Frigate recordings to an external HDD?

Hey everyone,

I am in the process of creating a HA instance on a second pc (a recent thinkpad) which will mainly handle my Frigate NVR and the database needs for my main HA instance.

The NVME drive of the thinkpad is kind of small on capacity (but i can live with that) the main thing is that I understand that the NVME drive on the laptop is not the most suitable for constant read/rights.

What i want is to move the actual database of mariaDB and point the frigate recordings to an external usb drive.

My technical abilities allow me to install HAOS and Supervised on debian 12.
I’ve tried setting it up on proxmox but I didnt make it, just lost a couple of days of my life trying to mount HDs without success.

I’ve seen this Samba+NAS addon which mounts shares and then i can add them to my media folder, would that be the solution for the frigate front? - (this only works on HAOS tho - not supervised)

As for moving the DB out of the main HD, i have no idea how to do that.

Any instructions or links of tutorials would be greatly appreciated!!

Thanks in Advance!

PS:
I am currently messing with a fresh Supervised installation on debian 12.
I guess i could “move datadisk” to the extneral drive (which is formatted to ext4 and shows up on the list).
That would move my entire installation and boot from the external drive, along with the OS right?
This would partly allow me to do what i want, and move everything, Frigate and DBs (and i guess it’s my last resort), but wouldn’t it be more efficient if debian+supervised stayed on the nvme?

I think most nvme drives can withstand carrying a database. What you could do is install mariadb on a different drive (through docker) or for example run a mariadb server on a different server. In Homeassistant you can then point the database url to that server and all data will flow to there.

See also: Recorder - Home Assistant

Until now I ran my main HA instance on a laptop And on a different laptop, a second HA where I installed Maria db and frigate. I installed HA on the second machine for the ease of setting up the db and the nvr as I’m not comfortable doing it standalone. (I’m actually using HA as a platform to manage the addon, I have frigate, maria db, influxdb, grafana and adguard)

If I understand correctly, you are suggesting to install docker on the 2nd machine and install standalone containers of maria db and frigate and point the containers to run on their data drives on the external hdd?

Can docker run different containers on different drives?

That’s a solution I might be able to get to work with the correct guides…

Apologies for late reply, but docker can indeed run different containers on different drives as long as you can reach those drives via the host. See for more details: Bind mounts | Docker Documentation

Thank you, I’ll definitely check it out.
And maybe come back with some questions :slight_smile: