[go: up one dir, main page]

CN100438396C - System and method for realizing error return in iSCSI - Google Patents

System and method for realizing error return in iSCSI Download PDF

Info

Publication number
CN100438396C
CN100438396C CNB2005100043101A CN200510004310A CN100438396C CN 100438396 C CN100438396 C CN 100438396C CN B2005100043101 A CNB2005100043101 A CN B2005100043101A CN 200510004310 A CN200510004310 A CN 200510004310A CN 100438396 C CN100438396 C CN 100438396C
Authority
CN
China
Prior art keywords
scsi
iscsi
information
error
description block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100043101A
Other languages
Chinese (zh)
Other versions
CN1805328A (en
Inventor
宋建福
刘文涵
李卓印
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CNB2005100043101A priority Critical patent/CN100438396C/en
Publication of CN1805328A publication Critical patent/CN1805328A/en
Application granted granted Critical
Publication of CN100438396C publication Critical patent/CN100438396C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种在因特网小计算机系统接口,以下均简称iSCSI(internet SCSI),中实现错误返回的系统及其方法,利用在目标设备(Target Machine)内的iSCSI模块(module)中,建立一虚拟SCSI磁盘装置(Virtual SCSI disk driver),当启动设备(Initiator Machine)端发出命令至目标设备端后,能够不必通过文件系统(filesystem)传送到SCSI layer,即可快速辨识命令的正确性,并立即将错误命令信息回传给启动设备。

Figure 200510004310

A system and method for implementing error return in the Internet Small Computer System Interface (hereinafter referred to as iSCSI) is provided. A virtual SCSI disk driver is established in the iSCSI module in the target machine. When the initiator machine sends a command to the target machine, the correctness of the command can be quickly identified without transmitting it to the SCSI layer through the file system, and the error command information can be immediately returned to the initiator machine.

Figure 200510004310

Description

在iSCSI中实现错误返回的系统及其方法 System and method for implementing error return in iSCSI

技术领域 technical field

本发明涉及一种返回错误信息的系统及其方法,特别是指应用在储存网络上,通过在目标设备内建立一虚拟SCSI磁盘装置,可直接返回错误命令信息的系统及其方法。The present invention relates to a system and method for returning error information, in particular to a system and method for directly returning error command information by establishing a virtual SCSI disk device in a target device when applied to a storage network.

背景技术 Background technique

储存网络是特指连结储存设备与服务器的网络,由于储存网络是以网络串联储存设备,故其较RAID及SCSI等将服务器与储存设备直接连结的技术,除了具有高速传输能力,也不会因服务器本身而限制储存设备的扩充与备份,扩充性与可靠性佳。目前Fiber Channel是最为常用的储存网络的连结技术的代表。A storage network refers specifically to a network that connects storage devices and servers. Since a storage network uses a network to connect storage devices in series, it is not only capable of high-speed transmission, but also free of The expansion and backup of the storage device are limited by the server itself, and the scalability and reliability are good. Fiber Channel is currently the most commonly used storage network connection technology representative.

另一个新兴起的储存网络技术,则是刚完成标准制定的iSCSI(互联网小型计算机系统接口)传输协议。此传输协议主要的功能是将SCSI的命令及数据,通过iSCSI的协议数据单元(PDU,Protocol Data Units)在目前发展已非常成熟的IP网络上传送,借由iSCSI协议,将使IP网络亦可成为储存网络。以IP网络作为储存网络时的最大优点是,对使用者而言,其只需将其服务器及储存设备换成iSCSI接口,使用原有的IP网络的交换设备,就可建置出价廉物美的储存网络,而且使用上好像它们是″直接存取装置″一样。iSCSI可以实现在IP网络上营运SCSI协议,使其能够在高速千兆Ethernet上进行路由选择。Another emerging storage network technology is the iSCSI (Internet Small Computer System Interface) transmission protocol, which has just completed standard formulation. The main function of this transmission protocol is to transmit SCSI commands and data through iSCSI Protocol Data Units (PDU, Protocol Data Units) on the currently developed IP network. With the iSCSI protocol, the IP network will also be able to become a storage network. The biggest advantage of using an IP network as a storage network is that for users, they only need to replace their servers and storage devices with iSCSI interfaces, and use the original IP network switching devices to build a low-cost and high-quality system. storage network and are used as if they were "direct access devices". iSCSI can realize the operation of SCSI protocol on IP network, so that it can perform routing on high-speed Gigabit Ethernet.

iSCSI传输协议为互联网工程任务组织(IETF,Internet Engineering TaskForce)所制定的标准,定义了启动设备(Initiator Machine),也就是发出存取数据要求的一方,通常为服务器端或使用者计算机,及目标设备(TargetMachine),也就是接收并响应要求的一方,通常为储存设备端,两者之间的传输方式,包括了有两者之间的传送的iSCSI PDU的格式,Session的建立及终止,以及SCSI Task的开始及结束。The iSCSI transport protocol is a standard developed by the Internet Engineering Task Force (IETF, Internet Engineering Task Force), which defines the initiator machine (Initiator Machine), that is, the party that issues a data access request, usually the server or user computer, and the target Device (TargetMachine), that is, the party that receives and responds to the request, usually the storage device side, the transmission method between the two, including the format of the iSCSI PDU transmitted between the two, the establishment and termination of the Session, and The start and end of SCSI Task.

对传统SCSI而言,iSCSI协议是架构在TCP/IP协议之上,而再往上则是与SCSI接口相接,因此不必再受限于SCSI的最远距离只能到25公尺,只要有网络的地方即可建构,由于是采取SCSI的接口方式来传送命令,而执行一个SCSI命令只能有2种结果:正确或错误。启动设备把命令传递给目标设备后,会一直等待命令的执行结果。若是执行错误,目标设备必须返回错误信息给启动设备,才能保证启动设备能够正常运行。For traditional SCSI, the iSCSI protocol is based on the TCP/IP protocol, and then it is connected to the SCSI interface. Therefore, there is no need to be limited by the longest distance of SCSI, which can only reach 25 meters. The place where the network can be constructed, because the SCSI interface is used to transmit commands, and executing a SCSI command can only have two results: correct or wrong. After the initiating device transmits the command to the target device, it will wait for the execution result of the command. If there is an execution error, the target device must return an error message to the boot device to ensure that the boot device can operate normally.

请参照图1,此为iSCSI传递SCSI命令的过程示意图。当启动设备端270从SCSI层100发出一格式为命令描述块(CDB,Command DescriptorBlock)的命令101到iSCSI层110,iSCSI层110则再包上一层协议数据单元111,最后再加上TCP/IP标头(header),成为一IP封包后,才能传送到因特网上到达目标设备端280。Please refer to FIG. 1 , which is a schematic diagram of the process of transferring SCSI commands by iSCSI. When the starting device end 270 sends a command 101 whose format is a command description block (CDB, Command DescriptorBlock) from the SCSI layer 100 to the iSCSI layer 110, the iSCSI layer 110 then wraps up a layer of protocol data unit 111, and finally adds TCP/ The IP header (header) can be transmitted to the Internet to reach the target device end 280 after becoming an IP packet.

而当目标设备端280自TCP/IP网络120上接收到此封包后,先由网络层将TCP/IP标头解除后,传到iSCSI层110将PDU111的标头去除后,最后才将命令描述块格式数据101传到SCSI层100。由于从目标设备端280所返回的错误信息必须包含在IP封包中,但是如果目标设备端280在协议数据单元的标头中加入错误信息,则在启动设备端270的分层拆解过程将导致错误信息到SCSI层100丢失,如此一来,启动设备端270的SCSI磁盘装置将得不到命令执行的结果,以至于导致启动设备端270与目标设备端280的操作异常,甚至于造成系统停止运作的危险。And when the target device end 280 receives this packet from the TCP/IP network 120, the TCP/IP header is first removed by the network layer, and then passed to the iSCSI layer 110 to remove the header of the PDU111, and finally the command is described The block format data 101 is passed to the SCSI layer 100 . Since the error information returned from the target equipment end 280 must be included in the IP packet, but if the target equipment end 280 adds the error information in the header of the protocol data unit, then the layered disassembly process at the initiation equipment end 270 will result in The error information is lost to the SCSI layer 100. As a result, the SCSI disk device of the boot device 270 will not get the result of command execution, so that the operation of the boot device 270 and the target device 280 will be abnormal, and even cause the system to stop. operational hazards.

发明内容 Contents of the invention

本发明的主要目的是提供一种在iSCSI中实现错误返回的系统,其在目标设备内的iSCSI模块中就能够把错误信息处理完,并返回给启动设备端的SCSI层,以解决现有技术中的上述问题,正确的处理错误信息,保证错误能够返回到启动设备端的SCSI层。The main purpose of the present invention is to provide a system for realizing error return in iSCSI, which can process the error information in the iSCSI module in the target device and return it to the SCSI layer of the boot device to solve the problems in the prior art. For the above problems, correctly handle the error information, and ensure that the error can be returned to the SCSI layer on the boot device side.

为达到上述目的,本发明一种在iSCSI中实现错误返回的系统,对于该系统中一启动设备端所传送出去的一IP封包,需经由一目标设备内一iSCSI模块将其协议数据单元拆解后,再由一SCSI磁盘装置解读剩余的SCSI命令描述块格式数据及命令,并于该SCSI磁盘装置中执行,其特征在于该系统还包含:一虚拟SCSI磁盘装置,位于该目标设备的iSCSI模块中,经由网络系统连结至该启动设备,当该目标设备内包含一连结于iSCSI层与SCSI层之间的逻辑磁区管理/磁盘冗余阵列磁盘装置时,在该iSCSI模块中判别出一个以上错误命令时,立即反馈给该启动设备端,使每个SCSI命令都能够得到实时的确认,避免信息的丢失,以利将该IP封包重送。In order to achieve the above object, the present invention is a system for realizing error return in iSCSI. For an IP packet sent by an initiating device in the system, it needs to disassemble its protocol data unit via an iSCSI module in a target device. Afterwards, the remaining SCSI command description block format data and commands are interpreted by a SCSI disk device, and executed in the SCSI disk device. It is characterized in that the system also includes: a virtual SCSI disk device, located in the iSCSI module of the target device In, when the target device is connected to the boot device via the network system and contains a logical sector management/redundant disk array disk device connected between the iSCSI layer and the SCSI layer, more than one error is identified in the iSCSI module When the command is issued, it is immediately fed back to the boot device, so that each SCSI command can be confirmed in real time, avoiding information loss, and resending the IP packet.

该虚拟SCSI磁盘装置用以解读多个SCSI命令描述块发送的多个命令。The virtual SCSI disk device is used for interpreting a plurality of commands sent by a plurality of SCSI command description blocks.

该虚拟SCSI磁盘装置能将错误信息加入各该SCSI命令描述块中。The virtual SCSI disk device can add error information to each of the SCSI command description blocks.

该启动设备端的SCSI层用以解读由该虚拟SCSI磁盘装置加入错误信息的各该SCSI命令描述块。The SCSI layer at the boot device side is used for interpreting each SCSI command description block added with error information by the virtual SCSI disk device.

该虚拟SCSI磁盘装置检查SCSI命令描述块的各命令信息无误后,则仍用以将各该命令信息交由SCSI磁盘装置来执行。After the virtual SCSI disk device checks that each command information in the SCSI command description block is correct, it is still used to deliver each command information to the SCSI disk device for execution.

本发明还提供一种在iSCSI中实现错误返回的方法,该方法包含下列步骤:接收一启动设备端发出的IP封包;去除一协议数据单元及一SCSI命令描述块的标头;自一SCSI命令描述块中取出SCSI命令的多个设备信息;当该设备信息正常时,将该SCSI命令描述块的设备信息传给一文件系统,处理完毕后,向该启动设备端发送确认信息;当发现该设备信息错误时,在该SCSI命令描述块中加入一个以上的一错误处理信息;及直接回传给启动设备端。The present invention also provides a method for realizing error return in iSCSI. The method comprises the following steps: receiving an IP packet sent by a starting device; removing a protocol data unit and a header of a SCSI command description block; Take out a plurality of device information of SCSI command in the description block; When this device information is normal, pass the device information of this SCSI command description block to a file system, after processing, send confirmation information to this starting device end; When finding the When the device information is wrong, add more than one error handling information in the SCSI command description block; and directly send back to the starting device side.

该设备信息为一SCSI磁盘装置执行的命令。The device information is a command executed by a SCSI disk device.

该启动设备端接收到该错误信息回复时,立即将该SCSI命令重送。When the boot device receives the reply of the error message, it immediately resends the SCSI command.

该虚拟SCSI磁盘装置用以判读SCSI磁盘装置的命令:READCAPACITY(10)、MODE SENSE(6)、REPORT LUNS、INQUIRY、TEST UNITREADY、VERIFY(10)、READ(10)、WRITE(10)。The virtual SCSI disk device is used to interpret the commands of the SCSI disk device: READCAPACITY (10), MODE SENSE (6), REPORT LUNS, INQUIRY, TEST UNITREADY, VERIFY (10), READ (10), WRITE (10).

也就是说,本发明提供一种在iSCSI中实现错误返回的系统,其特征在于:于目标设备的iSCSI层除原有的iSCSI模块外,还包含一虚拟SCSI磁盘装置(Virtual SCSI disk driver),使处于iSCSI层的iSCSI协议,不需传送到SCSI层即能准确的把SCSI命令的错误执行结果反馈给启动设备,使每个SCSI命令都能够得到实时的确认,避免信息的丢失,从而达到目标设备端与启动设备端的信息互通,最后保证了目标设备端与启动设备端能维持稳定运作的目的。That is to say, the present invention provides a system for realizing error return in iSCSI, which is characterized in that: in addition to the original iSCSI module, the iSCSI layer of the target device also includes a virtual SCSI disk driver (Virtual SCSI disk driver), The iSCSI protocol at the iSCSI layer can accurately feed back the error execution result of the SCSI command to the boot device without transmitting it to the SCSI layer, so that each SCSI command can be confirmed in real time, avoiding information loss, and achieving the goal The information exchange between the device side and the starting device side finally ensures the stable operation of the target device side and the starting device side.

至于在iSCSI中实现错误返回的方法上,则包含下列步骤:首先,在目标设备端接收启动设备发出的IP封包;接着,去除协议数据单元及命令描述块的标头;然后,自命令描述块中取出SCSI的命令;判断内含的设备信息是否正常?如果不是,则在命令描述块中加入错误处理信息,否则就直接将命令描述块信息传给文件系统(file system),最后,向启动设备发送确认信息。As for the method of realizing error return in iSCSI, the following steps are included: first, at the target device end, receive the IP packet sent by the boot device; then, remove the header of the protocol data unit and the command description block; then, from the command description block Take out the SCSI command; judge whether the contained device information is normal? If not, then add error handling information in the command description block, otherwise just directly pass the command description block information to the file system (file system), and finally, send confirmation information to the boot device.

有关本发明的特征与实作,兹配合附图作最佳实施例详细说明如下。Regarding the characteristics and implementation of the present invention, the preferred embodiments are described in detail below in conjunction with the accompanying drawings.

附图说明 Description of drawings

图1为公知的系统结构图;Fig. 1 is a known system structure diagram;

图2是本发明的系统结构图;及Fig. 2 is a system structure diagram of the present invention; and

图3是本发明的方法流程图。Fig. 3 is a flow chart of the method of the present invention.

其中,附图标记说明如下:Wherein, the reference signs are explained as follows:

100-SCSI层;101-SCSI命令(CDB)100-SCSI layer; 101-SCSI command (CDB)

110-iSCSI层;111-iSCSI命令(PDU);110-iSCSI layer; 111-iSCSI command (PDU);

120-TCP/IP网络;200-SCSI磁盘装置;120-TCP/IP network; 200-SCSI disk device;

210-LVM/RAID装置;220-文件系统;210-LVM/RAID device; 220-file system;

230-虚拟SCSI磁盘装置;240-iSCSI模块;230-virtual SCSI disk device; 240-iSCSI module;

250-网络系统;260-IP封包;250-network system; 260-IP packet;

270-启动设备端;280-目标设备端;270-Start device side; 280-Target device side;

步骤301-接收启动设备端发出的IP封包;Step 301 - receiving the IP packet sent by the boot device;

步骤310-去除PDU及CDB的标头;Step 310 - remove the header of PDU and CDB;

步骤320-自CDB中取出SCSI的命令;Step 320—retrieve the SCSI command from the CDB;

步骤330-设备信息是否正常?;Step 330-Is the device information normal? ;

步骤340-将CDB信息传给文件系统;Step 340—transfer CDB information to the file system;

步骤350-向启动设备端发送确认信息;Step 350—sending confirmation information to the boot device;

步骤360-在CDB中加入错误处理信息;Step 360—add error handling information to CDB;

具体实施方式 Detailed ways

本发明提出一种在iSCSI中实现错误返回的系统及其方法,可借由在目标设备280内的iSCSI模块240中,来对错误信息作直接的处理,以防止信息的丢失。The present invention proposes a system and method for implementing error return in iSCSI. The iSCSI module 240 in the target device 280 can directly process error information to prevent information loss.

请参照图1,此图为公知的iSCSI传递SCSI命令的过程示意图。如图中所示,启动设备端270与目标设备端280两者对SCSI磁盘装置200的操作,实际上都是对SCSI磁盘驱动程序即SCSI层100的操作,所以,iSCSI层110可以把命令描述块直接传递给SCSI层100的磁盘驱动程序,这和以往的对本机SCSI磁盘操作很类似。原来的本机SCSI磁盘,操作系统只要把SCSI命令描述块传递给SCSI层100的驱动程序即可,SCSI层100的驱动程序在接收到SCSI命令描述块后,可独立完成命令的处理,之后,把执行结果回传给操作系统。而且,假如SCSI命令执行有误,则SCSI层100的驱动程序会自动把错误信息记录到SCSI命令描述块中,最后,把SCSI命令描述块再返回给操作系统。Please refer to FIG. 1 , which is a schematic diagram of a known process of transferring SCSI commands by iSCSI. As shown in the figure, the operation of both the initiator device 270 and the target device 280 on the SCSI disk device 200 is actually an operation on the SCSI disk driver, that is, the SCSI layer 100, so the iSCSI layer 110 can describe the command Blocks are passed directly to the SCSI layer 100 disk driver, much as they have been done with native SCSI disks. For the original local SCSI disk, the operating system only needs to pass the SCSI command description block to the driver program of the SCSI layer 100. After receiving the SCSI command description block, the driver program of the SCSI layer 100 can independently complete the processing of the command. After that, Send the execution result back to the operating system. Moreover, if the execution of the SCSI command is wrong, the driver program of the SCSI layer 100 will automatically record the error information into the SCSI command description block, and finally return the SCSI command description block to the operating system.

请参照图2,此图为本发明的系统结构图。与图1的不同点在于,本系统后端的储存设备为一LVM(Logical Volume Manager)/RAID(RedundantArray of Inexpensive Disks)装置210,而在启动设备端270内部的系统结构则与图1相同,故本图的启动设备端270仅省略为以一方块代替。而原本iSCSI系统为单纯的SCSI磁盘装置200,因此依据SCSI层100的磁盘驱动程序在处理SCSI命令时,会自动把错误信息加入到SCSI命令描述块中,而iSCSI模块240则无须判断SCSI命令描述块的内容,可以直接把SCSI命令描述块传递给SCSI层100的磁盘驱动程序作处理。Please refer to Fig. 2, which is a system structure diagram of the present invention. The difference from Fig. 1 is that the storage device at the back end of the system is a LVM (Logical Volume Manager)/RAID (Redundant Array of Inexpensive Disks) device 210, and the system structure inside the boot device 270 is the same as that in Fig. 1, so The boot device end 270 in this figure is only omitted and replaced by a block. The original iSCSI system is a simple SCSI disk device 200, so when the disk driver program based on the SCSI layer 100 processes SCSI commands, it will automatically add error information to the SCSI command description block, and the iSCSI module 240 does not need to judge the SCSI command description The content of the block can directly transfer the SCSI command description block to the disk driver of the SCSI layer 100 for processing.

在SCSI层100的磁盘驱动程序处理完命令描述块后,如果有错误发生,则命令描述块中已包含错误信息,iSCSI层110只需要把此SCSI命令描述块打包成协议数据单元后,发给启动设备端270即可。而启动设备端270在得到SCSI命令描述块后,再对自目标设备端280所发出的结果作分析,这部分则和处理本机SCSI磁盘一样。After the disk driver of the SCSI layer 100 has processed the command description block, if an error occurs, the command description block has contained error information, and the iSCSI layer 110 only needs to pack the SCSI command description block into a protocol data unit and send it to Just start the device terminal 270. And the starting device end 270 analyzes the result sent from the target device end 280 after obtaining the SCSI command description block, and this part is the same as processing the local SCSI disk.

因此,对本机直接通过网络储存TCP/IP方式120,连接一iSCSI磁盘装置而言,iSCSI层110只需要直接把SCSI命令描述块发给启动设备端270即可,全部的错误处理和判断都在目标设备端280及启动设备端270,各自的SCSI层100的磁盘驱动程序内部完成。Therefore, for this machine to directly store the TCP/IP mode 120 through the network and connect an iSCSI disk device, the iSCSI layer 110 only needs to directly send the SCSI command description block to the boot device end 270, and all error handling and judgment are in the The target device side 280 and the boot device side 270 are internally implemented by the respective disk drivers of the SCSI layer 100 .

但是假如iSCSI模块240要操控的是LVM/RAID装置210,则必须通过设备文件访问的方式,这与原先的iSCSI系统直接操纵SCSI层100的磁盘驱动程序并不相同,必须先通过文件系统220,才能对相应设备作控制。如图2所示,当启动设备端270发出I/O(Input/Output)要求时,iSCSI模块240却不能直接将此要求送至SCSI磁盘装置200,也就是说,SCSI命令描述块并不能直接传递到SCSI磁盘装置200,同时,SCSI磁盘装置200也无法将错误信息上传给iSCSI模块240。因此,我们必须让iSCSI模块240拥有可以自己完成错误处理的功能。But if the iSCSI module 240 is to control the LVM/RAID device 210, it must be accessed through the device file, which is different from the original iSCSI system that directly manipulates the disk driver of the SCSI layer 100. It must first pass through the file system 220. In order to control the corresponding equipment. As shown in Figure 2, when the boot device terminal 270 sends an I/O (Input/Output) request, the iSCSI module 240 cannot directly send this request to the SCSI disk device 200, that is to say, the SCSI command description block cannot directly At the same time, the SCSI disk device 200 cannot upload the error information to the iSCSI module 240 . Therefore, we must let the iSCSI module 240 have a function that can complete error handling by itself.

我们采取在iSCSI模块240中,建立一虚拟SCSI磁盘装置230,代替了SCSI磁盘装置200来处理发生错误的工作。针对READ CAPACITY(10)、MODE SENSE(6)、REPORT LUNS、INQUIRY、TEST UNIT READY、VERIFY(10)、READ(10)、WRITE(10)等命令做逐一判读,如果发现异常,则直接修改SCSI命令描述块,根据具体问题来组织相对应的错误信息。We adopt in the iSCSI module 240 to create a virtual SCSI disk device 230 to replace the SCSI disk device 200 to handle the work of the error. Interpret READ CAPACITY(10), MODE SENSE(6), REPORT LUNS, INQUIRY, TEST UNIT READY, VERIFY(10), READ(10), WRITE(10) and other commands one by one. If abnormalities are found, directly modify the SCSI The command description block organizes the corresponding error information according to the specific problem.

请参照图3,此为本发明的方法流程图。首先,目标设备端280接收启动设备端270所发出的IP封包260(步骤300)后,则网络系统250会先将IP标头给去除,接着将剩余的数据往下传到iSCSI模块240,将协议数据单元的标头去掉,剩下的就是由SCSI磁盘装置200所要判读的命令描述块格式,原先的做法是要等传到底层的SCSI磁盘装置200才能判断命令是否有错。Please refer to FIG. 3 , which is a flow chart of the method of the present invention. First, after the target device 280 receives the IP packet 260 sent by the initiator 270 (step 300), the network system 250 will first remove the IP header, and then pass the remaining data down to the iSCSI module 240. The header of the protocol data unit is removed, and what remains is the command description block format to be interpreted by the SCSI disk device 200. The original method is to wait for the SCSI disk device 200 to be transmitted to the bottom layer before judging whether the command is wrong.

而我们的做法是利用在iSCSI模块240中,建立一个虚拟SCSI磁盘装置230,其对于判断命令描述块格式的能力与SCSI磁盘装置200相同,故能直接去除命令描述块的标头(步骤310),并自命令描述块中读取SCSI的命令(步骤320),并对这些命令作检查,判断是否有错误发生(步骤330)。And our way is to utilize in iSCSI module 240, set up a virtual SCSI disk device 230, it is identical with SCSI disk device 200 for the ability of judging command description block format, so can directly remove the header of command description block (step 310) , and read the SCSI commands from the command description block (step 320), and check these commands to judge whether there is an error (step 330).

假如检查的结果是发现有异常,则直接修改命令描述块,在其中加入错误处理信息(步骤360),并将加入错误码的命令描述块往下传到iSCSI模块240;假如检查结果并没有发现异常情形,则将命令描述块的信息直接传给文件系统220(步骤340),文件系统220再与LVM/RAID装置210沟通后,最后将命令描述块传给SCSI磁盘装置200执行;当命令描述块信息正常无误的执行,则回传给启动设备端270一正常执行的回复信息,否则,则将先前加入错误处理信息的命令描述块回传。If the result of inspection finds that there is abnormality, then directly modify the command description block, add error handling information (step 360) therein, and pass down the command description block adding error code to iSCSI module 240; if the inspection result does not find Abnormal situation, then the information of command description block is directly passed to file system 220 (step 340), after file system 220 communicates with LVM/RAID device 210 again, command description block is passed to SCSI disk device 200 to carry out at last; When command description If the block information is executed normally and without error, it will send back a reply message of normal execution to the boot device end 270; otherwise, it will send back the command description block previously added with the error handling information.

当启动设备端270收到目标设备端280所回复的信息也是按相反顺序来作逐层拆解,由于虚拟SCSI磁盘装置230是按照SCSI协议标准来组织错误信息,因此传到启动设备端270可以被正常判读,当启动设备端270读完命令描述块的内容后,发现在命令执行上有错误产生,则立即取消此命令的执行,否则,此命令将会令启动设备端270一直处于等待结果状态,最终可能导致系统陷入当机的状态之中。When the boot device end 270 receives the information replied by the target device end 280, it also disassembles layer by layer in the reverse order. Since the virtual SCSI disk device 230 organizes error information according to the SCSI protocol standard, it can be sent to the boot device end 270. It is judged normally, when the boot device end 270 reads the content of the command description block and finds that there is an error in the execution of the command, it will immediately cancel the execution of the command, otherwise, this command will make the boot device end 270 wait for the result. state, which may eventually cause the system to fall into a crashed state.

虽然本发明以前述的较佳实施例揭露如上,然其并非用以限定本发明,任何熟悉相像技术者,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的专利保护范围须视本说明书所附的权利要求书为准。Although the present invention is disclosed above with the foregoing preferred embodiments, it is not intended to limit the present invention. Any person familiar with the similar technology can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The scope of patent protection of the present invention shall be determined by the appended claims of this specification.

Claims (8)

1.一种在互联网小型计算机系统接口iSCSI中实现错误返回的系统,对于该系统中一启动设备端所传送出去的一IP封包,需经由一目标设备内一iSCSI模块将其协议数据单元拆解后,再由一SCSI磁盘装置解读剩余的SCSI命令描述块格式数据及命令,并于该SCSI磁盘装置中执行,其特征在于,该系统还包含:1. A system for realizing error return in the Internet small computer system interface iSCSI, for an IP packet transmitted by an initiating device in the system, it needs to disassemble its protocol data unit through an iSCSI module in a target device Afterwards, the remaining SCSI command description block format data and commands are interpreted by a SCSI disk device, and executed in the SCSI disk device. It is characterized in that the system also includes: 一虚拟SCSI磁盘装置,位于该目标设备的iSCSI模块中,经由网络系统连结至该启动设备,该目标设备内包含一连结于iSCSI模块与SCSI磁盘装置之间的逻辑磁区管理/磁盘冗余阵列磁盘装置,在该虚拟SCSI磁盘装置中判别出一个以上错误命令时,立即反馈给该启动设备端,使每个SCSI命令都能够得到实时的确认,避免信息的丢失,以利将该IP封包重送。A virtual SCSI disk device, located in the iSCSI module of the target device, connected to the boot device through the network system, the target device includes a logical sector management/disk redundant array disk connected between the iSCSI module and the SCSI disk device device, when more than one error command is identified in the virtual SCSI disk device, it will immediately feed back to the boot device side, so that each SCSI command can be confirmed in real time, avoiding information loss, and resending the IP packet . 2.如权利要求1所述的在iSCSI中实现错误返回的系统,其特征在于,该虚拟SCSI磁盘装置用以解读多个SCSI命令描述块包含的多个命令。2. The system for implementing error return in iSCSI according to claim 1, wherein the virtual SCSI disk device is used for interpreting a plurality of commands contained in a plurality of SCSI command description blocks. 3.如权利要求1所述的在iSCSI中实现错误返回的系统,其特征在于,该虚拟SCSI磁盘装置能将错误信息加入每一该SCSI命令描述块中。3. The system for implementing error return in iSCSI according to claim 1, wherein the virtual SCSI disk device can add error information into each SCSI command description block. 4.如权利要求1所述的在iSCSI中实现错误返回的系统,其特征在于,该启动设备端的SCSI磁盘装置用以解读由该虚拟SCSI磁盘装置加入错误信息的每一该SCSI命令描述块。4. The system for implementing error return in iSCSI as claimed in claim 1, wherein the SCSI disk device at the boot device is used to interpret each SCSI command description block added with error information by the virtual SCSI disk device. 5.如权利要求2所述的在iSCSI中实现错误返回的系统,其特征在于,该虚拟SCSI磁盘装置检查SCSI命令描述块的每一该命令无误后,则仍用以将每一该命令交由SCSI磁盘装置来执行。5. The system for realizing error return in iSCSI as claimed in claim 2, characterized in that, after the virtual SCSI disk device checks that each of the commands in the SCSI command description block is correct, it is still used to send each of the commands to Executed by SCSI disk devices. 6.一种在iSCSI中实现错误返回的方法,该方法包含下列步骤:6. A method for implementing error return in iSCSI, the method comprising the following steps: 接收一启动设备端发出的IP封包;Receive an IP packet sent by the boot device; 去除一协议数据单元及一SCSI命令描述块的标头;removing a protocol data unit and a header of a SCSI command description block; 自该SCSI命令描述块中取出SCSI命令的多个设备信息;Taking out multiple device information of SCSI commands from the SCSI command description block; 当所述设备信息正常时,将该SCSI命令描述块的所述设备信息传给一文件系统;When the device information is normal, transfer the device information of the SCSI command description block to a file system; 处理完毕后,向该启动设备端发送确认信息;After the processing is completed, a confirmation message is sent to the boot device; 当发现该设备信息错误时,在该SCSI命令描述块中加入一个以上的一错误处理信息;及直接回传给启动设备端。When it is found that the device information is wrong, add more than one error handling information in the SCSI command description block; and directly send back to the starting device side. 7.如权利要求6所述的在iSCSI中实现错误返回的方法,其特征在于,该启动设备端接收到该错误处理信息回复时,立即将该SCSI命令重送。7 . The method for implementing error return in iSCSI according to claim 6 , wherein the boot device immediately resends the SCSI command when receiving the error handling information reply. 8 . 8.如权利要求6所述的在iSCSI中实现错误返回的方法,其特征在于,建立一虚拟SCSI磁盘装置来判读操作命令:READ CAPACITY(10)、MODESENSE(6)、REPORT LUNS、INQUIRY、TEST UNIT READY、VERIFY(10)、READ(10)、WRITE(10)。8. The method for realizing error return in iSCSI as claimed in claim 6, characterized in that, a virtual SCSI disk device is set up to interpret operation commands: READ CAPACITY (10), MODESENSE (6), REPORT LUNS, INQUIRY, TEST UNIT READY, VERIFY(10), READ(10), WRITE(10).
CNB2005100043101A 2005-01-14 2005-01-14 System and method for realizing error return in iSCSI Expired - Fee Related CN100438396C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100043101A CN100438396C (en) 2005-01-14 2005-01-14 System and method for realizing error return in iSCSI

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100043101A CN100438396C (en) 2005-01-14 2005-01-14 System and method for realizing error return in iSCSI

Publications (2)

Publication Number Publication Date
CN1805328A CN1805328A (en) 2006-07-19
CN100438396C true CN100438396C (en) 2008-11-26

Family

ID=36867198

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100043101A Expired - Fee Related CN100438396C (en) 2005-01-14 2005-01-14 System and method for realizing error return in iSCSI

Country Status (1)

Country Link
CN (1) CN100438396C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101404657B (en) * 2008-10-30 2011-08-17 广州慧扬科技投资有限公司 File integrality checking method for network storage system based on iSCSI protocol
CN102023926B (en) * 2010-12-08 2013-12-11 杭州华三通信技术有限公司 Method and device for data overtime aging processing
CN102222033B (en) * 2011-06-20 2017-07-11 中兴通讯股份有限公司 A kind of method and device for preserving small computer system interface access error

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0549217A1 (en) * 1991-12-20 1993-06-30 International Business Machines Corporation Small computer system interface for non-local SCSI devices
US5867671A (en) * 1996-11-20 1999-02-02 Ncr Corporation Virtual device for performing an operation in response to a SCSI command different than the operation of a SCSI device responding to the SCSI command
CN1490704A (en) * 2002-10-17 2004-04-21 �Ҵ���˾ Method and device for simulating iSCSI facility on logic roll administrator

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0549217A1 (en) * 1991-12-20 1993-06-30 International Business Machines Corporation Small computer system interface for non-local SCSI devices
US5499378A (en) * 1991-12-20 1996-03-12 International Business Machines Corporation Small computer system emulator for non-local SCSI devices
US5867671A (en) * 1996-11-20 1999-02-02 Ncr Corporation Virtual device for performing an operation in response to a SCSI command different than the operation of a SCSI device responding to the SCSI command
CN1490704A (en) * 2002-10-17 2004-04-21 �Ҵ���˾ Method and device for simulating iSCSI facility on logic roll administrator

Also Published As

Publication number Publication date
CN1805328A (en) 2006-07-19

Similar Documents

Publication Publication Date Title
CN101651559B (en) A method for failover of storage services in a dual-controller storage system
TWI859030B (en) Method and data storage system having solid-state drive with initiator mode
US7953878B1 (en) Multi-threaded internet small computer system interface (iSCSI) socket layer
US20030028731A1 (en) Block data storage within a computer network
US20060248292A1 (en) Storage processor for handling disparate requests to transmit in a storage appliance
JP2006033854A (en) Method of enabling transmission between nodes, system, and program
US7787383B2 (en) Method and apparatus for monitoring a connection in a peer-to-peer network
JP2006127201A (en) Storage system and continuity check method
CN101471830B (en) Method of multi-path accessing remote logical device under Linux system
US8676928B1 (en) Method and system for writing network data
CN102843284A (en) iSCSI storage node, framework and read-write method
US20220147412A1 (en) Method for Implementing Storage Service Continuity in Storage System, Front-End Interface Card, and Storage System
CN100438396C (en) System and method for realizing error return in iSCSI
US10798159B2 (en) Methods for managing workload throughput in a storage system and devices thereof
JP4426261B2 (en) Channel adapter and disk array device
CN111756826B (en) A DLM lock information transmission method and related device
CN1642170A (en) Method of Accessing Logical Devices Using iSCSI Protocol
CN102868684A (en) Fiber channel target and realizing method thereof
US20090216886A1 (en) Method of multi-path accessing remote logic device under linux system
CN103677657A (en) Storage device, control method for storage device and computer readable recording medium
US20060107105A1 (en) Error recovery level optimization in network system
CN104247338A (en) Switch, transmission method, program, and recording medium
JP4258482B2 (en) iSCSI storage system and path multiplexing method in the system
US11855778B2 (en) Network interface for storage controller
US10585823B2 (en) Leveling IO

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081126

Termination date: 20110114