Method, terminal and storage medium for duplicate frame control of cluster communication in a storage system
By designing a global two-dimensional array to record the repeated frame count value of IO commands in the storage system, the problem that the repeated frame control mechanism in the storage system cannot handle complex field environments is solved, and the communication stability and reliability are achieved, and it is adapted to multiple protocols and hardware link types.
Patent Information
- Application Number
- CN202211324133.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-10-27
AI Technical Summary
There is a duplicate frame control mechanism in the existing storage system that cannot effectively handle communication exceptions in complex field environments, affecting communication stability and reliability.
Design a global two-dimensional array to record the repeated frame count value of each IO command. The initiator and target side are consistent. The target side makes repeated frame judgments on empty IO applications, and aborts the IO process when the judgment fails. The UI alarms and resets it to 0 to ensure that the IO is carried out normally in abnormal situations.
It realizes that while detecting abnormal situations in the storage system cluster communication, it ensures that most of the IO is carried out normally, improves the stability and reliability of communication, and adapts to multiple protocol models and hardware link types.
Smart Images

Figure CN115914255B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a method, a terminal, and a storage medium for controlling duplicate frames in cluster communication in a storage system. Background Art
[0002] In a unified storage system, a cluster is built through multiple controllers, and a large amount of data is transmitted between cluster nodes through functional modules such as cache synchronization, mirror mapping, and redundant backup. In addition to the communication performance requirements of high concurrency and high bandwidth, the storage system also needs to ensure the reliability and security of communication. Therefore, a duplicate frame control mechanism is designed to handle the duplicate frame problem in the cluster communication of the storage system.
[0003] The duplicate frame control mechanism realizes that the duplicate frame count value is generated and transferred along with the IO process. It can not only display warning information on the UI interface to facilitate manual maintenance and transformation, but also self-repair to handle various abnormal situations and ensure the normal progress of cluster communication. According to the information displayed on the UI interface, specific communication ports and physical lines can be checked and located, and then whether there are physical problems such as fiber optic cables, network cards, and network failures can be analyzed. In addition to controlling and detecting traditional fiber channel frames, it is extended to be compatible with NTB link frames, IP link frames, and RDMA link frames, and unified into a set of control mechanisms. It adapts to multiple protocol models and multiple hardware link types, and can handle more complex on-site environments, contributing to the goals of high performance, high availability, and high reliability of the storage system. Summary of the Invention
[0004] In order to solve the technical problems existing in the above-mentioned prior art, the present invention provides a method, a terminal, and a storage medium for controlling duplicate frames in cluster communication in a storage system.
[0005] To achieve the above object, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, in an embodiment provided by the present invention, a method for controlling duplicate frames in cluster communication in a storage system is provided. The method includes the following steps:
[0007] Initialize and generate a global two-dimensional array (initiator_duplicated_ids and target_duplicated_ids) with node id as rows and cmnd cid as columns to record the duplicate frame id of each cmnd;
[0008] Wherein, a dual-link or multi-link redundancy connection is maintained between nodes;
[0009] An IO request is initiated at the initiator end of the CL layer, the target end of the CL layer receives the IO request, and the target end returns the feedback result to the initiator end;
[0010] Among them, the target end makes a repeated frame judgment on the empty IO application;
[0011] If the repeated frame judgment fails, the IO process is aborted, the UI is alerted, and the initiator is fed back to reset it to 0;
[0012] If there are other abnormal situations, there are also operations to reset to 0 or step back one step to ensure that subsequent IOs can proceed normally.
[0013] As a further solution of the present invention, there are credit_max numbers of concurrent IOs on each link; the specific form of each IO is reflected by the protocol command cmnd structure body. Each cmnd is allocated from the cmnd resource pool, and each cmnd has a unique cid.
[0014] As a further solution of the present invention, when a link is accidentally disconnected, traverse all the unacknowledged cmnds sent by the initiator end of the link, and reset the corresponding repeated frame count value in the initiator_duplicated_ids table to 0.
[0015] As a further solution of the present invention, when all the links between two nodes are disconnected, that is, the nodes are out of contact, then all the elements in the initiator_duplicated_ids table corresponding to the node id as the row are reset to 0 at the initiator end; after the nodes are successfully reconnected, the relevant repeated frame count values start completely from 0.
[0016] As a further solution of the present invention, the process of the initiator in the CL layer initiating an IO application is as follows:
[0017] Retrieve an idle cmnd from the cmnd resource pool, obtain the repeated frame count value of the cmnd from the initiator_duplicated_ids, assign it to the corresponding field of the cmnd, and send it to the other node.
[0018] As a further solution of the present invention, the process of the CL layer target receiving an IO application is as follows:
[0019] Obtain the repeated frame count value of the cid from the target_duplicated_ids array, compare it with the repeated frame count value of the corresponding field of the received cmnd. If they are equal, the IO process continues; the value of the target_dpulicate_ids array is incremented to keep in sync with the initiator end;
[0020] If the match fails, the target actively aborts the IO, marks the feedback result as abort, and issues a repeated frame warning to the UI interface.
[0021] As a further solution of the present invention, when the UI interface issues a repeated frame warning, it further includes:
[0022] The warning message indicates the specific physical link wwpn value to assist in locating the physical device and guiding subsequent troubleshooting and maintenance work.
[0023] As a further solution of the present invention, when the initiator receives the feedback result, if it has an abort flag, the count value of the repeated frame of the cmnd under initiator_duplicated_ids is reset to 0; when called next time, the value 0 is taken.
[0024] In a second aspect, in another embodiment provided by the present invention, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor loads and executes the computer program, the steps of the repeated frame control method for cluster communication in the storage system are implemented.
[0025] In a third aspect, in another embodiment provided by the present invention, a storage medium is provided, storing a computer program, and when the computer program is loaded and executed by a processor, the steps of the repeated frame control method for cluster communication in the storage system are implemented.
[0026] The technical solution provided by the present invention has the following beneficial effects:
[0027] For the repeated frame control method, terminal and storage medium for cluster communication in the storage system provided by the present invention, a two-dimensional array with node id as rows and cid as columns is designed globally. Each IO command is bound with a repeated frame count value to keep the initiator side and the target side consistent. The target side makes a repeated frame judgment on the empty IO application, which does not affect normal data transmission. If the repeated frame judgment fails, the IO process is aborted, a UI warning is issued, and the initiator is fed back to reset it to 0. If there are other abnormal situations, there are also operations of resetting to 0 or stepping back one step to ensure that subsequent IOs can proceed normally. The present invention can not only detect abnormal situations of cluster communication but also ensure that most IOs proceed normally, realizing the stability and reliability of cluster communication in the storage system.
[0028] These aspects or other aspects of the present invention will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can also be obtained based on these drawings.
[0030] Figure 1 Flowchart of the duplicate frame control method for cluster communication in a storage system according to an embodiment of the present invention;
[0031] Figure 2 Schematic diagram of cluster IO communication according to an embodiment of the present invention;
[0032] Figure 3 Block diagram of a terminal according to an embodiment of the present invention.
[0033] In the figure: processor - 301, communication interface - 302, memory - 303, communication bus - 304. Detailed implementation manners
[0034] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0035] The flowchart shown in the drawings is only an example, and does not necessarily include all contents and operations / steps, nor does it necessarily need to be executed in the described order. For example, some operations / steps can be decomposed, combined or partially merged, so the actual execution order may change according to the actual situation.
[0036] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless otherwise clearly specified in the context, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0037] Specifically, the embodiments of the present invention will be further described below with reference to the drawings.
[0038] Please refer to Figure 1 and 2 , Figure 1 is a flowchart of a duplicate frame control method for cluster communication in a storage system provided by an embodiment of the present invention. As shown in Figure 1As shown in the figure, the method for controlling duplicate frames in cluster communication in the storage system includes steps S10 to S20.
[0039] S10. Initialize a global two-dimensional array (initiator_duplicated_ids and target_duplicated_ids) with the node id as the row and the cmnd cid as the column to record the duplicate frame ids of each cmnd.
[0040] Among them, a dual-link or multi-link redundant connection is maintained between nodes.
[0041] In the embodiment of the present invention, the default value of all elements of the two arrays is initialized to 0. During the subsequent use of the cmnd, the element values of the corresponding two-dimensional array change.
[0042] S20. Initiate an IO application at the initiator end of the CL layer, the target end of the CL layer receives the IO application, and the target end returns the feedback result to the initiator end.
[0043] Among them, the target end makes a duplicate frame judgment on the empty IO application.
[0044] If the duplicate frame judgment fails, the IO process is aborted, the UI gives an alarm, and feedback is sent to the initiator to reset it to 0.
[0045] If there are other abnormal situations, there are also operations of resetting to 0 or backing up one step to ensure the normal progress of subsequent IOs.
[0046] Among them, each link has a credit_max number of concurrent IOs (the credit_max is different for different link types). The specific form of each IO is reflected by the protocol command cmnd structure body, and each cmnd is allocated from the cmnd resource pool. Each cmnd has a unique cid, and the cmnd can be recycled.
[0047] In the embodiment of the present invention, when a link is accidentally disconnected, traverse all the unacknowledged cmnds sent by the initiator end of the link, and reset the corresponding duplicate frame count value in the initiator_duplicated_ids table to 0. That is, when using this cmnd next time, the duplicate frame count value starts from 0 to complete the target duplicate frame detection. The duplicate frame count values of other cmnds remain unchanged because the values at the initiator end and the target end are the same.
[0048] In an embodiment of the present invention, when all links between two nodes are disconnected, that is, the nodes are out of contact, all elements in the row corresponding to the node ID in the initiator_duplicated_ids table at the initiator end are reset to 0. After the nodes are successfully reconnected, the relevant duplicate frame count values start completely from 0.
[0049] In an embodiment of the present invention, when the initiator at the CL layer initiates an IO request, the specific process is as follows:
[0050] Retrieve an idle cmnd from the cmnd resource pool, obtain the duplicate frame count value of this cmnd from the initiator_duplicated_ids, assign it to the corresponding field of the cmnd, and send it to the peer node. The duplicate frame count value of this cmnd in the initiator_duplicated_ids array is incremented for the next use.
[0051] In an embodiment of the present invention, when the target at the CL layer receives an IO request, the specific process is as follows:
[0052] Obtain the duplicate frame count value of this cid from the target_duplicated_ids array, compare it with the duplicate frame count value in the corresponding field of the received cmnd. If they are equal (if the duplicate frame count value of the IO request cmnd is 0, it is also considered a successful match, and the value in the target_dpulicate_ids array is reset to 0), the IO process continues. The value in the target_dpulicate_ids array is incremented to keep in sync with the initiator end. If the match fails, the target actively aborts this IO, marks the feedback result as abort, and issues a duplicate frame warning to the UI interface.
[0053] In an embodiment of the present invention, when the UI interface issues a duplicate frame warning, it further includes:
[0054] The warning information indicates the specific physical link wwpn value to assist in locating physical devices and guiding subsequent troubleshooting and maintenance work.
[0055] In an embodiment of the present invention, when the initiator receives the feedback result, if it has an abort mark, the duplicate frame count value of this cmnd under the initiator_duplicated_ids is reset to 0. When called next time, the value 0 is taken.
[0056] In an embodiment of the present invention, the other abnormal situations include:
[0057] The public interface platform returns a failure result. That is, when the initiator issues an IO request, after being processed by the underlying layer, the peer responds, but a failure feedback is obtained. Then, the repeat frame count value of this cmnd is reset to 0.
[0058] The received data is incomplete and there are dropped frames. That is, the size of the received data is inconsistent with the size of the data sent by the target. Then, the repeat frame count value of this cmnd is reset to 0.
[0059] When being blocked by the SAN network during the underlying processing and unable to be sent normally. That is, this cmnd leaves the CL layer and reaches the public interface platform layer and the driver layer, but due to physical reasons, this IO is no longer sent down and is directly fed back to the CL layer. Then, the repeat frame count value of this cmnd is decremented by one, indicating that this IO is invalid, and the next time this cmnd is called, it is transmitted with the previous value.
[0060] Other status value errors. That is, when assigned to the cmnd status by the peer target or the underlying driver, indicating an abnormal situation. Then, the repeat frame count value of this cmnd is reset to 0.
[0061] If the present invention never detects duplicate repeat link channel frames. Generating a duplicate frame alarm indicates that a duplicate link channel frame, or an incorrect link channel frame, or a partial link channel frame is missed, indicating that there is a problem with the link channel or the communication network. It may cause other errors related to the link channel communication network.
[0062] The specific communication link that generates the duplicate frame can be determined by using the transmitted and received WWPNs indicated in the error data. Use a network monitoring tool to find the cause of the problem. Design errors, configuration errors in the cluster communication network topology, or software or hardware failures of one of the components (including the link between switches) in the link channel communication network may cause problems such as generating duplicate frames, incorrect frames, and lost frames.
[0063] The present invention designs two-dimensional arrays initiator_duplicated_ids and target_duplicated_ids with the connection node id and command cid as the global indexes to record the duplicate frame count values of each command cmnd. Using a global array to record values instead of a single count value can not only achieve duplicate frame detection but also the concurrency of multiple queues and multiple I / Os (the concurrent I / Os are carried by different cmnds). When the initiator initiates an I / O, the duplicate value count of this cid is bound to the cmnd (at this time, the duplicate frame count values at both the initiator and target ends are equal). When the target receives the I / O, it performs a duplicate frame check. If the match is successful, the I / O process continues; if it fails, an alarm is issued to prompt manual maintenance. By using the reset to zero and decrement operations at the initiator end, except for abnormal I / O alarms, other I / Os can flow normally, and the cmnd after reset can also be used continuously. The control mechanism can be applied not only to the ntb link, fc link, and ip link of the SCSI protocol but also to the rdma link of the NVME protocol. The duplicate frame control mechanism performs duplicate frame detection on a single command in the storage system cluster communication environment, ensures I / O concurrency, meets the requirements of increasing IOPS and throughput, and realizes the stability and reliability of the entire system.
[0064] It should be understood that although the above is described in a certain order, these steps are not necessarily executed in the above order sequentially. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, a part of the steps in this embodiment may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time but can be executed at different times. The execution order of these steps or stages is not necessarily sequential but can be executed alternately or in turn with at least a part of other steps or steps in other steps.
[0065] In one embodiment, refer to Figure 3 As shown, in the embodiment of the present invention, a computer device is further provided, including a processor 301, a communication interface 302, a memory 303, and a communication bus 304. Among them, the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.
[0066] The memory 303 is used to store a computer program;
[0067] When the processor 301 executes the computer program stored on the memory 303, it executes the above-mentioned subject method. When the processor executes the instructions, it implements the steps in the above method embodiment:
[0068] S10. Initialize a global two-dimensional array (initiator_duplicated_ids and target_duplicated_ids) with the node ID as the row and the cmnd cid as the column to record the duplicate frame IDs of each cmnd.
[0069] Among them, the nodes maintain dual-link or multi-link redundant connections.
[0070] In the embodiment of the present invention, the values of all elements of the two arrays are initialized to 0 by default. During the subsequent use of cmnds, the values of the corresponding elements in the two-dimensional array change.
[0071] S20. Initiate an IO request at the initiator end of the CL layer, the target end of the CL layer receives the IO request, and the target end returns the feedback result to the initiator end.
[0072] Among them, the target end makes a duplicate frame judgment on the empty IO request.
[0073] If the duplicate frame judgment fails, the IO process is aborted, the UI gives an alarm, and feedback is sent to the initiator to reset it to 0.
[0074] If there are other abnormal situations, there are also operations to reset to 0 or step back one step to ensure that subsequent IOs can proceed normally.
[0075] Among them, each link has a credit_max number of concurrent IOs (the credit_max is different for different link types). The specific form of each IO is reflected by the protocol command cmnd structure body, and each cmnd is allocated from the cmnd resource pool. Each cmnd has a unique cid and can be recycled.
[0076] In the embodiment of the present invention, when a link is accidentally disconnected, traverse all the unacknowledged cmnds sent by the initiator end of the link, and reset the corresponding duplicate frame count value in the initiator_duplicated_ids table to 0. That is, when using this cmnd next time, the duplicate frame count value starts from 0 to complete the target duplicate frame detection. The duplicate frame count values of other cmnds remain unchanged because the values at the initiator end and the target end are the same.
[0077] In the embodiment of the present invention, when all the links between two nodes are disconnected, that is, the nodes are out of contact, then all the elements corresponding to the node ID as the row in the initiator_duplicated_ids table at the initiator end are reset to 0. After the nodes are successfully reconnected, the relevant duplicate frame count values start completely from 0.
[0078] In an embodiment of the present invention, when an initiator in the CL layer initiates an IO application, the specific process is as follows:
[0079] Retrieve an idle cmnd from the cmnd resource pool, obtain the duplicate frame count value of this cmnd from initiator_duplicated_ids, assign it to the corresponding field of the cmnd, and send it to the peer node. The duplicate frame count value of this cmnd in the initiator_duplicated_ids array is incremented for the next use.
[0080] In an embodiment of the present invention, when the target in the CL layer receives an IO application, the specific process is as follows:
[0081] Obtain the duplicate frame count value of this cid from the target_duplicated_ids array, compare it with the duplicate frame count value in the corresponding field of the received cmnd. If they are equal (if the duplicate frame count value of the IO application cmnd is 0, it is also considered a successful match, and the value in the target_dpulicate_ids array is reset to 0), then the IO process continues. The value in the target_dpulicate_ids array is incremented to keep in sync with the initiator side. If the match fails, the target actively aborts this IO, marks the feedback result as abort, and issues a duplicate frame warning to the UI interface.
[0082] In an embodiment of the present invention, when the UI interface issues a duplicate frame warning, it further includes:
[0083] The warning information indicates the specific physical link wwpn value to assist in locating the physical device and guiding subsequent troubleshooting and maintenance work.
[0084] In an embodiment of the present invention, when the initiator receives the feedback result, if it has an abort mark, the duplicate frame count value of this cmnd under initiator_duplicated_ids is reset to 0. When called next time, the value 0 is taken.
[0085] In an embodiment of the present invention, the other abnormal situations include:
[0086] The common interface platform feedbacks a failure result, that is, the initiator sends an IO request, which is processed by the underlying layer, and the peer responds, but a failure feedback is obtained, then the duplicate frame count value of this cmnd is reset to 0;
[0087] The received data is incomplete and there is a frame loss situation, that is, the size of the received data is inconsistent with the size of the data sent by the target, then the duplicate frame count value of this cmnd is reset to 0;
[0088] Blocked by the SAN network during underlying processing and unable to be sent out normally. That is, the cmnd leaves the CL layer and reaches the common interface platform layer and the driver layer. However, due to physical reasons, this IO is no longer sent down and is directly fed back to the CL layer. Then the repeated frame count value of this cmnd is decremented by one, indicating that this IO is invalid, and the next time this cmnd is called, it is transmitted with the previous value.
[0089] Other status value errors, that is, assigned to the cmnd status by the peer target or the underlying driver, indicating an abnormal situation. Then the repeated frame count value of this cmnd is reset to 0.
[0090] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0091] The communication interface is used for communication between the above terminal and other devices.
[0092] The memory can include a Random Access Memory (RAM), and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located far from the aforementioned processor.
[0093] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0094] The computer device includes a user device and a network device. Among them, the user device includes, but is not limited to, a computer, a smart phone, a PDA, etc.; the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of computers or network servers based on cloud computing (Cloud Computing). Among them, cloud computing is a type of distributed computing, which is composed of a super virtual computer formed by a group of loosely coupled computer sets. Among them, the computer device can run independently to implement the present invention, or can be connected to a network and implement the present invention through interactive operations with other computer devices in the network. Among them, the network where the computer device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, etc. It should also be understood that the term "and / or" used in the specification and appended claims of the present invention refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0095] In an embodiment of the present invention, a storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented:
[0096] S10. Initialize and generate a global two-dimensional array (initiator_duplicated_ids and target_duplicated_ids) with the node id as the row and the cmnd cid as the column to record the duplicate frame ids of each cmnd;
[0097] Among them, a dual-link or multi-link redundant connection is maintained between nodes.
[0098] In the embodiment of the present invention, the values of all elements of the two arrays are initialized to 0 by default. During the subsequent use of cmnd, the element values of the corresponding two-dimensional array change.
[0099] S20. Initiate an IO application at the initiator end of the CL layer, the target end of the CL layer receives the IO application, and the target end returns the feedback result to the initiator end;
[0100] Among them, the target end makes a duplicate frame judgment on the empty IO application;
[0101] If the duplicate frame judgment fails, the IO process is aborted, the UI gives an alarm, and feedback is sent to the initiator to reset it to 0;
[0102] If there are other abnormal situations, there are also operations of resetting to 0 or stepping back one step to ensure that subsequent IOs can proceed normally.
[0103] Among them, each link has credit_max number of concurrent I / Os (the credit_max is different for different link types). The specific form of each I / O is reflected by the protocol command cmnd structure, and each cmnd is allocated from the cmnd resource pool. Each cmnd has a unique cid and can be recycled.
[0104] In the embodiment of the present invention, when a link is unexpectedly disconnected, all unacknowledged cmnds sent from the initiator end of the link are traversed, and the corresponding duplicate frame count value in the initiator_duplicated_ids table is reset to 0. That is, when the cmnd is used next time, the duplicate frame count value starts from 0 to complete the target duplicate frame detection. The duplicate frame count values of other cmnds remain unchanged because the values at the initiator end and the target end are the same.
[0105] In the embodiment of the present invention, when all links between two nodes are disconnected, that is, the nodes are out of contact, all elements in the initiator_duplicated_ids table corresponding to the node id as the row at the initiator end are reset to 0. After the nodes are successfully reconnected, the relevant duplicate frame count values start completely from 0.
[0106] In the embodiment of the present invention, the process of the initiator in the CL layer initiating an I / O application is as follows:
[0107] Retrieve an idle cmnd from the cmnd resource pool, obtain the duplicate frame count value of the cmnd from the initiator_duplicated_ids, assign it to the corresponding field of the cmnd, and send it to the other node. The duplicate frame count value of the cmnd in the initiator_duplicated_ids array is incremented for the next use.
[0108] In the embodiment of the present invention, the process of the CL layer target receiving an I / O application is as follows:
[0109] Obtain the duplicate frame count value of the cid from the target_duplicated_ids array, compare it with the duplicate frame count value in the corresponding field of the received cmnd. If they are equal (if the duplicate frame count value of the I / O application cmnd is 0, it is also considered a successful match, and the value in the target_dpulicate_ids array is reset to 0), the I / O process continues. The value in the target_dpulicate_ids array is incremented to keep in sync with the initiator end. If the match fails, the target actively aborts the I / O, marks the feedback result as abort, and issues a duplicate frame warning to the UI interface.
[0110] In an embodiment of the present invention, when the UI interface issues a repeated frame warning, it further includes:
[0111] The warning information indicates the specific physical link wwpn value, assisting in locating the physical device and guiding subsequent troubleshooting and maintenance work.
[0112] In an embodiment of the present invention, when the initiator receives the feedback result, if it has an abort flag, the count value of the repeated frames of this cmnd under initiator_duplicated_ids is reset to 0. When called next time, the value 0 is taken.
[0113] Other abnormal situations include:
[0114] The public interface platform returns a failed result, that is, when the initiator issues an IO request, after being processed by the underlying layer, the peer responds, but a failed feedback is obtained, then the count value of the repeated frames of this cmnd is reset to 0;
[0115] The received data is incomplete and there is a frame loss situation, that is, the size of the received data is inconsistent with the size of the data sent by the target, then the count value of the repeated frames of this cmnd is reset to 0;
[0116] When being blocked by the SAN network during the underlying processing and unable to be sent normally, that is, when this cmnd leaves the CL layer and reaches the public interface platform layer and the driver layer, but due to physical reasons, this IO is not further issued and is directly fed back to the CL layer, then the count value of the repeated frames of this cmnd is decreased by one, indicating that this IO is invalid, and the next time this cmnd is called, it is transmitted with the previous value;
[0117] Other status value errors, that is, when the peer target or the underlying driver assigns a value to cmnd status, indicating an abnormal situation, then the count value of the repeated frames of this cmnd is reset to 0.
[0118] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present invention can include at least one of non-volatile and volatile memories.
[0119] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0120] The above are exemplary embodiments disclosed by the present invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any specific order. In addition, although the elements disclosed by the embodiments of the present invention may be described or claimed in an individual form, they can also be understood as plural unless explicitly limited to the singular form.
[0121] It should be understood that, as used herein, unless the context clearly supports exceptions, the singular form "a" is also intended to include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations of one or more of the related listed items. The serial numbers of the above-disclosed embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0122] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the embodiments disclosed by the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features between the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.
Claims
1. A method for controlling duplicate frames in cluster communication in a storage system, characterized in that, The method includes: initializing global two-dimensional arrays initiator_duplicated_ids and target_duplicated_ids with the generated node id as the row and the cmnd cid as the column to record the duplicate frame ids of each cmnd; Among them, a dual-link or multi-link redundancy connection is maintained between nodes; An IO request is initiated at the CL layer initiator end, the CL layer target end receives the IO request, and the target end returns the feedback result to the initiator end; Among them, the target end makes a duplicate frame judgment on the empty IO request; If the duplicate frame judgment fails, the IO process is aborted, the UI gives an alarm, and feedback is sent to the initiator to reset it to 0; If there are other abnormal situations, there are also operations of resetting to 0 or backing up one step to ensure that subsequent IOs can proceed normally; The CL layer target receives the IO request, and the specific process is as follows: Obtain the duplicate frame count value of this cid in the target_duplicated_ids array, compare it with the duplicate frame count value of the corresponding field of the received cmnd. If they are equal, the IO process continues; the value in the target_dpulicate_ids array is incremented to keep in sync with the initiator end; If the match fails, the target actively aborts this IO, marks the feedback result as abort, and issues a duplicate frame alarm to the UI interface; Among them, the other abnormal situations include the failure of the common interface platform feedback, the abnormality of data transmission integrity, the physical transmission blockage abnormality, and the status value abnormality.
2. The method for controlling duplicate frames in cluster communication in the storage system according to claim 1, wherein There are credit_max numbers of concurrent IOs on each link; the specific form of each IO is reflected by the protocol command cmnd structure body. Each cmnd is allocated from the cmnd resource pool, and each cmnd has a unique cid.
3. The method for controlling duplicate frames in cluster communication in the storage system according to claim 2, wherein, When a link is unexpectedly disconnected, traverse all the unacknowledged cmnds sent by the initiator end of this link, and reset the corresponding duplicate frame count value in the initiator_duplicated_ids table to 0.
4. The method for controlling duplicate frames in cluster communication in the storage system according to claim 2, characterized in that, When all links between two nodes are disconnected, that is, the nodes are out of contact, then all elements corresponding to the node id as the row in the initiator_duplicated_ids table at the initiator end are reset to 0; after the nodes are successfully reconnected, the relevant duplicate frame count values start completely from 0.
5. The method for controlling duplicate frames in cluster communication in the storage system according to claim 1, wherein The process of initiating an IO request at the CL layer initiator is as follows: Retrieve an idle cmnd from the cmnd resource pool, obtain the duplicate frame count value of this cmnd from the initiator_duplicated_ids, assign it to the corresponding field of the cmnd, and send it to the other node.
6. The method for controlling duplicate frames in cluster communication in the storage system according to claim 1, wherein, The UI interface issues a duplicate frame alarm, and it also includes: The alarm information indicates the specific physical link wwpn value to assist in locating the physical device and guiding subsequent troubleshooting and maintenance work.
7. The duplicate frame control method for cluster communication in the storage system according to claim 1, characterized in that The initiator receives the feedback result. If it has an abort flag, the count value of the duplicate frame of the cmnd under initiator_duplicated_ids is reset to 0; when called next time, the value 0 is taken.
8. A computer device, comprising a memory and a processor, where the memory stores a computer program, and when the processor loads and executes the computer program, the steps of the duplicate frame control method for cluster communication in the storage system according to any one of claims 1-7 are implemented.
9. A storage medium stores a computer program, and when the computer program is loaded and executed by a processor, the steps of the duplicate frame control method for cluster communication in the storage system according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Receiving frames at redundant port connecting node to communications network
CN109314655A
Method and device for improving communication performance of storage system and medium
CN114328317A