Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I set up an NFS server on arch linux in my LAN. One of the Clients is a Mac OS X 10.6 machine with NFS4.0Alpha support. The user/group ids on the OS X machine are 501/20 and of the corresponding user on the router 1001/1001. GID 20 is already occupied on the arch machine.

What is the best way, without manually synchronizing the IDs and squashing all IDs, to properly get the ID mapping done? Preferably without touching the client. Or should I switch to SAMBA? Has that any advantages? (Currently, even with id squashing, the NFS is somewhat unstable, causing freezes when copying several chunks of large data at the same time...)

Is there any up to date tutorial on how to properly set up this NFS Server/Client system for OS X clients?


As for Samba: I am reading a lot about that it doesn't perform so well compared to NFS. In my Wi-Fi network, I get between 8-9 MB/s Speeds (max. 75Mbit/s). Is that slow enough, so I wouldn't feel the performance differences of Samba? Although probably harder to set up, it seems like it ships much more features and has better support for OS X/Windows.

share|improve this question
    
Please restrict yourself to a single question (or very closely related questions), so others actually know what to answer. You'll also get answers more quickly, as a comprehensive answer doesn't require expertise with all your questions. –  Daniel Beck Mar 24 '13 at 10:32
add comment

1 Answer

up vote 3 down vote accepted

with NFS4.0Alpha support

Maybe that's the cause for the instability? :)

What is the best way, without manually synchronizing the IDs and squashing all IDs, to properly get the ID mapping done? Preferably without touching the client.

RPC, used by NFS, usually supports two authentication mechanisms: AUTH_UNIX (sec=sys, by user ID) and AUTH_GSS (sec=krb5/krb5i, by Kerberos ticket).

If AUTH_UNIX is used, it is currently impossible to translate UIDs. Even though NFSv4 rpc.idmapd can translate usernames displayed in file listings, it does not affect the UIDs sent in RPC AUTH_UNIX headers.

You will have to synchronize the client and server UIDs, or set up Kerberos, or switch to a different filesystem.

As for Samba: I am reading a lot about that it doesn't perform so well compared to NFS.

It somewhat depends on the client and server implementations.

I've heard rumors saying that Samba can outperform NFSv4, especially if both client and server support the SMBv2 protocol (which has many improvements over the old SMBv1/CIFS). You might need to set max protocol in your smb.conf. The client software matters a lot, too – for example, the Linux cifs.ko module had a significant performance increase between 3.2 and 3.6 kernels... Strangely, the user-space smbclient can be even faster.

Aside from performance, the major difference from NFS is that SMB never uses Unix UIDs for authentication – it requires either password login or Kerberos (again). This means that it can be more complicated to set up as a system-wide mount – OS X clients will probably need to connect to the share using GUI, BSD users will be limited to FTP-style smbclient. Linux 3.3 supports mount -o multiuser even for password logins, but each user has to log in using cifscreds add before they can access the share.

share|improve this answer
    
Thank you for the comprehensive answer. I think I'll just try Samba and compare the performance. –  janoliver Mar 24 '13 at 11:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.