I have connected a hard drive to my router, and I am trying to make use of it both to store recordings from camera and to store the hass database.
I can set it up both as smb and ftp, but no matter what I do, it does not seem to work. I constantly get a error for the recordings saying “no access to destination”. The user has been granted access to the share, so that should not be the problem.
the approaches I have been trying out are:
For the database, that is a bit different.
I know it is a sqlite database, and the docs says that the path should be sqlite:////path/to/filename.
The example used in the docs only show for a local stored database. unfortunately, I am not able to install something like MariaDB on this drive.
How do I make it connect to a database stored on my network drive?
sqlite:////ftp:// seems way to odd but unfortunately, this is somewhat the thing I can come up with.
Its Hassio og HassOS. The drive is connected to my router, and works as a network drive that I can at least get access to from Windows.
It is completely empty except for to folders for db and recordings.
I run it on a Raspberry Pi with both a conbee and z-wave.me z-stick connected. So I did not have the guts to try connecting it directly to the pi, because I am not sure the power is sufficient.
The main idea was to have the active db stored on the network drive, to avoid having it on the SD card.
If you has Hassio on Raspbian or Ubuntu you woulsd have assess to the Samba client and could use smb to mount the drive.
HassOs only has the Samba server and it is in a Docker container as addon.
I am running Hassio on Raspbian Lite. I have access to a full Linux system and have the freedom to run some other lightweight service if I choose.
That depends on how fast your local disk is, how fast the network is, what protocol you use, what IO is like on each machine. There are many variables.
Not much of a good protocol for any damn thing. NFS would be superior. Many systems run their entire OS over NFS.
My first statement was local db on sdcard / remote smb with hdd. Easy case
Completely agree with NFS. (Lol about SMB…)
A db server on a NAS or anything able to run it.
Depending if you need to read all of your data at every connection…
Maybe smb can handle db backup and when you need to read all data you can merge all backups, but on a powerful device, not a Pi.