Transmission link fault detection method for multi-stage cascade scene and program product

By obtaining the real-time link information and command sending and receiving of the multi-stage cascade extender and executing the fault detection program, the problem of insufficient transmission link failure detection in the multi-stage cascade scenario is solved, and accurate positioning and alarming of the cause and location of the fault is achieved.

CN119902939AActive Publication Date: 2025-04-29INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510381447.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-29
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The prior art lacks detection of transmission link faults in multi-stage cascade scenarios, which is prone to false alarms as receiving terminal failures, and it is difficult to accurately detect the cause and location of the fault.

Method used

By obtaining the real-time link information of the multi-stage cascade extender and the command sending and receiving status of the target port in the target device, the corresponding fault detection program is executed to determine the fault detection result of the transmission link.

Benefits of technology

Accurate fault detection of multi-stage cascade extenders and transmission links is realized, which avoids false alarms on hard disks and improves fault positioning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902939A_ABST
    Figure CN119902939A_ABST
Patent Text Reader

Abstract

The invention discloses a transmission link fault detection method for a multi-stage cascade scene and a program product, and relates to the technical field of fault detection. Acquiring real-time link information of a multi-stage cascade expander in the target equipment and an instruction receiving and transmitting condition of at least one target port; when it is detected that the real-time link information is abnormal, executing a corresponding first link fault detection program to determine a first fault detection result; when it is detected that the instruction receiving and sending condition fails, the failure type of the instruction receiving and sending condition is detected, and the second link fault detection program corresponding to the failure type is executed to determine the second fault detection result, so that the technical problem that whether a transmission link fault or a hard disk fault cannot be detected is solved; the technical effects that the fault device or the fault link or the hard disk fault on the transmitting and receiving instruction transmission path is accurately positioned and alarmed, false alarms on the hard disk are avoided, and the fault positioning efficiency is improved are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of fault detection technology, and in particular to a transmission link fault detection method and program product in a multi-stage cascade scenario. Background Art

[0002] In related technologies, with the rapid development of electronic devices, in order to meet the needs of electronic device capacity and performance, multiple key electronic devices will be connected in a multi-level cascade manner, which will form a very complex topology, causing the proportion of transmission link failures to gradually increase. When electronic devices fail to send or receive instructions or time out when processing multi-threaded tasks, the cause of the failure is no longer just the failure of the execution terminal. For example, when the IO from the host to the hard disk fails or times out, in addition to the hard disk failure, it may also be a transmission link failure.

[0003] However, in the related art, fault detection of electronic devices with multi-level cascade scenarios still focuses on the receiving terminal, ignoring the transmission link failure in the multi-level cascade scenario, and is easily misreported as a receiving terminal (such as a hard disk) failure. There is a lack of accurate detection of transmission link failures and specific fault causes and fault locations, which makes it difficult to adapt to the fault detection needs of electronic devices in multi-level cascade scenarios and needs to be urgently resolved. Summary of the invention

[0004] The present invention provides a transmission link fault detection method and program product for a multi-stage cascade scenario, so as to at least solve the problems in the related art that fault detection of electronic devices with multi-stage cascade scenarios still focuses on receiving terminals, ignores transmission link faults in multi-stage cascade scenarios, is easily misreported as receiving terminal faults, lacks accurate detection of specific fault causes or fault locations in transmission link faults, and is difficult to adapt to fault detection needs of electronic devices in multi-stage cascade scenarios.

[0005] The present invention provides a transmission link fault detection method for a multi-stage cascade scenario, comprising: in the case where a transmission link fault detection mechanism exists in a target device, obtaining real-time link information of a multi-stage cascade expander in the target device and the instruction receiving and sending status of at least one target port; when an abnormality is detected in the real-time link information, executing a corresponding first link fault detection program to determine a first fault detection result of the multi-stage cascade port and / or the transmission link of the multi-stage cascade expander; when a failure is detected in the instruction receiving and sending status, detecting the failure type of the instruction receiving and sending status, and executing a second link fault detection program corresponding to the failure type to determine a second fault detection result of the target device.

[0006] The present invention also provides a computer program product, comprising: an acquisition module, used to acquire real-time link information of a multi-stage cascade expander in the target device and the instruction sending and receiving status of at least one target port when a transmission link fault detection mechanism exists in the target device; a first detection module, used to execute a corresponding first link fault detection program when an abnormality is detected in the real-time link information, so as to determine a first fault detection result of the multi-stage cascade port and / or transmission link of the multi-stage cascade expander; and a second detection module, used to detect the failure type of the instruction sending and receiving status when a failure is detected in the instruction sending and receiving status, and execute a second link fault detection program corresponding to the failure type to determine a second fault detection result of the target device.

[0007] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned transmission link failure detection methods for the multi-stage cascade scenario when executing the computer program.

[0008] The present invention also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the transmission link failure detection method for any of the above-mentioned multi-stage cascade scenarios are implemented.

[0009] Through the present invention, when a transmission link fault detection mechanism exists in the target device, the real-time link information of the multi-stage cascade expander in the target device and the instruction receiving and sending status of at least one target port can be obtained, and then when an abnormality exists in the real-time link information, a corresponding first link fault detection program is executed to accurately detect whether a fault occurs in the multi-stage cascade port and / or the transmission link of the multi-stage cascade expander; when a failure in the instruction receiving and sending status is detected, a corresponding second link fault detection program is executed according to the failure type of the instruction receiving and sending status, so as to accurately judge the second fault detection result of the target device. Therefore, the problem in the related technology that fault detection of electronic devices with multi-stage cascade scenarios still focuses on the receiving terminal, ignores the transmission link fault in the multi-stage cascade scenario, is easily misreported as a receiving terminal fault, lacks accurate detection of the specific fault cause or fault location in the transmission link fault, and is difficult to adapt to the fault detection needs of electronic devices in the multi-stage cascade scenario can be solved. The technical effect of comprehensively determining the fault object and fault type when the real-time link information of the multi-stage cascade expander is abnormal and the sending and receiving instructions fail, accurately locating the faulty transmission node or faulty transmission link where the real-time link information is abnormal, and accurately locating the faulty device or faulty link or hard disk failure on the sending and receiving instruction transmission path when the sending and receiving instructions fail, avoiding false alarms of the hard disk and improving the technical effect of fault location efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0011] Figure 1 A flow chart of a transmission link failure detection method for a multi-stage cascade scenario provided by an embodiment of the present invention; Figure 2 A schematic diagram of a link from a CPU to a hard disk according to an embodiment of the present invention; Figure 3 A schematic diagram of two access paths of a SAS hard disk according to an embodiment of the present invention; Figure 4 A schematic diagram of a SAS protocol layered framework according to an embodiment of the present invention; Figure 5 A schematic diagram of link abnormality query according to an embodiment of the present invention; Figure 6 This is a flow chart of transmission link failure detection of dual-control hosts in a multi-stage cascade scenario according to an embodiment of the present invention; Figure 7 A schematic diagram of a fault alarm according to an embodiment of the present invention; Figure 8 A block diagram of a computer program product provided according to an embodiment of the present invention; Reference numerals: Among them, 10-computer program product; 100-acquisition module, 200-first detection module, 300-second detection module. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0013] It should be noted that, in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0014] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0015] An embodiment of the present invention provides a transmission link failure detection method for a multi-stage cascade scenario. The method is described in detail in conjunction with the execution flow of the transmission link failure detection method for the multi-stage cascade scenario.

