A communication method, device and medium between a storage system and a downstream device
By pre-stored different versions of communication protocols in the storage system and calling the corresponding protocol according to the version number of the downlink device, the problem of communication interruption after the downlink device protocol is solved, and compatibility and cost-effectiveness between devices are achieved.
Patent Information
- Application Number
- CN202211132878.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-09-16
AI Technical Summary
In the case of the downlink device protocol version update, communication cannot be performed between the uplink device and the downlink device.
Different versions of communication protocols are pre-stored in the storage system. By obtaining the communication protocol and version number of the downlink device, the corresponding communication protocol in the version library is called to achieve version matching.
It realizes that uplink devices and downlink devices can still communicate normally after the protocol version is updated, improving system compatibility and maintainability and reducing system costs.
Smart Images

Figure CN115525593B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage systems, and in particular to a method, apparatus, and medium for communication between a storage system and downstream equipment. Background Art
[0002] SAS or Non-Volatile Memory Express (NVME) hard drives are connected to the storage system's Serial Attached SCSI (SAS), Fiber Channel (FC), or Ethernet link, which is based on the high-speed Peripheral Component Interconnect Express (PCIE) standard. Communication between the storage system and the hard drives is based on the storage protocol. The storage system can be called the upstream device, the initiator of storage protocol communication, while the hard drives can be called the downstream device, the target of storage protocol communication.
[0003] Communication between the upstream device and the downstream device is possible only when the communication protocol is the same. Currently, the upstream device only stores a specific version of the communication protocol, limiting communication between the upstream and downstream devices. If the protocol version of the downstream device is updated, communication between the upstream and downstream devices becomes impossible.
[0004] It can be seen that, when the protocol version of the downlink device is updated, how to enable the uplink device and the downlink device to still communicate is a technical problem that people in this field need to solve urgently. Summary of the Invention
[0005] The purpose of this application is to provide a communication method, apparatus and medium between a storage system and a downstream device, so as to enable communication between the upstream device and the downstream device even when the protocol version of the downstream device is updated.
[0006] To solve the above technical problems, the present application provides a communication method between a storage system and a downstream device, which is applied to the storage system and includes:
[0007] Acquiring a communication protocol with the downlink device;
[0008] Obtaining the version corresponding to the communication protocol;
[0009] Calling the communication protocol corresponding to the version from a version library in which the communication protocol is pre-stored;
[0010] In the case that the versions of the communication protocols are the same, communication with the downlink device is performed according to the communication protocol corresponding to the version.
[0011] Preferably, the acquiring of the communication protocol with the downlink device includes:
[0012] Obtaining the hardware interface and hardware driver for the downstream device;
[0013] Identifying the type of the downstream device according to the hardware interface and the hardware driver;
[0014] The communication protocol between the downstream device and the downstream device is determined according to the type.
[0015] Preferably, obtaining the version corresponding to the communication protocol includes:
[0016] Sending corresponding preset instructions to the downlink device according to the communication protocol;
[0017] Read the version corresponding to the communication protocol according to the preset instruction.
[0018] Preferably, the determining the communication protocol with the downlink device according to the type includes:
[0019] In the case where the type of the downstream device is SCSI, determining that the communication protocol between the downstream device and the downstream device is the SCSI protocol;
[0020] Correspondingly, obtaining the version corresponding to the communication protocol includes:
[0021] Sending the INQUIRY instruction of the SCSI protocol to the downstream device;
[0022] The version corresponding to the communication protocol is read according to the INQUIRY instruction.
[0023] Preferably, the determining the communication protocol with the downlink device according to the type includes:
[0024] When the type of the downstream device is NVME, determining that the communication protocol between the downstream device and the downstream device is the NVME protocol;
[0025] Correspondingly, obtaining the version corresponding to the communication protocol includes:
[0026] Send the IDENTIFY instruction of the NVME protocol to the downstream device;
[0027] The version corresponding to the communication protocol is read according to the IDENTIFY instruction.
[0028] Preferably, the acquiring of the communication protocol with the downlink device includes:
[0029] In the case of NVME based on FC or Ethernet, the communication protocol obtained with the downstream device is the NVMF protocol.
[0030] Preferably, after calling the communication protocol corresponding to the version from the version library pre-stored with the communication protocol, the method includes:
[0031] Since the communication protocol corresponding to the version is called out from the version library, determining within a preset time whether the version of the communication protocol called out from the version library is the same as the version of the communication protocol of the downstream device;
[0032] If not, return to the step of obtaining the communication protocol with the downlink device.
[0033] In order to solve the above technical problems, the present application further provides a communication device between a storage system and a downstream device, which is applied to the storage system and includes:
[0034] A first acquisition module, configured to acquire a communication protocol with the downlink device;
[0035] A second acquisition module is used to obtain the version corresponding to the communication protocol;
[0036] A calling module, configured to call the communication protocol corresponding to the version from a version library pre-stored with the communication protocol;
[0037] The communication module is used to communicate with the downlink device according to the communication protocol corresponding to the version when the versions of the communication protocols are the same.
[0038] In order to solve the above technical problems, the present application also provides a communication device between a storage system and a downstream device, including:
[0039] Memory for storing computer programs;
[0040] The processor is configured to implement the steps of the above-mentioned method for communicating between the storage system and the downstream device when executing the computer program.
[0041] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the communication method between the storage system and the downstream device are implemented.
[0042] The present application provides a communication method between a storage system and a downstream device, which is applied to the storage system and includes: obtaining a communication protocol between the storage system and the downstream device; obtaining a version corresponding to the communication protocol; calling a communication protocol corresponding to the version from a version library that pre-stores the communication protocol, and when the versions of the communication protocols are the same, communicating with the downstream device according to the communication protocol of that version. In this method, since the version library of the communication protocol of the storage system pre-stores the communication protocol of that version, the storage system can call the communication protocol of that version from the version library that pre-stores the communication protocol of that version based on the version of the communication protocol of the downstream device, so that the communication protocols between the storage system and the downstream device are the same and normal communication can be carried out.
[0043] In addition, the present application also provides a communication device between a storage system and a downstream device and a computer-readable storage medium, which have the same or corresponding technical features as the above-mentioned communication method between the storage system and the downstream device, and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0045] Figure 1 A schematic diagram of a storage control system provided in an embodiment of the present application;
[0046] Figure 2 A flow chart of a communication method between a storage system and a downstream device provided in an embodiment of the present application;
[0047] Figure 3 A structural diagram of a communication device between a storage system and a downstream device provided in one embodiment of the present application;
[0048] Figure 4 A structural diagram of a communication device between a storage system and a downstream device provided in another embodiment of the present application;
[0049] Figure 5 A flowchart of a method for adapting the version of a storage system to a downstream device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] The core of this application is to provide a communication method, device and medium between a storage system and a downstream device, which is used to enable communication between the upstream device and the downstream device when the protocol version of the downstream device is updated.
[0052] The storage control system (storage system for short) is a device that connects to a large number of storage media. The storage system is based on FC or Ethernet links and cascades the lower-level storage control systems through storage communication protocols (SCSI, NVME, or NVMF). Figure 1 This is a schematic diagram of a storage control system provided in an embodiment of the present application. Figure 1 As shown, the storage control system is based on a PCIE expansion card, and is connected to an NVME hard disk through an NVME card; is connected to a SAS hard disk through a SAS card; is cascaded to a SAS / NVME storage system through an FC card; and is cascaded to a SAS / NVME storage system through Ethernet. At present, only a specific version of the storage protocol is stored in the storage system. Therefore, the storage system can only communicate with the downstream device based on a specific version of the communication protocol. As the storage capacity increases, when the downstream storage medium or the cascaded storage control system is updated, the storage system cannot communicate with the downstream device based on the new version of the communication protocol. Therefore, in the present application, different versions of the communication protocol are pre-stored in the version library of the storage system, and the communication protocol version in its own version library is kept updated according to the version of the communication protocol of the downstream device, and multiple versions can be compatible at the same time. When the version of the communication protocol of the downstream device is updated, the corresponding version of the communication protocol can be found from the version library, so that the upstream device and the downstream device communicate based on the same version of the communication protocol, which reduces the system cost to a certain extent and improves the maintainability of the system.
[0053] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods. Figure 2 A flow chart of a communication method between a storage system and a downstream device provided in an embodiment of the present application, wherein the method is applied to a storage system, such as Figure 2 As shown, the method includes:
[0054] S10: Acquire the communication protocol with the downlink device;
[0055] S11: Obtain the version corresponding to the communication protocol;
[0056] S12: calling the communication protocol corresponding to the version from the version library where the communication protocol is stored in advance;
[0057] S13: When the versions of the communication protocols are the same, communicate with the downstream device according to the communication protocol corresponding to the version.
[0058] The storage system communicates with the downstream device based on a communication protocol. Commonly used communication protocols include the SCSI protocol and the NVME protocol. The communication protocol may have different versions. For example, if the communication protocol of the downstream device is the SCSI protocol, the storage system only stores version 1.0 of the SCSI protocol in the previous method, so that the storage system can only communicate with the downstream device based on version 1.0 of the SCSI protocol. When the version of the SCSI protocol of the downstream device is updated to version 2.0, since only version 1.0 of the SCSI protocol is stored in the storage system, the storage system cannot communicate with the downstream device after the version of the SCSI protocol of the downstream device is updated. Therefore, in this embodiment, after obtaining the communication protocol with the downstream device, the version number corresponding to the communication protocol is further obtained.
[0059] Different protocols are stored in the storage system, and different version libraries are used for different protocols. Different versions of the protocols are pre-stored in the version library, which may include historical protocol versions and the latest protocol versions, to improve system compatibility. According to the version of the communication protocol of the downstream device, the version number corresponding to the corresponding protocol can be called from its own version library. For example, if the protocol of the downstream device is the SCSI protocol, the version library corresponding to the SCSI protocol is first found. Assuming that the version library corresponding to the SCSI protocol contains versions 1.0 and 2.0, version 2.0 is then called from the version library corresponding to the SCSI protocol, so that the version number of the storage system and the downstream device are the same, thereby enabling the storage system and the downstream device to communicate based on the 2.0 version of the SCSI protocol.
[0060] This embodiment provides a method for communicating between a storage system and a downstream device, applied to the storage system, comprising: obtaining a communication protocol with the downstream device; obtaining a version corresponding to the communication protocol; and calling the corresponding version of the communication protocol from a repository pre-stored with the communication protocol version. If the communication protocol versions are the same, communicating with the downstream device according to that version of the communication protocol. In this method, since the storage system's communication protocol version repository pre-stores the communication protocol version, the storage system can call that version of the communication protocol from the repository pre-stored with the communication protocol version based on the downstream device's communication protocol version, ensuring that the communication protocols between the storage system and the downstream device are the same and enabling normal communication.
[0061] In practice, in order to accurately obtain the communication protocol of the downlink device, a preferred implementation is that obtaining the communication protocol with the downlink device includes:
[0062] Obtain the hardware interface and hardware driver for the downstream device;
[0063] Identify the type of downstream device based on the hardware interface and hardware driver;
[0064] Determine the communication protocol with the downstream device based on the type.
[0065] When the storage system starts running, it connects to downstream devices. Based on the hardware interface and hardware driver identification, the downstream devices are identified as different device types, such as SCSI or NVME. The device type determines the communication protocol with the downstream devices. For example, if the device type is SCSI, the communication protocol is SCSI; if the device type is NVME, the communication protocol is NVME.
[0066] In the method for obtaining the communication protocol provided in this embodiment, the type of device is first determined based on the hardware interface and the hardware driver, and then the communication protocol between the device and the downstream device is determined based on the type of the device, so that the obtained communication protocol between the downstream device and the downstream device is more accurate.
[0067] Based on the acquisition of the communication protocol with the downstream device in the above embodiment, it is necessary to further acquire the version number corresponding to the communication protocol. In practice, a preferred implementation is that acquiring the version corresponding to the communication protocol includes:
[0068] Send corresponding preset instructions to the downlink device according to the communication protocol;
[0069] Read the corresponding version of the communication protocol according to the preset instructions.
[0070] The preset instruction is an instruction used to read the version corresponding to the communication protocol. The preset instruction is determined according to the corresponding communication protocol, that is, different protocols have different preset instructions for reading the version number of the protocol. On the basis of obtaining the corresponding communication protocol, there is no limit on the time and number of times of sending the preset instruction. For example, the preset instruction may be sent immediately after obtaining the communication protocol so that the version number corresponding to the communication protocol can be quickly obtained; or the preset instruction may be sent at a preset time after obtaining the communication protocol, etc. In practice, there may be a situation where the version corresponding to the communication protocol is not read after sending the preset instruction once. Therefore, if the version corresponding to the communication protocol is not obtained within the preset time after sending the preset instruction once, the preset instruction may be sent again so that the version number corresponding to the communication protocol can be obtained as much as possible.
[0071] The method of reading the communication protocol version according to the preset instruction provided in this embodiment enables obtaining the version corresponding to the communication protocol, thereby facilitating subsequent communication with the downstream device.
[0072] The device type described above may be SCSI or NVME. When the downstream device type is SCSI, the communication protocol between the downstream device and the device is determined based on the type, including:
[0073] Determine that the communication protocol with the downstream device is the SCSI protocol;
[0074] Correspondingly, obtaining the corresponding version of the communication protocol includes:
[0075] Send the SCSI protocol INQUIRY command to the downstream device;
[0076] Read the corresponding version of the communication protocol according to the INQUIRY instruction.
[0077] When the type of the downstream device is NVME, the communication protocol between the downstream device and the downstream device is determined according to the type, including:
[0078] Determine that the communication protocol with the downstream device is the NVME protocol;
[0079] Correspondingly, obtaining the corresponding version of the communication protocol includes:
[0080] Send the NVME protocol IDENTIFY command to the downstream device;
[0081] Read the corresponding version of the communication protocol according to the IDENTIFY instruction.
[0082] This embodiment describes how to determine the communication protocol between the downstream device and the corresponding version of the communication protocol based on the type of the device, and how to obtain the corresponding version of the communication protocol when the device type is SCSI or NVME, so that the corresponding protocol can be accurately obtained according to the corresponding type, and then the corresponding version can be accurately obtained according to the corresponding instruction. Compared with setting the same instruction for reading the protocol version for different protocols, when there are multiple types of devices, the corresponding protocol version number can only be read for each type of device in turn according to the instruction for reading the protocol version. In the method of this embodiment, different instructions for reading the protocol version are set for different types of devices, so that even in the case of different types of devices, the version number corresponding to the corresponding protocol can be read at the same time according to the instruction for reading the protocol version, which can improve the efficiency of obtaining the corresponding version of the communication protocol.
[0083] The device types described in the above embodiments are the communication protocols corresponding to SCSI or NVME (based on PCIE). In practice, the corresponding communication protocol also needs to be determined when based on the network. A preferred embodiment is that obtaining the communication protocol between the downstream device includes:
[0084] In the case of NVME based on FC or Ethernet, the communication protocol between the acquisition and downstream devices is the NVMF protocol.
[0085] The communication protocol determined based on the network provided in this embodiment enables communication with a downstream device to be implemented according to the corresponding communication protocol and the communication protocol with the corresponding version number based on the network in practice.
[0086] In practice, the communication protocol called from the version library may not have the correct version number, resulting in a failure in normal communication between the storage system and the downstream device. Therefore, in practice, a preferred embodiment is that after calling the communication protocol corresponding to the version from the version library pre-stored with the communication protocol, the communication method between the storage system and the downstream device includes:
[0087] Since the communication protocol corresponding to the version is called out from the version library, it is determined within a preset time whether the version of the communication protocol called from the version library is the same as the version of the communication protocol of the downstream device;
[0088] If not, return to the step of obtaining the communication protocol with the downstream device.
[0089] There's no specific limit to the preset time. It could be immediately after the version corresponding to the communication protocol is retrieved from the repository, to determine whether the retrieved version is the same as the previously retrieved version. Alternatively, it could be within a certain period of time after the version corresponding to the communication protocol is retrieved from the repository. If the communication protocol versions are the same, the storage system can communicate with the downstream device using that version of the communication protocol. If the communication protocol versions are different, the storage system can return to the step of retrieving the communication protocol from the downstream device to enable communication between the storage system and the downstream device, i.e., adapt the communication protocol version multiple times.
[0090] This embodiment provides a method for adapting the communication protocol version again when a communication protocol is not compatible, so as to achieve protocol communication between the storage system and the downstream device as much as possible.
[0091] In the above embodiments, a method for communicating between a storage system and a downstream device is described in detail. This application also provides embodiments of a corresponding apparatus for communicating between a storage system and a downstream device. It should be noted that this application describes embodiments of the apparatus from two perspectives: one based on functional modules and the other based on hardware.
[0092] Figure 3 This is a block diagram of a communication device between a storage system and a downstream device provided in one embodiment of the present application. This embodiment, based on the perspective of functional modules, includes:
[0093] A first acquisition module 10 is used to acquire a communication protocol with a downlink device;
[0094] The second acquisition module 11 is used to obtain the version corresponding to the communication protocol;
[0095] The calling module 12 is used to call the communication protocol corresponding to the version from the version library where the communication protocol is pre-stored;
[0096] The communication module 13 is configured to communicate with the downstream device according to the communication protocol corresponding to the version when the communication protocols are the same.
[0097] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0098] The communication device between the storage system and the downstream device provided in this embodiment obtains the communication protocol between the storage system and the downstream device through a first acquisition module; obtains the corresponding version of the communication protocol through a second acquisition module; uses a calling module to call the corresponding version of the communication protocol from a version library pre-stored with the communication protocol; and uses the communication module to communicate with the downstream device according to the corresponding version of the communication protocol when the communication protocol versions are the same. In this device, because the storage system's communication protocol version library pre-stores the communication protocol version, the storage system can call the communication protocol version from the version library pre-stored with the communication protocol version based on the communication protocol version of the downstream device, thereby ensuring that the communication protocols between the storage system and the downstream device are the same and normal communication can be carried out.
[0099] Figure 4 This is a structural diagram of a communication device between a storage system and a downstream device provided in another embodiment of the present application. This embodiment is based on the hardware perspective, such as Figure 4 As shown, the communication device between the storage system and the downstream device includes:
[0100] Memory 20, for storing computer programs;
[0101] The processor 21 is configured to implement the steps of the method for communication between the storage system and the downstream device mentioned in the above embodiment when executing a computer program.
[0102] The communication device between the storage system and the downstream device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0103] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0104] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the communication method between the storage system and the downstream device disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the data involved in the communication method between the storage system and the downstream device mentioned above.
[0105] In some embodiments, the communication device between the storage system and the downstream device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0106] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the communication device between the storage system and the downstream equipment, and may include more or fewer components than shown in the figure.
[0107] The communication device between the storage system and the downstream device provided in the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the communication method between the storage system and the downstream device, the effect is the same as above.
[0108] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment.
[0109] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0110] The computer-readable storage medium provided in this application includes the above-mentioned communication method between the storage system and the downstream device, and the effect is the same as above.
[0111] In order to make the technical personnel in this field better understand the present application scheme, the following Figure 5 The present application is further described in detail with specific implementation methods. Figure 5 This is a flowchart of a method for a storage system to adapt to the version of a downstream device provided in an embodiment of the present application. Figure 5 As shown, the method includes:
[0112] S14: The storage control system starts running;
[0113] S15: storage control system, connected to downstream equipment;
[0114] S16: Determine whether the downstream device is based on the PCIE bus; if so, proceed to step S17; if not, proceed to step S19;
[0115] S17: Determine whether the device type is SCSI based on the hardware interface and hardware driver; if so, proceed to step S18; if not, proceed to step S19;
[0116] S18: Determine that the communication protocol is the SCSI protocol; and proceed to step S20;
[0117] S19: Determine that the communication protocol is the NVME protocol; and proceed to step S21;
[0118] S20: Sending the INQUIRY command of the SCSI protocol to the downstream device;
[0119] S21: Send the IDENTIFY command of the NVME protocol to the downstream device;
[0120] S22: Read the version number corresponding to the downlink device communication protocol;
[0121] S23: The storage system calls the corresponding version library of the corresponding protocol to perform protocol layer IO interaction;
[0122] S24: Normal I / O interaction between the storage system and downstream devices.
[0123] In the method for adapting the storage system to the version of a downstream device connected, provided in this embodiment, since the storage system's communication protocol version library already stores the communication protocol version, the storage system can call the communication protocol version from the library that pre-stores the communication protocol version based on the downstream device's communication protocol version. This ensures that the storage system and the downstream device have the same communication protocol and can communicate normally. The storage system's ability to be compatible with downstream devices with historical protocol versions improves the compatibility of the entire system at a specific stage, reduces system costs to a certain extent, and improves system maintainability.
[0124] The above is a detailed introduction to the communication method, device and medium between a storage system and a downstream device provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0125] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A communication method between a storage system and a downstream device, characterized in that: Applied to storage systems. Storage systems are based on FC or Ethernet links and cascade lower-level devices through storage communication protocols, including: Acquiring a communication protocol with the downlink device; Obtaining the version corresponding to the communication protocol; Calling the communication protocol corresponding to the version from a version library in which the communication protocol is pre-stored; When the versions of the communication protocols are the same, communicating with the downlink device according to the communication protocol corresponding to the version; The acquiring of the communication protocol with the downlink device includes: Obtaining the hardware interface and hardware driver for the downstream device; Identifying the type of the downstream device according to the hardware interface and the hardware driver; Determining the communication protocol with the downlink device according to the type; The determining of the communication protocol with the downlink device according to the type includes: In the case where the type of the downstream device is SCSI, determining that the communication protocol between the downstream device and the downstream device is the SCSI protocol; When the type of the downstream device is NVME, determining that the communication protocol between the downstream device and the downstream device is the NVME protocol; The acquiring of the communication protocol with the downlink device includes: In the case of NVME based on FC or Ethernet, the communication protocol obtained with the downstream device is the NVMF protocol.
2. The method for communication between a storage system and a downstream device according to claim 1, wherein: The obtaining of the version corresponding to the communication protocol includes: Sending corresponding preset instructions to the downlink device according to the communication protocol; Read the version corresponding to the communication protocol according to the preset instruction.
3. The method for communication between a storage system and a downstream device according to claim 2, wherein: The obtaining of the version corresponding to the communication protocol includes: Sending the INQUIRY instruction of the SCSI protocol to the downstream device; The version corresponding to the communication protocol is read according to the INQUIRY instruction.
4. The method for communication between a storage system and a downstream device according to claim 2, wherein: The obtaining of the version corresponding to the communication protocol includes: Send the IDENTIFY instruction of the NVME protocol to the downstream device; The version corresponding to the communication protocol is read according to the IDENTIFY instruction.
5. The method for communication between a storage system and a downstream device according to any one of claims 1 to 4, characterized in that: After calling the communication protocol corresponding to the version from the version library pre-stored with the communication protocol, the method includes: Since the communication protocol corresponding to the version is called out from the version library, determining within a preset time whether the version of the communication protocol called out from the version library is the same as the version of the communication protocol of the downstream device; If not, return to the step of obtaining the communication protocol with the downlink device.
6. A communication device between a storage system and a downstream device, characterized in that: Applied to storage systems. Storage systems are based on FC or Ethernet links and cascade lower-level devices through storage communication protocols, including: A first acquisition module, configured to acquire a communication protocol with the downlink device; A second acquisition module is used to obtain the version corresponding to the communication protocol; A calling module, configured to call the communication protocol corresponding to the version from a version library pre-stored with the communication protocol; a communication module, configured to communicate with the downlink device according to the communication protocol corresponding to the version when the versions of the communication protocols are the same; The first acquisition module is specifically configured to: Obtaining the hardware interface and hardware driver for the downstream device; Identifying the type of the downstream device according to the hardware interface and the hardware driver; Determining the communication protocol with the downlink device according to the type; The determining of the communication protocol with the downlink device according to the type includes: In the case where the type of the downstream device is SCSI, determining that the communication protocol between the downstream device and the downstream device is the SCSI protocol; When the type of the downstream device is NVME, determining that the communication protocol between the downstream device and the downstream device is the NVME protocol; The first acquisition module is specifically configured to: In the case of NVME based on FC or Ethernet, the communication protocol obtained with the downstream device is the NVMF protocol.
7. A communication device between a storage system and a downstream device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for communication between a storage system and a downstream device as claimed in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the communication method between the storage system and the downstream device according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Detection method and device for software and hardware version information, equipment and medium
CN113377421A
Data transmission method and device and electronic equipment
CN113392046A