Storage protocols: iSCSI, NFS, SMB

iSCSI (Internet Small Computer System Interface):

iSCSI is a way for computers to access storage devices over a network, as if they were directly attached.
It uses the existing TCP/IP network infrastructure to transmit SCSI commands, which are typically used for communication between computers and storage devices.
iSCSI allows a computer (called the initiator) to send SCSI commands to a storage device (called the target) over the network.
It's commonly used in data centers and enterprise environments for storage area networks (SANs), where multiple servers need to access shared storage.

SCSI commands:

1. INQUIRY: Retrieves information about the SCSI device, such as vendor, product, and supported features.

2. READ (6/10/16/32): Reads data from the SCSI device. The number indicates the version of the command and the data transfer length.

3. WRITE (6/10/16/32): Writes data to the SCSI device. The number indicates the version of the command and the data transfer length.

4. REQUEST SENSE: Retrieves sense data from the device, which contains information about the last command's status.

5. TEST UNIT READY: Checks if the SCSI device is ready to accept commands.

6. MODE SENSE (6/10): Retrieves the current mode parameters from the device.

7. MODE SELECT (6/10): Sets the mode parameters on the device.

8. START STOP UNIT: Starts or stops the SCSI device.

9. SEND DIAGNOSTIC: Sends diagnostic information or runs self-tests on the device.

10. FORMAT UNIT: Formats the SCSI device for use.

11. READ CAPACITY (10/16): Retrieves the capacity of the SCSI device.

12. WRITE SAME (10/16): Writes the same data pattern to multiple blocks on the SCSI device.

13. LOG SENSE: Retrieves logging information from the device.

14. LOG SELECT: Sets logging parameters on the device.

15. COPY: Copies data from one SCSI device to another.

NFS (Network File System):

NFS is a distributed file system protocol that allows a computer to access files over a network as if they were stored locally.
It allows for file sharing between computers running different operating systems, such as Unix, Linux, and Windows.
NFS works by mounting a remote directory from one computer onto another, making it appear as part of the local file system.
It's commonly used for sharing files and data among computers in a networked environment, such as in offices or homes.

SMB (Server Message Block):

SMB is a network file sharing protocol that allows computers to share files, printers, and other resources over a network.
It's primarily used in Windows environments but can also be used on other operating systems with the help of software like Samba.
SMB works by allowing a computer to make requests for files and services from another computer on the network.
It's commonly used for sharing files, printers, and other resources in home networks, offices, and larger corporate environments.

In summary, iSCSI allows computers to access storage over a network, NFS enables file sharing between computers, and SMB facilitates file and resource sharing in Windows and other environments.