[0016] Specifically, Figure 1 The present invention is a flowchart of a method for detecting a transmission link failure in a multi-stage cascade scenario according to an embodiment of the present invention.

[0017] like Figure 1 As shown, the transmission link failure detection method in the multi-stage cascade scenario includes the following steps: In step S101, when the target device has a transmission link failure detection mechanism, real-time link information of multi-stage cascade expanders in the target device and instruction receiving and sending status of at least one target port are obtained.

[0018] It can be understood that the target device here refers to an electronic device with multi-stage cascade components that requires transmission link fault detection, for example, a terminal device (such as a computer), a system device, etc.; the transmission link fault detection mechanism here can be understood as a detection mechanism pre-established in the target device of the present invention for detecting whether the target device has a transmission link abnormality when multiple devices are abnormal.

[0019] Also, the link here can be understood as the path between the multi-stage cascade components in the target device, and between the multi-stage cascade components and various interfaces; at least one target port here can be understood as at least one target port in the interface established by the instruction transceiver terminal.

[0020] For example, in a computer with a SAS (Serial Attached SCSI, Small Computer System Interface, a common interface for computer storage) hard drive installed, a storage system is often designed to reliably and quickly process the massive data transmitted between the server and the hard drive. The interface of the storage system includes but is not limited to an external PCIE interface for the CPU to process business data, a common SAS interface for hard drives, and so on. During computer operation, the PCIE interface needs to be converted to a SAS interface and connected to each hard drive by a SAS expander. In order to provide high reliability, each SAS hard drive will support dual ports. At this time, there will be two paths from the CPU to the hard drive, which can be called links, such as Figure 2 As shown, Figure 2This is a schematic diagram of a link from a CPU to a hard disk (disk) according to an embodiment of the present invention.

[0021] In some embodiments, in order to meet the needs of larger capacity and higher performance, the target device may install multiple multi-stage cascade components to meet various processing requirements.

[0022] For example, a computer with a SAS hard drive installed can expand the number of hard drives by cascading more levels of Expanders. Figure 3 FIG. 2 is a schematic diagram of two access paths of a SAS hard disk according to an embodiment of the present invention. Figure 3 As shown, taking the 3-level Expander as an example, the host's access path to the hard disk can be, but is not limited to, expressed as: (1) Expander acts as an intermediate node between the host and the hard disk, connecting different devices through SAS connectors and cables; (2) Expander and Disk are numbered respectively. When the host wants to access Disk-1, it needs to go through Expander1. When it wants to access Disk-2, it needs to go through Expander1 and Expander2. (3) If 10 levels of Expanders are cascaded, the host needs to access the hard disk expanded by Expander10. The link to be passed includes the cables of 10 Expanders and devices, including Expander1 to Expander10.

[0023] In the process of command interaction in a multi-level scenario, after passing through multiple levels of Expander nodes, the failure of any intermediate transmission node (such as Expander1, Disk-1, etc.) may cause IO (InputOut) transmission failure, such as: abnormal transmission signal, a single physical link failure between the Expander and the hard disk leading to a single disk IO failure, and a link failure between Expanders leading to IO failure of multiple hard disks in the subsequent stage.

[0024] As a possible implementation method, in order to detect whether the target device has a network terminal failure or a hard disk failure, or a switch, router, Expander, Disk-X failure involved in the middle, or a transmission link failure between these components, when these abnormalities occur in the target device, an embodiment of the present invention can first obtain the real-time link information of the multi-stage cascade expander in the target device and the instruction reception and sending status of at least one target port.

[0025] The target device needs to be set with the transmission fault detection mechanism in the embodiment of the present invention. The multi-stage cascade expander can be understood as a multi-stage switch, a router in a network system or an Expander, Disk-X, etc. in a computer, and at least one target port can be understood as an interface of a transmission terminal, for example, two interfaces of a SAS hard disk.

[0026] The embodiments of the present invention can obtain this information as data support, which is convenient for detecting actual faults of the target device using the transmission link fault detection mechanism, and helps to accurately locate the information and fault problems of multi-stage cascade expanders and links.

[0027] Optionally, in one embodiment of the present invention, before obtaining the real-time link information of the multi-stage cascade expander in the target device and the instruction reception and sending status of at least one target port, it also includes: collecting software error codes and firmware error codes in the historical transmission link failures of the target device; combining the software error code, firmware error code, preset extension instruction and corresponding parsing strategy and the management module of the target device to establish a transmission link failure detection mechanism.

[0028] Based on the relevant descriptions of other embodiments, it can be understood that the present invention will obtain the real-time link information of the multi-stage cascade expander in the target device and the instruction sending and receiving status of at least one target port when the target device has a transmission link failure detection mechanism. Among them, the transmission link failure detection mechanism can be pre-established in the target device by the present invention, that is, the target device needs to have the transmission link failure detection mechanism to implement the transmission link failure detection method of the present invention.

[0029] In some embodiments, the present invention can consider the software error codes and hardware error codes in various historical transmission link failures and use this information as information support for the transmission link failure detection mechanism. Among them, the software error code and the hardware error code can be understood here as abnormal information that can locate the device failure as a transmission link failure in the software implementation part and the hardware (firmware) implementation part of the target device.

[0030] For example, in the host SAS (SAS3.0, SAS4.0) card, the SAS protocol standard divides the layers into the physical layer (Physical Layer), link layer (Link Layer), port layer (Port Layer), transport layer (Transport Layer) and application layer (Application Layer).

[0031] The software implementation part of each layer under the state machine (a mathematical model used to describe the state transition of an object under different conditions and the corresponding behavior) can locate the abnormal information of the transmission link failure, including but not limited to: (1) Transmission-related exception logs recorded in the driver log, such as errors in the SAS card itself and errors in receiving IO; (2) Exceptions recognized by the transport layer, such as: invalid XFER_RDY (transmission ready signal or status), invalid ResponseFrame (invalid ResponseFrame means that the received response frame does not conform to the expected format, content or protocol requirements and cannot be correctly parsed or recognized), invalid DataFrame, and frame loss due to hard disk or Expander errors (invalid DataFrame means that there is a problem with the data frame and it cannot be correctly processed or used); (4) Anomalies identified by the port layer, such as loss of connection between the Initiator and the Target; (4) Exceptions identified by the link layer, such as: frame errors, connection establishment errors, and ACK (Acknowledgement Signal) signal timeouts; (5) Anomalies identified by the physical layer: e.g., invalid Dword (4-byte data unit), polarity error; Some of these error types are SAS standard protocols, and some are dependent on manufacturer implementation. The embodiments of the present invention can add these error codes to the transmission link fault detection mechanism, which can be used to trigger the trigger conditions for the transmission link fault detection of each Expander or hard disk.

