This application claims the priority of Chinese Patent Application No. 200710129984.3, entitled “DATA TRANSFER METHOD AND SYSTEM AND INTERNET SMALL COMPUTER SYSTEMS INTERFACE CONTROLLER”, and filed with the Chinese Patent Office on Jul. 20, 2007, and the priority of International patent application No. PCT/CN2008/070521, entitled “DATA TRANSFER METHOD AND SYSTEM AND INTERNET SMALL COMPUTER SYSTEMS INTERFACE CONTROLLER”, and filed on Mar. 18, 2008, which are hereby incorporated by reference in their entirety.
The present invention relates to the field of data transfer technologies and in particular to a data transfer method and system.
After stepping into the information age, the rapidly increasing amount of information has posed higher requirements on the capacity, performance and reliability of storage devices. A host and storage devices are typically networked in a distributed manner for the purposes of resource sharing, centralized management and security. Connection technologies in support of a high bandwidth and a long distance are particularly important for this networking manner.
The Internet Small Computer Systems Interface (iSCSI) is a standard established by the Internet Engineering Task Force in 2003 for mapping an SCSI data block into an Ethernet data packet. The iSCSI can build an IP storage Local Area Network with use of the Ethernet. With this method, the iSCSI can overcome the limitation of a direct connection with a storage device so as to share storage resources across different servers and regions and to extend a storage capacity without any outage.
Step 101: An iSCSI controller runs an iSCSI target service program corresponding to an IP address of a service network port.
Step 102: An iSCSI host sends a log-in request to the iSCSI controller in accordance with the IP address and the port number of the iSCSI controller, which are configured at the iSCSI host.
Step 103: The iSCSI controller receives the log-in request and starts a log-in process and sends back a log-in success response at the end of the process.
Step 104: The iSCSI host transfers data with the iSCSI controller.
The iSCSI host can write data to and read data from the iSCSI controller.
As can be seen from the flow above, a single-controller mode is adopted for an iSCSI target. i.e., the iSCSI host can be connected with only one iSCSI controller. When a failure occurs with a connection link between the iSCSI host and the iSCSI controller or with the iSCSI controller per se, the consistency of data and the continuity of service can not be guaranteed, thereby resulting in poor stability and reliability of data communication.
Some embodiments of the invention provide a data transfer method and system and an iSCSI controller to improve reliability of data transfer between an iSCSI host and the iSCSI controller.
Technical solutions of the embodiments of the invention are achieved as follows.
It shall be noted that in the embodiments of the invention, if an iSCSI controller b is a mirror iSCSI controller of an iSCSI controller a, the iSCSI controller a is referred to as a mirrored iSCSI controller of the iSCSI controller b.
This method presets at least one mirror iSCSI controller for each iSCSI controller and includes:
detecting, by the mirror iSCSI controller, failure of the mirrored iSCSI controller corresponding to the mirror iSCSI controller;
adding service information of the mirrored iSCSI controller to the mirror iSCSI controller;
receiving, by the mirror iSCSI controller, a log-in request sent from an iSCSI host which originally has logged in the mirrored iSCSI controller; and
processing the log-in request and taking the place of the mirrored iSCSI. controller.
A data transfer system includes:
an iSCSI host adapted to re-initiate a log-in request upon detection of failure of a mirrored iSCSI controller which the iSCSI host logs in, to log in a mirror iSCSI controller corresponding to the mirrored iSCSI controller, and to conduct data transfer with the mirror iSCSI controller; and
the mirror iSCSI controller adapted to add service information of the mirrored iSCSI controller upon detection failure of the corresponding mirrored iSCSI controller, to receive the log-in request sent from the iSCSI host which originally has logged in the mirrored iSCSI controller, and to conduct data transfer with the iSCSI host which originally has logged in the mirrored iSCSI controller in accordance with the service information.
An iSCSI controller includes:
a mirror failure processing module adapted to add service information of a corresponding mirrored iSCSI controller upon detection of failure of the mirrored iSCSI controller; and
a data processing module adapted to conduct data transfer with an iSCSI host, which originally has logged in the mirrored iSCSI controller.
As compared with the existing technology, the disclosed embodiments preset at least one mirror iSCSI controller for each iSCSI controller. The mirror iSCSI controller adds service information of its mirrored iSCSI controller upon detection of failure of the mirrored iSCSI controller, receives a log-in request sent from the iSCSI host which originally has logged in the mirrored iSCSI controller, accepts the log-in request, and conducts data transfer with the iSCSI host in accordance with the service information, thereby improving reliability of data communication.
In some embodiments of the invention, for each iSCSI controller, at least one iSCSI controller is selected in advance from all other iSCSI controllers as a mirror iSCSI controller of the iSCSI controller. Different IP addresses are set for the iSCSI controller and its mirror iSCSI controller. An IP address and a port number of an iSCSI controller accessible to an iSCSI host are configured on the iSCSI host. The same name can be set for the iSCSI controller and its mirror iSCSI controller. A homing iSCSI controller can be set for each iSCSI host. The homing iSCSI controller stores the relationship between the identifier of the iSCSI host (e.g., an initiator name) and the IP address of the homing iSCSI controller.
Some embodiments of the invention will be detailed below, taking it as an example that an iSCSI controller B is a mirror iSCSI controller of an iSCSI controller A, wherein the iSCSI controller A is a homing iSCSI controller of an iSCSI host 1 configured with an IP address and a port number of the iSCSI controller B.
Step 201: The iSCSI controller A is starts to run an iSCSI target service program corresponding to an IP address of each of its own service network ports, and the iSCSI controller B is started to run an iSCSI target service program corresponding to an IP address of each of its own service network ports.
At least one service network port is provided on each iSCSI controller and each service network port is configured with at least one IP address.
Step 202: The iSCSI host 1 establishes a temporary discovery session with the iSCSI controller B in accordance with the IP address, IPB1, of the iSCSI controller B configured at the iSCSI host 1, and obtains the name of the iSCSI controller B through the session.
Step 203: The iSCSI host 1 sends to the iSCSI controller B a log-in request carrying the initiator name of the iSCSI host 1.
The iSCSI host 1 may be configured with one IP address or two or more IP addresses of the iSCSI controller B and send the log-in request to any of the IP addresses configured at the iSCSI host.
Step 204: The iSCSI controller B receives the log-in request message and obtains the IP address, IPA1, of a homing iSCSI controller which the iSCSI host 1 should log in, in accordance with the initiator name of the iSCSI host 1 carried in the message and its stored relationship between the initiator name and the IP address of the homing iSCSI controller.
The relationship between the initiator name of the iSCSI host and the IP address of the homing iSCSI controller may include an algorithm to calculate the IP address of the homing iSCSI controller by taking the initiator name of the iSCSI host as a parameter.
Step 205: The iSCSI controller B detects that IPA1 is not the IP address at which the iSCSI host 1 logs in and then sets IPA1 in a redirection request message and sends the redirection request message to the iSCSI host 1.
The IP address at which the iSCSI host 1 logs in is IPB1 with which the iSCSI host 1 sends the log-in request in the step 202.
Step 206: The iSCSI host 1 receives the redirection request message, establishes a temporary discovery session with the iSCSI controller A which IPA1 indicates in accordance with IPA1 carried in the redirection request and obtains the name of the iSCSI controller A through the session.
Step 207: The iSCSI host 1 sends to the iSCSI controller A indicated by IPA1 a log-in request carrying the initiator name of the iSCSI host 1.
Step 208: The iSCSI controller A receives the log-in request message and obtains the IP address, IPA1, of a homing iSCSI controller A which the iSCSI host 1 should log in, in accordance with the initiator name of the iSCSI host 1 carried in the message and its stored relationship between the initiator name and the IP address of the homing iSCSI controller.
Step 209: The iSCSI controller A detects that IPA1 is the IP address at which the iSCSI host 1 logs in, starts a log-in process and sends back a log-in success response at the end of the process.
The log-in process includes negotiation about operative parameters, and security authentication, etc.
Step 210: The iSCSI host 1 transfers data with the iSCSI controller A. The iSCSI controller A may store data sent from the iSCSI host 1 into a storage medium accessible to both the iSCSI controller A and the iSCSI controller B, and the iSCSI host 1 can read the data from the storage medium.
As can be seen from the flow illustrated in
Descriptions will be made below to a process in which when a failure occurs with a connection link between the iSCSI host 1 and the homing iSCSI controller, i.e. the iSCSI controller A or with the iSCSI controller A per se, i.e. the iSCSI controller A fails, the mirror iSCSI controller of the iSCSI controller A, i.e. the iSCSI controller B takes the place of the iSCSI controller A for data transfer with the iSCSI host which originally has logged in the iSCSI controller A.
Step 301: The iSCSI controller B detects failure of the iSCSI controller A, and adds the IP addresses over all the service network ports of the iSCSI controller A to the service network port of the iSCSI controller B.
Failure of the iSCSI controller A in this step refers to when the iSCSI controller A can not conduct data transfer with the iSCSI host which logs in the iSCSI controller A. The iSCSI controller A may fail due to partial malfunction or restart of the iSCSI controller A. In the case of a partial malfunction of the iSCSI controller A, the iSCSI controller A can notify the iSCSI controller B in time upon detection of its own failure. In the case of restart of the iSCSI controller A, the iSCSI controller B can know that the iSCSI controller A has failed due to no reception of any handshake message sent from the iSCSI controller A.
Information on the IP address over the service network port of each iSCSI controller is stored in a storage space accessible to both the iSCSI controller and its mirror iSCSI controller. Therefore, the iSCSI controller B may obtain the IP addresses over all the service network ports of the iSCSI controller A from the storage space accessible to both of the iSCSI controllers.
Upon determination of its own failure, the iSCSI controller A can stop the iSCSI target service program running at the IP addresses of its all service network ports and delete the IP addresses over its all service network ports.
After this step is executed, the IP addresses of the service network ports of the iSCSI controller B include IPA1+IPA2+ . . . and IPB1+IPB2+ . . . , where IPA1+IPA2+ . . . denote the IP addresses over all the service network ports formerly on the iSCSI controller A, and IPB1+IPB2+. . . denote the IP addresses over all the service network ports on the iSCSI controller B.
Step 302: The iSCSI controller B runs the iSCSI target service program corresponding to the IP addresses, IPA1+IPA2+ . . . , which are newly added over the service network port.
Step 303: The iSCSI host 1 detects disconnection of the session with the iSCSI controller A, takes an IP address at which a recent successful log-in occurs, i.e. IPA1 in this embodiment, as a destination address, and re-sends a log-in request carrying the initiator name of the iSCSI host 1.
Typically, the iSCSI host 1 may send the log-in request to an IP address used for the recent successful log-in.
Step 304: The iSCSI controller B receives the log-in request message and obtains the IP address, IPA1, of a homing iSCSI controller which the iSCSI host 1 should log in, in accordance with the initiator name of the iSCSI host 1 carried in the log-in request message and its stored relationship between the initiator name and the IP address of the homing iSCSI controller.
Step 305: The iSCSI controller B detects that IPA1 is the IP address at which the iSCSI host 1 logs in, starts a log-in process, and sends back a log-in success response at the end of the process.
The log-in process in this step is the same as that in the step 209.
Step 306: The iSCSI host 1 transfers data with the iSCSI controller B.
The iSCSI controller B can store data sent from the iSCSI host 1 into a storage medium accessible to both the iSCSI controller B and the iSCSI controller A, and the iSCSI host can read the data from the storage medium.
As can be seen from the flow illustrated in
When the homing iSCSI controller of the iSCSI host 1 (the iSCSI controller A) recovers, the iSCSI controller B can disconnect the session with the iSCSI host which originally has logged in the iSCSI controller A for load sharing, so that the iSCSI host 1 will log in the iSCSI controller A again. A description will be made below to an embodiment of data transfer when the homing iSCSI controller recovers.
Step 401: The iSCSI controller B detects that the iSCSI controller A recovers, disconnects session with all iSCSI hosts which originally log in the iSCSI controller A, and disables iSCSI target service programs running corresponding to all the IP addresses formerly related to the iSCSI controller A.
Step 402: The iSCSI controller B deletes all the IP addresses formerly related to the iSCSI controller A configured over the service network port of the iSCSI controller B.
Step 403: The iSCSI controller A detects its own recovery, configures the IP addresses of the iSCSI controller A over all its own service network ports, and runs the iSCSI target service program corresponding to the configured IP addresses.
All the IP addresses configured over the service network port of each iSCSI controller are stored in a storage space accessible to both the iSCSI controller and its mirror iSCSI controller. Therefore, the iSCSI controller A can obtain the IP address configured over the service network port of the iSCSI controller A from the storage space accessible to both of the iSCSI controllers.
Step 404: The iSCSI host 1 detects disconnection of the session with the iSCSI controller B, and re-sends, to IPA1, a log-in request carrying the initiator name of the iSCSI host 1.
Step 405: The iSCSI controller A receives the log-in request message, and obtains the IP address, IPA1, of a homing iSCSI controller A which the iSCSI host 1 should log in, in accordance with the initiator name of the iSCSI host 1 carried in the message and its stored relationship between the initiator name and the IP address of the homing iSCSI controller.
Step 406: The iSCSI controller A detects that IPA1 is the IP address at which the iSCSI host 1 logs in, starts a log-in process, and sends back a log-in success response at the end of the process.
The log-in process in this step is the same as that in the step 209.
Step 407: The iSCSI host 1 transfers data with the iSCSI controller A.
The embodiments illustrated in
Furthermore, in the embodiments illustrated in
According to the embodiments illustrated in
When being started, the iSCSI host obtains, in accordance with an IP address of the iSCSI controller configured at the iSCSI host, a name of the iSCSI controller which the IP address identifies, and sends to the iSCSI controller a log-in request carrying the initiator name of the iSCSI host. If the iSCSI host receives a redirection request message carrying an IP address sent from the iSCSI controller, the iSCSI host obtains the name of an iSCSI controller which the IP address carried in the redirection request message identifies, and sends a log-in request to the iSCSI controller. After receiving a log-in success notification sent from the iSCSI controller which the IP address carried in the redirection request message identifies, the iSCSI host conducts data transfer with the iSCSI controller. Upon detection of disconnection of the session with the iSCSI controller, the iSCSI host re-sends a log-in request message. As an example, the iSCSI host may re-send the log-in request message to an IP address used for its recent successful log-in.
As illustrated in
The log-in processing module 61 receives the log-in request message sent from the iSCSI host, and obtains an IP address of a homing iSCSI controller which the iSCSI host should log in, in accordance with the initiator name of the iSCSI host carried in the message and its own stored relationship between the initiator name and the IP address of the homing iSCSI controller. If the IP address is the IP address at which the iSCSI host logs in, the log-in processing module starts a log-in process and sends back a log-in success response at the end of the process. Otherwise, the module sends back a redirection request carrying the obtained IP address to the iSCSI host.
The mirror failure processing module 62 detects failure of a mirrored iSCSI controller of the iSCSI controller, adds an IP address over a service network port of the mirrored iSCSI controller to the iSCSI controller, and runs an iSCSI target service program corresponding to the IP address.
The mirror recovery processing module 63 detects that the mirrored iSCSI controller of the iSCSI controller recovers, disconnects the session of the iSCSI controller with the iSCSI host which originally has logged in the mirrored iSCSI controller, disables the iSCSI target service program corresponding to the IP address of the mirrored iSCSI controller over the service network port of the iSCSI controller, and deletes the IP address of the mirrored iSCSI controller over the service network port of the iSCSI controller.
The data processing module 64 receives data sent from the iSCSI host which originally has logged in the mirrored iSCSI controller of the present controller and stores the data into a cache.
As illustrated in
The mirror failure detection module 621 detects failure of the mirrored iSCSI controller of the iSCSI controller, and sends a mirror failure indication to the IP address adding module 622.
The IP address adding module 622 receives the mirror failure indication sent from the mirror failure detection module 621, adds the IP address of the mirrored iSCSI controller of the iSCSI controller to the service network port of the iSCSI controller, and runs the iSCSI target service program corresponding to the IP address.
As illustrated in
The mirror recovery detection module 631 is adapted to send a mirror recovery indication to the session disconnection module 632 and the IP address deletion module 633, upon detection of that the mirrored iSCSI controller of the iSCSI controller recovers.
The session disconnection module 632 is adapted to disconnect the session of the iSCSI controller with the iSCSI host which originally has logged in the mirrored iSCSI controller of the iSCSI controller upon reception of the mirror recovery indication sent from the mirror recovery detection module 631.
The IP address deletion module 633 is adapted to disable the iSCSI target service program corresponding to the IP address of the mirrored iSCSI controller over the service network port of the iSCSI controller and delete the IP address of the mirrored iSCSI controller configured over the service network port of the iSCSI controller upon reception of the mirror recovery indication sent from the mirror recovery detection module 631.
Furthermore, the iSCSI controller in one embodiment of the invention further includes a failure processing module and a recovery processing module.
The failure processing module is adapted to disable the iSCSI target service program running at the IP address of the service network port and delete the IP address over the service network port upon determination of failure of the iSCSI controller.
The recovery processing module configures the IP address over the service network port of the iSCSI controller and runs the iSCSI target service program corresponding to the IP address of the service network port of the iSCSI controller upon determination that the iSCSI controller recovers.
As illustrated in
The recovery detection module 651 is adapted to send a failure recovery indication to the IP address configuration module 652 upon detection of that the iSCSI controller recovers from failure.
The IP address configuration module 652 is adapted to configure the IP address over the service network port of the iSCSI controller and to run the iSCSI target service program corresponding to the IP addresses upon reception of the failure recovery indication sent from the recovery detection module 651.
As can be seen from the embodiments above, when the iSCSI controller fails, the mirror iSCSI controller of the iSCSI controller can add the IP address over the service network port of the iSCSI controller to its own service network port, and runs the iSCSI target service program corresponding to the IP address. Thereafter, the iSCSI host logs in the mirror iSCSI controller, and conducts data transfer with the mirror iSCSI controller, thereby achieving consistency of data and continuity of the service and improving reliability and stability of data communication. Furthermore, a homing iSCSI controller can be set for each iSCSI host for load sharing. Additionally, the same name is used for the iSCSI controller and the mirror iSCSI controller, so that the process of switching the iSCSI controllers will be transparent to a user.
The foregoing descriptions are merely illustrative of the processes and method embodiments of the invention but not limitative to the invention. Any modifications, alternatives and adaptations made without departing from the spirit and principle of the invention shall come into the scope of the invention as defined in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
200710129984.3 | Jul 2007 | CN | national |
PCT/CN2008/070521 | Mar 2008 | CN | national |