From an end-user perspective, what is the difference between a NAS device and using NFS exports from a file server?
They seem to accomplish the same end result.
The difference between a SAN and other file storage is related (in my experience) to how they are connected to the server infrastructure.
However, the difference between a NAS, connecting over a standard ethernet port, and NFS (sharing storage off specific servers, also over the network), seems more nebulous.
Is there a good reason to pick a NAS filer over just running NFS on servers?
A NAS (Networked Attached Storage) is a device serving files via the network. One protocol to accomplish this is NFS. So a NAS can use the NFS protocol (or another protocol).
So a Linux server providing NFS exports is, in effect, a NAS device.
The appliance has the advantage of being pre-packaged and ready out of the box and probably has a web gui to make changes a little more admin friendly. A disadvantage to the appliance is that recovery of the data could be more difficult, if you get in that spot, as the underlying filesystem could be proprietary.
This is an oddly-worded question - it's like saying "What's the difference between fruit and an apple" - one is a class, one is a member of that class.
NAS contribute to a general-purpose network by only sharing one or more protocols that can include NFS.
NFS is a protocol that can be shared from one or more devices on a general purpose network, these devices can share only using NFS or simultaneously with other protocols.
True SANs contribute to storage-specific networks.
iSCSI blurs the issue as it can share over a general-purpose network (i.e. NAS-like bahaviour) but at the block level (usually a trait of SANs).
To answer your final question more directly, pick a NAS where you want a single, often more highly-available (i.e. dual-controllers, PSUs, storage-path, NIC), centralised, and importantly centrally-managed, solution and use a multi-point NFS solution where budgets are perhaps tighter, data availability is perhaps lower and skills to manage across multiple machines is available.
The "real" difference between NAS and NFS is that the NAS is a technology and NFS is a protocol.
NAS:
NFS:
A NAS is just a server, but it may be running a proprietary or carefully-tuned (or both) operating system and provide you with a nice GUI.
When you buy a NAS, you’re paying for somebody to do the hard work of picking the appropriate hardware, OS, on-disk file system, build in monitoring and fault tolerance, and wrap it all up with an administrative interface to manage and configure it.
There’s nothing to say that you couldn’t do something similar yourself, or build a server and deploy something like FreeNAS on it (or, in the case of OpenSolaris, something as simple as
zfs set sharenfs=on
), if you have a good reason to think you’ll get better bang for your buck than buying an off-the-shelf NAS. For most consumers, it’s almost always going to be tilted in favour of “buy a NAS”. If you have a bunch of well-specified servers which can be easily deployed as file-servers, then the benefit of buying a NAS diminishes rapidly."A Linux box running NFS" vs. a dedicated NAS appliance is not the same thing: it's like saying "A FreeBSD box running pf is the same as a Cisco PIX firewall" -- sure they're both doing the basic task of packet filtering, but there's alot of differences in features that may be deal-breakers, depending on what you need or want your firewall to do.
For example NetApp's range of NAS devices feature deduplication technology to minimize the amount of redundant data you may have, which is particularly useful in a virtualized environment if you're storing alot of redundant VM templates, ISOs, etc. data. As far as I know, there's no open source equivalent.
On the other hand, a Linux NFS file server could also be configured in a dual role as a backup server, FTP server, database server, etc. because you have a complete Linux server platform, vs. a single-purpose storage device like a NAS utilizing NFS.
Looks like your title was poorly phrased and repliers didn't even bother to read your question ... anyway, here are some advantages/disadvantages I see about a NAS device vs a NFS server:
NAS pros: an appliance usually easier to maintain and administrate, dedicated to the service, less prone to disruptions, can potentially serve many protocols (NFS, SMB, FTP, HTTP, ...), usually better tuned for the task, might be less noisy, smaller, use less energy, faster to boot, ...
NAS cons: might be less customizable/upgradeable (both h/w and s/w), might be closed source, might be more expensive.
In reality, a "NAS" access protocol such as NFS or SMB or AFS will not have exactly the same access semantics as the native filesystem.
For instance, in unix, when you have a file that has a process reading / writing to it and you delete it, in a local filesystem, the link to that file vanishes but the inode won't be reclaimed until the process exits (and the link count goes to zero). At least in older implementations of NFS (and possibly newer ones, though I'm not sure), you'd wind up with that file getting renamed .nfs-#### and moved elsewhere, but not actually deleted. NFS best emulates the access patterns of a native unix filesystem.
SMB/CIFS, when mounted on a windows system, may appear exactly as if it is a local filesystem. I'm not sure, I don't have enough seat time on windows. Chances are, though, there are differences between an SMB mounted file and one on NTFS (and probably one that's fat32) that would be apparent if you're writing a weirdly low-level program.
You'll probably also see weird artifacts if you've mounted an NFS partition on windows or an SMB/CIFS share on unix.
Other more exotic things like AFS will also have weird behaviors relative to a local filesystem
So, in short, it depends on which NAS protocol you're using and which client you're using, and how closely you look.
There are differences that go well beyond the obvious differences in their basic definitions. I think there are good reasons to pick a NAS appliance\filer over a general purpose server that supports the NAS protocol you need and those are related to management, power, security, feature set and performance. Whether a general purpose server is a good substitute depends on how you prioritize those parameters for your use case.
NAS devices cover a price range from around a hundred dollars at the entry level to many hundreds of thousands at the upper end and possible higher. The features and performance scale to match.
At the entry level small consumer grade and small business oriented devices have basic functionality that does not offer much, if anything, over a general purpose server sharing out using NFS (or SMB\CIFS as the case may be). As far as characteristic differences between an NFS capable server and one of these you are looking at some combination of compactness, low power consumption, ease of config, simplicity of management and minimal attack surfaces. From a feature\performance point of view you can easily substitute a standard Linux\Solaris\Windows server for the appliance and deliver the same capabilities to the servers\clients consuming the storage however if compactness and\or power consumption are more important to you then an entry level NAS appliance may still be a better choice.
Higher up the food chain (looking at the likes of NetApp's filers and EMC's Celerra amongst others) you are getting high levels of component redundancy, not only hot swappable drives but hot swappable controllers\PSU's\Fans, zero downtime controller OS\Firmware upgrades, hardware based snapshots and front end accelerator caching (like NetApp's PAM), hardware assisted de-duplicattion (enormously useful in virtualized desktop type environments), hardware based replication and more. At this level of reliability and performance it is not possible to substitute a general purpose server OS running on off the shelf hardware and still get the same performance or feature set. But at this level you will be paying for the privilege.
NAS is a generic word to indicate a Network Attached Storage. That's NAS is the generic name o a device. NFS is only an access protocol, such as iscsi or fibre channel.