[0032] Furthermore, on the Expander, the firmware implementation can locate the abnormal information of the transmission link error, including but not limited to: (1) Error records encountered when the state machines at each layer of IO transmission are running in the firmware; (2) Exception records related to the Expander processor, such as abnormal firmware operation and abnormal restart; (3) The link-related status register values ​​fed back during the Expander hardware mechanism processing, such as: whether the PHY (physicial, physical layer interface, the channel for physical data transmission) is Ready (ready), whether it is disabled (whether it is set to a disabled working state), whether it is connected, on-off count, link on-off CRC (Cyclic Redundancy Check) error, polarity value, and routing table loss; (4) Expander responds to the interactive information of the chassis management module, such as: chip temperature exceeds the threshold, records abnormal restart, and records the kick, port, and restart instructions issued by the chassis management module; The SAS standard protocol defines CRC errors, rates, etc., most of which rely on the processor signal mechanism. Since some target devices, such as computers with SAS3.0 Expander installed, do not support accurate positioning of signal fault types, the embodiment of the present invention can add this information to the transmission link fault detection mechanism to provide detailed information to the chassis management module as much as possible. The chassis management module can clearly locate which device is faulty by combining this information and provide feasible troubleshooting steps.

[0033] In addition, there are various layers of mechanisms between the computer's host main program and the SAS Controller (Serial Attached SCSI Controller) firmware to complete the interaction with the Expander and the hard disk: such as sending SSP instructions (Serial SCSI Protocol instructions, a communication protocol instruction set based on serial SCSI technology) to the hard disk to implement the sending and receiving of IO instructions for all hard disks; sending SES instructions (SCSI Enclosure Services instructions, a set of commands in the SCSI protocol used to communicate with the chassis management module) to the Expander for chassis management functions, detecting the hard disk status, device temperature and voltage, etc., and reporting alarms; sending SMP instructions (SCSI Management Protocol instructions, a management protocol in the SCSI protocol) to the Expander to identify topology information, PHY rate, PHY CRC count, etc.

[0034] Therefore, the embodiment of the present invention can also add preset extension instructions to the SMP instructions for the host to interact with the Expander. The preset extension instructions here can be understood as certain instructions for the above error information detection added on the basis of the original SMP query instructions of the computer, so as to realize the host querying the Expander for the most detailed link fault information based on the existing SMP instruction transmission channel and instruction code.

[0035] Moreover, the embodiment of the present invention also takes into account that the host main program in the computer is equipped with a chassis management module and an IO transceiver module, so the embodiment of the present invention can also combine the parsing strategy corresponding to certain extended instructions and the management module of the target device to determine the transmission link fault detection mechanism in the embodiment of the present invention.

[0036] It should be noted that the example in the embodiment of the present invention uses the management instructions of SAS3.0 to manage Expander, which belongs to the category of extended chassis management; for models such as storage and servers that use BMC chips to manage chassis status, BMC can also be used to detect the information of each device. That is, "adding SMP instructions to query link information" is changed to "adding instructions for BMC and Expander to interact and query link information".

[0037] Among them, the function of the IO transceiver module is: when each SAS disk has two independent SAS ports, that is, when there are two IO paths, the host can select one of the IO paths to send IO instructions to the hard disk; when the IO path fails to send or receive instructions, another IO path can be selected to continue sending and receiving instructions; and when the link is connected or disconnected, the SMP instruction is sent to quickly identify the connection and disconnection of the Expander link.

[0038] In addition, the role of the chassis management module (the chassis management modules of the dual-control host are integrated into a whole through the data synchronization module) is to query the device status information, such as the link connection and disconnection information of the Expander, temperature information, and the connection and disconnection information of the PHY link (including the physical PHY ports between Expanders and between Expanders and hard disks); and issue control instructions as needed, such as: kicking the disk, kicking the wide port, triggering Expander reset; and, based on the status of the dual controls, comprehensively determine whether to include a certain alarm; for example: when the temperature of a temperature sensor on the device exceeds the monitoring threshold, an over-temperature alarm is reported; when an IO failure of a hard disk is received from the IO transceiver module, the failure of the hard disk is reported, etc.

[0039] The embodiments of the present invention can, based on the above, add a channel for parsing the SMP instruction code and reporting to the chassis management module on the host side; add a channel for receiving SMP instructions, parsing, and identifying link error information in the chassis management module; add an alarm channel for intermediate devices (SAS cards, a certain level of Expander) on the IO path; and identify which device is at fault and trigger an alarm in combination with the functional operation of the chassis management.

[0040] The embodiment of the present invention can add abnormal information that can be located as transmission link failure (error) in various situations into the transmission link fault detection mechanism, and provide detailed information to the chassis management module as much as possible, so that the chassis management can clearly locate which component is faulty in combination with this information, and provide feasible troubleshooting steps. In order to implement the fault detection process more reliably and efficiently, the present invention also adds certain SMP extension instructions, corresponding parsing strategies and management modules of the target device, which can realize more detection functions and management operations.

[0041] Optionally, in one embodiment of the present invention, before obtaining the real-time link information of the multi-stage cascade expander in the target device and the instruction reception and sending status of at least one target port, it also includes: traversing the routing table pre-established by the multi-stage cascade expander and determining the topological structure corresponding to the routing table; obtaining the real-time link information according to the topological structure.

[0042] In some embodiments, there are a huge number of multi-stage cascade expanders in the target device, and there are also many components connected to the multi-stage cascade expanders. In order to facilitate the acquisition of real-time link information of the multi-stage cascade expanders in the target device and realize the subsequent fault location process, the present invention can traverse the pre-established routing table of the multi-stage cascade expander before acquiring the real-time link information of the multi-stage cascade expander in the target device and the instruction sending and receiving status of at least one target port, and establish a topological structure corresponding to the routing table, and respectively determine the fault rules for the narrow link connected to the hard disk and the wide port connected to the cable, so as to obtain the real-time link information and perform the subsequent detection process according to the topological structure.

[0043] For example, after the target device such as a computer is powered on, the embodiment of the present invention can initialize it. First, the Expander is started and a routing table is established. Then the host is started, and the routing table of the SMP of each level of Expander is traversed, and the complete topology structure is sorted out and reported to the chassis management module. At the same time, the host registers certain SMP extension instructions and waits for the triggering opportunity.

[0044] It should be noted that since the SAS hard disk has two links, a complete SAS topology contains at least two controller hosts and two IO paths; the host's transceiver module and chassis management module must integrate these two paths.

[0045] The embodiment of the present invention can establish a topological structure corresponding to the routing table pre-established by the multi-stage cascade expander, and utilize the characteristics that the topological structure includes the complex link relationship between the multi-stage cascade expander and other multiple components in the target device to obtain the real-time link information of the multi-stage cascade expander in the target device, which can ensure that the acquired information can cover all real-time link information, thereby ensuring the accuracy of the positioning result.

[0046] Step S102: when it is detected that the real-time link information is abnormal, a corresponding first link fault detection program is executed to determine a first fault detection result of the multi-stage cascade ports and / or transmission links of the multi-stage cascade expander.

[0047] In some embodiments, after acquiring the real-time link information of the multi-stage cascade expander of the target device, the present invention can execute the corresponding first link fault detection program when detecting that the real-time link information is abnormal.

[0048] Here, executing the corresponding first link fault detection program can be understood as executing different first link fault detection programs when the abnormal conditions existing in the detected real-time link information are different.

[0049] For example, in a computer with a SAS hard drive installed, multiple hard drives are connected through a multi-stage cascade expander. When a fault occurs during the process of reading hard drive information, an abnormality may be reported in a certain expander, an abnormality may be reported in a device linked to a certain expander, an abnormality may be reported in the link between a certain expander and an expander, an abnormality may be reported in the link between the expander and the hard drive, etc. At this time, some detection programs in the first link fault detection program corresponding to these abnormal information may be executed.

