What is the difference between SAN, NAS and DAS?
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.
- A block device is a handle to the raw disk.
- Such as
/dev/sdafor a disk or
/dev/sda1for a partition on that disk.
- Such as
- A filesystem is layered on top of the block device in order to store data. You can then mount this.
- Such as
mount /dev/sda1 /mnt/somepath.
- Such as
With those terms in mind it's then easier to see the distinction between the following.
- DAS is a block device from a disk which is physically [directly] attached to the host machine.
- You must place a filesystem upon it before it can be used.
- Technologies to do this include IDE, SCSI, SATA, etc.
- SAN is a block device which is delivered over the network.
- Like DAS you must still place a filesystem upon it before it can used.
- Technologies to do this include FibreChannel, iSCSI, FoE, etc.
- NAS is a filesystem delivered over the network.
- It is ready to mount and use.
- Technologies to do this include NFS, CIFS, AFS, 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,
ANY block device which is directly connected to your system makes a DAS, even an USB stick is a DAS (but the interface is USB in this case).
And unless you access your disk by block numbers you need a file system on top of it in order to put it at good use.
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:
- SCSI - The father of all ;) While SCSI is a low level protocol is used encapsulated into secondary or transport protocols to send commands to controllers or disks
- SAS - Serial Attacched SCSI This allows to create entire SANs as SAS supports routing and addressing
- FC - Fiber Channel
- iSCSI - Internet SCSI Or simply SCSI over Ethernet (in IP networks)
- ATAoE and similar - ATA over Ethernet
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!
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.
NAS stands for Network Attached Storage. It differs from traditional, directly attached storage in that, in NAS, the operating system and other software on the NAS product are dedicated solely to data storage.
SAN stands for Storage Area Network. A SAN is a network designed to attach storage hardware and software to servers. SANs generally come in two forms: as a network primarily dedicated to transferring data between computer systems and storage systems, or as a complete system that includes all of the storage elements and computer systems within the same network.
DAS stands for Directly Attached Storage. DAS is generally used to differentiate between storage systems directly attached to a server or workstation and NAS and SAN setups.
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