I’m using a systemd mount unit to mount an rclone storage into my homelab.
[Mount]
Type=rclone
What=paperless-backend:data
Where=/var/mnt/paperless/data
Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=full,poll-interval=0,config=%d/rclone-podman.conf,cache-dir=%C/rclone-paperless
LoadCredential=rclone-podman.conf
According to systemd’s documentation, the presence of _netdev in the Options should be enough for systemd to classify this as a network mount and thread it into the tree of networkt.target and remote-fs.target: https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html#:~:text=in%20which%20case%20_netdev%20may%20be%20added
However, the option seems to be filtered out when systemd loads the unit:
$ systemctl daemon-reload
$ systemctl show var-mnt-paperless-data.mount
..snip..
# Note `local-fs` instead of `remote-fs`, and no `network.target` dependency
Before=umount.target paperless-webserver.service local-fs.target
After=systemd-journald.socket system.slice var.mount local-fs-pre.target -.mount
..snip..
# No _netdev!
Options=rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
..snip..
# But here _netdev is passed
ExecMount={ path=/usr/bin/mount ; argv[]=/usr/bin/mount paperless-backend:data /var/mnt/paperless/data -t rclone -o rw,_netdev,allow_other,args2env,vfs-cache-mode=full,poll-interval>
I tried to set SloppyOptions=true as, according to the docs, systemd does some option filtering and that option disables it, and it does work to make it systemd detect it as a network mount, but the -s option then chokes the mount command. Plus I don’t think _netdev should be considered an “unrecognized” option.
My system:
- Fedora CoreOS 44.20260419.3.1
- systemd 259 (259.5-1.fc44)