[0050] However, the link fault detection programs corresponding to these abnormal information may not be applicable to various other faults that may be encountered during the transmission of instructions. Therefore, the embodiment of the present invention can execute other link fault detection programs in the corresponding first link fault detection program when other faults occur.

[0051] The embodiment of the present invention can execute the corresponding first link fault detection program when it is detected that the real-time link information of the multi-stage cascade expander of the target device is abnormal, so as to avoid directly judging that it is a fixed type of transmission link failure when an error occurs, and instead perform different first link fault detection programs according to the actual situation, which can effectively improve the accuracy of the link fault detection result.

[0052] Optionally, in one embodiment of the present invention, before executing the corresponding first link fault detection program, it also includes: detecting the state change report information of the multi-stage cascade expander and the sending time of the state change report information; judging whether there is an abnormality in the real-time link information according to the state change report information and the sending time; if the state change report information meets the preset abnormal condition and / or the sending time is inconsistent with the preset sending time, it is determined that there is an abnormality in the real-time link information, otherwise, it is determined that there is no abnormality in the real-time link information.

[0053] Based on the relevant descriptions of other embodiments, it can be understood that when the real-time link information of the multi-stage cascade expander is abnormal, the present invention can execute the corresponding first link fault detection procedure, that is, it is necessary to determine whether the real-time link information of the multi-stage cascade expander is abnormal before performing fault detection.

[0054] In some embodiments, when determining whether there is an abnormality in the real-time link information of the multi-stage cascade expander, the embodiments of the present invention may, but are not limited to, determine it based on the state change report information fed back by the multi-stage cascade expander and the sending time of the state change report information.

[0055] Among them, when the status change report information meets the preset abnormal condition or the sending time of the status change report information is inconsistent with the expected sending time, or the status change report information meets the preset abnormal condition and the sending time is also inconsistent, the embodiment of the present invention can determine that there is an abnormality in the real-time link information and can execute the corresponding first link fault detection procedure.

[0056] The preset abnormal condition here can be understood as the state change report information fed back by the multi-stage cascade expander being abnormal information, that is, the state change report information fed back when an abnormal change (failure) occurs in the multi-stage cascade expander or the devices, links, etc. connected thereto. The preset sending time here can be understood as the time when the multi-stage cascade expander feeds back the state change report information in the periodic routine test, for example, the state change report information is fed back on time at zero minutes every hour, etc.

[0057] It should be noted that multi-stage cascade expanders may involve many faults, and the configuration of each device is different. Therefore, the preset abnormal conditions and preset sending time can be set or adjusted by professional and technical personnel in this field according to actual conditions. The embodiments of the present invention are only illustrative and not specifically limited.

[0058] For example, in a storage system, when certain states or configurations related to a multi-stage cascade expander undergo abnormal changes, such as link negotiation failure, the Expander notifies the host and other related devices of this situation by broadcasting, thereby determining that there is an abnormality in the real-time link information.

[0059] It should also be noted that a multi-stage cascade expander may involve many faults, so professional and technical personnel in this technical field can also add or delete criteria for determining real-time link information abnormalities according to actual needs.

[0060] The embodiment of the present invention can determine whether an abnormality has occurred in the real-time link information based on the status change report information of the multi-stage cascade expander and the sending time of the status change report information, thereby combining the added software error code and hardware error code to achieve more extensive and accurate fault detection of the target device.

[0061] Optionally, in one embodiment of the present invention, when an abnormality is detected in the real-time link information, a corresponding first link fault detection procedure is executed, including: when the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time, a first link fault query procedure is executed; when the real-time link information has other abnormal conditions except that the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time, a first link error query process is executed.

[0062] Based on the relevant descriptions of other embodiments, it can be understood that when the present invention detects that there is an abnormality in the real-time link information, it does not directly execute a certain fixed transmission link fault detection, but executes the corresponding first link fault detection program according to the abnormal situation.

[0063] In the actual implementation process, the present invention will execute the first link fault query program when the state change report information of the real-time link information is abnormal state change report information and / or the sending time is inconsistent with a certain sending time. When the real-time link information has other abnormal conditions besides these abnormal conditions, For example, when the host receives the BroadcastChange broadcast event (a message transmission mechanism, when a component or object in the system undergoes a specific state change or event, it will send a broadcast message to notify other components or objects interested in the event) of the Expander, such as the plugging and unplugging of the hard disk, the plugging and unplugging of the SAS cable, the power on and off of the Expander or the hard disk, or the link negotiation failure and reconnection caused by the SAS signal failure, the present invention can execute the corresponding first link fault query process. For example, traverse each Expander to identify which link has a connection change.

[0064] Alternatively, when the host does not receive the BroadcastChange broadcast event of the Expander for a long time and performs periodic testing, that is, the sending time of the state change report information is inconsistent with a certain sending time (delay occurs), the embodiment of the present invention can also execute the corresponding first link fault query process.

[0065] When the real-time link information is abnormal and still cannot be restored after the abnormal handling strategies of each layer (such as command retry, reset operation of the expander), the embodiment of the present invention can execute the corresponding first link error query process, such as checking whether the SAS card driver has a fault record, and if there is a fault, reporting the SAS card fault to the chassis management module.

[0066] The embodiments of the present invention can respectively execute the corresponding first link fault query process or the first link error query process, etc. when there are different abnormal situations in the real-time link information, so as to ensure that the query process is targeted at the current event, avoid confusing the cause of the fault when the problems are similar, and effectively improve the accuracy of the detection results.

[0067] Step S103, when it is detected that there is a failure in the instruction receiving and sending situation, the failure type of the instruction receiving and sending situation is detected, and a second link failure detection program corresponding to the failure type is executed to determine a second failure detection result of the target device.

[0068] It is understood by professionals in this technical field that the target device can process tasks in multiple threads when there are multi-level cascade expanders, and the task processing process requires the main control end to send certain execution instructions (control instructions) to the main execution end, and the corresponding main execution end will also respond after receiving and executing the instructions. In this process, the sending and receiving of instructions is extremely important. When the sending and receiving of instructions in the multi-level cascade scenario fails, it is extremely important to detect the transmission link failure.

[0069] As a possible implementation method, considering that the state change report information of the multi-stage cascade expander may spontaneously report an abnormality when an abnormality occurs, the embodiment of the present invention can detect the failure type of the instruction sending and receiving situation when a failure in the instruction sending and receiving situation is detected, that is, detect whether the failure of the instruction sending and receiving is caused by an existing abnormality.

[0070] Then, the embodiment of the present invention can execute the corresponding second link fault detection program according to the failure type of the sending and receiving instructions. It no longer simply determines it as an error of the receiving terminal, but performs certain fault detection on both the transmission link and the receiving terminal, and then determines the second fault detection result of the target device.

[0071] For example, in a computer with a SAS hard drive installed, the SAS protocol is layered (physical layer, link layer, port layer, transport layer, and application layer), and the adjacent layers are passed up and down, and each layer has an independent state machine and error handling mechanism.

