Issues with samba access to NAS

Hello,

I’m setting up a dietpi system which needs access to a samba share on my Synology NAS at boot.
I successfully mapped a network drive with Dietpi-drive_manager.
The issue is: sometimes (more or less 50% chance) it works correctly and the NAS share is mounted at boot, sometimes it fails to mount the network drive. No errors are shown, but in Drive Manager I see the network drive is not mounted. In those occasions I need to reboot/restart until it works.
It happens with either ethernet and wifi connections (but I need it to work on wifi).
I cannot find a reason, but i suspect the issue has something to do with connection timeouts: maybe sometimes the NAS is not fast enough to negotiate the connection.

Any suggestions? I thank you in advance.

Configuration:
Raspberry Pi 400 with Dietpi 7.9
NAS Synology DS220J with DMS 6.2.4

Additional information:

Looking at dmesg, the error I get (four times) is:

VFS: Error connecting to socket. Aborting operation.
VFS: cifs_mount failed w/return code = -101

do you use any hibernate mode on your Synology? Maybe the NAS is not coming up fast enough?

Thanks a lot for you reply.

No hibernation on the NAS. It’s active and can be reached from my Mac at the same time.

what is the name of your mount point? Maybe we can find some more logs why the mount is not working