Samba or NFS?

Status
Not open for further replies.

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
This is one reason why I recommend CIFS whenever possible. AFP is apple exclusive (which is quite limiting). NFS is fairly common, but poorly supported in Windows (which is extremely common). CIFS is supported in basically ever OS in existence, provides excellent performance with reasonable hardware (I've gotten over 400MB/sec on 10Gb with CIFS on a FreeNAS Mini) and is, for the most part, fairly user-friendly for the vast majority of OSes on computer (those being Windows and OSX).

For me, if %randomuser% shows up asking which one to use of the 3, the answer is super clear to me. Both NFS and AFP can provide performance gains in some situations, but CIFS wins in others. So do you argue that 6 of one isn't 1/2 dozen of the other or not? ;)
 

9C1 Newbee

Patron
Joined
Oct 9, 2012
Messages
485
I admit to reading only parts of the manual. But I do remember reading this. I think it was over my head at the time. I should sit down and read the manual again. I still don't know ish. But I know a hellova lot more than I did when I loaded FreeNAS on the ole Dell.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
To be honest, I read the manual cover to cover with each release. Not because I'm bored, but because there's always little tidbits that might be extremely crucial to a healthy setup that might be added. ;)

The 9.3 manual is going to see some pretty big rewrites. I'm hoping to be pretty heavily involved in the editing portion of the manual.
 

9C1 Newbee

Patron
Joined
Oct 9, 2012
Messages
485
I started using NFS for two reasons. I wanted to see if NFS offered some kind of performance gain. Given my hardware on each end of the equation, there was none to be had. The second reason I started using NFS was because I could.

I think it would be awesome if you are involved in the manual. You have a way of breaking it down Barney style so noobs like me can understand. Other than the cost of your personal time, I can't see a down side. Hope it happens.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I know. I just have to do something with keys... or something.
 

Eniac74

Dabbler
Joined
Jan 9, 2015
Messages
41
Need some guidance on this issue. My network consists of three laptops, two macs and one windows, and therefore this is not a uniform network as far as OS goes. The purpose of the NAS is primarily to hold music, movies and photos, and with only one person being admin (others read-only). The structure is NAS/Media/Music (Movies and Photos will be on the same level as Music)

From my reading and testing my understanding is that there are four "layers" where you get to choose essentially between Apple/Linux/Windows:

1. Service: I understand it as this is the overall accessability, e.g. if I do not enable the CIFS service, a windows computer will not see the FreeNAS device at all. Once I enabled CIFS my windows laptop could see it, but as everything else (dataset etc.) was configured for AFP/Apple, that was it. However, if I disable the AFP service, the macs are still able to access the NAS as I understand that they also can run over CIFS.

2. Sharing: This level has to do with a certain dataset or zvol and the choices are AFP/NFS/CIFS. It is here that the manual advices you to NOT use multiple share types for the same dataset/zvol.

3. Share type: Choices are Unix/Windows/Mac and only one is possible to select (manual 8.1.3)

4. Permission type: Choices are Unix/Apple/Windows and only one is possible to select. (manual 8.1.2)

My questions:
a. Service - given the set-up above it is recommended that I choose either CIFS or NFS (assuming windows will be able to access this type) in order to use only one service? Any preference between CIFS and NFS?
b. Sharing - If I share Media this will automatically share underlying zvols Music, Movies and Photos as well, correct?
c. Sharing - as the macs can use the CIFS is this the preferable choice then?
d. Share type - what difference does this choice make? (my impression is that the windows machines are more picky and people therefore use Windows in order to avoid problems)
e. Share type - what impact does it have if make inconsistent choices, e.g. CIFS under Sharing and Mac under Share type?
f. Permission type - same as in question d, what difference does this choice make?

Finally, I read this article on the future of AFP on macs

http://appleinsider.com/articles/13...fp-file-sharing-to-smb2-in-os-x-109-mavericks

so the question is
g. Should I just choose Windows/CIFS everywhere in order to be future proof?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Last edited:

Eniac74

Dabbler
Joined
Jan 9, 2015
Messages
41
haha
Well, I guess the question kind of made the answer expected. However, I would still be interested in understanding the "layers" somewhat more, especially question e, i.e. regarding effects of inconsistent choices.