[0072] Figure 4 FIG. 1 is a schematic diagram of a SAS protocol layered framework according to an embodiment of the present invention. Figure 4 As shown in the figure, from the perspective of the upper-layer application, only the dotted part is passed, but in fact it passes through each layer of the intermediate device and is a very long path. As long as one node fails during the transmission, the transmission fails. The normal link is the key prerequisite for normal IO transmission. In the IO business, whether it is a single or multiple IO instruction sending and receiving abnormalities, whether it is an IO abnormality for one disk or multiple disks, the link failure must be determined first.

[0073] If the host sends an IO instruction error to the hard disk and the error is not combined with the link status at that moment for comprehensive judgment, and if it is not ruled out whether a link failure has occurred at that moment, or a long timeout caused by a link transmission conflict, it may be mistakenly diagnosed as a hard disk failure.

[0074] Alternatively, when the chassis management module uses the Send / Receive Diagnostic Page to query the device status, it ignores the delay caused by the SCSI command layer and the impact of periodic column testing on IO performance, and cannot obtain status changes in real time. Some scenarios (for example, the hard disk link changes rapidly multiple times within the time interval between two queries) cannot be identified, resulting in incorrect detection results.

[0075] Alternatively, the host's link layer sends SMP queries for some rare fault types. When the driver detects certain transmission faults (transmission timeout, abnormal stop data received), it does not identify which Expander fault is in real time and cannot associate it with the chassis management module, which will also lead to incorrect detection results.

[0076] Most importantly, when the chassis management module receives an IO anomaly, it may simply tend to identify it as a hard disk failure and report a hard disk alarm. Under an increasingly complex topology, link failures become more and more prominent, which can easily cause false hard disk alarms. If the wide port signal between the Expanders fails, most of the disks of the subsequent Expander will be at risk of IO failure, and the alarm will be incorrect. False alarms may trigger subsequent error repair strategies, greatly increasing maintenance costs.

[0077] Based on this, when a failure in command reception and transmission is detected, such as when an abnormality occurs in a certain IO on the host side, the embodiment of the present invention can no longer allow the chassis management module to directly report a hard disk failure alarm, but open a time window to perform the corresponding second link failure detection procedure. For example, by using the SMP instruction that the host side transport layer responds quickly, the most detailed link status information that can be supported and provided by the SAS Expander chip of all nodes on the IO path can be quickly obtained, and it can be accurately determined whether it is a device (SAS card, a certain Expander, a certain SAS cable) on the IO path that is alarming, or a hard disk failure.

[0078] Figure 5 FIG. 1 is a schematic diagram of a link abnormality query according to an embodiment of the present invention. Figure 5As shown: Taking the three-level Expander as an example, the host sends an SMP instruction to first query the information of Expander1, then Expander2, and then Expander3; the chassis management module comprehensively determines whether it is a device problem (Expander1 failure or Expander2 failure or Expander3 failure) or a connection problem (connection problem between the host and Expander1 or connection problem between Expander1 and Expander2 or connection problem between Expander2 and Expander3 or connection between Expander3 and the hard disk, etc.) based on the SMP information; after these checks are found to be normal, the hard disk is suspected to be faulty, and hard disk detection and alarm are performed.

[0079] As a result, accurate device alarms are achieved, false alarms on hard disks are avoided, and fault location efficiency is improved.

[0080] Optionally, in one embodiment of the present invention, when a failure in instruction sending and receiving is detected, the failure type of the instruction sending and receiving is detected, including: detecting whether there is an abnormality in the real-time link information before the failure in the sending and receiving of at least one target port; if there is an abnormality in the real-time link information before the failure in the sending and receiving of at least one target port, the failure type is determined to be a passive type, otherwise, the failure type is determined to be an active type.

[0081] During the actual execution process, the state change report information of the multi-stage cascade expander may spontaneously report an abnormality when an abnormality occurs. Then, when detecting the failure type of instruction sending and receiving failure, the present invention can first detect whether an abnormality in the real-time link information occurred before the instruction sending and receiving failure.

[0082] If there is an abnormality in the real-time link information before the failure of command transmission and reception, it can be deduced that the reason for the failure of command transmission and reception may be due to a failure of the multi-stage cascade expander or the transmission link to which it is linked. At this time, the failure of command transmission and reception is caused passively, and the type of command transmission and reception failure can be determined to be a passive type.

[0083] If there is no abnormality in the real-time link information before the instruction sending and receiving fails, it can be inferred that the reason for the instruction sending and receiving failure may not be due to a failure of the multi-stage cascade expander or the transmission link connected to it, and the type of instruction sending and receiving failure can be determined to be an active type.

[0084] The embodiment of the present invention can detect the failure type of the instruction sending and receiving situation, so as to execute the corresponding targeted second link fault detection program according to the failure type, which can effectively improve the fault detection efficiency and reduce the fault detection time and cost.

[0085] Optionally, in one embodiment of the present invention, when a failure in instruction sending and receiving is detected, the failure type of the instruction sending and receiving is detected, and a second link fault detection procedure corresponding to the failure type is executed, including: when the type is a passive type, executing a second link fault query process to determine a second fault detection result of the target device; when the type is an active type, executing a second link error query process to determine the second fault detection result of the target device.

[0086] In some embodiments, when the type of instruction sending and receiving failure is a passive type, the present invention may execute a second link fault query process, and determine the second fault detection result of the target device at this time according to the result of the second link fault query process.

[0087] When the type of instruction receiving and sending failure is an active type, the present invention can execute a second link error query process, and determine the second fault detection result of the target device at this time according to the result of the second link error query.

[0088] Among them, the difference between the second link fault query process and the second link error query process can be determined in conjunction with the more likely cause of the failure of instruction sending and receiving: the second link fault query process mainly but not limited to querying the links of multi-stage cascade expanders, and the second error query process mainly but not limited to querying the electronic devices involved in the sending and receiving path.

[0089] The embodiment of the present invention can execute the corresponding second link fault query process and second link error query process under different types of transmission and reception failures, and use the cause of the failure type to determine the focus of fault detection, thereby reducing detection time and cost while ensuring the accuracy of the detection results.

[0090] Optionally, in one embodiment of the present invention, when the type is a passive type, a second link fault query process is executed to determine a second fault detection result of the target device, including: when the type is a passive type, traversing multiple levels of cascade ports and their transmission links to determine the on-off changes of the transmission link; based on a pre-established routing table and on-off changes, identifying the on-off link end of the transmission link; and determining the second fault detection result of the target device based on the on-off link end.

[0091] Based on the relevant descriptions of other embodiments, it can be understood that when the type of failure in sending and receiving instructions is a passive type, the present invention will execute a second link fault query process to determine a second fault detection result of the target device.

[0092] In certain embodiments, the present invention executes a second link fault query process to determine the second fault detection result. In this process, it can, but is not limited to, first traverse the multi-stage cascade ports and their transmission links to determine the on-off changes of the transmission links; then based on the routing table and on-off changes pre-established by the multi-stage cascade expander, identify the on-off link end of the transmission link; finally, the second fault detection result of the target device can be determined based on the on-off link end.

