Which to use NFS or Samba?

1

There's two ways to share directories over a network, Samba and NFS. There's probably lots of other ways, but those are the common ones. The question is, which to use?

If your network includes Windows boxes, then you'll need at least some Samba, because Samba is the native Windows file sharer. So, for example, to access Dropbox, I use a Windows machine to handle the Dropbox, and share that across the network using Samba. And NFS is the native Unix file sharer.

I'm mostly Linux, with a couple of Windows boxes for the places that Windows really is needed (for GSAK, for example, and yes, I know you can run GSAK under Wine, but have you actually tried that? Not everything works).

Setting up the Pix firewall, brought this question back to my attention. Because it's a bit fiddly running NFS across a firewall, there's two ports to allow (111 and 2049), usng both TCP and UDP. And then there's several other ports that need to be allowed, and you can't predict which...

0 0
2

I have this MCVE under SLES 11 SP2:

1) Server 10.10.50.199 has the directory /foo/. Inside /foo there is a directory bar/ which is used in /etc/fstab : 10.10.50.200:/nfs_folder /foo/bar

2) Server 10.10.50.199 has an NFS export of /foo which means that /foo/bar is included in this export.

And now something very strange happens: When I access the NFS share 10.10.50.199:/foo on a Windows Server 2012 R2 then the /foo/bar/ directory is empty even /foo/bar/ has lot of entries.

When I access the NFS share 10.10.50.200:/nfs_folder directly on the Windows Server 2012 R2 then I can see its content.

The same happens when /foo is a Samba share which includes the 10.10.50.200:/nfs_folder NFS share.

Any write operation into this embedded NFS share is denied but when I write directly into the 10.10.50.200:/nfs_folder share then it works.

Under Samba I am using the hide files directive to hide the bar/ directory and prevent any problems. But under...

0 0
3

Hello fellow NSLU2 user. I would definitely go for NFS, unless there were some compelling reasons (namely Windows machines). NFS is more light-weight and faster.

As for the NSLU2 side, you will find that tweaking the NFS options and choosing the right filesystem for the shared disk are important. I have chosen ext3 but then switched to ext2 as it seemed to consume less of the precious resources. When using wireless don't expect extraordinary performance and don't use too big block size, otherwise go for huge blocks.

In either case there are some parameters to tweak. Do some benchmarks on your own and decide which options are the best (TCP/UDP, rsize, wsize, etc) for example for NFS here is some old comparison: NSLU2 NFS

Last but not least - it would be nice to see your results - to learn from them...

0 0
4

Answer / rv

The difference between Samba and NFS is primarily that Samba
uses the SMB (aka Lanmanager) protocol which is considered
"standard" for PCs (Windows and OS/2 both have built in
support for it, a free client is also available for DOS, I'm
not sure about MacOS), whereas NFS uses its own protocol
(usually just called "NFS") which is not commonly available
for PCs (NFS clients do exist for operating systems other
than UNIX/Linux, but they're
usually neither free or easy to setup).

Samba's SMB protocol allows the server machine to handle
authentication, so it can decide what files the client has
access to based on the particular machine and user
connecting. NFS by default trusts all client machines
completely (it's really not intended to share files to
unsecured workstations) and lets the client machines handle
authentication all on their own (once an NFS server has been
...

0 0
5

"Robert C" ,

In a message on Tue, 18 May 2004 21:47:43 -0400, wrote :

"C> I am confused...just what the heck is the diff btw SAMBA & NFS ???

*Conceptually* none.

SAMBA uses M$ 'NetBIOS' protocol for file and printer sharing.

NFS uses the Network File Server (NFS) protocol developed by Sun back in
the late '70s (or early '80s).

"C>
"C> We are on M$ LAN at work, I set up a RH8 box to test & push Linux
"C> adoption....
"C>
"C> For the Linux box to access files on winduhs server --- need NFS or Samba ?
"C> For LAN users to see the Linux box & read/write files --- need NFS or Samba
"C> ?
"C> Which one is easier ?

For Linux MS-Windows, you want Samba.

For Linux any UNIX system (including another Linux system), you want NFS.

"C>
"C> eduucate me plz !
"C> Thanks
"C> robert
"C>
"C>
"C>
"C>

\/
Robert Heller ||InterNet: heller
...

0 0
6

What is the Network File System (NFS)?

The Network File System (NFS) is a way of mounting Linux discs/directories over a network. An NFS server can export one or more directories that can then be mounted on a remote Linux machine. Note, that if you need to mount a Linux filesystem on a Windows machine, you need to use Samba/CIFS instead.

NFS is a way of mounting Linux discs/directories over a network ..

Why use the Network File System (NFS)?

The main use of NFS in the home context, is to share out data on a central server (-for example, your music collection) to all the PCs in the house. This way, you have a single copy of data (-hopefully, well backed up) accessible from a central location.

Can I use Samba (CIFS) Instead?

The short answer is "Yes" -but the consensus opinion is: "only use Samba if you have to"! If you have a Linux server and a Linux client, those two should share data via NFS rather than Samba/CIFS.

Samba was...

0 0
7

NFS vs Samba

Network File System (also known as NFS) is a protocol developed by Sun Microsystems. It allows a user on a computer to access files that are sent across a network – similar to the way one accesses local storage. It is most common in systems with a similar composition to the UNIX system; however, it is also readily available for other systems, such as Mac OS, OpenVMS, Microsoft Windows, Novell NetWare, and IBM AS/400.

Samba is a re-implementation of SMB/CIFS networking protocol (meaning a re-imaging of Server Message Block – or Common Internet File System). As with the NFS, Samba runs most naturally on a system with qualities not unlike those of the UNIX systems. It comes standard with almost every distribution of Linux, and is used as a basic system service on all other UNIX-based systems.

NFS has a number of variations: The original NFS version was used strictly for in-house experimentation. Once changes were added to this protocol, version two...

0 0