Click to See Complete Forum and Search --> : Samba v. NFS


Loki3
06-30-2004, 02:24 PM
I have a local network file server. It basiclly handles backups of user's /home directories and very important commonly accessed files, such as mp3s. When I orginaly put it together I decided to use samba as the protocal for the shares. The network has become much less Window-centric (ha, ha, ha) since then. The majority of the machines that use the file server are now Linux boxes. Mac OS X seems to have good support for both Samba and NFS so I'm not too worried about that. Since there's the occasional Windows machine I'll probably run Samba regardless.

Basicly, are there any avantages to running NFS over Samba? As far as I can tell there both equal speed-wise.

Any input?

cowanrl
07-01-2004, 07:44 AM
I think Samba is easier to secure than NFS.

By default, Samba will use user level security which requires the creation of user accounts and passwords. It uses encrypted passwords over the network.
Of course, you can change Samba to share level security which eliminates the use of username/passwords and makes it much less secure.

By default, NFS does not use username/passwords for authentication. All it uses is the user ID of the user trying to connect. Depending on the sophistication of the users on your network, this is very easy to spoof.
There are ways to secure NFS but from what I've read, they are much more difficult than securing Samba.

It really depends on your environment and how much security you need.

jymbo
07-01-2004, 08:43 AM
NFS is definitely much faster than samba.

Pafnoutios
07-01-2004, 10:56 AM
I use NFS in my home network for my /home directory. I have only linux machines, so I didn't consider samba. I don't worry about security of it since I have a router between my network and the internet, and I use static IPs on my network so I only export the /home directory to those two specific computers, and if anyone is in my apartment to get on my network, he'll have physical access to my server and nothing will matter until I encrypt it later this summer when I upgrade my /home drive from 4GB to 20 or 30 (depending on which harddrive I hand down to it).

timothykaine
07-01-2004, 12:26 PM
A quick and dirty from my experiences:

Samba: Slow as crap, but secure and flexible.
NFS: 2-4x the speed of Samba, but thats about it.

Loki3
07-01-2004, 01:53 PM
This is on a home network so I'm considering all the clients to be trusted(execpt wireless, iptables MAC filtering for that). Currently I have the majority of my samba shares set on "share" for convience.

So from that point of view NFS and Samba are about even.

Loki3
07-02-2004, 06:36 PM
One more quick question. My server's shares are on SCSI drives in a RAID-0 array. When I use hdparm -tvT to do a speed test I get this:

Timing buffer-cache reads: 332 MB in 2.02 seconds = 164.36 MB/sec
Timing buffered disk reads: 28 MB in 3.14 seconds = 8.92 MB/sec

This is on a dually 300Mhz with SCSI and RAID-0 shouldn't I be getting faster times? My Duron 900Mhz with IDE gets:

Timing buffer-cache reads: 656 MB in 2.00 seconds = 327.23 MB/sec
Timing buffered disk reads: 70 MB in 3.01 seconds = 23.27 MB/sec

Is this to be expected?

j79zlr
07-02-2004, 08:11 PM
80GB WD 7200rpm 8mb cache ATA100;

Timing buffer-cache reads: 1744 MB in 2.00 seconds = 871.70 MB/sec
Timing buffered disk reads: 136 MB in 3.01 seconds = 45.14 MB/sec
root@wrkstn3#

sploo22
07-02-2004, 09:41 PM
Here's a quick article (http://www.linuxsecurity.com/feature_stories/feature_story-118.html) I googled up about NFS security. :)

Loki3
07-05-2004, 01:47 PM
Is there anyway to get hdparm to list all the options it's currently using? I have a feeling somethings not configured right. I should be getting way more than 8MB/s with SCSI and RAID.