[0093] For example, after receiving the BroadcastChange event of link connection and disconnection sent by Expander, the computer fails to respond to the receiving and sending instructions passively. At this time, the second link fault query process can be but is not limited to the following: (1) Traverse each Expander and identify which link has been turned on or off; (2) Combined with the routing table, identify the ownership of the PHY and make a comprehensive judgment: if it is a narrow port connected to the hard disk, it can be reported to the chassis management module immediately; if the port is a wide port of the Expander cascade, query the on / off status of all links corresponding to the port multiple times within the maximum connection event range, and then report it to the chassis management module (the wide port is composed of multiple links. In normal scenarios, due to actions such as plugging, unplugging, kicking ports, and resetting, it is expected that all links will be on / off together. Due to the deviation in the negotiation time of different links, and the fast SMP query command, a certain time window needs to be given for multiple confirmations until all links have changed and stabilized (only then can it reflect whether the wide port is on / off normally).

[0094] (3) After the query is completed, it is reported to the chassis management module of the control host.

[0095] The embodiment of the present invention can obtain the on-off link end by detecting the on-off change of each expander in the multi-stage cascade expander and the links connected to it, and then determine the specific fault interface in combination with the routing table. Therefore, when the type of failure in sending and receiving instructions is a passive type, the multi-stage cascade expander and its links can be targeted and comprehensive fault detection can be performed, and the problem in the entire path of sending and receiving instructions can be quickly and accurately detected, so as to obtain accurate fault detection results and fault location results.

[0096] Optionally, in one embodiment of the present invention, when the type is an active type, a second link error query process is executed to determine a second fault detection result of the target device, including: when the failure type is an active type, sending a query instruction to a multi-stage cascade expander; based on the receiving and sending information of the query instruction, generating a second fault detection result of the target device.

[0097] Based on the relevant descriptions of other embodiments, it can be understood that when the type of instruction sending and receiving failure is an active type, the present invention will execute a second link error query process to determine a second fault detection result of the target device.

[0098] In certain embodiments, the present invention executes a second link error query process to determine a second fault detection result. In this process, it can be but not limited to sending a query instruction to a multi-stage cascade expander to generate a second fault detection result of the target device according to the receiving and sending information of the query instruction.

[0099] For example, the present invention first adds certain SMP extension instructions in the host SAS transceiver module of the computer: instructions for obtaining information of each level of Expander links, and then actively initiates a second link fault query process when a transceiver instruction failure occurs when the multi-level cascade expander does not report abnormal state change report information. The process can be, but is not limited to, as follows: (1) In order from the nearest to the host, check the intermediate devices (SAS card or Expander) involved in the IO path from the host to the hard disk {host application layer, SAS card, Expander1, Expander2, Expander3, hard disk} in turn: First, check whether the SAS card driver has a fault record. If there is a fault, report the SAS card fault to the chassis management module; thereby, check whether the application layer program has an execution error to avoid the cause of the fault being due to software defects that cannot cover certain extreme scenarios; (2) Send an SMP command to Expander1 to query the standard-defined command code and newly added extended command code of each PHY. The specific process can be, but is not limited to, expressed as follows: If no response is received from the Expander, it is initially suspected that the Expander may have lost power, or restarted normally after receiving a restart command from the chassis management, or the firmware may have restarted abnormally. Multiple queries are made within the time period "exceeding the restart time required by the Expander" to determine whether the Expander has restarted (only confirm that it is the Expander restart, as whether it is a normal restart is determined by the chassis management module); ① If an abnormal response is received from an Expander, the Expander is considered abnormal; ② If a normal response is received from the Expander, the link status information is parsed to determine whether a fault has occurred. If a fault has occurred, the connection problem is determined based on the routing table information. ③ If it is detected that the Expander is restarted or continues to be unresponsive, the Expander information (Expander SAS address) and IO object information (hard disk information) are reported to the chassis management module; ④ If a connection abnormality is detected, the objects connected by the link (the interconnected objects include: SAS card and Expander connected by wide ports, the previous Expander and the next Expander connected by wide ports, and the Expander and hard disk connected by narrow ports) and IO object information (hard disk information) are reported to the chassis management module; (3) Perform the previous operation on Expander 2, and so on. If there is no abnormality in each level of Expander, it is suspected that the hard disk is faulty. Further confirmation is made by sending a series of detection instructions to the hard disk. The IO object information (hard disk information) is reported to the chassis management module. After the SMP query is completed, it is reported to the chassis management module of the local control host.

[0100] Therefore, after certain SMP instructions (instructions for obtaining information about each level of Expander links) are added to the host SAS transceiver module in the embodiment of the present invention, when an IO instruction sent to the hard disk is abnormal, the host SAS transceiver module can quickly respond in the form of SMP instructions, quickly obtain all link-related fault information that can be extracted on the SAS Expander chip, and report it to the chassis management module.

[0101] The embodiment of the present invention can generate a second fault detection result of the target device according to the information receiving and sending results of the query instruction sent to the multi-stage cascade expander. Therefore, when the type of failure of the receiving and sending instruction is an active type, it can be detected in turn whether it is an application layer error, whether it is a multi-stage cascade expander problem, whether it is a link problem, and whether it is a link object problem. In this way, the topology and "abnormal location of receiving and sending instructions" are linked together, and a detailed link abnormality query is performed to obtain a second fault detection result of the target device with extremely high accuracy.

[0102] Optionally, in one embodiment of the present invention, when the type is an active type, a second link error query process is executed to determine a second fault detection result of the target device, and also includes: obtaining instruction transmission and reception information of other target ports except at least one target port; generating a second fault detection result of the target device based on the instruction transmission and reception information of other target ports except at least one target port.

[0103] As a possible implementation method, considering that there may be more than one target port in the target device, in some cases there may be a link failure in only one path used to send and receive instructions. In order to more conveniently and accurately detect the cause of the failure of the target device, an embodiment of the present invention can also combine the instruction sending and receiving information of other target ports except at least one target port in the target device to generate a second fault detection result for the target device.

[0104] For example, Figure 6FIG. 1 is a flow chart of a transmission link failure detection of a dual-control host in a multi-stage cascade scenario according to an embodiment of the present invention. Figure 6 As shown: Step S601: The dual-control host is powered on and initialized, that is, the Expander is started and a routing table is established (SAS protocol standard process), and then the host is started, traverses the routing table of the SMP of each level of Expander, organizes the complete topology structure, and reports it to the chassis management module; at the same time, the host registers certain SMP extension instructions and waits for the triggering opportunity; Step S602: All expanders of the dual controllers detect their own link-related information in real time. Both control hosts are ready to send and receive IO instructions to the hard disk at any time and detect the triggering time of "initiating the SMP detection process". Step S603, the two controllers are referred to as controller 1 and controller 2, which correspond to one port and another port respectively, and according to the current service (task) scheduling strategy, the IO path of one of the controller hosts is selected to execute the IO instruction transmission and reception of the hard disk; Step S604, in this embodiment of the present invention, firstly selects 1 controller to execute the sending and receiving of IO instructions to the hard disk; Step S605, determining whether an abnormality occurs in the IO instruction transmission and reception executed by the first controller, and if no abnormality occurs, continuing to use the first controller to execute the IO instruction transmission and reception to the hard disk; Step S606, if an abnormality occurs in the sending and receiving of the IO instruction executed by the 1 controller, the SMP query process of the 1 controller path will be triggered, and the query information will be reported to the chassis management module; Step S607, the chassis management module receives the link information of the 1st controller, switches to the IO path corresponding to the 2nd controller to resend the failed IO, and waits to see whether the link information of the 2nd controller is received; Step S608, the 2nd controller executes the sending and receiving of IO instructions to the hard disk; Step S609, determining whether an abnormality occurs in the IO instruction transmission and reception executed by the second controller. If no abnormality occurs, the second controller is used to continue to transmit and receive IO instructions to the hard disk. At this time, the embodiment of the present invention will not initiate the SMP query process. In actual scenarios, a link failure on a certain IO path is common. Step S610, if the IO instruction sent and received by the 2nd controller is also abnormal, the SMP query process of the 2nd controller path will be triggered. At this time, the embodiment of the present invention will initiate the SMP query process and report the query result to the chassis management module of the controller; Step S611, after receiving the SMP information from the 2nd controller, the chassis management module waits to see whether it has received the link information from the 1st controller; Step S612: The chassis management determines the cause of the IO abnormality based on all link information obtained within the timeout period (only 2 controllers, or 1 controller and 2 controllers): If link information from one controller is received, it is received and parsed, and a certain timeout period (longer than the switching of the IO path and the sending and receiving query events of the other controller path) is started to wait for the other controller to receive the link information; After the scheduled retry, based on all received link information (defined according to the actual fault, it may receive link information from only one controller or from both controllers), combined with the status information queried by the chassis management module itself and the control information whether it has been initiated, it is comprehensively determined whether a fault has actually occurred and how to issue an alarm; Among them, the conditions included in the comprehensive judgment include but are not limited to the following conditions: ① Combined with the routing table, identify the connection attribute of the PHY, whether it is a narrow port connected to the hard disk or a wide port connected by the Expander cascade; ②Whether the link error information is received at the same time as the SMP on / off information; ③ Whether chassis management control instructions have been issued, such as kicking disks, raising ports, issuing control instructions for links, control instructions issued by SMP, etc.; ④ Whether the chassis management status changes, such as changes in the board position status, cable position status, power supply status, etc.; The comprehensive judgment process can be expressed as follows, but is not limited to: ① If it is a narrow port connected to a hard disk, the chassis management module determines whether it is abnormally connected or disconnected based on whether it has issued a kick command; ② If it is a wide port of Expander cascade, in addition to the above information, the chassis management module also needs to check whether all PHYs in the wide port are connected and disconnected together, and comprehensively determine whether there is an abnormal connection or disconnection. Because the wide port is composed of multiple links, in normal control scenarios, all links will be connected and disconnected at the same time. Due to bit errors or abnormal signal quality, some links negotiate to disconnect after sending IO, resulting in IO errors for an indefinite number of random hard disks behind the wide port. It is necessary to identify this scenario, and not report the failure of multiple hard disks at the same time. Such an error alarm will lead to incorrect processing operations, which has a great impact. Step S613, if the Expander access exception is received, the chassis management module combines the management information queried by itself, such as: determining whether to perform plug-in and unplug actions after the board is in place, and whether there is a power-off operation, sending a restart instruction to the Expander, and comprehensively determining the result (whether it is a normal restart or an abnormal restart); If the error information received is about the hard disk link, it includes but is not limited to the following three situations: query the location of the error based on the routing table information, such as the SAS card, the Expander device on the IO path, the wide-port cable link connection between two Expander devices, the link connection from the Expander to the hard disk, the hard disk of the target IO, etc.; if a node between the host and the hard disk fails, report a node failure alarm; if there is no node alarm, determine whether the hard disk fails based on the hard disk failure determination strategy; Step S614: If the transmission link fails, a fault alarm of the device (such as SAS card, Expander, cable) is reported, and reference steps for fault repair are provided; among them, the abnormal access to the Expander can give a corresponding alarm according to the comprehensive judgment result; in the error information of the hard disk link, if the error position is queried according to the routing table information, a corresponding alarm can also be directly given; if a node between the host and the hard disk fails, a node failure alarm is reported; Step S615, if the node has no alarm (no transmission link alarm), determine whether the hard disk fails according to the hard disk fault judgment strategy, report the fault alarm of the target hard disk where IO transmission and reception failed, and provide reference steps for fault repair.

[0105] as well as, Figure 7 FIG. 1 is a schematic diagram of a fault alarm according to an embodiment of the present invention. Figure 7 As shown, after receiving the SMP abnormal information, the embodiment of the present invention can also combine the decision-making fault point (such as Expander device, cable, hard disk), comprehensively determine the fault object and decide how to alarm, and provide users with possible troubleshooting and repair steps: (1) Send a command to Expander to query the information of the device where Expander is located, which is related to the link, such as: Hard disk slot information (in place, connection status, hard disk address); Cable presence signal; Whether the power supply to the hard disk and ExpAnder is normal; Expander operating status and reset reason; (2) According to business needs, send instructions to Expander to send Expander control operations: Kick the hard disk out of the slot; Operations on Expander Phy; Hard disk plugging and unplugging, SAS cable plugging and unplugging; (3) Receive information from the host: IO abnormal events on the host side; Waiting for the link connection and disconnection information and error code information queried by SMP.

[0106] The embodiment of the present invention can wait to receive link information of other target ports while receiving link information of one target port, thereby comprehensively determining the fault object and fault type based on the integrated link information of multiple target ports and the original fault determination rules; and can issue alarms for link-related faults, accurately report the fault object and fault type, and provide possible repair methods, which is extremely practical.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0108] An embodiment of the present invention also provides a computer program product.

