What is the difference between SAN, NAS and DAS?
migrated from stackoverflow.com Nov 5 '09 at 13:38
This question came from our site for professional and enthusiast programmers.
First it is best to define the difference between a block device and filesystem. This is easier grasped if you are familiar with UNIX because it makes an objective distinction between the two things. Still the same applies to Windows.
With those terms in mind it's then easier to see the distinction between the following.
While the descriptions from itmanagement.com are ok, I think they could be a little more specific.
With NAS, you're usually referring to something where you mount a shared storage space over a network using protocols like CIFS or NFS. The system on which these are mounted does not see them as local storage, it sees them as network storage. This is important because many programs will not allow the use of network storage for various things.
With SAN, the storage space is mounted via iSCSI or Fiber Channel. You're still using a network to mount the space, but the protocols allow the system doing the mounting to see the space as local storage, thus allowing more programs to use it properly.
DAS is simply storage directly attached (ie, not via a network) to a system. Internal harddrives, USB drives, etc.
I would like to improve the answer of this question as it was asked me many times.
If your asking the differences between DAS- NAS -SAN you are in the data storage context; in this area many technologies exists which share a primary common goal: the persistence and availability of your data.
Block devices and filesystems
Most storage devices share the same physical and logical structure, in order to be able to locate the data you want, you need a way to identify where your data resides, so this is the reason of why Hard Disk drives have sectors (or simply "blocks"), in many cases this reflects the layout of the data written into the physical medium. But accessing your data by addressing the sector number while not very complex, it's an error prone method and you have to keep track yourself of the data you write and the sectors you have written to. So this is where a file-system comes to the rescue, a simple file-system will help you by addressing the blocks used and providing you a common interface to retrieve your data, the most common paradigm used is the folder/file structure (this is why is it called a file-system).
So essentially a file-system leaves you with a very simple interface towards your data, and takes care of the housekeeping and remembering in which blocks/sectors it puts your stuff, normally in a file system you will not refer to block numbers to get your data, but to filenames. This explains the difference between a block device and a filesystem, a filesystem must reside on a block device.
The simplest storage is a Hard Disk connected to your computer/server. Hard disk drives need to communicate somehow, and they need to use a well defined physical interface and protocol in order for your computer to understand them, the most common interface and protocol employed today for PC is the S-ATA or Serial ATA or Serial Advanced Technology Attachment. So a hard disk which is physically connected trough the same interface to your PC is identified as a Direct Attached Storage or DAS for short. To make it clear,
But what if you can provide access to your file-system to other computers (for transferring files)? Many protocols have been created over the years to accomplish easy file sharing on a Network with other computers, as an example I will only name the main per Operating System: UNIX and the likes - NFS , DOS/Windows - CIFS/aka.SMB, Apple - AFP. What they do is share files over a network, of course file implies an underlying file-system structure and file-system implies block device, but because it's done over a network it's called as NAS - Network Attached Storage. All of this interfaces explicitly prohibit remote lookups of block addresses (for security reasons first) and normally such interfaces are not even implemented. Network file systems can be considered safe enough to be used in a concurrent way, the Protocol implementation will take care of problems due to concurrent access to the same resource (file), normally by locking the file to a single user/requester. While any computer can share files over a network and could be called NAS, normally by NAS you identify only devices which main purpose is to share files over the network. Normally NAS operates on IP/TCP Ethernet networks and most can easily provide access to your data over the Internet.
Let's say that I like to read my data by block numbers, because I've written my own software but I'm in need of many disk drives, more than a single computer can host. The solution would be to share the disks of other computers, but as said before my NAS doesn't provide a way to lookup block numbers remotely. So I will need to use another protocol to share my disk drives, one that doesn't need a file system to operate. The following interfaces/protocols/networks exists today to share disks over a network:
Virtually any low level protocol can be encapsulated into network packets and sent remotely to allow to access the hard disk as it was connected locally. Then you can read your data by block numbers or simply create a file-system on the new block device.
Notice! I may intentionally or unintentionally left many subjects out from this answer, misspelled words and wrongly wrote sentences, you are welcome to edit it and make it better!
DAS: Direct Attached Storage. Storage
(usually disk or tape) is directly attached by a cable to the computer processor. (The hard disk drive inside a PC or a tape drive attached to a single server are simple types of DAS.) I/O requests (also called protocols or commands) access devices directly.
SAN: Storage Area Network. Storage resides on a dedicated network. Like DAS, I/O requests access devices directly. Today, most SANs use Fibre Channel media, providing an any-to-any connection for processors and storage on that network. Ethernet media using an I/O protocol called iSCSI is emerging in
NAS: Network Attached Storage. A NAS device (“appliance”), usually an integrated processor plus disk storage, is attached to a TCP/IP-based network (LAN or WAN), and accessed using specialized file access/file sharing protocols. File requests received by a NAS are translated by the internal processor to device requests
protected by sysadmin1138♦ Jun 27 '13 at 12:55
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?