October 4, 201411 yr Author I don't export individual disks via samba. This will be a great impact on my system. I think I have to live with this issue for now, it got better with beta 10a.
October 4, 201411 yr I don't export individual disks via samba. his will be a great impact on my system. I think I have to live with this issue for now, it got better with beta 10a. Ugh, I hate to hear that (that you have to "live" with this). That's not acceptable. Let's see if we can figure this out. I'm gonna need some time to think about this and maybe even talk with Tom next week to see what else we can do to debug and get to the root cause. What good is a NAS if you can't reliably copy data over the network to it!?!?
October 7, 201411 yr Author Today, the samba disconnect got worst (see attached). I am also sending you /var/log/samba/log.smb - I turned the 'log level' to 2. The server cannot complete any of the copied files. However when using scp (Transmit for Mac) no problem at all. Your help is greatly appreciated. Thanks. samba.tar.gz
October 7, 201411 yr "The operation can't be completed because an unexpected error occurred (error code -51)" "-51 rfNumErr Reference number invalid" I did a little research, didn't find much, some misinformation (scammer trying to sell irrelevant tool), lots of ignorance, and others with similar problems same error. In general, those with your exact error message were on Macs trying to transfer to an external server, whether locally attached external drive or external server. I *think* they were all using Samba. No one anywhere seemed to know what "-51 rfNumErr Reference number invalid" means. I believe there were a couple of others that had realized that they could generally copy smaller files, but less likely larger files. One said if he kept trying, he could successfully copy everything. That sounds as if it is somewhat random, unrelated to file size, except that the larger the file the more likely it would occur before completion. My suspicion is a bug in the current Samba module, on the server or client side. I'm not yet completely convinced it is on the UnRAID side. I know you said you have tried 3 different OS's, but aren't they all on the same machine in a VM? So could they not be using the same underlying network protocol? As you can tell, I'm not an expert here, hoping Tom or other Apple experts will know better. Perhaps a Samba upgrade (or downgrade) will fix it. It would be interesting to monitor the Samba change log.
October 7, 201411 yr Author RobJ, I tend to agree with you on this one. I know that there is a problem with Samba 3.x and Macs. Obviously unRAID 5.0.5 is not running the same version as unRAID 6.0 beta10a since I cannot recreate the issue. I have a machine that runs Windows 8.1 Pro natively and I will give it a try. Also, ReadyNAS 3100 has a special module to set the Samba version to 2.0 and after that everything works with Mac. I am 99% convinced now that it's the Mac not unRAID. Thanks for the hint. MA
October 8, 201411 yr Author I've tested it today and confirm that this is a OS X 10.9.x problem not unRAID. Oddly enough this was not happening on 5.0.5 but happens on all 6.0 beta versions - go figure. For all the Mac users there are some workarounds, let me know if you are interested.
October 8, 201411 yr I see this error quite often with Large / Multiple files transferred at the same time. I've found as long as I complete each file before starting the next, it usually isnt an issue..... Prior to Unraid 6 I always used AFP, which also had a similar issue, but only seems to be a problem on 75~100+gb file transfers, but with a different error number (error 31 if I remember). If you have found a work-around, I would certainly be interested in hearing!!!
October 9, 201411 yr Author I found few recommendations for work around, they do work somewhat better but none is perfect: 1. Try unix copy and move commands from terminal, eg cp <local file path> /Volumes/<NAS share>/<folder path> (you can use drag and drop) 2. In finder use CMD-C (to copy) and on the destination CMD-V (to paste))do not use drag and drop) 3. Force the connection to be SMB1 protocol In a terminal paste the following: echo "[default]" >> ~/Library/Preferences/nsmb.conf; echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf All of the above or compiled from Internet, none of them is mine. Also, when ReadyNAS OS 6.1.x was released they had the same problem. Netgear released special app called 'SMB Plus' and that solved the problem. (see attached) In conclusion, stock Linux Debian, Ubuntu and RedHat works without any issues. I strongly believe that something can be done on unRAID to make our experience better. Thanks.
October 9, 201411 yr I found few recommendations for work around, they do work somewhat better but none is perfect: 1. Try unix copy and move commands from terminal, eg cp <local file path> /Volumes/<NAS share>/<folder path> (you can use drag and drop) 2. In finder use CMD-C (to copy) and on the destination CMD-V (to paste))do not use drag and drop) 3. Force the connection to be SMB1 protocol In a terminal paste the following: echo "[default]" >> ~/Library/Preferences/nsmb.conf; echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf All of the above or compiled from Internet, none of them is mine. Also, when ReadyNAS OS 6.1.x was released they had the same problem. Netgear released special app called 'SMB Plus' and that solved the problem. (see attached) In conclusion, stock Linux Debian, Ubuntu and RedHat works without any issues. I strongly believe that something can be done on unRAID to make our experience better. Thanks. Thanks for the info, I have tried most of those actually... Also always use command c & v....so can't really say that makes a difference!!
October 10, 201411 yr Author Yesterday I tried one more like this: 1. Copied /etc/samba/smb.conf on the server to /boot/config/samba.custom 2. Added the following lines to the copy: === # increase log level log level = 2 syslog = 0 syslog only = No bind interfaces only = yes max protocol = SMB2 interfaces = 127.0.0.1 192.168.0.100 socket options = TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072 === most important is 'max protocol=SMB2' 3. Modified/added to /boot/config/go script === # Custom Samba - enable logging etc. echo "Custom Samba - enable logging etc." cp /boot/config/samba.custom/smb.conf /etc/samba/ smbcontrol smbd reload-config === 4. Execute this portion of go script So far the results are promising, will update you again.
October 10, 201411 yr Yesterday I tried one more like this: 1. Copied /etc/samba/smb.conf on the server to /boot/config/samba.custom 2. Added the following lines to the copy: === # increase log level log level = 2 syslog = 0 syslog only = No bind interfaces only = yes max protocol = SMB2 interfaces = 127.0.0.1 192.168.0.100 socket options = TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072 === most important is 'max protocol=SMB2' 3. Modified/added to /boot/config/go script === # Custom Samba - enable logging etc. echo "Custom Samba - enable logging etc." cp /boot/config/samba.custom/smb.conf /etc/samba/ smbcontrol smbd reload-config === 4. Execute this portion of go script So far the results are promising, will update you again. When you are doing this kind of testing it's most useful to change only one thing at a time. I suspect the 'max protocol = smb2' is the culprit, please retest with only this single change to smb.conf. The other things, like the socket options, are no longer necessary. You will find plenty of "tuning" article on the 'net that suggest adding that, but these are all obsolete with newer linux kernels these days. The reason for 'smb2' is that Apple, we-dont-need-no-stinkin-open-source, chose to write their own implementation of SMB and probably didn't get something right with SMB3 (current unRaid default). If this proves to be the case we can add a config setting to let user set this on the SMB Settings page.
October 11, 201411 yr Author You are right about one parameter at the time. And I did that. Now Mac is much better, but Windows 8.1 Pro (running on a physical machine) gives me the same problem as the Macs before while copying 45 GB file. Something is not right. I have a ReadyNAS 3100 as well - no problems what so ever.
October 11, 201411 yr You can create a file on your flash: /boot/config/smb-extra.conf Inside here you can set the SMB protocol level used by the server, for example, to set SMB2: max protocol = SMB2 Here is the list of identifiers you can use (from man page for smb.conf): server max protocol (G) The value of the parameter (a string) is the highest protocol level that will be supported by the server. Possible values are : · LANMAN1: First modern version of the protocol. Long filename support. · LANMAN2: Updates to Lanman1 protocol. · NT1: Current up to date version of the protocol. Used by Windows NT. Known as CIFS. · SMB2: Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available. · SMB2_02: The earliest SMB2 version. · SMB2_10: Windows 7 SMB2 version. · SMB2_22: Early Windows 8 SMB2 version. · SMB2_24: Windows 8 beta SMB2 version. By default SMB2 selects the SMB2_10 variant. · SMB3: The same as SMB2. Used by Windows 8. SMB3 has sub protocols available. · SMB3_00: Windows 8 SMB3 version. (mostly the same as SMB2_24) By default SMB3 selects the SMB3_00 variant. Note: "max protocol" is a synonym for "server max protocol". If you look at the file /etc/samba/smb.conf you will see how this "extra" file is included. You should experiment with different settings in this file rather than copying/renaming a custom file via 'go' script or however you're doing it. In unRaid 5.0.5 max protocol is set to SMB2. In unRaid-6 it's set to SMB3. You can use this command to see the current real-time settings of all the Samba vars: testparm -sv I wouldn't recommend any protocol below SMB2 (eg, forget about LANMAN1, LANMAN2, NT1).
October 11, 201411 yr Author Well, after playing with /boot/config/smb-extra.conf quite a bit I came with the following configuration that works 85-90% of the time: log level = 2 syslog = 0 syslog only = No oplocks = 1 server max protocol = SMB2_10 client max protocol = SMB2_10 # Mac OS X Specific deadtime = 0 allocation roundup size = 4096 veto files = /Network Trash Folder/Temporary Items/ delete veto files = 1 Honestly, I had enough and will live with it.
October 27, 201411 yr Author Final results: These are only for Mac OS X 10.9.5 and 10.10 unRAID 5.0.6 samba and AFP work - no problems ReadyNAS 5/6 samba and AFP work - no problem OpenMediaVault 1.0.29 samba and AFP work - no problem unRAID 6 beta 10a samba fails 30-40% while copying files, AFP works. Hope this helps someone.
Archived
This topic is now archived and is closed to further replies.