[0109] Figure 8 It is a block diagram of a computer program product provided according to an embodiment of the present invention.

[0110] like Figure 8 As shown, the computer program product 10 includes: an acquisition module, a first detection module and a second detection module.

[0111] The acquisition module is used to acquire the real-time link information of the multi-stage cascade expanders in the target device and the instruction receiving and sending status of at least one target port when the target device has a transmission link fault detection mechanism.

[0112] The first detection module is used to execute a corresponding first link fault detection program when detecting that the real-time link information is abnormal, so as to determine a first fault detection result of the multi-stage cascade port and / or the transmission link of the multi-stage cascade expander.

[0113] The second detection module is used to detect the failure type of the instruction sending and receiving situation when a failure is detected in the instruction sending and receiving situation, and execute a second link fault detection program corresponding to the failure type to determine a second fault detection result of the target device.

[0114] Optionally, in one embodiment of the present invention, it further includes: a collection module and a creation module.

[0115] The acquisition module is used to acquire software error codes and firmware error codes in historical transmission link failures of the target device before acquiring real-time link information of the multi-stage cascade expander in the target device and the instruction receiving and sending status of at least one target port; A module is established to establish a transmission link fault detection mechanism by combining software error codes, firmware error codes, preset extension instructions and corresponding parsing strategies and a management module of a target device.

[0116] Optionally, in one embodiment of the present invention, it further includes: a third detection module and a judgment module.

[0117] Wherein, the third detection module is used to detect the state change report information of the multi-stage cascade expander and the sending time of the state change report information before executing the corresponding first link fault detection program; A judgment module, used to judge whether the real-time link information is abnormal according to the status change report information and the sending time; The determination module is used to determine that the real-time link information is abnormal if the state change report information meets the preset abnormal condition and / or the sending time is inconsistent with the preset sending time; otherwise, determine that the real-time link information is not abnormal.

[0118] Optionally, in one embodiment of the present invention, the first detection module includes: a first execution unit and a second execution unit.

