File Copy using Veeam Backup Broken

marlonc

Explorer
Joined
Jan 4, 2018
Messages
75
Hello,

I have FreeNAS-11.2-U6 with several SMB shares. I had Veeam 9.5 running on Windows 2016 Server with the latest updates with SMB 1 and SMB 2 Enabled, no SMB 3 installed.

I believe Freenas has disabled SMB 1, so SMB 2 or 3 should be enabled I think. I could use the file copy in Veeam to backup the SMB shares up till recently in Aug 2020 and then it stopped working in Sept as I am getting "Access Denied" errors now.

On a Windows 10 PC I can create a mapped drive to those same shares and can access those shares no problem.

How can i check the SMB version on Freenas and secondly, has anyone ran into this issue?

Thanks,
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello,

I have FreeNAS-11.2-U6 with several SMB shares. I had Veeam 9.5 running on Windows 2016 Server with the latest updates with SMB 1 and SMB 2 Enabled, no SMB 3 installed.

I believe Freenas has disabled SMB 1, so SMB 2 or 3 should be enabled I think. I could use the file copy in Veeam to backup the SMB shares up till recently in Aug 2020 and then it stopped working in Sept as I am getting "Access Denied" errors now.

On a Windows 10 PC I can create a mapped drive to those same shares and can access those shares no problem.

How can i check the SMB version on Freenas and secondly, has anyone ran into this issue?

Thanks,
FreeNAS support up to SMB 3.11 (Latest protocol version). There are some features we lack, but for all practical purposes clients shouldn't know the difference. "Access Denied" errors are usually caused by filesystem permissions.
 

marlonc

Explorer
Joined
Jan 4, 2018
Messages
75
Its weird because the permissions didn't change on Freenas or Veeam. I tried all sorts of permissions such as giving the Veeam service access to the Freenas SMB share and still I would get "Access Denied" or "Username and Password" is incorrect. I even did a clean install of Veeam 10a and still the same issue.

So, not sure where else to look at.

Are there any other backup software you know of that works with FreeBSD as I seem to think Veeam is causing the issue or some Windows 2016 update maybe broke the process?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Its weird because the permissions didn't change on Freenas or Veeam. I tried all sorts of permissions such as giving the Veeam service access to the Freenas SMB share and still I would get "Access Denied" or "Username and Password" is incorrect. I even did a clean install of Veeam 10a and still the same issue.

So, not sure where else to look at.

Are there any other backup software you know of that works with FreeBSD as I seem to think Veeam is causing the issue or some Windows 2016 update maybe broke the process?
It's probably better to try to figure out what the exact problem is. You can start by getting a packet capture of the traffic when it fails and pm it to me.
tcpdump -i <interface> -w /tmp/smb.pcap host <ip of veeam client> and port 445
 

jenksdrummer

Patron
Joined
Jun 7, 2011
Messages
250
I have had issues under certain conditions where SMB does not work properly and it needs to be reset. The share itself seems to behaving normally, but, until it's reset my use case doesn't pan out.

Run this either from a SSH session, from the shell inside the the FreeNAS...
midclt call service.restart cifs
...or you can manually toggle off and on the CIFS service in the UI.

Then see if Veeam plays nice again. Of note, this will kill any existing CIFS sessions...

For me, I now leverage a logon script for the box where it passes that through plink before attempting to mount the VHDx I have on the SMB/CIFS share.

Noted this behavior through 11.2 and exists in 12 beta. Figure for me I'm an edge case; using SMB Multichannel which AFAIK still not "release" after many years...
 

marlonc

Explorer
Joined
Jan 4, 2018
Messages
75
Thanks for your input. I will toggle off the SMB service in the GUI and try again. As I said earlier, ti was working fine with not permission changes and then poof, it stopped working.
 

marlonc

Explorer
Joined
Jan 4, 2018
Messages
75
Well, stopping and starting the SMB service did the trick. I am no able to create a file share and then a backup job. Do you mind sharing your logon script?
 

jenksdrummer

Patron
Joined
Jun 7, 2011
Messages
250
yeah, my case is that I automatically mount a VHDx file on logon, where theVHDx was on an SMB/CIFS share, and if I rebooted that workstation, 9 of 10 times it wouldn't mount it. I could hit the share, see the file, but it acted as if there was a lingering lock on the file that would never clear.

So I added a call to plink.exe (putty product)...

Nutshell it's a scheduled task...this is what's in it; well, the part you're probably interested in...


Exe: c:\scripts\plink.exe
Args:-batch -ssh root@freenasboxname -pw ##ROOTPASSWORD## -m c:\scripts\cifsreset.txt
working directory: c:\scripts

contents of cifsreset.txt:
midclt call service.restart cifs
exit

Likely can sub for another priv'd account if root isn't acceptable.
 
Top