WO2021018086A1 - Method and apparatus for communication between storage devices, storage medium and storage device - Google Patents

Method and apparatus for communication between storage devices, storage medium and storage device Download PDF

Info

Publication number
WO2021018086A1
WO2021018086A1 PCT/CN2020/104802 CN2020104802W WO2021018086A1 WO 2021018086 A1 WO2021018086 A1 WO 2021018086A1 CN 2020104802 W CN2020104802 W CN 2020104802W WO 2021018086 A1 WO2021018086 A1 WO 2021018086A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
scsi command
communication
communication message
storage
Prior art date
Application number
PCT/CN2020/104802
Other languages
French (fr)
Chinese (zh)
Inventor
朱维国
郭金生
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021018086A1 publication Critical patent/WO2021018086A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Definitions

  • This article relates to the field of communications, and in particular to a method, device, storage medium and storage device for communication between storage devices.
  • optical fiber corresponds to the Fiber Channel (FC) protocol
  • Ethernet corresponds to the Internet Small Computer System Interface (iSCSI) protocol.
  • FC Fiber Channel
  • iSCSI Internet Small Computer System Interface
  • a commonly used communication method is to package and unpack the management data in the sending device and the receiving device according to the requirements of the protocol (FC protocol or iSCSI and other protocols) to realize the transmission of the management data between storage devices.
  • the problem with the above method is that its implementation is strongly related to the underlying protocol type, and needs to adapt to different underlying protocol types, such as FC, iSCSI and other protocols, and the processing is complicated.
  • the embodiments herein provide a communication method, apparatus, storage medium, and storage device between storage devices to solve the problem that the communication between storage devices in related technologies is strongly related to the underlying protocol type and needs to adapt to different underlying protocol types.
  • a communication method between storage devices includes: a first storage device sends a first small computer system interface SCSI command to a second storage device, wherein the first SCSI The SELECT REPORT field of the command is set to a first specific value, and the first specific value is used to instruct the second storage device to create a first virtual logical unit; the first storage device receives the second storage device The first response data fed back to establish a first communication connection between the first storage device and the second storage device, wherein the first response data carries the information of the first virtual logical unit; The first storage device receives the second SCSI command sent by the second storage device, wherein the SELECT REPORT field of the second SCSI command is set to a second specific value; the first storage device is based on the second A specific value creates a second virtual logical unit; the first storage device sends second response data to the second storage device to establish a second communication connection between the first storage device and the second storage device
  • the value range of the first specific value and the second specific value is F8h to FFh
  • the value range of the first SCSI command code and the second SCSI command code is C0h to FFh.
  • the embodiment of this document also provides a communication device between storage devices, which is set in a first storage device, and includes: a sending module for sending a first SCSI command to a second storage device, wherein the SELECT of the first SCSI command
  • the REPORT field is set to a first specific value, the first specific value is used to instruct the second storage device to create a first virtual logical unit;
  • a receiving module is used to receive the first response data fed back by the second storage device , To establish a first communication connection between the first storage device and the second storage device, wherein the first response data carries the information of the first virtual logical unit;
  • the receiving module also uses After receiving the second SCSI command sent by the second storage device, the SELECT REPORT field of the second SCSI command is set to a second specific value; the creation module is configured to create a second SCSI command according to the second specific value.
  • Virtual logic unit the sending module is also used to send second response data to the second storage device to establish a second communication connection between the first storage device and the second
  • the embodiments herein also provide a storage device including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement any of the above methods.
  • the embodiments herein also provide a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are configured to perform any of the methods described above.
  • FIG. 1 is a flowchart of a communication method between storage devices according to the first embodiment of this document;
  • FIG. 2 is a block diagram of a communication device between storage devices according to the second embodiment of this document;
  • FIG. 3 is a block diagram of another communication device between storage devices according to the second embodiment of this document.
  • FIG. 4 is a block diagram of another communication device between storage devices according to the second embodiment of this document.
  • FIG. 5 is a block diagram of a communication system between storage devices according to the third embodiment of this document.
  • FIG. 6 is a schematic diagram of a SCSI command report logical unit REPORT LUNS provided in the fourth embodiment of this document;
  • FIG. 7 is a schematic diagram of an interface parameter defined in the fourth embodiment of this document.
  • Figure 8 is a schematic diagram of a SCSI command defined in the fourth embodiment of this document.
  • Fig. 9 is a cooperative flow chart of a service communication between storage devices provided in the fourth embodiment of this document.
  • Embodiment 1 of this document provides a communication method between storage devices.
  • Fig. 1 is a flow chart of a communication method between storage devices according to the first embodiment of this document.
  • the method includes the following steps: S102, a first storage device sends a first SCSI command to a second storage device, wherein, The SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to instruct the second storage device to create a first virtual logical unit; S104, the first storage device receives the second storage device According to the first response data fed back by the first virtual logic unit, a first communication connection between the first storage device and the second storage device is established; S106, the first storage device receives the first storage device sent by the second storage device Two SCSI commands, where the SELECT REPORT field of the second SCSI command is set to a second specific value; S108, the first storage device creates a second virtual logical unit according to the second specific value; S110, the first storage device The second virtual virtual logical
  • process of establishing the first communication connection in S102-S104 and the process of establishing the second communication connection in S106-S110 can be performed synchronously or sequentially, and the sequence does not affect the implementation of the solution.
  • the method further includes: the first storage device sends a first communication message to the second storage device, wherein, the first communication message carries a first SCSI command code, and the first SCSI command code is used to indicate that the first communication message is a communication message between storage devices.
  • the second storage device can recognize that the type of the current communication message is a communication message between storage devices.
  • the first storage device sending the first communication message to the second storage device includes: the first storage device converts the service data to be sent into a SCSI command, and uses the SCSI command as the first communication message Send to the second storage device.
  • the conversion step may be to encapsulate the service data to be sent in a SCSI command carrying the first SCSI command code.
  • the method further includes: the first storage device receives a second communication message sent by the second storage device , Wherein, the second communication message carries a second SCSI command code, and the second SCSI command code is used to indicate that the second communication message is an inter-storage device communication message; the first storage device parses according to a preset analysis method And read the second communication message.
  • the SCSI command set defines many standard commands.
  • the SCSI command code is used to identify which SCSI command is.
  • the SCSI protocol also reserves a range of custom SCSI command codes for manufacturers, and we choose one of them as the command code within this range.
  • the customized SCSI command code is used to identify the current communication message as a communication message between storage devices.
  • the storage device can recognize the command code, so as to parse the content of the communication data packet according to the corresponding analysis method.
  • the value range of the first specific value and the second specific value is F8h to FFh
  • the value range of the first SCSI command code and the second SCSI command code is C0h to FFh.
  • the above value range is the value range reserved by the standard for manufacturers.
  • the first specific value and the second specific value may be the same or different, and the first SCSI command code and the second SCSI command code may be the same or different.
  • the second embodiment of this document provides a communication device between storage devices, which is set in the first storage device.
  • FIG. 2 is a block diagram of a communication device between storage devices according to the second embodiment of this document.
  • the communication device includes the following modules: a sending module 22 for sending a first SCSI command to a second storage device, where the SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to indicate
  • the second storage device creates a first virtual logical unit;
  • the receiving module 24 is used to receive the first response data fed back by the second storage device to establish a first communication connection between the first storage device and the second storage device , Wherein the first response data carries the information of the first virtual logical unit;
  • the receiving module 24 is also used to receive the second SCSI command sent by the second storage device, where the SELECT REPORT of the second SCSI command
  • the domain is set to a second specific value;
  • the creation module 26 is used to create a second virtual logical unit according
  • the sending module 22 is further configured to send a first communication message to the second storage device, where the first communication message carries a first SCSI command code, and the first SCSI command code is used to indicate The first communication message is a communication message between storage devices.
  • Fig. 3 is a block diagram of another communication device between storage devices according to the second embodiment of this document.
  • the sending module 22 includes: a conversion sub-module 32 for converting service data to be sent into SCSI commands;
  • the module 34 is configured to send the SCSI command as the first communication message to the second storage device.
  • the receiving module 24 is further configured to receive a second communication message sent by the second storage device, where the second communication message carries a second SCSI command code, and the second SCSI command code is used for Indicate that the second communication message is a communication message between storage devices.
  • FIG. 4 is a block diagram of another communication device between storage devices according to the second embodiment of this document.
  • the communication device between storage devices includes all the modules shown in FIG. 2 and also includes a parsing module 42 for Analyze and read the second communication message according to a preset analysis manner.
  • Fig. 5 is a block diagram of a communication system between storage devices according to the third embodiment of this document.
  • the system includes a first storage device 52 and a second storage device 54: the first storage device 52 is used to communicate with the The second storage device sends the first SCSI command, where the SELECT REPORT field of the first SCSI command is set to a first specific value; the second storage device 54 is configured to receive the first SCSI command, and according to the first specific value Create a first virtual logical unit, and send the information of the first virtual logical unit as the first response data to the first storage device; the first storage device 52 is also used to receive the first response data to establish the The first communication connection between the first storage device and the second storage device; the second storage device 54 is also used to send a second SCSI command to the first storage device, where the SELECT REPORT field of the second SCSI command is Set to a second specific value; the first storage device 52 is also used to receive a second SCSI command
  • SCSI devices are divided into startup devices and target devices.
  • the target device receives the request command from the boot device, analyzes the received SCSI command's operation code and other parameters, executes the corresponding processing according to the command operation code (ie the command code in the above embodiment), and sends it to the boot device after the processing is completed answer.
  • the boot device and the target device here correspond to the first storage device and the second storage device in the foregoing embodiment.
  • an I_T_L connection relationship (A nexus between a SCSI initiator port, a SCSI target port, and a logical unit) needs to be established between them, that is, SCSI start The connection between the device port, the SCSI target port and the logical unit.
  • the two storage devices are each other's boot device and target device.
  • I_T connection A nexus between a SCSI initiator port and a SCSI target port
  • the protocol is set up
  • the specific fields in the virtual logic unit are automatically generated to establish the I_T_L connection relationship.
  • one of the storage devices is used as the boot device.
  • the boot device sends the SCSI command to report the logical unit REPORT LUNS to scan the target device for the logical unit.
  • the SELECT REPORT field of the command is set to a specific value.
  • the target device receives the REPORT LUNS command, it checks the SELECT REPORT field of the command. If it is the specific value, the target device will automatically create a virtual logical unit and use the relevant information of the virtual logical unit as the response data of the REPORT LUNS command. Sent to the boot device, the boot device can recognize the logic unit. This completes the establishment of the first I_T_L connection relationship between the boot device and the target device.
  • the virtual logical unit does not occupy any actual storage space.
  • the purpose of creating a virtual logical unit is to establish a communication basis for SCSI commands, because SCSI command interaction is based on logical units.
  • the SELECT REPORT field of the command is set to 0xFF; when the target device receives the REPORT LUNS command, it checks the SELECT REPORT field. If its value is 0xFF, the SELECT REPORT field is set in the target device Create a virtual logical unit and use the related information of the virtual logical unit as the response data of the REPORT LUNS command.
  • Fig. 6 is a schematic diagram of a SCSI command REPORT LUNS provided in the fourth embodiment of this document.
  • the value range of the SELECT REPORT field is from F8h to FFh, and the specific value is customized by the manufacturer.
  • the value of the fourth embodiment of this document is 0xFF.
  • the target device in the first stage serves as the initiating device in the second stage to initiate an I_T connection establishment request to the initiating device in the first stage (the target device in the second stage).
  • the subsequent processing of this stage is the same as that of stage one.
  • the startup device in phase two sends a SCSI command to report the logical unit REPORT LUNS to scan the logical unit of the target device in phase two.
  • the fourth embodiment of this document sets the SELECT REPORT field of the command to a specific value. After receiving the REPORT LUNS command, the target device in phase two checks the SELECT REPORT field of the command.
  • the target device in phase two creates a virtual logical unit and uses the relevant information of the virtual logical unit as REPORT LUNS With the response data of the command, the starting device of stage two can recognize the logical unit, thus completing the establishment of the second I_T_L connection relationship between the starting device of stage two and the target device of stage two.
  • phase two The role of phase two is to establish a "reverse" I_T connection. That is, the initiator of phase one is used as the target of phase two, and the target of phase one is used as the initiator of phase two. This forms the basis for two-way communication.
  • the fourth embodiment of this document provides a unified interface for services to send and receive messages.
  • the interface parameters that need to be provided include the receiver (target device) identifier, message content, message length, and the definition of interface parameters is shown in Figure 7.
  • the sending end (initiating device) interface encapsulates the service message in the SCSI command of the custom command opcode, and sends the SCSI command to the virtual logical unit of the receiving end (target device) through the established I_T_L connection.
  • the receiving end (target device) parses the message content and performs corresponding processing.
  • the fourth embodiment of this document also defines the format of the SCSI command.
  • Byte 0 is the custom SCSI command opcode 0xFE in the fourth embodiment of this article; the upper 4 bits of byte 1 are the version number, and the lower 4 bits are the magic number for verification; bytes 2-5 are the length of the transmitted data ( (In bytes); bytes 6-8 are reserved bytes; byte 9 is the control character defined by the SCSI protocol. As shown in Figure 8.
  • the cooperation process of the communication between the storage devices of the business is shown in FIG. 9.
  • the service calls the interface send_msg provided in the fourth embodiment of the method to send a message to the receiving end (target device), using the target device identifier, message length, and message content as interface parameters.
  • the transmitting end (initiating device) interface internally converts the service message into a custom SCSI command (command code is 0xFE), and sends the SCSI command to the receiving end (target device).
  • the receiving end (target device) receives the SCSI command with a command code of 0xFE, parses the message content and performs corresponding processing.
  • the embodiments herein also provide a storage device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
  • the embodiments herein also provide a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • the communication between storage devices can not only shield the difference of the underlying transmission protocol, but also ensure simple and reliable use.

Abstract

Provided herein are a method and apparatus for communication between storage devices, a storage medium and a storage device, wherein the method comprises: at phase 1, a first storage device acts as a boot device and sends a small computer system interface (SCSI) command to a second storage device, wherein a SELECT REPORT field of the SCSI command is set to a specific value, and the specific value is used to instruct the second storage device to create a virtual logical unit; and the first storage device receives response data fed back by the second storage device so as to establish a first communication connection between the first storage device and the second storage device, the response data carrying information of the virtual logical unit. At phase 2, the second storage device acts as as the boot device and completes the establishment of a second communication connection with the first storage device in accordance with the same method as in phase 1. Phase 1 and phase 2 may occur simultaneously or sequentially.

Description

一种存储设备间通信方法、装置、存储介质及存储设备Communication method, device, storage medium and storage device between storage devices
本文要求享有2019年07月31日提交的名称为“一种存储设备间通信方法、装置、存储介质及存储设备”的中国专利申请CN201910706345.1的优先权,其全部内容通过引用并入本文中。This article claims the priority of the Chinese patent application CN201910706345.1 entitled "A method, device, storage medium and storage device for communication between storage devices" filed on July 31, 2019, the entire content of which is incorporated herein by reference .
技术领域Technical field
本文涉及通信领域,特别涉及一种存储设备间通信方法、装置、存储介质及存储设备。This article relates to the field of communications, and in particular to a method, device, storage medium and storage device for communication between storage devices.
背景技术Background technique
目前,存储设备间的通信存在多种传输介质,与这些传输介质相对应的传输协议也不相同。比如,光纤对应Fiber Channel(FC)协议,以太网对应Internet Small Computer System Interface(iSCSI)协议。一种常用的通信方式是,将管理数据按照协议(FC协议或iSCSI等协议)要求分别在发送设备和接收设备进行打包、拆包,以实现管理数据在存储设备间的传输。Currently, there are multiple transmission media for communication between storage devices, and the transmission protocols corresponding to these transmission media are also different. For example, optical fiber corresponds to the Fiber Channel (FC) protocol, and Ethernet corresponds to the Internet Small Computer System Interface (iSCSI) protocol. A commonly used communication method is to package and unpack the management data in the sending device and the receiving device according to the requirements of the protocol (FC protocol or iSCSI and other protocols) to realize the transmission of the management data between storage devices.
上述方法存在的问题是,其实现与底层协议类型强相关,需要适配不同的底层协议类型,如FC、iSCSI等协议,处理复杂。The problem with the above method is that its implementation is strongly related to the underlying protocol type, and needs to adapt to different underlying protocol types, such as FC, iSCSI and other protocols, and the processing is complicated.
发明内容Summary of the invention
本文实施例提供了一种存储设备间通信方法、装置、存储介质及存储设备,以解决相关技术中存储设备间通信与底层协议类型强相关,需要适配不同的底层协议类型的问题。The embodiments herein provide a communication method, apparatus, storage medium, and storage device between storage devices to solve the problem that the communication between storage devices in related technologies is strongly related to the underlying protocol type and needs to adapt to different underlying protocol types.
为解决上述问题,本文实施例的技术方案实现如下:一种存储设备间通信方法,包括:第一存储设备向第二存储设备发送第一小型计算机系统接口SCSI命令,其中,所述第一SCSI命令的选择报告SELECT REPORT域被设置为第一特定值,所述第一特定值用于指示所述第二存储设备创建第一虚拟逻辑单元;所述第一存储设备接收所述第二存储设备反馈的第一应答数据,以建立所述第一存储设备与所述第二存储设备间的第一通信连接,其中,所述第一应答数据中携带所述第一虚拟逻辑单元的信息;所述第一存储设 备接收所述第二存储设备发送的第二SCSI命令,其中,所述第二SCSI命令的SELECT REPORT域被设置为第二特定值;所述第一存储设备根据所述第二特定值创建第二虚拟逻辑单元;所述第一存储设备向所述第二存储设备发送第二应答数据,以建立所述第一存储设备与所述第二存储设备间的第二通信连接,其中,所述第二应答数据中携带所述第二虚拟逻辑单元的信息。In order to solve the above-mentioned problems, the technical solutions of the embodiments herein are implemented as follows: A communication method between storage devices includes: a first storage device sends a first small computer system interface SCSI command to a second storage device, wherein the first SCSI The SELECT REPORT field of the command is set to a first specific value, and the first specific value is used to instruct the second storage device to create a first virtual logical unit; the first storage device receives the second storage device The first response data fed back to establish a first communication connection between the first storage device and the second storage device, wherein the first response data carries the information of the first virtual logical unit; The first storage device receives the second SCSI command sent by the second storage device, wherein the SELECT REPORT field of the second SCSI command is set to a second specific value; the first storage device is based on the second A specific value creates a second virtual logical unit; the first storage device sends second response data to the second storage device to establish a second communication connection between the first storage device and the second storage device, Wherein, the second response data carries information of the second virtual logical unit.
进一步的,所述第一特定值和所述第二特定值的取值范围是F8h到FFh,所述第一SCSI命令码和所述第二SCSI命令码的取值范围是C0h到FFh。Further, the value range of the first specific value and the second specific value is F8h to FFh, and the value range of the first SCSI command code and the second SCSI command code is C0h to FFh.
本文实施例还提供了一种存储设备间通信装置,设置于第一存储设备中,包括:发送模块,用于向第二存储设备发送第一SCSI命令,其中,所述第一SCSI命令的SELECT REPORT域被设置为第一特定值,所述第一特定值用于指示所述第二存储设备创建第一虚拟逻辑单元;接收模块,用于接收所述第二存储设备反馈的第一应答数据,以建立所述第一存储设备与所述第二存储设备间的第一通信连接,其中,所述第一应答数据中携带所述第一虚拟逻辑单元的信息;所述接收模块,还用于接收所述第二存储设备发送的第二SCSI命令,其中,所述第二SCSI命令的SELECT REPORT域被设置为第二特定值;创建模块,用于根据所述第二特定值创建第二虚拟逻辑单元;所述发送模块,还用于向所述第二存储设备发送第二应答数据,以建立所述第一存储设备与所述第二存储设备间的第二通信连接,其中,所述第二应答数据中携带所述第二虚拟逻辑单元的信息。The embodiment of this document also provides a communication device between storage devices, which is set in a first storage device, and includes: a sending module for sending a first SCSI command to a second storage device, wherein the SELECT of the first SCSI command The REPORT field is set to a first specific value, the first specific value is used to instruct the second storage device to create a first virtual logical unit; a receiving module is used to receive the first response data fed back by the second storage device , To establish a first communication connection between the first storage device and the second storage device, wherein the first response data carries the information of the first virtual logical unit; the receiving module also uses After receiving the second SCSI command sent by the second storage device, the SELECT REPORT field of the second SCSI command is set to a second specific value; the creation module is configured to create a second SCSI command according to the second specific value. Virtual logic unit; the sending module is also used to send second response data to the second storage device to establish a second communication connection between the first storage device and the second storage device, where all The second response data carries information of the second virtual logical unit.
本文实施例还提供了一种存储设备,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器通过执行所述计算机程序以实现上述任一项方法。The embodiments herein also provide a storage device including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement any of the above methods.
本文实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被设置为执行上述任一项所述的方法。The embodiments herein also provide a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are configured to perform any of the methods described above.
附图说明Description of the drawings
图1是根据本文实施例一的一种存储设备间通信方法流程图;FIG. 1 is a flowchart of a communication method between storage devices according to the first embodiment of this document;
图2是根据本文实施例二的一种存储设备间通信装置框图;2 is a block diagram of a communication device between storage devices according to the second embodiment of this document;
图3是根据本文实施例二的另一种存储设备间通信装置框图;3 is a block diagram of another communication device between storage devices according to the second embodiment of this document;
图4是根据本文实施例二的又一种存储设备间通信装置框图;4 is a block diagram of another communication device between storage devices according to the second embodiment of this document;
图5是根据本文实施例三的一种存储设备间通信系统框图;5 is a block diagram of a communication system between storage devices according to the third embodiment of this document;
图6是本文实施例四提供的一种SCSI命令报告逻辑单元REPORT LUNS的示意图;6 is a schematic diagram of a SCSI command report logical unit REPORT LUNS provided in the fourth embodiment of this document;
图7是本文实施例四定义的一种接口参数示意图;Figure 7 is a schematic diagram of an interface parameter defined in the fourth embodiment of this document;
图8是本文实施例四定义的一种SCSI命令示意图;Figure 8 is a schematic diagram of a SCSI command defined in the fourth embodiment of this document;
图9是本文实施例四提供的一种业务在存储设备间通信的协作流程图。Fig. 9 is a cooperative flow chart of a service communication between storage devices provided in the fourth embodiment of this document.
具体实施方式Detailed ways
下面通过附图和实施例,对本文的技术方案做进一步的详细描述。需要说明的是,文中的“第一”、“第二”仅用作区别,不表示先后顺序。另外,下列实施例中的方案在不产生冲突的情况下,方案可以任意组合。In the following, the technical solution of this document will be further described in detail through the accompanying drawings and embodiments. It should be noted that the "first" and "second" in the text are only used for distinction and do not indicate the order of sequence. In addition, the solutions in the following embodiments can be combined arbitrarily without conflict.
实施例一Example one
本文实施例一提供了一种存储设备间通信方法。图1是根据本文实施例一的一种存储设备间通信方法流程图,如图1所示,该方法包括以下步骤:S102,第一存储设备向第二存储设备发送第一SCSI命令,其中,该第一SCSI命令的SELECT REPORT域被设置为第一特定值,该第一特定值用于指示该第二存储设备创建第一虚拟逻辑单元;S104,该第一存储设备接收该第二存储设备根据该第一虚拟逻辑单元反馈的第一应答数据,以建立该第一存储设备与该第二存储设备间的第一通信连接;S106,该第一存储设备接收该第二存储设备发送的第二SCSI命令,其中,该第二SCSI命令的SELECT REPORT域被设置为第二特定值;S108,该第一存储设备根据该第二特定值创建第二虚拟逻辑单元;S110,该第一存储设备将该第二虚拟逻辑单元作为第二应答数据发送给该第二存储设备,以建立该第一存储设备与该第二存储设备间的第二通信连接。 Embodiment 1 of this document provides a communication method between storage devices. Fig. 1 is a flow chart of a communication method between storage devices according to the first embodiment of this document. As shown in Fig. 1, the method includes the following steps: S102, a first storage device sends a first SCSI command to a second storage device, wherein, The SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to instruct the second storage device to create a first virtual logical unit; S104, the first storage device receives the second storage device According to the first response data fed back by the first virtual logic unit, a first communication connection between the first storage device and the second storage device is established; S106, the first storage device receives the first storage device sent by the second storage device Two SCSI commands, where the SELECT REPORT field of the second SCSI command is set to a second specific value; S108, the first storage device creates a second virtual logical unit according to the second specific value; S110, the first storage device The second virtual logical unit is sent to the second storage device as second response data to establish a second communication connection between the first storage device and the second storage device.
通过上述方法,两个存储设备之间通过虚拟逻辑单元建立了双向连接,后续就可以正常通信,从而屏蔽了传输介质的影响。Through the above method, a two-way connection is established between the two storage devices through the virtual logical unit, and subsequent communication can be normal, thereby shielding the influence of the transmission medium.
需要说明的是,S102-S104第一通信连接建立的过程与S106-S110第二通信连接建立的过程可以同步进行,也可以先后进行,并且先后顺序不影响方案的实现。It should be noted that the process of establishing the first communication connection in S102-S104 and the process of establishing the second communication connection in S106-S110 can be performed synchronously or sequentially, and the sequence does not affect the implementation of the solution.
在一种实施方式中,在完成该第一存储设备与该第二存储设备间的第二通信连接之后,该方法还包括:该第一存储设备向该第二存储设备发送第一通信消息,其中,该第一通信消息中携带第一SCSI命令码,该第一SCSI命令码用于指示该第一通信消息为存储设备间通信消息。In an embodiment, after completing the second communication connection between the first storage device and the second storage device, the method further includes: the first storage device sends a first communication message to the second storage device, Wherein, the first communication message carries a first SCSI command code, and the first SCSI command code is used to indicate that the first communication message is a communication message between storage devices.
通过设置SCSI命令码,第二存储设备可以识别出当前通信消息的类型为存储设备间 通信消息。By setting the SCSI command code, the second storage device can recognize that the type of the current communication message is a communication message between storage devices.
在一种实施方式中,该第一存储设备向该第二存储设备发送第一通信消息包括:该第一存储设备将待发送业务数据转化成SCSI命令,将该SCSI命令作为该第一通信消息发送给该第二存储设备。In an embodiment, the first storage device sending the first communication message to the second storage device includes: the first storage device converts the service data to be sent into a SCSI command, and uses the SCSI command as the first communication message Send to the second storage device.
在一种实施方式中,转化步骤可以是,将待发送业务数据封装在携带有第一SCSI命令码的SCSI命令中。In an implementation manner, the conversion step may be to encapsulate the service data to be sent in a SCSI command carrying the first SCSI command code.
在一种实施方式中,在完成该第一存储设备与该第二存储设备间的第二通信连接之后,该方法还包括:该第一存储设备接收该第二存储设备发送的第二通信消息,其中,该第二通信消息中携带第二SCSI命令码,该第二SCSI命令码用于指示该第二通信消息为存储设备间通信消息;该第一存储设备按照预先设定的解析方式解析并读取该第二通信消息。In an embodiment, after completing the second communication connection between the first storage device and the second storage device, the method further includes: the first storage device receives a second communication message sent by the second storage device , Wherein, the second communication message carries a second SCSI command code, and the second SCSI command code is used to indicate that the second communication message is an inter-storage device communication message; the first storage device parses according to a preset analysis method And read the second communication message.
SCSI命令集中定义了许多标准的命令,SCSI命令码就是用来标识具体是哪个SCSI命令。SCSI协议除了定义好的标准的SCSI命令码外,还给厂商预留了自定义的SCSI命令码的范围,我们就是在这个范围内选择其中的一个作为命令码。The SCSI command set defines many standard commands. The SCSI command code is used to identify which SCSI command is. In addition to the well-defined standard SCSI command codes, the SCSI protocol also reserves a range of custom SCSI command codes for manufacturers, and we choose one of them as the command code within this range.
在本文实施例一中,自定义的SCSI命令码是用来标识当前通信消息为存储设备间通信消息。在实际的应用场景中,存储设备可以识别出该命令码,从而按照对应的解析方式解析通信数据包的内容。In the first embodiment of this document, the customized SCSI command code is used to identify the current communication message as a communication message between storage devices. In an actual application scenario, the storage device can recognize the command code, so as to parse the content of the communication data packet according to the corresponding analysis method.
在一种实施方式中,该第一特定值和第二特定值的取值范围是F8h到FFh,该第一SCSI命令码和第二SCSI命令码的取值范围是C0h到FFh。In an embodiment, the value range of the first specific value and the second specific value is F8h to FFh, and the value range of the first SCSI command code and the second SCSI command code is C0h to FFh.
上述取值范围为标准预留给厂商的取值范围。在本文实施例一中,第一特定值和第二特定值可以相同或不同,第一SCSI命令码与第二SCSI命令码可以相同或不同。The above value range is the value range reserved by the standard for manufacturers. In the first embodiment herein, the first specific value and the second specific value may be the same or different, and the first SCSI command code and the second SCSI command code may be the same or different.
实施例二Example two
本文实施例二提供了一种存储设备间通信装置,设置于第一存储设备中,图2是根据本文实施例二的一种存储设备间通信装置框图,如图2所示,该存储设备间通信装置包括以下模块:发送模块22,用于向第二存储设备发送第一SCSI命令,其中,该第一SCSI命令的SELECT REPORT域被设置为第一特定值,该第一特定值用于指示该第二存储设备创建第一虚拟逻辑单元;接收模块24,用于接收该第二存储设备反馈的第一应答数据,以建立该第一存储设备与该第二存储设备间的第一通信连接,其中,该第一应答数据中携带该第一虚拟逻辑单元的信息;该接收模块24,还用于接收该第二存储设备发 送的第二SCSI命令,其中,该第二SCSI命令的SELECT REPORT域被设置为第二特定值;创建模块26,用于根据该第二特定值创建第二虚拟逻辑单元;该发送模块22,还用于向该第二存储设备发送第二应答数据,以建立该第一存储设备与该第二存储设备间的第二通信连接,其中,该第二应答数据中携带该第二虚拟逻辑单元的信息。The second embodiment of this document provides a communication device between storage devices, which is set in the first storage device. FIG. 2 is a block diagram of a communication device between storage devices according to the second embodiment of this document. As shown in FIG. The communication device includes the following modules: a sending module 22 for sending a first SCSI command to a second storage device, where the SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to indicate The second storage device creates a first virtual logical unit; the receiving module 24 is used to receive the first response data fed back by the second storage device to establish a first communication connection between the first storage device and the second storage device , Wherein the first response data carries the information of the first virtual logical unit; the receiving module 24 is also used to receive the second SCSI command sent by the second storage device, where the SELECT REPORT of the second SCSI command The domain is set to a second specific value; the creation module 26 is used to create a second virtual logical unit according to the second specific value; the sending module 22 is also used to send second response data to the second storage device to establish A second communication connection between the first storage device and the second storage device, wherein the second response data carries information of the second virtual logical unit.
通过上述装置,两个存储设备之间通过创建虚拟逻辑单元建立了双向连接,后续就可以正常通信,从而屏蔽了传输介质的影响。Through the above device, a two-way connection is established between the two storage devices by creating a virtual logical unit, and subsequent communication can be normal, thereby shielding the influence of the transmission medium.
在实施例二中,该发送模块22,还用于向该第二存储设备发送第一通信消息,其中,该第一通信消息中携带第一SCSI命令码,该第一SCSI命令码用于指示该第一通信消息为存储设备间通信消息。In the second embodiment, the sending module 22 is further configured to send a first communication message to the second storage device, where the first communication message carries a first SCSI command code, and the first SCSI command code is used to indicate The first communication message is a communication message between storage devices.
图3是根据本文实施例二的另一种存储设备间通信装置框图,如图3所示,该发送模块22包括:转换子模块32,用于将待发送业务数据转化成SCSI命令;发送子模块34,用于将该SCSI命令作为该第一通信消息发送给该第二存储设备。Fig. 3 is a block diagram of another communication device between storage devices according to the second embodiment of this document. As shown in Fig. 3, the sending module 22 includes: a conversion sub-module 32 for converting service data to be sent into SCSI commands; The module 34 is configured to send the SCSI command as the first communication message to the second storage device.
在实施例二中,该接收模块24,还用于接收该第二存储设备发送的第二通信消息,其中,该第二通信消息中携带第二SCSI命令码,该第二SCSI命令码用于指示该第二通信消息为存储设备间通信消息。In the second embodiment, the receiving module 24 is further configured to receive a second communication message sent by the second storage device, where the second communication message carries a second SCSI command code, and the second SCSI command code is used for Indicate that the second communication message is a communication message between storage devices.
图4是根据本文实施例二的又一种存储设备间通信装置框图,如图4所示,该存储设备间通信装置除包括图2所示的所有模块外,还包括解析模块42,用于按照预先设定的解析方式解析并读取该第二通信消息。FIG. 4 is a block diagram of another communication device between storage devices according to the second embodiment of this document. As shown in FIG. 4, the communication device between storage devices includes all the modules shown in FIG. 2 and also includes a parsing module 42 for Analyze and read the second communication message according to a preset analysis manner.
实施例三Example three
本文实施例三提供了一种存储设备间通信系统。图5是根据本文实施例三的一种存储设备间通信系统框图,如图5所示,该系统包括第一存储设备52、第二存储设备54:该第一存储设备52,用于向第二存储设备发送第一SCSI命令,其中,该第一SCSI命令的SELECT REPORT域被设置为第一特定值;该第二存储设备54,用于接收该第一SCSI命令,根据该第一特定值创建第一虚拟逻辑单元,并将该第一虚拟逻辑单元的信息作为第一应答数据发送给该第一存储设备;该第一存储设备52,还用于接收该第一应答数据,以建立该第一存储设备与该第二存储设备间的第一通信连接;该第二存储设备54,还用于向第一存储设备发送第二SCSI命令,其中,该第二SCSI命令的SELECT REPORT域被设置为第二特定值;该第一存储设备52,还用于接收第二SCSI命令,根据该第二特定值创建第二虚拟逻辑单元,并将该第二虚拟逻辑单元的信息作为第二应答数据发送给该第二存储设备;该第二存储设备54,还用于接收该第二应答数据,以建立该第一存储设 备与该第二存储设备间的第二通信连接。The third embodiment of this document provides a communication system between storage devices. Fig. 5 is a block diagram of a communication system between storage devices according to the third embodiment of this document. As shown in Fig. 5, the system includes a first storage device 52 and a second storage device 54: the first storage device 52 is used to communicate with the The second storage device sends the first SCSI command, where the SELECT REPORT field of the first SCSI command is set to a first specific value; the second storage device 54 is configured to receive the first SCSI command, and according to the first specific value Create a first virtual logical unit, and send the information of the first virtual logical unit as the first response data to the first storage device; the first storage device 52 is also used to receive the first response data to establish the The first communication connection between the first storage device and the second storage device; the second storage device 54 is also used to send a second SCSI command to the first storage device, where the SELECT REPORT field of the second SCSI command is Set to a second specific value; the first storage device 52 is also used to receive a second SCSI command, create a second virtual logical unit according to the second specific value, and use the information of the second virtual logical unit as a second response The data is sent to the second storage device; the second storage device 54 is also used to receive the second response data to establish a second communication connection between the first storage device and the second storage device.
实施例四Example four
以下结合具体场景,对本文实施例四进行说明。The fourth embodiment of this document will be described below in combination with specific scenarios.
SCSI设备分为启动设备和目标设备。目标设备接收来自于启动设备的请求命令,分析收到的SCSI命令的操作码等参数,根据命令操作码(即上述实施例中的命令码)执行相应的处理,处理完成后,向启动设备发送应答。这里的启动设备和目标设备对应于上述实施例中的第一存储设备和第二存储设备。SCSI devices are divided into startup devices and target devices. The target device receives the request command from the boot device, analyzes the received SCSI command's operation code and other parameters, executes the corresponding processing according to the command operation code (ie the command code in the above embodiment), and sends it to the boot device after the processing is completed answer. The boot device and the target device here correspond to the first storage device and the second storage device in the foregoing embodiment.
为实现SCSI命令在启动设备和目标设备之间传输,按照SCSI定义,需要在它们之间建立I_T_L连接关系(A nexus between a SCSI initiator port,a SCSI target port,and a logical unit),即SCSI启动器端口、SCSI目标端口和逻辑单元之间的连接。In order to realize the transmission of SCSI commands between the starting device and the target device, according to the definition of SCSI, an I_T_L connection relationship (A nexus between a SCSI initiator port, a SCSI target port, and a logical unit) needs to be established between them, that is, SCSI start The connection between the device port, the SCSI target port and the logical unit.
两个存储设备互为启动设备和目标设备,在它们建立I_T连接(A nexus between a SCSI initiator port and a SCSI target port),即SCSI启动器端口和SCSI目标端口之间的连接时,通过设置协议中的特定字段自动生成虚拟逻辑单元,以建立起I_T_L连接关系。The two storage devices are each other's boot device and target device. When they establish an I_T connection (A nexus between a SCSI initiator port and a SCSI target port), that is, the connection between the SCSI initiator port and the SCSI target port, the protocol is set up The specific fields in the virtual logic unit are automatically generated to establish the I_T_L connection relationship.
两个存储设备在建立I_T连接时,分为两个阶段。When two storage devices establish an I_T connection, they are divided into two stages.
阶段一,将其中一个存储设备作为启动设备。启动设备发送SCSI命令报告逻辑单元REPORT LUNS对目标设备进行逻辑单元扫描,本文实施例四将该命令的SELECT REPORT域设置为特定值。目标设备收到REPORT LUNS命令后,检查该命令的SELECT REPORT域,如果其为该特定值,则在目标设备自动创建虚拟逻辑单元,并且将该虚拟逻辑单元的相关信息作为REPORT LUNS命令的应答数据发送给启动设备,启动设备就可以识别到该逻辑单元。这样就完成了启动设备和目标设备间第一次I_T_L连接关系的建立。虚拟逻辑单元不占用任何实际存储空间。In the first stage, one of the storage devices is used as the boot device. The boot device sends the SCSI command to report the logical unit REPORT LUNS to scan the target device for the logical unit. In the fourth embodiment of this document, the SELECT REPORT field of the command is set to a specific value. After the target device receives the REPORT LUNS command, it checks the SELECT REPORT field of the command. If it is the specific value, the target device will automatically create a virtual logical unit and use the relevant information of the virtual logical unit as the response data of the REPORT LUNS command. Sent to the boot device, the boot device can recognize the logic unit. This completes the establishment of the first I_T_L connection relationship between the boot device and the target device. The virtual logical unit does not occupy any actual storage space.
这里,创建虚拟逻辑单元的目的是建立SCSI命令的通信基础,因为SCSI命令交互都是以逻辑单元为基础的。Here, the purpose of creating a virtual logical unit is to establish a communication basis for SCSI commands, because SCSI command interaction is based on logical units.
在一种实施方式中,启动设备发送SCSI命令REPORT LUNS时,设置命令的SELECT REPORT域为0xFF;目标设备在收到REPORT LUNS命令时,检查SELECT REPORT域,如果其值为0xFF,则在目标设备创建虚拟逻辑单元,并将该虚拟逻辑单元的相关信息作为REPORT LUNS命令的应答数据。图6是本文实施例四提供的一种SCSI命令REPORT LUNS的示意图。In one embodiment, when the boot device sends the SCSI command REPORT LUNS, the SELECT REPORT field of the command is set to 0xFF; when the target device receives the REPORT LUNS command, it checks the SELECT REPORT field. If its value is 0xFF, the SELECT REPORT field is set in the target device Create a virtual logical unit and use the related information of the virtual logical unit as the response data of the REPORT LUNS command. Fig. 6 is a schematic diagram of a SCSI command REPORT LUNS provided in the fourth embodiment of this document.
SELECT REPORT域取值范围为F8h到FFh,具体数值由厂商自定义,本文实施例 四取值0xFF。The value range of the SELECT REPORT field is from F8h to FFh, and the specific value is customized by the manufacturer. The value of the fourth embodiment of this document is 0xFF.
阶段二,阶段一的目标设备作为阶段二的启动设备向阶段一的启动设备(阶段二的目标设备)发起I_T连接建立请求。该阶段的后续处理与阶段一相同。具体包括:阶段二的启动设备发送SCSI命令报告逻辑单元REPORT LUNS对阶段二的目标设备进行逻辑单元扫描,本文实施例四将该命令的SELECT REPORT域设置为特定值。阶段二的目标设备收到REPORT LUNS命令后,检查该命令的SELECT REPORT域,如果其为特定值,则在阶段二的目标设备创建虚拟逻辑单元,并且将该虚拟逻辑单元的相关信息作为REPORT LUNS命令的应答数据,阶段二的启动设备就可以识别到该逻辑单元,这样就完成了阶段二的启动设备和阶段二的目标设备间第二次I_T_L连接关系的建立。In the second stage, the target device in the first stage serves as the initiating device in the second stage to initiate an I_T connection establishment request to the initiating device in the first stage (the target device in the second stage). The subsequent processing of this stage is the same as that of stage one. Specifically, the startup device in phase two sends a SCSI command to report the logical unit REPORT LUNS to scan the logical unit of the target device in phase two. The fourth embodiment of this document sets the SELECT REPORT field of the command to a specific value. After receiving the REPORT LUNS command, the target device in phase two checks the SELECT REPORT field of the command. If it is a specific value, the target device in phase two creates a virtual logical unit and uses the relevant information of the virtual logical unit as REPORT LUNS With the response data of the command, the starting device of stage two can recognize the logical unit, thus completing the establishment of the second I_T_L connection relationship between the starting device of stage two and the target device of stage two.
阶段二的作用是建立“反向”的I_T连接。即阶段一的启动器作为阶段二的目标器,阶段一的目标器作为阶段二的启动器。这样就构成了双向互相通信的基础。The role of phase two is to establish a "reverse" I_T connection. That is, the initiator of phase one is used as the target of phase two, and the target of phase one is used as the initiator of phase two. This forms the basis for two-way communication.
需要说明的是,第一次I_T_L连接关系的建立与第二次I_T_L连接关系的建立可以同时进行,也可以先后进行,且先后顺序不影响方案的实现。It should be noted that the establishment of the first I_T_L connection relationship and the second establishment of the I_T_L connection relationship can be performed simultaneously or sequentially, and the sequence does not affect the implementation of the solution.
本文实施例四对业务提供统一的接口进行消息的发送和接收。在发送端(启动设备)业务调用发送接口时,需要提供的接口参数包括,接收端(目标设备)标识,消息内容,消息长度,接口参数定义如图7所示。具体而言,发送端(启动设备)接口内部将业务消息封装在自定义命令操作码的SCSI命令中,通过已经建立的I_T_L连接将SCSI命令发送给接收端(目标设备)的虚拟逻辑单元。接收端(目标设备)接收到自定义的SCSI命令后,解析消息内容并进行相应的处理。The fourth embodiment of this document provides a unified interface for services to send and receive messages. When the sender (starting device) service calls the sending interface, the interface parameters that need to be provided include the receiver (target device) identifier, message content, message length, and the definition of interface parameters is shown in Figure 7. Specifically, the sending end (initiating device) interface encapsulates the service message in the SCSI command of the custom command opcode, and sends the SCSI command to the virtual logical unit of the receiving end (target device) through the established I_T_L connection. After receiving the customized SCSI command, the receiving end (target device) parses the message content and performs corresponding processing.
本文实施例四还对SCSI命令定义了格式。字节0为本文实施例四自定义的SCSI命令操作码0xFE;字节1高4位是版本号,低4位是幻数,用于校验;字节2-5为传输数据的长度(以字节为单位);字节6-8为保留字节;字节9为SCSI协议定义的控制字符。如图8所示。The fourth embodiment of this document also defines the format of the SCSI command. Byte 0 is the custom SCSI command opcode 0xFE in the fourth embodiment of this article; the upper 4 bits of byte 1 are the version number, and the lower 4 bits are the magic number for verification; bytes 2-5 are the length of the transmitted data ( (In bytes); bytes 6-8 are reserved bytes; byte 9 is the control character defined by the SCSI protocol. As shown in Figure 8.
在一种实施方式中,业务在存储设备间通信的协作流程如图9所示。在发送端(启动设备),业务调用本方法实施例四提供的接口send_msg向接收端(目标设备)发送消息,将目标设备标识、消息长度、消息内容作为接口参数。具体而言,发送端(启动设备)接口内部将业务消息转化为自定义的SCSI命令(命令码为0xFE),并将该SCSI命令发送给接收端(目标设备)。接收端(目标设备)接收到命令码为0xFE的SCSI命令,解析消息内容并进行相应的处理。In one embodiment, the cooperation process of the communication between the storage devices of the business is shown in FIG. 9. At the sending end (starting device), the service calls the interface send_msg provided in the fourth embodiment of the method to send a message to the receiving end (target device), using the target device identifier, message length, and message content as interface parameters. Specifically, the transmitting end (initiating device) interface internally converts the service message into a custom SCSI command (command code is 0xFE), and sends the SCSI command to the receiving end (target device). The receiving end (target device) receives the SCSI command with a command code of 0xFE, parses the message content and performs corresponding processing.
本文的实施例还提供了一种存储设备,包括存储器和处理器,该存储器中存储有计 算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。The embodiments herein also provide a storage device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the foregoing method embodiments.
本文的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。The embodiments herein also provide a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
通过上述方法,存储设备间通信既可以屏蔽底层传输协议的差异,又能保证使用简单可靠。Through the above method, the communication between storage devices can not only shield the difference of the underlying transmission protocol, but also ensure simple and reliable use.
以上仅为本文的实施例而已,并不用于限制本文,对于本领域的技术人员来说,本文可以有各种更改和变化。凡在本文的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本文的权利要求范围之内。The above are only the embodiments of this article and are not used to limit this article. For those skilled in the art, this article can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this article shall be included in the scope of the claims of this article.

Claims (10)

  1. 一种存储设备间通信方法,其中,包括:A communication method between storage devices, which includes:
    第一存储设备向第二存储设备发送第一SCSI命令,其中,所述第一SCSI命令的SELECT REPORT域被设置为第一特定值,所述第一特定值用于指示所述第二存储设备创建第一虚拟逻辑单元;The first storage device sends the first SCSI command to the second storage device, wherein the SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to indicate the second storage device Create the first virtual logical unit;
    所述第一存储设备接收所述第二存储设备反馈的第一应答数据,以建立所述第一存储设备与所述第二存储设备间的第一通信连接,其中,所述第一应答数据中携带所述第一虚拟逻辑单元的信息;The first storage device receives the first response data fed back by the second storage device to establish a first communication connection between the first storage device and the second storage device, wherein the first response data Carries the information of the first virtual logical unit;
    所述第一存储设备接收所述第二存储设备发送的第二SCSI命令,其中,所述第二SCSI命令的SELECT REPORT域被设置为第二特定值;Receiving, by the first storage device, a second SCSI command sent by the second storage device, wherein the SELECT REPORT field of the second SCSI command is set to a second specific value;
    所述第一存储设备根据所述第二特定值创建第二虚拟逻辑单元;The first storage device creates a second virtual logical unit according to the second specific value;
    所述第一存储设备向所述第二存储设备发送第二应答数据,以建立所述第一存储设备与所述第二存储设备间的第二通信连接,其中,所述第二应答数据中携带所述第二虚拟逻辑单元的信息。The first storage device sends second response data to the second storage device to establish a second communication connection between the first storage device and the second storage device, wherein the second response data is Carry the information of the second virtual logical unit.
  2. 如权利要求1所述的方法,其中,在建立所述第一存储设备与所述第二存储设备间的第二通信连接之后,所述方法还包括:5. The method according to claim 1, wherein after the second communication connection between the first storage device and the second storage device is established, the method further comprises:
    所述第一存储设备向所述第二存储设备发送第一通信消息,其中,所述第一通信消息中携带第一SCSI命令码,所述第一SCSI命令码用于指示所述第一通信消息为存储设备间通信消息。The first storage device sends a first communication message to the second storage device, where the first communication message carries a first SCSI command code, and the first SCSI command code is used to indicate the first communication The message is a communication message between storage devices.
  3. 如权利要求2所述的方法,其中,所述第一存储设备向所述第二存储设备发送第一通信消息包括:3. The method of claim 2, wherein the first storage device sending the first communication message to the second storage device comprises:
    所述第一存储设备将待发送业务数据转化成SCSI命令,将所述SCSI命令作为所述第一通信消息发送给所述第二存储设备。The first storage device converts the service data to be sent into a SCSI command, and sends the SCSI command as the first communication message to the second storage device.
  4. 如权利要求1-3任一项所述的方法,其中,在建立所述第一存储设备与所述第二存储设备间的第二通信连接之后,所述方法还包括:8. The method according to any one of claims 1 to 3, wherein after establishing a second communication connection between the first storage device and the second storage device, the method further comprises:
    所述第一存储设备接收所述第二存储设备发送的第二通信消息,其中,所述第二通信消息中携带第二SCSI命令码,所述第二SCSI命令码用于指示所述第二通信消息为存储设备间通信消息;The first storage device receives a second communication message sent by the second storage device, where the second communication message carries a second SCSI command code, and the second SCSI command code is used to indicate the second The communication message is a communication message between storage devices;
    所述第一存储设备按照预先设定的解析方式解析并读取所述第二通信消息。The first storage device parses and reads the second communication message according to a preset analysis manner.
  5. 一种存储设备,其中包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器通过执行所述计算机程序以实现如权利要求1-4中任一项所述的方法。A storage device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method according to any one of claims 1-4.
  6. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被设置为执行如权利要求1-4中任一项所述的方法。A computer-readable storage medium storing computer-executable instructions configured to execute the method according to any one of claims 1-4.
  7. 一种存储设备间通信装置,设置于第一存储设备中,其中,包括:A communication device between storage devices, which is provided in a first storage device, and includes:
    发送模块,用于向第二存储设备发送第一SCSI命令,其中,所述第一SCSI命令的SELECT REPORT域被设置为第一特定值,所述第一特定值用于指示所述第二存储设备创建第一虚拟逻辑单元;The sending module is configured to send a first SCSI command to a second storage device, wherein the SELECT REPORT field of the first SCSI command is set to a first specific value, and the first specific value is used to indicate the second storage The device creates the first virtual logical unit;
    接收模块,用于接收所述第二存储设备反馈的第一应答数据,以建立所述第一存储设备与所述第二存储设备间的第一通信连接,其中,所述第一应答数据中携带所述第一虚拟逻辑单元的信息;The receiving module is configured to receive the first response data fed back by the second storage device to establish a first communication connection between the first storage device and the second storage device, wherein the first response data is Carrying information of the first virtual logical unit;
    所述接收模块,还用于接收所述第二存储设备发送的第二SCSI命令,其中,所述第二SCSI命令的SELECT REPORT域被设置为第二特定值;The receiving module is further configured to receive a second SCSI command sent by the second storage device, wherein the SELECT REPORT field of the second SCSI command is set to a second specific value;
    创建模块,用于根据所述第二特定值创建第二虚拟逻辑单元;A creation module, configured to create a second virtual logical unit according to the second specific value;
    所述发送模块,还用于向所述第二存储设备发送第二应答数据,以建立所述第一存储设备与所述第二存储设备间的第二通信连接,其中,所述第二应答数据中携带所述第二虚拟逻辑单元的信息。The sending module is further configured to send second response data to the second storage device to establish a second communication connection between the first storage device and the second storage device, wherein the second response The data carries the information of the second virtual logical unit.
  8. 如权利要求7所述的装置,其中,所述发送模块,还用于向所述第二存储设备发送第一通信消息,其中,所述第一通信消息中携带第一SCSI命令码,所述第一SCSI命令码用于指示所述第一通信消息为存储设备间通信消息。8. The apparatus of claim 7, wherein the sending module is further configured to send a first communication message to the second storage device, wherein the first communication message carries a first SCSI command code, and the The first SCSI command code is used to indicate that the first communication message is a communication message between storage devices.
  9. 如权利要求8所述的装置,其中,所述发送模块包括:The device according to claim 8, wherein the sending module comprises:
    转换子模块,用于将待发送业务数据转化成SCSI命令;The conversion sub-module is used to convert the service data to be sent into SCSI commands;
    发送子模块,用于将所述SCSI命令作为所述第一通信消息发送给所述第二存储设备。The sending submodule is configured to send the SCSI command as the first communication message to the second storage device.
  10. 如权利要求7-9任一项所述的装置,其中,所述接收模块,还用于接收所述第二存储设备发送的第二通信消息,其中,所述第二通信消息中携带第二SCSI命令码,所述第二SCSI命令码用于指示所述第二通信消息为存储设备间通信消息。8. The apparatus according to any one of claims 7-9, wherein the receiving module is further configured to receive a second communication message sent by the second storage device, wherein the second communication message carries a second SCSI command code, where the second SCSI command code is used to indicate that the second communication message is an inter-storage device communication message.
PCT/CN2020/104802 2019-07-31 2020-07-27 Method and apparatus for communication between storage devices, storage medium and storage device WO2021018086A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910706345.1A CN112311743A (en) 2019-07-31 2019-07-31 Communication method and device between storage devices, storage medium and storage device
CN201910706345.1 2019-07-31

Publications (1)

Publication Number Publication Date
WO2021018086A1 true WO2021018086A1 (en) 2021-02-04

Family

ID=74229448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104802 WO2021018086A1 (en) 2019-07-31 2020-07-27 Method and apparatus for communication between storage devices, storage medium and storage device

Country Status (2)

Country Link
CN (1) CN112311743A (en)
WO (1) WO2021018086A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849262B1 (en) * 2000-06-30 2010-12-07 Emc Corporation System and method for virtualization of networked storage resources
CN101938523A (en) * 2010-09-16 2011-01-05 华中科技大学 Convergence method of iSCSI (Internet Small Computer System Interface) and FCP (Fiber Channel Protocol) and application thereof to disaster recovery
CN103250143A (en) * 2012-12-28 2013-08-14 华为技术有限公司 Data storage method and storage device
CN108196800A (en) * 2013-08-20 2018-06-22 株式会社日立制作所 Storage system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4461089B2 (en) * 2005-10-04 2010-05-12 富士通株式会社 Storage control apparatus and storage control method
US7783805B2 (en) * 2006-11-29 2010-08-24 Cisco Technology, Inc. Interlocking input/outputs on a virtual logic unit number
IN2014DN05659A (en) * 2011-12-30 2015-04-03 Schneider Electric It Corp
US8972616B2 (en) * 2013-03-15 2015-03-03 Dell Products, L.P. System and method for prioritizing iSCSI data transmission using data center bridging enabled switches
CN109600436B (en) * 2018-12-10 2021-06-29 浪潮电子信息产业股份有限公司 Distributed iscsi service implementation method, system and related device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849262B1 (en) * 2000-06-30 2010-12-07 Emc Corporation System and method for virtualization of networked storage resources
CN101938523A (en) * 2010-09-16 2011-01-05 华中科技大学 Convergence method of iSCSI (Internet Small Computer System Interface) and FCP (Fiber Channel Protocol) and application thereof to disaster recovery
CN103250143A (en) * 2012-12-28 2013-08-14 华为技术有限公司 Data storage method and storage device
CN108196800A (en) * 2013-08-20 2018-06-22 株式会社日立制作所 Storage system

Also Published As

Publication number Publication date
CN112311743A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
WO2016145797A1 (en) Smart home control method, device and system
CN111294399B (en) Data transmission method and device
KR20160045635A (en) Electronic device using logical channels for communication
US8819286B2 (en) Methods, systems, and apparatus for processing messaging data sets using structured data sets
EP3131303B1 (en) Method and device for transmitting data in intelligent terminal to television terminal
US9756113B2 (en) Method and apparatus of performing remote command dispatching
CN111954100B (en) Interface upgrading method and device and optical network unit management method and device
JP2013543189A (en) Method and apparatus for controlling a remote device using SMS
CN112822199B (en) OTA (over the air) upgrading method and system based on protocol conversion
WO2017143743A1 (en) Heterogeneous protocol communication method and controller
CN111159019B (en) Application program testing method, testing control terminal and testing terminal
WO2022267635A1 (en) Method and apparatus for data exchange
US9148404B2 (en) System for accessing data of cloud database using transparent technology
CN108989157B (en) Method and device for controlling intelligent equipment
WO2011160341A1 (en) Reader driver device, system and method based on llrp (low-level reader protocol)
WO2021018086A1 (en) Method and apparatus for communication between storage devices, storage medium and storage device
GB2580419A (en) Electronic message control
WO2023246060A1 (en) User authentication and authorization method and apparatus, and medium and device
KR20190093294A (en) Device profile based gateway platform system and method for integrated control and management of heterogeneous iot network
US20080126520A1 (en) Devices, systems and methods for network device conversion
WO2023071717A1 (en) Operation and maintenance operation method and system, and network device
WO2022088888A1 (en) Multi-level pon management method and related apparatus
US20220052902A1 (en) Method for managing remote device through management device
CN110661850A (en) Edge calculation method, system, computer equipment and storage medium
WO2022121682A1 (en) Method and system for communication between apple mobile device andapple external accessory

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20846258

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20846258

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20846258

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/09/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20846258

Country of ref document: EP

Kind code of ref document: A1