Chapter III iSCSI and SCSI
3.1 ISCSI Overview
The iSCSI protocol is an Internet draft draft standard to define the transfer SCSI command on the TCP / IP protocol. In January 2001 IBM and Cisco first proposed the draft ISCSI draft. The IP Storage (IPS) working group submitted to the IETF in August was standardized. July 2001 IETF first defined the ISCSI draft standard. Based on draft, many companies have developed such products.
iSCSI allows SCSI I / O commands and data to be transmitted on the network using TCP / IP protocol, just like the SCSI command to Fiber Channel, the same as the SCSI and SSA media. Install the iSCSI device drive on the server, receive the I / O request of the application, and then use the iSCSI protocol to transmit them on the LAN. The target storage device can be attached to the LAN, or the router (protocol, converter) can also be connected to the LAN. In the second method, there is a fiber channel port on the other end of the LAN, which can be connected to a storage device that supports the Fiber Channel accessory. Such a solution allows storage products that do not have an ISCSI end through the iSCSI protocol, and also allows the server to access the device without a Fiber Channel host bus adapter. Compared to other solutions, iSCSI has some advantages:
1. Connectivity: ISCSI can be used when NAS and SANs are connected to the device. The iSCSI device can be placed on the existing LAN containing a plurality of applications, or on a LAN dedicated to storage I / O, or only to a processor (DAS). TCP / IP is a more mature protocol, many IT staff are familiar with it, which reduces a lot of management and training costs.
2. Media: iSCSI is attached to the IP network, compared to a simple Fiber Channel SAN, can support longer transmission distances.
3. I / O protocol: iSCSI uses the SCSI I / O protocol, so it is block-based I / O to avoid embarrassment of unsuitable databases or other applications that do not use file protocols. A plurality of separate networks can be connected to use a general switch, not as specific to a specific switch as a fiber channel.
4. Manage: The management of iSCSI is the same as the management of other SCSI devices that directly attach. From the perspective of the processor, the disk volume connected to the iSCSI is visible. Any data backup method that supports the SCSI volume is also possible for iSCSI. Compared to Fiber Channel SAN, iSCSI can utilize the advantages of facilitating network management tools and human skills.
5. Performance: Ethernet, iSCSI's performance is superior to NAS because it operates directly on the SCSI device without the need to convert between file I / O protocols and SCSI protocols. Speed can reach 10gigabit, which can be comparable to OC-192 SONET (synchronous fiber network).
6. Fee: In general, in the same case, a fee of iSCSI SAN is lower than the cost of Fiber Channel SAN. From the hardware point of view, the Ethernet host adapter is generally cheaper than the fiber optic host adapter. If iSCSI is attached to SAN, then There is no need for a new host adapter card at all. The establishment of iSCSI SAN is more fast than the establishment of Fiber Channel SAN, and there are few new technologies. The iSCSI disk device is cheaper than a NAS device because there is no need to support file system, file sharing protocols and other applications in NAS products.
In the case of frequent I / O operation, the advantages of iSCSI are particularly obvious.
3.2 iSCSI protocol layered
The figure below is easy to give a layering of the iSCSI protocol:
3.3 SAN and ISCSI relationships
Just as in LAN and WAN, clients and servers must communicate, must be made by the corresponding communication mechanism (common TCP / IP protocol, etc.), the server and storage device also need the corresponding mechanism, iSCSI It is a very potential agreement. Since iSCSI is essentially the SCSI command package in the TCP / IP protocol, it is necessary to introduce SCSI and related content before detailing iSCSI. 3.4 SCSI is at the highest layer, SCSI is an interface family requesting services to I / O devices, which includes hardware drives, tape drives, CDs, and DVD drivers, printers, and scanners. In SCSI terms, an I / O device is referred to as a "logical unit" (Lu, Logical Unit). SCSI adopts client - server structure. A client of an SCSI interface is called "launcher." The starter issues a "command" to request a logical unit. The "Device Server" on the logic unit receives the SCSI command and processes it. A "SCSI Transfer" maps the client - server SCSI protocol to a unique interaction connection. The starter is a final point of the SCSI transmission. A target contains multiple logical units. Each logic unit has an address in the target, called a logic unit number. A SCSI task is a SCSI command or a logical set of a SCSI command. Some logical units support multiple suspend (queuing) tasks, and the task queue is managed by the target. Target uses the "Task Tab" provided by the launcher to distinguish the task. At any given time, only one command of only one task can be executed. Each SCSI command exports an optional data phase and a necessary response phase. In the data phase, the information can be from the starter to the target (such as write operation), or from the target to the starter (such as a read operation), or two-way. In the response phase, the final state of the target is sent back, including any errors. A response stops a SCSI command. A command depiction block is a data structure that contains command parameters to be processed from the starter to the target. SCSI is a common technology that supports block level access, its bottleneck is the length of the SCSI bus. Currently, some protocols are used to extend the SCSI bus length: Fiber Channel, SCSI Packaging Agreement and ISCSI. A maximum of 16 devices on a SCSI bus, which can be arbitrary
A combination of multiple initiators and targets, but an available system must have at least one starter and a target. The SCSI protocol assigns an ID number (address) for each SCSI device, used to identify the device, in a system with 16 SCSI devices, ID number from 0 to 15. Each target can be subdivided into multiple logical units, with up to 8 logical units on each device.
3.5 SCSI command depiction block
The data structure from the communication command from the application client to the device server is called the command descript block (CDB). A SCSI command or a set of related commands is called "task". At any time, there is only one command in a task being executed. The result after the SCSI command is an optional data phase and a status phase. In the data phase, write the data from the starter to the target, read the data from the target to the initiator; in the status phase, the final state of the target returns the operation. Status response to a SCSI command or task. The basic function of the SCSI driver is to establish a SCSI command descript block (CDB) based on the request proposed by the application, and send the CDB to the iSCSI layer, the SCSI driver also receives the CDB from the iSCSI layer and forwards the data to the application layer. CDB is divided into 6 bytes, 10 bytes, and 12 bytes, and the figure below is a basic 16-byte SCSI CDB. Among them, for the operating code section, I give the general command of all SCSI devices in the appendix, please see.