Friday 3 October 2014

SAN and NAS


SAN

SAN is the Storage Area Network. When working with SAN, basically two protocols are used.
ISCSI
Fiber Channel.

ISCSI comes into play when we use Ethernet network but Fiber channel protocol comes into play when we use fiber optic network. The working of the both the protocols is however the same. ISCSI is an implementation of SCSI protocol in which the operations are packed in a TCP packet and sent over the network. When the Storage received the packet, extract the SCSI command and executed on the local storage. The result is then sent back to the client machine. Fiber channel operates in the same way.

What is the difference?

If you are running the FC SAN for years, You will believe that ISCSI is a slow, unreliable architecture. If you are using ISCSI, you will believe that no matter is buying such an expensive hardware and then manage that.

Generally the FC SAN is implemented using dedicated HBA, Host Bus Adapters and switches, That's why it is more expensive. FC is available in 1Gbps to 20Gbps speeds. FCP is also optimized to handle the storage traffic. FCP doesn't place any load on the CPU, Making CPU free all its time to work on the application.

ISCSI on the other hand, require no special hardware, however in the class of performance, It is lags behind the Fiber Channel Protocol. The difference is however the few milli seconds, that is due executing the SCSI commands on packets. ISCSI also places large load on the CPU. Although ISCSI HBA's are there that can be used in the implementation to reduce the load on the CPU. Using such dedicated hardware for ISCSI are called hardware initiators if we didn't use any such hardware, it is simply a software initiators.

NAS

NAS is Network Area Storage. Working with NAS involved different protocols. Network File system (NFS), Common Internet File System (CIFS).
NFS is simple sharing of file. If we talk about windows, NFS is sharing the files over network using a shared folder. Similar is the case with Linux. We use nfs server to share the files.

NAS and SAN

In case of NAS, suppose the client machine requests for a file, It will directly ask the NAS to provide some file, NAS will send the file on the network. In case of SAN, operations are on the block level. It means that the filesystem information of the storage device is stored on the client machine itself. SAN will first detect the blocks of the data to be fetched. This is determined using the inode values. When it calculates the blocks to access the file. It will send that information to SAN and then SAN will send the particular file on the network.