Re:Over engineering my homelab so I don't pay cloud providers
by jmholla on Friday August 08, 2025 @01:20PM
(#44839456)
Here's a deeper article on ordering things around network startup: https://systemd.io/NETWORK_ONLINE/
It doesn't conflict with anything you've said, just a very handy document.
Re:Over engineering my homelab so I don't pay cloud providers
by VTimofeenko on Friday August 08, 2025 @02:10PM
(#44839912)
You can also use _netdev in the mount options, then systemd mount generator will generate the dependency on network automatically.
If your OS is using systemd, you can fix that pretty easily by adding an After=network-online.target (so the ExecStart doesn't even try to check if there is no networking yet) and an ExecCondition shell script [1] to actually check if nfs / smb on the target host is alive as an override to the fs mounts.
Add a bunch of BindsTo overrides to the mounts and the services that need the data, and you have yourself a way to stop the services automatically when the filesystem goes away.
I've long been in the systemd hater camp, but honestly, not having to wrangle with once-a-minute cronjobs to check for issues is actually worth it.
[1] https://forum.manjaro.org/t/for-those-who-use-systemd-servic...