.mount file not correctly mounting SMB/CIFS share at boot, but works fine on service restart

Hello,

So I’ve recently reconfigured my system to run as a headless device providing a GUI via a nomachine server, and since I did this, the .mount file I was using to mount my NAS’ backup directory no longer mounts correctly on boot.

Using sudo systemctl restart name.mount works just fine, however. It mounts just as it should.

I’m not sure how to check for errors (where would I look for those?), but my instinct is that I need to tell systemd to wait a bit longer before it tries to mount the CIFS share. It seems to be trying too soon (or not trying long enough) and failing.

Here’s my mount file, with redactions for user/pass/etc.:

]$ cat name.mount

[Unit]
Description=Mount NAS shared folder for Host backups (NAS Name - Protocol)
After=network-online.target
Wants=network-online.target

[Mount]
What=//IP/folder/
Where=/path/to/NAS/backup
Type=cifs
Options=_netdev,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,user=USER,password=impressive,workgroup=productivesounding
TimeoutSec=30

[Install]
WantedBy=remote-fs.target
WantedBy=multi-user.target

My guess is that something is timing out on boot. I’ve just installed a switch and hooked the Pi up to that, and it’s possible the switch is introducing some delay. I’ve never had a dedicated switch and I’m still learning to configure it.

I’m guessing the hamfisted approach would be to increase the timeout, but is that the best way to go? If it is, what’s a good timeout value?

I’d be interested in understanding why it’s not working. I would have thought if “network-online.target” is … true (?) … then the network is ready, but apparently not?