Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What are the differences of these two types?

After searching on the Internet, I know NFS transfers files to the client, while iscsi transfers block to the client. With such information, I am still not very clear how it works internally, and how they deal with the file differently.

Can anybody give me some examples or real work cases so that I can imagine a picture.

Ultimately, I want to be able to tell which is better based on different scenarios.

share|improve this question
    
No any other ideas? –  performanceuser Apr 18 '11 at 20:52
    
ALso see ( superuser.com/questions/148416/… ) post. I feel this can be relevant. –  user99898 Oct 1 '11 at 18:03
    
ALso see ( superuser.com/questions/148416/… ) post. I feel this can be relevant. –  user99898 Oct 1 '11 at 18:12

3 Answers 3

They are used for different purposes:

  • NFS is for serving files from a server to many clients, taking care of conflicts etc.
  • iSCSI is used when you not directly attach the storage for the computing element, but connect over a (dedicated) network. Only one computer can use an iSCSI drive at a time. iSCSI's allows storage to be dynamically allocated for the servers, from one place at a time.

NFS is a networked file service, while iSCSI is a long virtual SCSI cable.

share|improve this answer
    
What does it mean "Iscsi benefit is when you have multiple servers and you can dinamically allocate storage for the servers, but iscsi can be used from one place at a time" Can you explain more? –  performanceuser Apr 15 '11 at 17:47
    
Explanation: iscsi lets one computer be connected to one drive through a network, but it is quick/easy to change which computer or drive that is. –  Eroen Mar 26 '12 at 18:41

NFS, like SMB (Windows) or Samba (Linux) maintains a file system. It keeps track of the various files, to include security (who owns a given file or folder, or can read that file or folder), folders, size of files, etc. When another computer talks to it, that client computer requests a list of files, the NFS server provides the list of files, and allows the client to request individual files for reading or writing. NFS, therefore, can allow multiple clients to share access to these files that it is hosting.

iSCSI may be using a huge file as a virtual hard disk, or exposing an actual physical disk. It just serves up blocks of data, just like blocks of data are stored on the actual disk (i.e. 512 bytes or 4k byte chunks). When a client computer attaches via an iSCSI Initiator that client has exclusive access to the disk. The client is responsible for dividing up or grouping up those blocks of data into files, and the client itself determines whether it is a ZFS or NTFS or whatever file system.

Consequently, an iSCSI server would be faster because it doesn't have as much work to do. It would be limited to only 1 client at a time connecting to that Target disk, and this would usually be fairly permanent. iSCSI clients would not normally be connecting/disconnecting a lot, unless the client was a laptop being moved away remotely. The client, in this case, would be doing more work, because all of the file system work (security, keeping track of which data block belongs to which file) has to be done by the client.

share|improve this answer

iSCSI actually exposes the raw device or partition to the remote device. So, when you connect to a new iSCSI device (server), it's like you've gotten a new 10GB or whatever hard drive - unformatted. Thus, the remote system (the client) now needs to format it and/or put any type of filesystem on it.

The remote system can also easily take responsibility for encrypting it using a full-disk type encryption and the server need not know anything about it.

NFS works on files and nothing lower. You only see directories and files, there's no formatting involved. It's like you are connected to a remote Windows share.

iSCSI to me seems faster if you are dealing if many small files, but network configuration and circumstance can vary that wildly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.