1. Field of Invention
The present invention relates to a storage server, and more particularly to a storage server implemented by an internet small computer systems interface (iSCSI) in a Linux system.
2. Related Art
Along with the rapid development of the hard disk technique, the hard disk space is improved from mega byte (MB) to giga byte (GB). With the progress of the network technique, a communication protocol standard on iSCSI is proposed by IETF, for serially connecting a plurality of computer hosts to form a virtual network storage server based on the TCP/IP communication protocol. The virtual network storage server has a high speed transmission capability and an expanding/backup capability for ever-expanding capacity of the virtual storage device. The storage server implemented by the iSCSI communication protocol can be formed by one or more targets. The operation of accessing data storage once is called a session. The terminal which initiating the session is called initiator. The initiator transmits a request packet to establish the session with the target, and the target receives the request packet to respond and establish a session link.
In view of the above, the target in the storage server establishes the session through the complicated handshaking procedure (transmitting the request and waiting the response) of elements of each layer, so the frequent process switch of the elements of each layer easily results in the performance bottleneck of the storage server. Thus, the iSCSI layer and the SCSI layer functions are embedded into the network subsystem and the SCSI subsystem through the embedded modules of the network subsystem and the SCSI subsystem, such that the network subsystem and the SCSI subsystem are independent executors respectively, so as to avoid the frequent process switch among the layers and prevent multiple times of memory data copy actions among the layers. The copy actions among the layers are not required in the course of data transmission, thereby saving the time for data transmission, and improving the overall operation performance.
In order to achieve the objective, the storage server implemented by the iSCSI in the Linux system includes two parts, namely a network subsystem and a SCSI subsystem.
The first part is the network subsystem that receives the network packet from the initiator. The iSCSI module and the SCSI module are embedded in the network subsystem. When the iSCSI module is called by the network subsystem, the network packet is determined to be an iSCSI request packet, and the SCSI request instruction or the SCSI data is parsed. The SCSI module is called by the iSCSI module, the SCSI request instruction or the SCSI data is received, and is packed to a SCSI subsystem identifiable format packet.
The second part is the SCSI subsystem that receives the SCSI identifiable format packet and returns the network subsystem identifiable format packet to the network subsystem to finish the receiving procedure. The SCSI module and the iSCSI module are embedded in the SCSI subsystem. The SCSI module is called by the SCSI subsystem, for determining that the instruction transmitted by SCSI subsystem is the response instruction. Next, the SCSI module calls the iSCSI module. According to the response instruction, the iSCSI module creates the iSCSI response format data, packs the iSCSI response format data into the network subsystem identifiable format packet, and transmits the network subsystem identifiable format packet to the network subsystem.
In the storage server implemented by the iSCSI in the Linux system according to a preferred embodiment of the present invention, the iSCSI module embedded in the network subsystem determines that the received network packet is not the iSCSI request packet, the network packet is transmitted to the network subsystem to execute the standard packet parsing flow. In addition, when the SCSI module embedded in the SCSI subsystem determines that the instruction transmitted by the SCSI subsystem is not the response instruction, the SCSI subsystem submits the response to the related application through the standard flow.
In the storage server implemented by the iSCSI in the Linux system according to a preferred embodiment of the present invention, the network packet is the data packet of the TCP layer, and the iSCSI request packet is the iSCSI packet containing the iSCSI request instruction.
In the storage server implemented by the iSCSI in the Linux system according to a preferred embodiment of the present invention, the SCSI module of the network subsystem transmits the SCSI identifiable format packet to the SCSI subsystem by calling an interface provided by the SCSI subsystem. The iSCSI module of the SCSI subsystem transmits the network subsystem identifiable format packet by calling an interface provided by the network subsystem.
Accordingly, in the storage server implemented by the iSCSI in the Linux system of the present invention, the iSCSI module and the SCSI module are embedded in the network subsystem and the SCSI subsystem respectively, for exclusively performing receiving or sending process. Each module does not need to perform the process switch of receiving or sending (switching to the initiator that transmits the request/responds the instruction), thereby solving the system performance bottleneck resulting from the process switch. In addition, the operations of the initiator (the network subsystem and the SCSI subsystem) requesting and responding the task are independent, so the instruction requesting and initiating can be operated in parallel, thereby improving the processing speed of the overall storage server.
The present invention will become more fully understood from the detailed description given herein below for illustration only, and thus are not limitative of the present invention, and wherein:
The objectives and the implementing methods of the present invention are described in detail in the following preferred embodiments. However, the concept of the present invention can also be used in other scope. The embodiments exemplified as follows are only used for illustrating the objectives and the implementation methods of the present invention, and are not intended to limit the scope of the present invention.
The network subsystem 210 receives the network packet transmitted from the initiator, and the network packet is the data packet of the TCP layer. Next, the network subsystem 210 calls the iSCSI module 212 to determine whether the network packet has the iSCSI request packet, and parse the SCSI request instruction or the SCSI data packed in the iSCSI request packet. The so-called iSCSI request packet is the iSCSI packet containing the iSCSI request instruction. In this embodiment, for example, whether the network packet has the iSCSI file header is determined, so as to quickly determine whether the network packet is the iSCSI packet. Then, the SCSI request instruction or the SCSI data in the iSCSI packet is parsed, so as to determine whether it is the SCSI request packet. Next, the iSCSI module 212 calls the SCSI module 214 to receive the parsed SCSI request instruction or SCSI data, and packs the data to the SCSI identifiable format packet. The iSCSI module calls the interface provided by the SCSI subsystem 220, and transmits the SCSI identifiable format packet to the SCSI subsystem 220.
The independent iSCSI module 222 and the SCSI module 224 are embedded in the SCSI subsystem 220, so the response instruction can be processed in sync without waiting the iSCSI module 222 and the SCSI module 224 to switch from the request end to the response end. After the SCSI subsystem 220 receives the SCSI identifiable format packet, it is determined that the network subsystem identifiable format packet needs to be transmitted to the network subsystem 210 to finish the receiving procedure. The SCSI subsystem 220 firstly calls the SCSI module 224 to determine that the instruction transmitted by the SCSI subsystem 220 is the response instruction. Then, the SCSI module 224 calls the iSCSI module 222, and creates the iSCSI response format data according to the response instruction. Then the SCSI module 224 packs the iSCSI response format data to the network subsystem identifiable format packet and transmits it it to the network subsystem 210. The iSCSI module 222 calls the interface provided by the network subsystem 210, so as to transmit the network subsystem identifiable format packet to the network subsystem 210.