docker container lost access to NFS share, deleted events

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
rhombus00
Posts: 2
Joined: Fri Nov 23, 2018 4:13 am

docker container lost access to NFS share, deleted events

Post by rhombus00 »

I've been running zoneminder 1.32 on Ubuntu 18 for several months. The Ubuntu has a NFS mount in fstab to my FreeNAS. I just had a power issue and I had to manually boot my FreeNAS and Ubuntu host. I guess my Ubuntu host and ZM container loaded before FreeNAS did because when I got around to checking ZM, it only had a day's worth of events and none of them could reach the files. I ran a mount -a and restarted the ZM container to fix, but I no longer have events although the files are now accessible.

I'm not that concerned about the deleted events; I would just like to try to prevent this in the future. I checked the forums and found this useful post https://wiki.zoneminder.com/Common_Issu ... ve_or_NAS referring to using systemd to handle the mount and service dependency. I don't think that will work because I'm running ZM in a container, though. I'm thinking the modifying the docker images health check to do something like an ls on the mount might work. Does anyone have any experience with this type of scenario?

Thanks
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: docker container lost access to NFS share, deleted events

Post by iconnor »

Turn off zmaudit. You don't need it, or only want to run it every now and then.
rhombus00
Posts: 2
Joined: Fri Nov 23, 2018 4:13 am

Re: docker container lost access to NFS share, deleted events

Post by rhombus00 »

I''ll give that a shot.
Thanks!
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: docker container lost access to NFS share, deleted events

Post by knight-of-ni »

If you move your NFS mount into a system mount file and create a systemd service file to manage your zoneminder container, you can then automatically prevent zoneminder from starting, in the event your remote storage fails to mount.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Post Reply