Page 1 of 1

Bind mounts for existing NFS share

Posted: Mon Jan 30, 2023 6:48 am
by Crazyjpeters
I'm wondering if anyone has had similar issues:

I've installed a new VM with Ubuntu 22.04, NGINX, and zoneminder 1.36. I have an NFS share that I had previously been using with 1.34 on 18.04.

Code: Select all

# Mount /mnt/nfs mount point
# Should be stored in /etc/systemd/system/mnt-nfs.mount

[Unit]
Description=Zoneminder NFS mount
After=networking.service
Before=zoneminder

[Mount]
What=192.168.20.15:/Zoneminder/Cams
Where=/mnt/nfs
Type=nfs
Options=

# Make 'systemctl enable mnt-nfs.mount' work:
[Install]
WantedBy=multi-user.target
I can mount the NFS share with the same systemd mount unit that I had used previously, but the bind mount units won't mount for the events and images mounts at /var/cache/zoneminder/events and /images

Code: Select all

# systemd bind mount unit for ZoneMinder event storage

[Unit]
Description=systemd bind mount unit for ZoneMinder event storage
After=mnt-nfs.mount
Requires=mnt-nfs.mount

[Mount]
What=/mnt/nfs/zoneminder/events
Where=/var/cache/zoneminder/events
Type=none
Options=bind

[Install]
WantedBy=local-fs.target
I'm wondering if this is a permissions issue? There is this bind mount issue that was reportedhttps://bugs.launchpad.net/ubuntu/+sour ... ug/1979952, but looks like it was fixed.

Re: Bind mounts for existing NFS share

Posted: Wed Feb 01, 2023 7:31 am
by Crazyjpeters
Ugh...

Ok, for anyone who might run into this problem, I ran systemctl status /mnt/nfs, and similar for the bind mounts. Bind mounts showed as inactive (dead) and when I tried to enable and start them, it wasn't able, and when I looked at status of /mnt/nfs, it had errors with "mount 7 failed to add dependency on zoneminder: ignoring, invalid argument. Couple of web searches later, and... dun da da duh... I needed to add ".service" to Before=zoneminder. Should have been zoneminder.service. All good now.