Hello all,
I can fumble my way around Ubuntu but I am still mostly a noob. I have deployed a couple of Unifi NVR systems and because of the myriad of issues running this on a windows machine with mongod I decided to run it on an OS native to Unifi video NVR. There is one issue I can not figure out and google searches are not reflecting my issue in its responses.
I have the Ubuntu server mounting a Synology disk station at /nas. If there is a power outage (which happens once in a while since the system is running on generators) the Ubuntu server boots up immediately but the Synology with its 112 TB iscsi takes a bit longer so if both are powered up at the same time the NAS does not mount as it is not present at the running of fstab (also mount -a does not mount it but a reboot after the synology is up does). I know there is some package or command that makes ubuntu wait for the mounts to be present to boot but that only addresses half of my issue. The other part is if the UPS on the Synology faults (this just happened) I am left in the same situation where I have now created another mount issue.
Is the a script anyone can help with, or maybe a package that checks mounted systems every say 5 minutes and if a mount is not present it reboots the system? I know rebooting is a little extreme but a mount going dark causes issues not only wth the mount being reinstated but also with the NVR software now starts acting funky and a reboot is the most complete way I have seen to reset to a working state.
The most important part of this system is that the recordings are being saved all of the time and viewing or using any other aspect of the Ubuntu server comes in second. I always need the NAS mounted and it is the most important aspect of this system as recovering recordings from multiple paths and also recovering recordings off a half full 112 TB drive never seems to succeed and I need to avoid it in the first place.
Or does this come down to a simple remount script if a frequent check of the mount status fails?
Any ideas?
Thank you.
Bookmarks