Frigate + network storagedrive for data sometimes fails mounting

Hey guys,

I have frigate running as an addon which stores the recorded data on a networkdrive that is attached as /media/frigate/.
Works like a charm, most of the time.
Only just a couple of days ago the networkdrive failed to mount as /media/frigate which resulted in the addon storing the data locally on the main drive ha itself is on.
This again resulted in this drive filling up, its just too small to store cctv footage.

Anyone have an idea how I can prevent this in the future? It has happened about three times in the past and I have to painfully delete the shares unmount the drive reformat and start all over (OMV is difficult and very involved to do this) I use Pi3 with OMV and two USB attached 1 TB SSD’s. My Pi5 runs HAOS with the Frigate addon. In addition adding network storage to HA doesn’t always work (have to try multiple times and pray it finally connects). Finally no real indication if it worked , sometimes get a red colored box with an icon when trying to connect in HA. It is very frustrating and I have spent countless hours to remedy this when it happens and I have to walk away sometimes. Lately saying something about the drive mount/unmount, I gave up. There should be an easier way to purge Frigate.db to reestablish the storage connection through the addon or through Home Assistant to facilitate the connection to the NAS. Otherwise if no issues it all operates and runs fine.

Have a script that verifies the network drive is attached then either reboots HA orb attention to mount the drive