Linux Shares: SMB or NFS?
March 25, 2009 11:29 AM   RSS feed for this thread Subscribe

Which is the better way to share Linux folders with Vista and OS X: SMB or NFS?

I'm an IT consultant who works from home. I have a MacBook Pro, a Vista x64 desktop, and a Linux box on which I run VMWare. Since a lot of what I do is LAMP based websites, my typical way of working is to set up a CentOS 5.2 VMWare image with the LAMP stack for each customer's site, running on the Linux box. I work on my Vista desktop in Eclipse 3.4.

What's worked well so far is to create an SMB share for the web directory on the VMWare image, and locate the Eclipse project there. I get to work in Eclipse on a box with plenty of horsepower so it's fast, and I don't need to transfer files to the image to see changes. I've tried using the VMWare console, and doing remote X on my Vista box, and both are sluggish in comparison.

However, the nagging detail I want to address is that SMB seems like a really poor way to access the share. When I save files in Eclipse, there's a momentary pause, and often a hard drive noise, like I'm waking something up to access the share, even if I'm doing it every 30 seconds. I'm generally dissatisfied with SMB because I'd hoped to use the Linux box's copious hard drive space (2 TB) as networked backup for my laptop and desktop, but it seems unable to keep up, especially with large numbers of files.

So: Is NFS a better way to make shares available on Linux? I'm pretty sure that Vista has no problem accessing NFS shares with it's Unix services subsystem, and Leopard is unix based, so shouldn't have a problem either (I'd like to be able to do on my laptop what I do on my desktop). Is there something else I should be looking at?

My network is via an Airport Extreme N.

Bonus Question: I'm sharing a printer connected to my Vista box, and I've allowed guest access. Whenever my girlfriend tries to print from her MacBook, she gets a dialogue that asks whether she wants to connect as a guest or a named account; selecting guest works fine. Can we get rid of the dialogue and make it connect as a guest without asking?

Bonus Bonus question: Anyone using PHP have an IDE they're more satisfied with than Eclipse, that includes SVN integration?

Thanks in advance.
posted by fatbird to technology (12 comments total) 4 users marked this as a favorite
I use NFS on my Mac to access my Linux server. It seems a bit more 'native' than SMB. I've never used it on Windows, though. Give it a shot!
posted by zsazsa at 11:31 AM on March 25


I think you need to troubleshoot your Samba setup. SMB itself is a lousy protocol but any modern hardware should not have a problem transferring files. I'd run Wireshark from the Vista box, try an SMB save, and see what's actually transpiring across the network. Vista may be trying to authenticate in some odd way. Does your physical Linux box have SMB issues as well or just the VMWare Linux image?
posted by benzenedream at 11:50 AM on March 25


It may pay to investigate how Samba is set up on your CentOS box.

I'm not familiar with the default CentOS configuration, but recently a friend and I discovered that his Ubuntu box benefited from some tweaking.

Possible starting point.
posted by i_am_joe's_spleen at 12:00 PM on March 25


I'd recommend SMB, if only because historically NFS on Windows has been a pay-only option. Not sure if anything's changed on that front, though.
posted by rhizome at 12:23 PM on March 25


nthing the re-check your SMB setup. I have mac, linux and windows machines, and they all talk SMB without issues.
posted by nomisxid at 12:51 PM on March 25


NFS can be achieved in XP, at least, for free by downloading Windows Services for Unix.


I use both for various different reasons. The wrench, for me, in your setup is Vista. I believe the File Sharing protocol was "updated" and that probably explains your problems with Samba. Try some of the options this guy played with (like the NTLMv2). I have a feeling the combination of Samba, Vista, and VMWare is hosing your computer.

Might I suggest a simpler solution? rsync? You can install rsync on your windows box with Cygwin, and write a batch file like "syncclient " that syncs two standardized directory locations on the two boxes. The batch file can even prompt for a client, so you can invoke it from an icon (you're a developer, you'll figure it out).

The upside here is you're going through SSH, so if you know that works you should have no issue.

posted by teabag at 1:00 PM on March 25


Bonus Bonus Answer: emacs :)
posted by teabag at 1:03 PM on March 25


SMB is slow. At least, SAMBA's implementation of an SMB service is slow, compared with Microsoft's. There are some settings in /etc/smb.conf you can tweak, but it will still be slow.

Try NFS, it will run faster by design (UDP), but be aware that it has very little security. Be sure to tunnel it over SSH.

Apple Xcode has SVN integration, code completion and some other niceties. Here's an article you might look at for more info.
posted by Blazecock Pileon at 1:20 PM on March 25


The better solution here is to use SVN to deploy to the website via a checkout. You can even configure a few preproduction boxes to run a nightly checkout or even an SVN trigger to check out on commit.
posted by pwnguin at 1:29 PM on March 25


Oh, and if you do SVN, be wary of NFS:
Do not create a Berkeley DB repository on a network share—it cannot exist on a remote filesystem such as NFS, AFS, or Windows SMB. Berkeley DB requires that the underlying filesystem implement strict POSIX locking semantics, and more importantly, the ability to map files directly into process memory.
This is generally a silly thing to do anyways, as SVN already has at least three network protocols.
posted by pwnguin at 1:33 PM on March 25


Another vote for SMB on Linux, serving Mac and PC with a single authorized log-on and read-only guest access
posted by ijoyner at 2:03 PM on March 25


Sounds like a Vista SMB/CIFS issue. Try setting this reg key to 1. (should be zero by default)

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters\EnablePlainTextPassword

If that doesnt work then try this:

Run the mmc and insert the Local Security Policy module. Make this change:

Local Policies > Security Options


Find "Network Security: LAN Manager authentication level"

Change Setting from "Send NTLMv2 response only"
to
"Send LM & NTLM - use NTLMv2 session security if negotiated"
posted by damn dirty ape at 2:10 PM on March 25 [1 favorite has favorites]


« Older Excel - Pivoting With Dates...   |   Whose permission do I need to ... Newer »

You are not logged in, either login or create an account to post comments