Hi everyone, I'm having an issue with a CIFS mount that I'm trying to solve and I haven't had much luck with my internet searches.
I have a FreeNAS server that I mount using CIFS and then use rsync to sync a copy of my photos folder to FreeNAS.
The issue is that if I reboot my desktop, the mount works. However if the desktop has been suspend and resumed then the mount fails. A folder is created at the mount point and all the photos are dumped in the folder taking up all the space on my home partition.
I followed this post when setting up cron and rsync.
The script the cron job calls is located on my home partition and owned by root (I have recently added the smbd and sleep options in the home that restarting the samba service will help but it has not):
#!/usr/bin/env zsh # Restart samba service smbd restart # Wait to make sure service has restarted sleep 5s # Mount volume mount -t cifs -o credentials=/.smbcred,uid=1000,gid=1000,forceuid,forcegid,vers=2.1, //192.168.1.124/Backups/ /home/george/mnt/FreeNAS/Backups/ # Sync the Photos folder on Data drive to FreeNAS box # Full list of options: https://ss64.com/bash/rsync_options.html # r -- recursive # a -- archive # t -- times (transfer modification times along with the files and update them on remote system) # v -- verbose # s -- no space-splitting; wildcard chars only # progress -- show progress during transfer rsync -r -a -t -v -s --progress --log-file=/tmp/rsync-output /run/media/george/Data/Photos /home/george/mnt/FreeNAS/Backups/ # Unmount volume umount /home/george/mnt/FreeNAS/Backups/
When the mount fails, kernel logs show:
No dialects specified on mount. Default has changed to a more secure dialect, SMB2.1 or later CIFS VFS: could not allocate crypto cmac(aes) CIFS VFS: could not allocate crypto md4 CIFS VFS: could not allocate crypto API arc4 Status code returned 0xc000000d STATUS_INVALID_PARAMETER CIFS VFS: Send error in SessSetup=-22 CIFS VFS: cifs_mount failed w/return code=-22
Any guidance is greatly appreciated, and if any more information is required please let me know.