Skip to the content.

I’ve been having some capacity problems on my Hetzner Cloud instances. To get around these limitations I’ve been using sub accounts on my StorageBox and mount them via CIFS onto their respective targets. However, when I wanted to bind-mount some other directories, my fstab configuration didn’t survive any restarts.

The error message stated:

1
2
3
4
5
local-fs.target: Found ordering cycle on networking.service/stop
local-fs.target: Found dependency on network-online.target/stop
local-fs.target: Found dependency on <mount-name-redacted>.mount/stop
local-fs.target: Found dependency on local-fs.target/stop
local-fs.target: Job networking.service/stop deleted to break ordering cycle starting with local-fs.target/stop

This meant going onto the cloud console, opening the serial console window and hitting CTRL+D to continue booting, then mounting everything manually. (Usually mount -av sufficed.) To get rid of this nasty behaviour, there is an easy-to-implement, but not-so-easy-to-find fix which can be made to the /etc/fstab.

Bind mounts themselves don’t have their own filesystem type. So typically, you would write “none” in the third column of your fstab. However, this will lead to systemd thinking that this is a local filesystem and at that it doesn’t need to wait for the networking to be fully setup first.

So the solution was to simply enter “cifs” instead of “none” in the third column and systemd considered the mountpoint as remote-fs.target and not local-fs.target, thus waiting for the network to come online first, as well as the cifs mount of the parent directory which needs to be mounted in order for the bind mount to climb down its path.

No more cycling dependencies and no more manual boot interactions!