Solved

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

Posted on 2014-03-31
11
1,958 Views
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?
0
Comment
Question by:brothertruffle880
11 Comments
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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.
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 56 total points
Comment Utility
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.
0
 
LVL 20

Assisted Solution

by:SelfGovern
SelfGovern earned 56 total points
Comment Utility
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.
0
 
LVL 47

Assisted Solution

by:dlethe
dlethe earned 166 total points
Comment Utility
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.
0
 
LVL 76

Accepted Solution

by:
arnold earned 167 total points
Comment Utility
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.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 55 total points
Comment Utility
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.
0
 
LVL 47

Assisted Solution

by:dlethe
dlethe earned 166 total points
Comment Utility
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.
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 167 total points
Comment Utility
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)
0
 
LVL 47

Assisted Solution

by:dlethe
dlethe earned 166 total points
Comment Utility
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.
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 167 total points
Comment Utility
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.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now