Also, I noticed an idiosyncracy with windows where any folder (yes, folder not zvol, as I just copied all the music from a MBP) containing the sign '.' (dot) turns into a non-logic pack of letters and numbers, e.g. "Blige, Mary J." becomes "B8FNVZ~7". This is of course not really impressive or wanted, so therefore I have not closed the door on non-CIFS set-ups, but would want to get a better understanding of the choices. The FreeNAS manual does not really provide me with that, so any pointers or suggested reading would be very welcome.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Basically, it boils down to this:

NFS sucks on Windows. Big-time.
AFP is a zombie whose only use, in my opinion, is Time Machine. Even Apple is dropping it.
CIFS works reasonably well on all platforms and is the prime choice on two (OS X and Windows).

From there, everything should be set up to be compatible with CIFS/SMB/Samba.

3) and 4) are the exact same setting. It's just a UI inconsistency - feel free to mention that in a bug report, since FreeNAS 10 is getting a big UI rewrite.
Choose whatever applies in 2), or else permissions will not work as they should. Honestly, I have no idea what will happen if you try using Samba with Unix permissions. Frankly, Windows manages permissions well enough for me not to care much.

Regarding b)... Why are you using zvols? Typically, you'd use datasets - one per share. Set them and their respective shares up in a way that allows for just the granularity you need when setting permissions and ZFS operations like snapshots.

haha
Well, I guess the question kind of made the answer expected. However, I would still be interested in understanding the "layers" somewhat more, especially question e, i.e. regarding effects of inconsistent choices.

Also, I noticed an idiosyncracy with windows where any folder (yes, folder not zvol, as I just copied all the music from a MBP) containing the sign '.' (dot) turns into a non-logic pack of letters and numbers, e.g. "Blige, Mary J." becomes "B8FNVZ~7". This is of course not really impressive or wanted, so therefore I have not closed the door on non-CIFS set-ups, but would want to get a better understanding of the choices. The FreeNAS manual does not really provide me with that, so any pointers or suggested reading would be very welcome.

Could be related to DOS attributes or something. That's a textbook 8.3 filename. Try playing around with the DOS attributes option or similar.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
haha
Well, I guess the question kind of made the answer expected. However, I would still be interested in understanding the "layers" somewhat more, especially question e, i.e. regarding effects of inconsistent choices.

Also, I noticed an idiosyncracy with windows where any folder (yes, folder not zvol, as I just copied all the music from a MBP) containing the sign '.' (dot) turns into a non-logic pack of letters and numbers, e.g. "Blige, Mary J." becomes "B8FNVZ~7". This is of course not really impressive or wanted, so therefore I have not closed the door on non-CIFS set-ups, but would want to get a better understanding of the choices. The FreeNAS manual does not really provide me with that, so any pointers or suggested reading would be very welcome.
Sounds like name mangling. You have somehow misconfigured samba and / or your client. It's hard to say what exactly is going wrong without looking at logs and the smb4.conf and other relevant config details.
 

Eniac74

Dabbler
Joined
Jan 9, 2015
Messages
41
Thanks for responses. I have now made some advances after some playing around.

@Ericloewe
Yes, you were right in your comment on dataset instead of zvol (question b) and I had actually set up using dataset, so my mistake in previous post.

I have now set up using CIFS/Windows choices all the way through. One point of information that could be of use (?) considering the comments above about the 8.3 filename is that my base system is a mac, where all the music originates from (my own CD rips). I also have not made any alterations in the FreeNAS setup other than those made just to set up the NAS or those alterations mentioned in this thread. Hence, I am not sure that there was any misconfigured setup, but feel free to comment if I am missing something.

Some interesting observations:
1. When I changed the permissions/share types etc (points 1-4 above) to consistently be windows/CIFS the 8.3-naming did not disappear, i.e. 'Blige, Mary J.' was still 'B8FNVZ~7' - accessing the NAS from a mac, not able to test with a windows system presently). Point of info is that the files were transferred to the NAS while the setup was in AFP/Mac and when accessing from a mac it all looked fine.
2. For whetever it's worth, the status in point 1 did not change upon reboot.
3. I decided to delete the music dataset, add a new dataset and call it music, and then to re-import one of the troublesome folders (Blige, Mary J.) to that dataset. Now, that folder's naming is fine...even after reboot.

Of course that is all fine and dandy, but does anybody know why the folder did not change to correct naming once I had changed all permissions etc., but needed a re-import?
 
Status
Not open for further replies.
Top