[0119] Wherein, the first execution unit is used to execute the first link fault query program when the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time; The second execution unit is used to execute the first link error query process when the real-time link information has other abnormal situations except that the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time.

[0120] The description of the features in the embodiment corresponding to the computer program product 10 can refer to the relevant description of the embodiment corresponding to the transmission link failure detection method in the multi-stage cascade scenario, which will not be repeated here.

[0121] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned transmission link failure detection method embodiments in the multi-stage cascade scenario.

[0122] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any of the above-mentioned transmission link failure detection method embodiments in the multi-stage cascade scenario when running.

[0123] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0124] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned transmission link failure detection method embodiments in the multi-stage cascade scenario are implemented.

[0125] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, implementing the steps in the transmission link failure detection method embodiment of any of the above-mentioned multi-stage cascade scenarios.

[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0127] The above is a detailed introduction to the transmission link fault detection method and program product for a multi-stage cascade scenario provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A transmission link failure detection method for a multi-stage cascade scenario, characterized in that: The following steps are involved: In the case where the target device has a transmission link failure detection mechanism, obtaining real-time link information of a multi-stage cascade expander in the target device and command receiving and sending status of at least one target port; When an abnormality is detected in the real-time link information, executing a corresponding first link fault detection program to determine a first fault detection result of the multi-stage cascade port and / or the transmission link of the multi-stage cascade expander; When a failure in the instruction receiving and sending is detected, the failure type of the instruction receiving and sending is detected, and a second link failure detection program corresponding to the failure type is executed to determine a second failure detection result of the target device.

2. The method according to claim 1, characterized in that Before acquiring the real-time link information of the multi-stage cascade expander in the target device and the instruction sending and receiving status of the at least one target port, the method further includes: Collecting software error codes and firmware error codes in historical transmission link failures of the target device; The transmission link fault detection mechanism is established in combination with the software error code, the firmware error code, the preset extension instruction and the corresponding parsing strategy and the management module of the target device.

3. The method according to claim 1, characterized in that Before executing the corresponding first link failure detection program, the method further includes: Detecting status change report information of the multi-stage cascade expander and the sending time of the status change report information; Determining whether the real-time link information is abnormal according to the state change report information and the sending time; If the state change report information satisfies the preset abnormal condition and / or the sending time is inconsistent with the preset sending time, it is determined that the real-time link information is abnormal; otherwise, it is determined that the real-time link information is not abnormal.

4. The method according to claim 3, characterized in that When the real-time link information is detected to be abnormal, executing the corresponding first link fault detection program includes: When the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time, executing a first link fault query procedure; When the real-time link information has other abnormal situations except that the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time, the first link error query process is executed.

5. The method according to claim 1, characterized in that Before acquiring the real-time link information of the multi-stage cascade expander in the target device and the instruction sending and receiving status of the at least one target port, the method further includes: Traversing the routing table pre-established by the multi-stage cascade expander, and determining the topological structure corresponding to the routing table; The real-time link information is acquired according to the topology structure.

6. The method according to claim 5, characterized in that When detecting that there is a failure in the instruction receiving and sending situation, detecting the failure type of the instruction receiving and sending situation includes: Detecting whether the real-time link information is abnormal before the sending and receiving conditions of the at least one target port fail; If the real-time link information is abnormal before the transmission and reception of the at least one target port fails, the failure type is determined to be a passive type; otherwise, the failure type is determined to be an active type.

7. The method according to claim 6, characterized in that When it is detected that there is a failure in the instruction receiving and sending situation, detecting the failure type of the instruction receiving and sending situation, and executing a second link failure detection program corresponding to the failure type, includes: In the case where the type is the passive type, executing a second link fault query process to determine a second fault detection result of the target device; When the type is the active type, a second link error query process is performed to determine a second fault detection result of the target device.

8. The method according to claim 7, characterized in that When the type is a passive type, executing a second link fault query process to determine a second fault detection result of the target device includes: When the type is the passive type, traversing the multi-stage cascade ports and their transmission links to determine the on-off change of the transmission link; Based on the pre-established routing table and the on-off change, identifying the on-off link end of the transmission link; A second fault detection result of the target device is determined according to the on-off link end.

9. The method according to claim 7, characterized in that: When the type is an active type, executing a second link error query process to determine a second fault detection result of the target device includes: When the type of the failure is the active type, sending a query instruction to the multi-stage cascade expander; Based on the sending and receiving information of the query instruction, a second fault detection result of the target device is generated.

10. A computer program product, characterized in that include: An acquisition module, used to acquire real-time link information of a multi-stage cascade expander in the target device and the instruction receiving and sending status of at least one target port when a transmission link failure detection mechanism exists in the target device; A first detection module, configured to execute a corresponding first link fault detection program when an abnormality is detected in the real-time link information, so as to determine a first fault detection result of the multi-stage cascade port and / or the transmission link of the multi-stage cascade expander; The second detection module is used to detect the failure type of the instruction sending and receiving situation when it is detected that there is a failure in the instruction sending and receiving situation, and execute a second link fault detection program corresponding to the failure type to determine a second fault detection result of the target device.

11. The computer program product according to claim 10, characterized in that Also includes: A collection module, used for collecting software error codes and firmware error codes in historical transmission link failures of the target device before acquiring the real-time link information of the multi-stage cascade expander in the target device and the instruction sending and receiving status of the at least one target port; An establishment module is used to establish the transmission link fault detection mechanism in combination with the software error code, the firmware error code, the preset extension instruction and the corresponding parsing strategy and the management module of the target device.

12. The computer program product according to claim 11, characterized in that Also includes: A third detection module, used for detecting the state change report information of the multi-stage cascade expander and the sending time of the state change report information before executing the corresponding first link fault detection program; A judging module, used for judging whether the real-time link information is abnormal according to the state change report information and the sending time; The determination module is used to determine that the real-time link information is abnormal if the state change report information meets the preset abnormal condition and / or the sending time is inconsistent with the preset sending time; otherwise, determine that the real-time link information is not abnormal.

13. The computer program product according to claim 12, characterized in that The first detection module includes: A first execution unit, configured to execute a first link fault query program when the state change report information is abnormal state change report information and / or the sending time is inconsistent with a preset sending time; The second execution unit is used to execute the first link error query process when the real-time link information has other abnormal situations except that the state change report information is abnormal state change report information and / or the sending time is inconsistent with the preset sending time.

14. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the transmission link failure detection method for a multi-stage cascade scenario as described in any one of claims 1 to 9.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the transmission link failure detection method for a multi-stage cascade scenario as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Monitoring method, device and apparatus for extender

    CN111124818A

  • Link fault diagnosis method and device, electronic equipment and readable storage medium

    CN114448915A

  • Link monitoring method and device, medium and computer program product

    CN118503055A

  • Methods and structure for detecting SAS link errors with minimal impact on SAS initiator and link bandwidth

    US20070070885A1

Cited By

  • Fault positioning method and device for double-control storage equipment

    CN120162189A

  • PCIE (Peripheral Component Interface Express) link fault three-layer early warning and automatic repairing method and system

    CN120762949A

  • A pcie link fault three-layer early warning and automatic repair method and system

    CN120762949B

  • State monitoring method and equipment based on industrial dust removal system and medium

    CN121048945A

  • Abnormality detection method and storage device

    CN121116697A