16

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?

warren
  • 17,829
  • 23
  • 82
  • 134

9 Answers9

34

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.


Is there a good reason to pick a NAS filer over just running NFS on servers?

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.

Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
  • Most (NetApp etc) appliances generally have a better feature set than "a Linux server" as well. e.g. Linux LVM snapshots are NOT the same as proper WAFL snapshots. – James Apr 21 '10 at 21:20
  • @James: What are the advantages of WAFL vs LVM snapshots? (Not trying to argue, I'm curious). – Kyle Brandt Apr 21 '10 at 21:34
  • 1
    Performance with LVM snapshots is terrible - LVM stores a separate copy of the "exceptions" or changes for each snapshot. So if you have 10 snapshots and then write to your original, you have to copy the changes 10 times - once to each snapshot. There are patches around for a common exception store which does improve performance somewhat. – James Apr 21 '10 at 21:40
17

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.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • my understanding of them was that a NAS is just a dedicated NFS share with a souped-up UI – warren Apr 21 '10 at 18:10
  • @warren, I can see where you're coming from but look at NetApp boxes, they can share CIFS, NFS, iSCSI, FC/FCoE, HTTP & FTP etc. all from one (needlessly overcomplex) box. – Chopper3 Apr 21 '10 at 18:13
  • 1
    @Warren - Once a NAS is configured for a specific environment though, admin should be dead simple and you shouldn't need to spend time figuring out (eg) why the init.d scripts aren't working properly. They reduce the "maintenance surface" of the device you're serving files from, compared to a full-blown Solaris or Linux machine that is exporting NFS shares, or a Windows file server. No one is going to SSH to a NAS directly and run "rm -rf / *" or RDP into it and start surfing the web. It's not just about a fancy UI. – mfinni Apr 21 '10 at 18:53
11

The "real" difference between NAS and NFS is that the NAS is a technology and NFS is a protocol.

NAS:

Network-attached storage (NAS) is file-level computer data storage connected to a computer network providing data access to heterogeneous network clients.

NFS:

Network File System (NFS) is a network file system protocol originally developed by Sun Microsystems in 1984,[1] allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The Network File System is an open standard defined in RFCs, allowing anyone to implement the protocol.

solefald
  • 2,303
  • 15
  • 14
7

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.

Mo.
  • 2,166
  • 16
  • 9
3

"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.

gravyface
  • 13,947
  • 16
  • 65
  • 100
2

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.

jlliagre
  • 8,691
  • 16
  • 36
  • I find it ironic that you vote down my answer for reply to the title question only, yet you, yourself, do not bother to fully reply to question either. – solefald Apr 21 '10 at 16:41
  • Perhaps was I to eager to cast my first down vote on serverfault. The FAQ tells down votes are for misinformation which your reply certainly isn't. On the other hand, on the down button, the pop-up tells "This answer is not useful" which IMHO match your reply as the Open Poster was definitely aware about the difference between both acronyms. About my answer being incomplete, feel free to add any details you think are missing. – jlliagre Apr 21 '10 at 19:54
2

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.

chris
  • 11,784
  • 6
  • 41
  • 51
2

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.

Helvick
  • 19,579
  • 4
  • 37
  • 55
1

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.