Score:0

Ubuntu 22.04 Can't Stop NFS Service When Shutting Down - Still Used By Zoneminder Service

us flag

I have a KVM guest that is running Zoneminder. I have configured this guest to use an NFS to store all the event data (recorded videos) to an NFS for various reasons. Unfortunately, if I send the KVM command to shutdown the guest, e.g.:

sudo virsh shutdown my-zoneminder-guest

... then it takes an age to shutdown because it fails to unmount the NFS filesystem...

enter image description here

... and we end up waiting until the NFS timeout is triggered and the guest kills the NFS.

enter image description here

I'm pretty sure that the issue is that Zoneminder is configured to use the NFS, because if I manually stop the Zoneminder service before issuing the virsh shutdown command on the hypervisor, then the guest shutsdown very quickly without issue.

In case it matters, my NFS is mounted through the following entry in my /etc/fstab file:

192.168.1.5:/media/extra_storage        /mnt/nfs        nfs     auto    0        0

Question

Is there a way to tweak the Ubuntu 22 server so that it knows that it needs to shutdown the Zoneminder service before it attempts to unmount the NFS filesystem? Perhaps that is the wrong way to resolve this problem and there is a better solution?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.