Which is better NFS or iSCSI?

Which is better? I don't know, and I don't care.

NFS, short for network file system. iSCSI, short for Internet Small Computer Systems Interface. The literal translation is "Internet Small Computer System Interface". At first glance, I thought it was a SCSI hard drive.

There is a 14-page paper with authors from MIT, IBM, and the University of California, Berkeley, which seems to be awesome! The paper compares the two systems and concludes:

  • The two systems NFS (v4) and iSCSI, although one is a file management system and the other is a block management system, have comparable performance at the data access level.
  • But in Metadata, metadata access, NFS v4 is twice as fast as iSCSI.

Wikipedia says that although iSCSI uses the CHAP protocol and avoids exchanging passwords in clear text, it is inherently more vulnerable. So security is about the same. If you don't want to translate it, the complete paper is here. If you can understand it and are interested, just take a look.

http://lass.cs.umass.edu/papers/pdf/FAST04.pdf

I'm more concerned about how to implement them in Linux. Simply compare:

NFS deployment

The storage array side (server side) needs to run:

  • nfs-server
  • nfs-secure-server

The configuration file for the server is /etc/exports. In it write the location of the space you want to provide

#/etc/exports

/exportdir           172.25.0.0/24(rw,sec=krb5p)

/exportdir2         172.25.0.0/24(ro)

The client needs to run:

  • nfs
  • nfs-secure

Example of loading in client /etc/fstab:

//server:/protected  /mnt/nfssecure nfs  sec=krb5, _netdev 0 0

iSCSI deployment

The storage array side (server side) needs to run:

  • targetcli, a command-line tool for configuring array resources, not for serving

The client needs to run:

  • iscsi
  • iscsid, this is the server-side daemon software, reversed from nfs.
  • iscsi-initiator-utils, also a tool for configuration

Example of loading in client /etc/fstab:

UUID = “as identified in blkid”   /mnt/   ext4   _netdev  0 0

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325481877&siteId=291194637