Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


SAN vs. NAS - Block I/O versus File I/O

Posted on 2014-03-31
Medium Priority
Last Modified: 2014-05-01
I checked out several links regarding the difference between a SAN and a NAS and I'm not understanding HOW block I/O is different than file I/O?
I also don't understand why block I/O is better than file I/O?
Question by:brothertruffle880
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 124
ID: 39967129
NAS do File I/O, e.g. the file is access through a remote file system, as a file reference. The file is read as a complete file. The file system will ask for the file, and a number of bytes will be read for the complete file.

SAN do Block I/O - when a request comes for a file, it's turned into a request to read several blocks which make up the file.
LVL 71

Assisted Solution

Qlemo earned 224 total points
ID: 40026022
You can imagine block I/O to be like accessing a hard disk. All sectors and blocks can be addressed directly. File I/O (usually) requires to read a stream up to the position you need data from.
Block I/O enables the host to know about the virtual or physical disk layout, cache and manage content aso. Changes are made at a very low level of disk operations, allowing for all kind of optimizations.
File I/O only can tell about the file name, and even needs to ask the storage system for size info and such. All tasks like "list directory" have to be sent to the storage system, which cannot know of the specifics of the application needing the info, and so not much of optimization of consecutive requests can be made.

NAS uses a file based approach, it is just another device connected remote, without the OS having sophisticated control over it.
SAN implements a storage access protocol you can imagine as IDE / SATA / SCSI / aso. embedded in network packets. This operates on a very low level, with sophisticated control over data.
LVL 21

Assisted Solution

SelfGovern earned 224 total points
ID: 40026054
It's also different in this:
In NAS, the NAS file-oriented device manages the space, creation of files, directories, etc.
In a SAN, the SAN block device presents a certain amount of space to the client, and then the client is responsible for managing the space.

The user sees some space and uses it -- doesn't usually make too much difference.

SAN-attach storage will typically be higher performance than NAS-attach storage, for what it's worth.  Historically, part of that was that NAS used an Ethernet network, and SAN used a Fibre Channel network, but with increasing speed on Ethernet, and use of iSCSI (over Ethernet) for SANs, the difference is a bit harder to categorize.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 47

Assisted Solution

David earned 664 total points
ID: 40026089
Neither is "best" in all situations.  Rather than go through all the permutations, may I suggest you provide details about YOUR intended use, and then you can get an answer that is more relevant to your needs.
LVL 80

Accepted Solution

arnold earned 668 total points
ID: 40026108
SAN resources are presented as local drives on the system to which they are allocated.
NAS are remote resources.

Depending on your environment defines/limits functionality and which as Dlethe pointed is the best for your circumstances.
Some iscsi based sans provide you the option to choose the mode. Some OS/Application combination can not function with a NAS as the resource.

As others pointed out, a SAN presents you with a notebook into which you write and from which you read.  A NAS presents you with a notebook and writer/reader to whom you have to dictate what you want written, and who has to read the data back to you that you want.
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 220 total points
ID: 40026114
It may help if you think of this question as Nfs vs iscsi, instead of nas/San. Personally I run FreeBSD on a box. This box has one nic on my normal LAN sharing files over samba. That makes it a "nas". I have a second nic that shares over iscsi on a vlan just for esxi, that would be a "San". I can also share on my "San" over Nfs which is a file based share like samba, but it's on a "storage area network".

My point is that San and nas shouldn't really be compared. As you can see from my example, my box is both. The experts before me have treated your question as Nfs vs iscsi basically already, I just wanted to clear that up.  Once you search for Nfs vs iscsi you will find a bunch of opinions on the subject.
LVL 47

Assisted Solution

David earned 664 total points
ID: 40026124
Aaron makes a good point, NFS vs iSCSI is a great real world analogy because it is a block vs. file I/O comparison using two well understood implementations of block and file I/O that often use the same low-level protocols and usually the same cabling.  They can also coexist on same cabling and  server.

I use Solaris O/S and have ZFS shares on same host that use iSCSI, NFS and SMB.  The nice thing this does is that I can take  HOT LIVE SNAPSHOT BACKUPS of all of these from my solaris host no matter what the remote machines are doing, even if the O/S on the system mounting that data doesn't support such things.

So to add another twist, you should consider how these shares exist on the server that creates them, and what that server's file system can do.

Just because you can't take a hot snapshot of a NTFS share in windows w/o specialized hardware, doesn't mean it can't be done if the share is presented on a filesystem such as ZFS.

P.S. forgot, the same system emulates an Apple time capsule, so I use it as an apple time machine backup  for 2 MacBooks.  Also with ZFS I can tell it to do data compression on a share, or directly, or even keep extra copies of the data if I want.   You have flexibility on a host that has such features.
LVL 80

Assisted Solution

arnold earned 668 total points
ID: 40026144
Dlethe, I'm hesitant to ..

A SAN can include a NAS, a NAS can not include a SAN.

The main issue is scale.
The difference deals with level on which the commands are.
Iscsi still sends scsi commands over IP.  I believe some iscsi SANs provide an option on whether to use block or file I/O.

A NAS is either NFS or SAMBA. For unix/Linux environments the distinction is without a difference "functionally" /mounted resource or /mounted NFS resource .....

On a windows platform however, certain application will not function when the resource is not seen as a local resource (iscsi or FC than LUN) versus a network resource (samba, NFS share from NAS)
LVL 47

Assisted Solution

David earned 664 total points
ID: 40026160
An appliance is  an appliance.   They all have CPUs, local memory, local storage, and network interfaces.   They all run an O/S and software stacks that perform various services.  I assure you, a system can do all of the above.  

It is not a  NAS doing a  SAN or SAN doing a NAS.  You have an appliance that does both at the same time.  Yes, do not  use a windows based O/S as the appliance. That limits you.  

Read up on Solaris + ZFS, and you can do all of the above, at once.  I know an ISP that has around 500 petabytes doing this on tens of thousands of solaris-based servers.
LVL 80

Assisted Solution

arnold earned 668 total points
ID: 40026166
The issue in difference deals with scope and scale.

An appliance that presents both options (NFS/samba and iscsi/FC), would you not agree, would be referred to as a SAN
While an appliance that can only do (NFS/samba) will generally be referred to as a NAS.

The OS based distinction I was making dealt with the clients that access the resources.
Not the OS that runs/makes up the appliance.

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft will be releasing the Windows 10 Creators Update in just a matter of weeks. Are you prepared? Follow these steps to ensure everything goes smoothly and you don't lose valuable data on your PC.
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question