You are not logged in.

#1 2021-07-29 10:05:56

TheStroyer
Member
Registered: 2018-08-28
Posts: 54

Systemd wait for cifs/nfs share to be unmounted

I have an cifs share that's only reachable when connected to the server via wireguard. I want the share to be automounted upon boot and automatically unmounted before stopping wireguard.
Mounting upon boot works fine when I add a dependency upon wireguard, but unmounting upon shutting down is a problem. Systemd stops the mount before stopping wireguard, but it doesn't wait for the share to finish unmounting, so it immediately stops wireguard afterwards. This results in me having to wait 1:30 min for systemd to force unmount the share.
I have looked around for solution and the only solution I can find is https://serverfault.com/questions/80839 … ork#810229. I haven't tried it but I was wondering if there is a better solution.

Offline

Board footer

Powered by FluxBB