Fault locating method, device, and apparatus, storage medium, and electronic device

By acquiring and analyzing the login status and influencing factors of the target port in the target link, accurately locate the fault port, the problem of inaccurate identification of fault locations in the prior art is solved, and the accuracy and efficiency of fault location are improved.

WO2025035892A1PCT designated stage expired Publication Date: 2025-02-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095818
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-15
Filing Date
2024-05-28
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

The prior art cannot accurately identify the fault location or range on a long hardware link, resulting in an expansion of the renovation range and reducing maintenance efficiency.

Method used

By obtaining the login status of the target port in the target link, query the influencing factors in the preset set, accumulate the influencing factors of each target port in the preset link order, and compare it with the preset bit threshold to determine the fault port.

Benefits of technology

The accurate positioning of the fault port in the target link with faults is achieved, improving the accuracy and efficiency of fault location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095818_20022025_PF_FP_ABST
    Figure CN2024095818_20022025_PF_FP_ABST
Patent Text Reader

Abstract

A fault locating method, device, and apparatus, a non-volatile readable storage medium, and an electronic device. The method comprises: acquiring a login state of at least one target port in a target link having a fault, wherein the target link is configured to be connected to a target port of at least one hard disk according to a preset link sequence; querying a preset set for an impact factor corresponding to each login state; according to the preset link sequence, accumulating one by one the impact factors corresponding to the target ports, so as to obtain an accumulation result of each accumulation, and comparing each accumulation result with a preset locating threshold; and when the accumulation result is greater than the preset locating threshold, determining that a target port corresponding to the last accumulated impact factor is a fault port. The technical problem in the prior art that a fault cannot be accurately located in a link is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Fault location method, equipment, device, storage medium and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on August 15, 2023, with application number 202311026712.6 and application name “Fault location method, equipment, device, storage medium and electronic device”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of computers, and more specifically, to a fault location method, device, apparatus, non-volatile readable storage medium, and electronic device. Background Art

[0004] Today is an era of data explosion. Massive amounts of data are generated every day. Professional storage devices provide the possibility of storing this huge amount of data. Among these massive amounts of data, some data are very important, such as financial data, experimental data, etc. This requires storage devices to be not only functional but also reliable.

[0005] However, storage devices inevitably experience hardware wear and tear during long-term operation. This wear and tear can cause hardware anomalies, which in turn can lead to software anomalies. Hardware link failure is a common hardware failure, manifesting as a fault occurring in one or more segments of a long hardware link. Existing technologies cannot accurately identify the location or extent of a fault on a long link. Therefore, intelligently repairing the entire link increases the scope of repair and reduces efficiency.

[0006] With respect to the problem that the above-mentioned prior art cannot accurately locate the fault position in the link, no effective solution has been proposed so far.

[0007] Summary of the Invention

[0008] The embodiments of the present application provide a fault location method, device, apparatus, non-volatile readable storage medium, and electronic device to at least solve the technical problem that the prior art cannot accurately locate the fault position in a link.

[0009] According to one aspect of an embodiment of the present application, a fault location method is provided, comprising: obtaining the login status of at least one target port in a target link having a fault, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; querying an impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factor corresponding to each target port one by one in the preset link order, and comparing each accumulation result with a preset location threshold; when the accumulation result is greater than the preset location threshold, determining that the target port corresponding to the last accumulated impact factor is the faulty port.

[0010] Optionally, before obtaining the login status of at least one target port in the target link with a fault, the method also includes: obtaining the login status of at least one preset port in a preset link, wherein the preset link is used to connect to the preset port of at least one hard disk; querying the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factors of all preset ports in the preset link to determine an evaluation result of the preset link; when the evaluation result is greater than a preset fault threshold, determining that the preset link is a target link with a fault.

[0011] Optionally, before obtaining the login status of at least one preset port in the preset link, the method also includes: sending broadcast information to the hard disk set to be detected, wherein the hard disk set to be detected includes at least one hard disk, and each hard disk includes two preset ports; receiving location information returned by the hard disk set to be detected, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis; determining the preset link based on the preset chassis information and the preset controller information, wherein the preset link is used to cascade controllers with the same identifier in multiple chassis.

[0012] Optionally, obtaining the login status of at least one preset port in a preset link includes: detecting frame loss information of each preset port, wherein the frame loss information includes at least the number of frame losses; determining a preset frame loss interval corresponding to the number of frame losses in a preset interval set as a target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss status; and determining a target frame loss status corresponding to the target frame loss area as the login status.

[0013] Optionally, after accumulating the influence factors of all preset ports in the preset link and determining the evaluation result of the preset link, the method further includes: judging whether the evaluation result is greater than a preset redundancy threshold; if the evaluation result is greater than the preset redundancy threshold, determining that the preset link is an abnormal link; determining a total link of the abnormal links, wherein the total link includes two preset links; and adjusting a redundancy flag of the total link, wherein the redundancy flag includes: a first redundant flag indicating that an abnormal link exists in the total link, and a second redundant flag indicating that no abnormal link exists in the total link.

[0014] Optionally, after determining that the last accumulated target port is a faulty port, the method further includes: obtaining target controller information of the faulty port, wherein the target controller information is a unique identifier of the controller connected to the faulty port; obtaining target chassis information of the hard disk where the faulty port is located, wherein the target chassis information is a unique identifier of the chassis of the hard disk where the faulty port is located; and generating alarm information based on the target controller information and the target chassis information.

[0015] Optionally, after obtaining the target controller information of the faulty port and the target chassis information of the hard disk where the faulty port is located, the method further includes: determining the upstream port of the faulty port, wherein the upstream port is used to transmit data for the faulty port; obtaining the upstream controller information of the upstream port, wherein the upstream controller information is a unique identifier of the upstream port connected to the controller; obtaining the upstream chassis information of the hard disk where the upstream port is located, wherein the upstream chassis information is a unique identifier of the chassis of the hard disk where the upstream port is located; and generating alarm information based on the target controller information, the target chassis information, the upstream controller information and the upstream chassis information.

[0016] Optionally, after generating the alarm information, the method further includes: displaying the alarm information through a graphical user interface.

[0017] Optionally, after obtaining the login status of at least one target port in the target link with the fault, the method further includes:

[0018] When the login status indicates that the target port is abnormal, obtaining the login status of the target port at the target time according to a preset time interval;

[0019] When the login status of the target port at the target time still indicates that the target port is abnormal, the hard disk where the target port is located is isolated.

[0020] Optionally, isolating the hard disk where the target port is located includes: determining the hard disk where the target port is located as the target hard disk; setting the target hard disk to a closed state, wherein when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

[0021] Optionally, after determining that the last accumulated target port is a faulty port, the method further includes: obtaining a redundant tag of the total link where the target link is located, wherein the redundant tag includes: a first redundant tag indicating that an abnormal link exists in the total link, and a second redundant tag indicating that no abnormal link exists in the total link; when the second redundant tag exists in the total link, performing fault isolation on the target controller that controls the faulty port.

[0022] According to another aspect of an embodiment of the present application, a fault location device is also provided, characterized in that it includes: a hard disk, a serial bus and a chassis manager; the serial bus is configured to connect the target port of at least one hard disk in the target link according to a preset link sequence, wherein the target link is a link with a fault; the chassis manager is configured to obtain the login status of the target port, query the impact factor corresponding to each login status in a preset set, accumulate the impact factor corresponding to each target port one by one according to the preset link sequence, and compare each accumulation result with a preset location threshold; when the accumulation result is greater than the preset location threshold, it is determined that the target port corresponding to the last accumulated impact factor is a faulty port, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login state.

[0023] Optionally, the device further includes: a controller configured to connect the serial bus to a preset port of the hard disk.

[0024] Optionally, the device also includes: a bus control chip, configured to publish broadcast events to at least one hard disk and a chassis manager; the chassis manager is also configured to initiate a discovery mechanism to obtain the location information of each hard disk after receiving the broadcast, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis.

[0025] Optionally, the chassis manager is further configured to, after initiating the discovery mechanism, subscribe to the frame loss information of each preset port, wherein the frame loss information includes at least the number of frame losses; determine the preset frame loss interval corresponding to the number of frame losses in the preset interval set as the target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss state; and determine the target frame loss state corresponding to the target frame loss area as the login state.

[0026] Optionally, the preset port of the hard disk includes: a first preset port and a second preset port; the serial bus includes: a first serial bus and a second serial bus; wherein the first serial bus is configured to connect to the first preset port; the second serial bus is configured to connect to the second preset port.

[0027] Optionally, the chassis manager is further configured to obtain the login status of at least one preset port in a preset link, where the preset link is a link of the first serial bus or a link of the second serial bus; query the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login status; accumulate the impact factors of all preset ports in the preset link to determine an evaluation result of the preset link; when the evaluation result is greater than a preset redundancy threshold, determine that the preset link is an abnormal link; adjust the redundant mark of the total link where the abnormal link is located, wherein the total link includes the first serial bus and the second serial bus, and the redundant mark includes: a first redundant mark indicating that there is an abnormal link in the total link, and a second redundant mark indicating that there is no abnormal link in the total link.

[0028] Optionally, the device also includes: a timer, configured to start when the login status indicates that there is an abnormality in the target port, and set to determine the target time according to a preset time interval; a chassis manager, further configured to obtain the login status of the target port at the target time; and when the login status of the target port at the target time still indicates that there is an abnormality in the target port, the hard disk where the target port is located is isolated.

[0029] Optionally, the chassis manager is further configured to, after determining the faulty port in the target link, obtain a redundant tag of the overall link where the target link is located, wherein the redundant tag includes: a first redundant tag indicating that there is an abnormal link in the overall link, and a second redundant tag indicating that there is no abnormal link in the overall link; when the second redundant tag exists in the overall link, the target controller that controls the faulty port is fault isolated.

[0030] According to another aspect of an embodiment of the present application, a fault location device is also provided, including: an acquisition module, configured to obtain the login status of at least one target port in a target link with a fault, wherein the target link is configured to connect the target port of at least one hard disk according to a preset link order; a query module, configured to query the impact factor corresponding to each login status in a preset set, wherein the preset set is configured to record multiple login statuses and the impact factor corresponding to each login status; a processing module, configured to accumulate the impact factor corresponding to each target port one by one according to the preset link order, and compare each accumulation result with a preset location threshold; a determination module, configured to determine that the target port corresponding to the last accumulated impact factor is a faulty port when the accumulation result is greater than the preset location threshold.

[0031] According to another aspect of an embodiment of the present application, a non-volatile readable storage medium is further provided. The non-volatile readable storage medium is configured to store a program, wherein when the program is running, the device where the non-volatile readable storage medium is located is controlled to execute the above-mentioned fault location method.

[0032] According to another aspect of an embodiment of the present application, an electronic device is provided, including: a memory and a processor, wherein the processor is configured to run a program stored in the processor, wherein the above-mentioned fault location method is executed when the program is run.

[0033] In an embodiment of the present application, the login status of at least one target port in a target link with a fault is obtained, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; the impact factor corresponding to each login status is queried in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; the impact factor corresponding to each target port is accumulated one by one in the preset link order, and each accumulated result is compared with a preset positioning threshold; when the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be the faulty port, and the faulty port where the fault occurs can be determined in the target link with the fault, thereby achieving the technical effect of accurately locating the fault position of the faulty target link, thereby solving the technical problem that the prior art cannot accurately locate the fault position in the link. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0035] FIG1 is a flow chart of a fault location method according to an embodiment of the present application;

[0036] FIG2 is a schematic diagram of a storage hardware link status monitoring method architecture based on hard disk command frame loss according to an embodiment of the present application;

[0037] FIG3 is a schematic diagram of a storage hardware link according to an embodiment of the present application;

[0038] FIG4 is a schematic diagram of a fault location device according to an embodiment of the present application;

[0039] FIG5 is a schematic diagram of a fault location device according to an embodiment of the present application;

[0040] FIG6 is a structural block diagram of a computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0043] For ease of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0044] SAS Serial Attached SCSI is a computer hub technology, which is mainly used for data transmission of peripheral components, such as hard disks, CD-ROMs and other devices.

[0045] SAS Expander is an expander that complies with the SAS protocol and can be used for chassis management.

[0046] SESSCSI Enclosure Services T10 Technical Committee developed a standard for enclosure management.

[0047] EN: The full name is Enclosure Management.

[0048] SCSI Small Computer System Interface SCSI protocol is mainly used to transmit commands, status and block data between the host and storage devices. Among various storage technologies, SCSI protocol can be said to be the most important backbone.

[0049] RAID generally refers to a disk array. Redundant Arrays of Independent Disks (RAID) means "an array of several independent disks with redundancy."

[0050] According to an embodiment of the present application, an embodiment of a fault location method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0051] FIG1 is a flow chart of a fault location method according to an embodiment of the present application. As shown in FIG1 , the method includes the following steps:

[0052] Step S102, obtaining a login status of at least one target port in a target link having a fault, wherein the target link is used to connect to a target port of at least one hard disk according to a preset link sequence;

[0053] Step S104: querying the impact factor corresponding to each login state in a preset set, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login state;

[0054] Step S106: accumulating the impact factor corresponding to each target port one by one according to the preset link order, and comparing each accumulation result with the preset positioning threshold;

[0055] Step S108 : When the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be a faulty port.

[0056] In an embodiment of the present application, the login status of at least one target port in a target link with a fault is obtained, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; the impact factor corresponding to each login status is queried in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; the impact factor corresponding to each target port is accumulated one by one in the preset link order, and each accumulated result is compared with a preset positioning threshold; when the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be the faulty port, and the faulty port where the fault occurs can be determined in the target link with the fault, thereby achieving the technical effect of accurately locating the fault position of the faulty target link, thereby solving the technical problem that the prior art cannot accurately locate the fault position in the link.

[0057] Optionally, the above fault location method may be used in a storage system having multiple hard disks, where the multiple hard disks may store data in a disk array.

[0058] Optionally, each hard disk may include two preset ports, which are respectively recorded as a first preset port and a second preset port.

[0059] Optionally, there may be two preset links, namely a first preset link and a second preset link, wherein the first preset link is used to connect the first preset port of each hard disk, and the second preset link is used to establish the second preset port of each hard disk.

[0060] Optionally, the first preset link may be used to transmit uplink data, and the second preset link may be used to transmit downlink data.

[0061] Optionally, the target link is a preset link with a fault, and the target port is a port connected to the preset link with a fault.

[0062] In the above step S102 , the login status may indicate a frame loss situation of the corresponding target port or the preset port.

[0063] Optionally, the login status includes: GOOD, indicating no frame loss exception; IN DOUBT, indicating that there is at least one frame loss, but it has not reached the level of DEGRADED; DEGRADED, indicating that there is a certain amount of frame loss, which is greater than IN DOUBT but has not reached the level of EXCLUSION; indicating that there is a large amount of frame loss in the EXCLUDSION disk.

[0064] In the above step S104, the impact factor is used to represent the degree of frame loss of the target port or the preset port in a numerical manner.

[0065] Optionally, different login states have different impact factors, for example, GOOD=0, IN DOUBT=1, DEGRADED=4, EXCLUDSION=10.

[0066] In the above step S106, the preset positioning threshold is used to locate the position of the fault in the target link. In the target link with the fault, the impact factor corresponding to each target port in the target link is accumulated one by one, and each accumulation result is compared with the preset positioning threshold. If the accumulated impact factor corresponding to a certain target port is greater than the preset positioning threshold, it means that there is a fault at the subsequently accumulated target port, and the faulty port is located, which facilitates subsequent maintenance or isolation of the faulty port.

[0067] Optionally, the location information of each hard disk and preset port can be recorded in advance. The location information includes at least: preset chassis information and preset controller information. The preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis. After determining the faulty port, the preset controller information of the faulty port can be queried to locate the faulty port.

[0068] It should be noted that the preset port of each hard disk is connected to the preset link through a controller. Since the controller and the preset port correspond one to one, the faulty port can be located by determining the controller of the faulty port.

[0069] As an optional embodiment, before obtaining the login status of at least one target port in a target link with a fault, the method also includes: obtaining the login status of at least one preset port in a preset link, wherein the preset link is used to connect to a preset port of at least one hard disk; querying the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factors of all preset ports in the preset link to determine an evaluation result of the preset link; when the evaluation result is greater than a preset fault threshold, determining that the preset link is a target link with a fault.

[0070] In the above embodiment of the present application, before locating the fault in the faulty target link, it is necessary to determine one by one whether each preset link belongs to the target link with the fault. Then, in the process of determining the target link, the impact factor corresponding to each preset port in each preset link can be accumulated to obtain an evaluation result of the preset link. Then, the evaluation result of the preset link is compared with the preset fault threshold. If the evaluation result of the preset link is greater than the preset fault threshold, it indicates that the preset link has a fault. In this case, the preset link is determined to be the target link, thereby achieving preliminary positioning of the target link with the fault.

[0071] As an optional embodiment, before obtaining the login status of at least one preset port in a preset link, the method also includes: sending broadcast information to the hard disk set to be detected, wherein the hard disk set to be detected includes at least one hard disk, and each hard disk includes two preset ports; receiving location information returned by the hard disk set to be detected, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis; determining the preset link based on the preset chassis information and the preset controller information, wherein the preset link is used to cascade controllers with the same identifier in multiple chassis.

[0072] In the above-mentioned embodiment of the present application, the location information of each hard disk and the preset port of each hard disk can be obtained through broadcast information. After the faulty port is determined, the location of the faulty port and the hard disk on which it is located can be determined from the location information, thereby facilitating the isolation or repair of the faulty port.

[0073] As an optional embodiment, obtaining the login status of at least one preset port in a preset link includes: detecting the frame loss information of each preset port, wherein the frame loss information includes at least the number of frame losses; determining a preset frame loss interval corresponding to the number of frame losses in a preset interval set as a target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss status; and determining the target frame loss status corresponding to the target frame loss area as the login status.

[0074] In the above-mentioned embodiment of the present application, the login status represents the frame loss situation of the corresponding target port or preset port. Therefore, the login status can be determined according to the number of frame losses. By pre-dividing multiple preset frame loss intervals and setting a corresponding preset frame loss status for each preset frame loss interval, the preset frame loss interval corresponding to the number of frame losses of the preset port or target port is determined as the target frame loss interval, and the preset frame loss status of the target frame loss interval is used as the login status of the preset port or target port, thereby realizing the determination of the login status.

[0075] As an optional embodiment, after obtaining the login status of at least one preset port in the preset link, the method also includes: when the login status indicates that there is an abnormality in the preset port, obtaining the login status of the preset port at the target time according to a preset time interval; when the login status of the preset port at the target time still indicates that there is an abnormality in the preset port, isolating the hard disk where the preset port is located.

[0076] In the above embodiment of the present application, if the hard disk occasionally has a small amount of frame loss, it can be tolerated by the storage system. However, if the hard disk frequently has frame loss, the hard disk needs to be processed. Therefore, when it is detected that the login status of the preset port is abnormal, the login status of the preset port can be obtained again at the target time according to the preset time interval. If the login status of the preset port at the target time still indicates that the preset port is abnormal, it means that the preset port has frequent frame loss, and the hard disk where the preset port is located needs to be separated from the storage system to isolate the faulty hard disk.

[0077] As an optional embodiment, isolating the hard disk where the preset port is located includes: determining the hard disk where the preset port is located as the target hard disk; setting the target hard disk to a closed state, wherein when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

[0078] In the above-mentioned embodiment of the present application, multiple hard disks can establish a disk array in a RAID manner. Then, when a hard disk in the disk array fails, the failed hard disk can be set to a closed state Fail. When a hard disk in the closed state Fail is detected in the RAID array, the hard disk is exited, thereby achieving the technical effect of isolating the failed hard disk.

[0079] As an optional embodiment, after accumulating the influence factors of all preset ports in the preset link and determining the evaluation result of the preset link, the method further includes: judging whether the evaluation result is greater than a preset redundancy threshold; if the evaluation result is greater than the preset redundancy threshold, determining that the preset link is an abnormal link; determining the total link of the abnormal links, wherein the total link includes two preset links; and adjusting the redundancy flag of the total link, wherein the redundancy flag includes: a first redundant flag indicating that an abnormal link exists in the total link, and a second redundant flag indicating that no abnormal link exists in the total link.

[0080] In the above embodiment of the present application, each general link in the storage system can be set with two preset links, and the two preset links serve as redundant backups for each other. If one of the preset links has an abnormality, the other preset link can be used to continue data transmission. Therefore, it is necessary to timely understand the redundancy status of the general link, and then the evaluation results of the corresponding impact factors of all preset ports in each link in the general link can be compared with the preset redundancy threshold. If the evaluation result is greater than the preset redundancy threshold, it means that the preset link has an abnormality, and it is necessary to call another redundant preset link in the general link to meet the data transmission requirements, and add a first redundancy mark to the general link; and then if both of the two preset links in the general link have abnormalities, it means that the general link can no longer meet the data transmission requirements, and it is necessary to shut down and alarm, waiting for maintenance.

[0081] As an optional embodiment, after determining that the last accumulated target port is a faulty port, the method further includes: obtaining target controller information of the faulty port, wherein the target controller information is a unique identifier of the controller connected to the faulty port; obtaining target chassis information of the hard disk where the faulty port is located, wherein the target chassis information is a unique identifier of the chassis of the hard disk where the faulty port is located; and generating alarm information based on the target controller information and the target chassis information.

[0082] As an optional embodiment, after obtaining the target controller information of the faulty port and the target chassis information of the hard disk where the faulty port is located, the method further includes: determining the upstream port of the faulty port, wherein the upstream port is used to transmit data for the faulty port; obtaining the upstream controller information of the upstream port, wherein the upstream controller information is a unique identifier of the upstream port connected to the controller; obtaining the upstream chassis information of the hard disk where the upstream port is located, wherein the upstream chassis information is a unique identifier of the chassis of the hard disk where the upstream port is located; and generating alarm information based on the target controller information, the target chassis information, the upstream controller information and the upstream chassis information.

[0083] In the above embodiment of the present application, the alarm information includes the enclosure_index of the chassis where the controller is located (that is, the target chassis information), the canister_index of the controller (that is, the target controller information), the enclosure_index of the upstream chassis connected to the faulty controller (that is, the upstream chassis information) and the canister_index of the upstream controller (that is, the upstream controller information). A line is limited by two points in the alarm information to determine the fault location, thereby achieving accurate positioning of the fault location.

[0084] As an optional embodiment, after generating the alarm information, the method further includes: displaying the alarm information through a graphical user interface.

[0085] As an optional embodiment, after obtaining the login status of at least one target port in the faulty target link, the method also includes: when the login status indicates that there is an abnormality in the target port, obtaining the login status of the target port at the target time according to a preset time interval; when the login status of the target port at the target time still indicates that there is an abnormality in the target port, isolating the hard disk where the target port is located.

[0086] In the above embodiment of the present application, if the hard disk occasionally has a small amount of frame loss, it can be tolerated by the storage system. However, if the hard disk frequently loses frames, the hard disk needs to be processed. Therefore, when it is detected that the login status of the target port is abnormal, the login status of the target port can be obtained again at the target time according to the preset time interval. If the login status of the target port at the target time still indicates that the target port is abnormal, it means that the target port has frequent frame loss, and the hard disk where the target port is located needs to be separated from the storage system to isolate the faulty hard disk.

[0087] As an optional embodiment, isolating the hard disk where the target port is located includes: determining that the hard disk where the target port is located is the target hard disk; setting the target hard disk to a closed state, wherein when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

[0088] In the above-mentioned embodiment of the present application, multiple hard disks can establish a disk array in a RAID manner. Then, when a hard disk in the disk array fails, the failed hard disk can be set to a closed state Fail. When a hard disk in the closed state Fail is detected in the RAID array, the hard disk is exited, thereby achieving the technical effect of isolating the failed hard disk.

[0089] As an optional embodiment, after determining that the last accumulated target port is a faulty port, the method further includes: obtaining a redundant tag of the total link where the target link is located, wherein the redundant tag includes: a first redundant tag indicating that an abnormal link exists in the total link, and a second redundant tag indicating that no abnormal link exists in the total link; when the second redundant tag exists in the total link, fault isolation is performed on the target controller that controls the faulty port.

[0090] In the above-mentioned embodiment of the present application, each general link in the storage system can be set with two preset links, and the two preset links serve as redundant backups for each other. If an abnormality occurs in one of the preset links, the other preset link can be used to continue data transmission. Furthermore, in the process of isolating the fault port, it is possible to first determine whether the general link has the redundancy condition that meets the fault isolation based on the redundancy mark of the general link, and then, if a second redundancy mark exists in the general link, indicating that there is no abnormal link in the general link, the fault isolation of the fault port can be achieved.

[0091] This application also provides an optional embodiment, which provides a storage hardware link status monitoring method based on hard disk command frame loss. Based on analyzing the number of hard disks experiencing frame loss and the severity of individual frame loss, the location of the faulty link can be identified, and corresponding fault isolation measures can be taken according to different link failures, effectively ensuring system stability. When a failure occurs, the cause of the failure can be accurately identified and corresponding treatment can be performed. The fault location or range can be accurately identified over a very long link.

[0092] Figure 2 is a schematic diagram of the architecture of a storage hardware link status monitoring method based on hard disk command frame loss according to an embodiment of the present application. As shown in Figure 2, it includes: chassis management layer (EN), protocol layer, driver layer, and physical link layer.

[0093] Optionally, the physical link layer is at the lowest layer and is a physical channel for command or data transmission between the storage system and the hard disk.

[0094] Optionally, the protocol layer and the driver layer are data channels for communication between the storage system and the hard disk.

[0095] Optionally, the chassis management layer is located at the top layer and its function is to determine the fault location based on the frame loss degree (ie, login status) of each hard disk returned by the protocol layer, and trigger a fault isolation action.

[0096] Optionally, each hard drive has two default ports, and the frame loss degree (i.e., login status) of each default port is divided into four levels:

[0097] GOOD: No frame loss exceptions, and the impact factor on EN is 0.

[0098] IN DOUBT: Frame loss exists: at least one frame loss occurs, but it has not reached the level of DEGRADED. The impact factor on EN is 1.

[0099] DEGRADED: The disk has frame loss: a certain amount of frame loss, greater than IN DOUBT but not reaching EXCLUSION level, affects EN by a factor of 4.

[0100] EXCLUDSION: The disk has a large amount of frame loss, affecting EN by a factor of 10.

[0101] Optionally, the chassis management layer records two attributes (i.e., location information) for each hard drive: the chassis where the hard drive is located and the controller where the hard drive is located. When a single hard drive experiences frame loss, it is considered a single-disk failure, but anti-shake processing is required to avoid misoperation. When multiple hard drives experience frame loss, the probability of multiple hard drives losing frames simultaneously is very small, so the fault may not be on the disk itself. In this case, multiple thresholds need to be set to superimpose the impact factors of multiple hard drives to determine whether the threshold has been reached and the chassis and controller where these disks are located. This further determines where the fault occurred in the hardware link. The chassis management layer then performs corresponding fault isolation operations based on the detected fault location and promptly reports an alarm.

[0102] In the above-mentioned embodiments of the present application, the storage device can promptly detect whether there is a link failure in the frame, and then perform corresponding troubleshooting on the abnormal link, thereby ensuring the security and reliability of the storage system and guaranteeing product quality and production services.

[0103] As an optional embodiment, the implementation process of the storage hardware link status monitoring method based on hard disk command frame loss includes the following steps:

[0104] Step S1: The storage system starts and runs normally.

[0105] In step S2, the SAS Expander chip is a programmable chip that can publish broadcast events. After receiving the broadcast, the chassis management layer (EN) initiates Discovery (also known as the discovery mechanism). After Discovery is completed, the EN can obtain the chassis information (enclosure_index) where the hard disk is located and the controller information (canister_index) corresponding to each preset port of each hard disk, that is, obtain the location information.

[0106] In step S3, EN subscribes to the frame loss information of each port preset by each hard disk in the protocol layer, and checks the frame loss information after each Discover is completed.

[0107] In step S4, the protocol layer returns the command execution status through the SCSI protocol rules and the driver, and sets the frame loss status of each port preset port of each disk. The frame loss status is recorded as the login status of the disk.

[0108] Optionally, the login status (i.e., login status) includes: GOOD: no frame loss exception; IN DOUBT: frame loss exists: at least one frame loss exists, but it has not reached the level of DEGRADED; DEGRADED: frame loss exists: a certain number of frame losses, greater than IN DOUBT but not reaching the level of EXCLUSION; and EXCLUDSION: a large number of frame losses exist.

[0109] Step S5: Different login states (ie, login states) described by the protocol layer for the disk have different impact factors on EN, GOOD=0, IN DOUBT=1, DEGRADED=4, EXCLUDSION=10.

[0110] Step S6: Determine the preset links Strand and the total link Chain, wherein each total link Chain includes two preset links Strand.

[0111] FIG3 is a schematic diagram of a storage hardware link according to an embodiment of the present application. As shown in FIG3 , enclosure 0 is the main cabinet, enclosures 1-3 are hard disk frames (i.e., chassis) corresponding to enclosure_index=1-3, and each chassis is divided into upper and lower parts corresponding to canister_index=0 and 1. The hard disks are distributed in enclosures 1-3, and each chassis is cascaded in a straight line through SAS cables. The hardware link from the same SAS port of the main cabinet to the bottom of the cascade is recorded as the preset link strand. Each disk and the preset port correspond to a preset link strand. The two preset link strands with symmetry between the upper and lower controllers are recorded as a total link chain.

[0112] In step S7, when the EN detects multiple disk login anomalies on a strand, it accumulates the impact factors corresponding to each disk login. This requires setting three thresholds: a preset failure threshold T1, a preset location threshold T2, and a preset redundancy threshold T3.

[0113] Optionally, the preset fault threshold T1 is the cumulative value of the impact factors of the login status (i.e., login status) of all corresponding hard disks on the entire preset link Strand and the color number node port, which must be at least greater than 30 to meet the simultaneous EXCLUDSION of at least three disks.

[0114] Optionally, the preset positioning threshold T2 is the cumulative value of the influencing factor of the login status (i.e., login status) of the preset port port of the hard disk corresponding to a controller on the current preset link Strand. T2 is less than T1 and can be calculated as 6 points to find the location of the first fault point on a single preset link Strand.

[0115] Optionally, the preset redundancy threshold T3 is the total chain threshold. T3 is smaller than T1 because the total chain represents a pair of preset strands. When both preset strands have abnormal login status (i.e., login status), it indicates that there is no redundant link, and the storage system is extremely unsafe. Therefore, if T3 is lower than T1, the total chain abnormality alarm is reported first. When the cumulative impact factor of the disk login status (i.e., login status) of each of the two preset strands in a total chain exceeds T3, the variable (i.e., redundancy flag) is set to bad_chain+1 (the initial value of bad_chain is 0).

[0116] Step S8: After the statistics of the accumulated values ​​of the impact factors of login (ie login status) on each preset link Strand are completed, the abnormal point judgment of the link fault begins.

[0117] In step S9, when the login status (i.e., login status) of the disks on the preset link Strand is greater than T1, it means that multiple disks have login (i.e., login status) abnormalities. The probability of multiple disks (at least 3 disks) simultaneously experiencing frame loss is very small, so it can be considered that there is a problem in a certain section of the preset link Strand.

[0118] In step S10, the cumulative impact factors of the login status (i.e., login status) of the disks corresponding to all controllers on the strand found to have a fault in step S9 are compared with T2. The first controller whose cumulative impact factor for the disk is greater than T2 is found. This controller is the controller that first failed (corresponding to the failed port).

[0119] In step S11, after the first faulty controller is found, the controller needs to be isolated for fault.

[0120] Optionally, during fault isolation, if the value of bad_chain in step S7 is less than 1, the physical link of the controller's uplink port is found. At this time, the controller and the downstream controller on the same preset link Strand as the controller will no longer have the hard disk frame loss problem, achieving the purpose of fault isolation. Then, an alarm of frame loss of the controller is reported. The alarm information must include the enclosure_index of the chassis where the controller is located, the canister_index of the controller, the enclosure_index of the upstream chassis connected to the faulty controller, and the canister_index of the upstream controller. A line is limited by two points in the alarm information to determine the fault location.

[0121] Optionally, if the value of bad_chain in step S7 is greater than 1, it means that the storage link has no redundancy at this time, and only the above alarm needs to be reported.

[0122] In step S12, when the EN finds that only one disk on a preset strand has a login exception (the login status of a single disk is not differentiated), it considers the disk with the login exception to be a problem of the disk itself. The storage system allows occasional disk login exceptions, but cannot tolerate disk login exceptions all the time. Therefore, when a single disk login exception is first discovered, the EN performs anti-shake processing, starts a 1h timer, and records the disk with the login exception in the context of the EN module.

[0123] Optionally, after the timer expires (i.e., at the target time), the latest disk login status (i.e., login status) is obtained. If a disk login error occurs at this time and it is the same disk that experienced the error 1 hour ago, an alarm is reported for this disk. Upon detecting the alarm, the RAID module can set the disk to Fail status, removing it from the RAID. If the EN detects a disk Failure, it shuts down the disk's physical default port to isolate the fault. The user then locates the faulty disk based on the alarm information and performs a replacement.

[0124] Step S13: Through the above steps, the storage system can automatically identify whether it is a point failure (disk) or a line failure (disk, controller) when a link failure occurs, and perform corresponding hardware fault isolation to prevent more software anomalies and ensure storage stability.

[0125] In step S14, all the above-mentioned alarms are displayed to the user through the GUI interface.

[0126] Figure 4 is a schematic diagram of a fault location device according to an embodiment of the present application. As shown in Figure 4, the device may include: a hard disk 42, a serial bus 44 and a chassis manager 46; the serial bus is used to connect the target port of at least one hard disk in the target link according to a preset link sequence, wherein the target link is a link with a fault; the chassis manager is used to obtain the login status of the target port, query the impact factor corresponding to each login status in the preset set, accumulate the impact factor corresponding to each target port one by one according to the preset link sequence, and compare each accumulation result with the preset location threshold; when the accumulation result is greater than the preset location threshold, it is determined that the target port corresponding to the last accumulated impact factor is the faulty port, wherein the preset set is used to record multiple login states and the impact factors corresponding to each login state.

[0127] In an embodiment of the present application, the login status of at least one target port in a target link with a fault is obtained, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; the impact factor corresponding to each login status is queried in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; the impact factor corresponding to each target port is accumulated one by one in the preset link order, and each accumulated result is compared with a preset positioning threshold; when the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be the faulty port, and the faulty port where the fault occurs can be determined in the target link with the fault, thereby achieving the technical effect of accurately locating the fault position of the faulty target link, thereby solving the technical problem that the prior art cannot accurately locate the fault position in the link.

[0128] As an optional embodiment, the device further includes: a controller, configured to connect the serial bus to a preset port of the hard disk.

[0129] As an optional embodiment, the device also includes: a bus control chip, used to publish broadcast events to at least one hard disk and a chassis manager; the chassis manager is also used to initiate a discovery mechanism to obtain the location information of each hard disk after receiving the broadcast, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis.

[0130] As an optional embodiment, the chassis manager is further used to subscribe to the frame loss information of each preset port after initiating the discovery mechanism, wherein the frame loss information includes at least the number of frame losses; determine the preset frame loss interval corresponding to the number of frame losses in the preset interval set as the target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss state; determine the target frame loss state corresponding to the target frame loss area as the login state.

[0131] As an optional embodiment, the preset port of the hard disk includes: a first preset port and a second preset port; the serial bus includes: a first serial bus and a second serial bus; wherein the first serial bus is used to connect to the first preset port; the second serial bus is used to connect to the second preset port.

[0132] As an optional embodiment, the chassis manager is further used to obtain the login status of at least one preset port in a preset link, wherein the preset link is a link of the first serial bus or a link of the second serial bus; query the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login status; accumulate the impact factors of all preset ports in the preset link to determine an evaluation result of the preset link; when the evaluation result is greater than a preset redundancy threshold, determine that the preset link is an abnormal link; adjust the redundant mark of the total link where the abnormal link is located, wherein the total link includes the first serial bus and the second serial bus, and the redundant mark includes: a first redundant mark indicating that there is an abnormal link in the total link, and a second redundant mark indicating that there is no abnormal link in the total link.

[0133] As an optional embodiment, the device also includes: a timer, which is used to start when the login status indicates that there is an abnormality in the target port, and is set to determine the target time according to a preset time interval; a chassis manager, which is also used to obtain the login status of the target port at the target time; and when the login status of the target port at the target time still indicates that there is an abnormality in the target port, the hard disk where the target port is located is isolated.

[0134] As an optional embodiment, the chassis manager is further used to obtain a redundant tag of the total link where the target link is located after determining the faulty port in the target link, wherein the redundant tag includes: a first redundant tag indicating that there is an abnormal link in the total link, and a second redundant tag indicating that there is no abnormal link in the total link; when the second redundant tag exists in the total link, the target controller that controls the faulty port is fault isolated.

[0135] According to an embodiment of the present application, an embodiment of a fault location device is also provided. It should be noted that the fault location device can be used to execute the fault location method in the embodiment of the present application, and the fault location method in the embodiment of the present application can be executed in the fault location device.

[0136] Figure 5 is a schematic diagram of a fault location device according to an embodiment of the present application. As shown in Figure 5, the device may include: an acquisition module 52, used to obtain the login status of at least one target port in a target link with a fault, wherein the target link is used to connect the target port of at least one hard disk in a preset link order; a query module 54, used to query the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; a processing module 56, used to accumulate the impact factor corresponding to each target port one by one in a preset link order, and compare each accumulation result with a preset location threshold; a determination module 58, used to determine that the target port corresponding to the last accumulated impact factor is a faulty port when the accumulation result is greater than the preset location threshold.

[0137] It should be noted that the acquisition module 52 in this embodiment can be used to execute step S102 in the embodiment of the present application, the query module 54 in this embodiment can be used to execute step S104 in the embodiment of the present application, the processing module 56 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the determination module 58 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0138] In an embodiment of the present application, the login status of at least one target port in a target link with a fault is obtained, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; the impact factor corresponding to each login status is queried in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; the impact factor corresponding to each target port is accumulated one by one in the preset link order, and each accumulated result is compared with a preset positioning threshold; when the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be the faulty port, and the faulty port where the fault occurs can be determined in the target link with the fault, thereby achieving the technical effect of accurately locating the fault position of the faulty target link, thereby solving the technical problem that the prior art cannot accurately locate the fault position in the link.

[0139] The embodiment of the present application can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0140] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.

[0141] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the fault location method: obtaining the login status of at least one target port in the target link with the fault, wherein the target link is used to connect to the target port of at least one hard disk in a preset link order; querying the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factor corresponding to each target port one by one in the preset link order, and comparing each accumulation result with the preset location threshold; when the accumulation result is greater than the preset location threshold, determining that the target port corresponding to the last accumulated impact factor is the faulty port.

[0142] Optionally, Figure 6 is a block diagram of a computer terminal according to an embodiment of the present application. As shown in Figure 6 , the computer terminal 60 may include: one or more (only one is shown in the figure) processors 62 and a memory 64 .

[0143] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the fault location method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-mentioned fault location method. The memory may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely located relative to the processor, and these remote memories may be connected to the terminal 60 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtaining the login status of at least one target port in the target link with the fault, wherein the target link is used to connect to the target port of at least one hard disk according to a preset link sequence; querying the impact factor corresponding to each login status in the preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factor corresponding to each target port one by one according to the preset link sequence, and comparing each accumulation result with a preset positioning threshold; when the accumulation result is greater than the preset positioning threshold, determining that the target port corresponding to the last accumulated impact factor is a faulty port.

[0145] Optionally, the processor may also execute the program code of the following steps: before obtaining the login status of at least one target port in the target link with a fault, obtaining the login status of at least one preset port in the preset link, wherein the preset link is used to connect the preset port of at least one hard disk; querying the impact factor corresponding to each login status in the preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factors of all preset ports in the preset link to determine the evaluation result of the preset link; and when the evaluation result is greater than the preset fault threshold, determining that the preset link is the target link with a fault.

[0146] Optionally, the processor may also execute the program code of the following steps: before obtaining the login status of at least one preset port in a preset link, sending broadcast information to the hard disk set to be detected, wherein the hard disk set to be detected includes at least one hard disk, and each hard disk includes two preset ports; receiving location information returned by the hard disk set to be detected, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis; determining the preset link based on the preset chassis information and the preset controller information, wherein the preset link is used to cascade controllers with the same identifier in multiple chassis.

[0147] Optionally, the processor may also execute the program code of the following steps: detecting the frame loss information of each preset port, wherein the frame loss information includes at least the number of frame losses; determining a preset frame loss interval corresponding to the number of frame losses in a preset interval set as a target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss state; and determining that the target frame loss state corresponding to the target frame loss area is a login state.

[0148] Optionally, the processor may further execute program code for the following steps: after accumulating the influence factors of all preset ports in the preset link and determining the evaluation result of the preset link, determining whether the evaluation result is greater than a preset redundancy threshold; if the evaluation result is greater than the preset redundancy threshold, determining that the preset link is an abnormal link; determining the total link of the abnormal link, wherein the total link includes two preset links; and adjusting the redundancy mark of the total link, wherein the redundant mark includes: a first redundant mark indicating that an abnormal link exists in the total link, and a second redundant mark indicating that no abnormal link exists in the total link.

[0149] Optionally, the processor may also execute the program code of the following steps: after determining that the last accumulated target port is a faulty port, obtaining target controller information of the faulty port, wherein the target controller information is a unique identifier of the controller connected to the faulty port; obtaining target chassis information of the hard disk where the faulty port is located, wherein the target chassis information is a unique identifier of the chassis of the hard disk where the faulty port is located; and generating alarm information based on the target controller information and the target chassis information.

[0150] Optionally, the processor may also execute the program code of the following steps: after obtaining the target controller information of the faulty port and the target chassis information of the hard disk where the faulty port is located, determining the upstream port of the faulty port, wherein the upstream port is used to transmit data for the faulty port; obtaining the upstream controller information of the upstream port, wherein the upstream controller information is a unique identifier of the upstream port connected to the controller; obtaining the upstream chassis information of the hard disk where the upstream port is located, wherein the upstream chassis information is a unique identifier of the chassis of the hard disk where the upstream port is located; and generating alarm information based on the target controller information, the target chassis information, the upstream controller information, and the upstream chassis information.

[0151] Optionally, the processor may further execute program code of the following steps: after generating the alarm information, display the alarm information through a graphical user interface.

[0152] Optionally, the above-mentioned processor can also execute the program code of the following steps: after obtaining the login status of at least one target port in the faulty target link, if the login status indicates that there is an abnormality in the target port, obtain the login status of the target port at the target time according to a preset time interval; if the login status of the target port at the target time still indicates that there is an abnormality in the target port, isolate the hard disk where the target port is located.

[0153] Optionally, the processor may also execute the program code of the following steps: determining that the hard disk where the target port is located is the target hard disk; setting the target hard disk to a closed state, wherein when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

[0154] Optionally, the processor may also execute the program code of the following steps: after determining that the last accumulated target port is a faulty port, obtaining a redundant mark of the total link where the target link is located, wherein the redundant mark includes: a first redundant mark indicating that there is an abnormal link in the total link, and a second redundant mark indicating that there is no abnormal link in the total link; when the second redundant mark exists in the total link, performing fault isolation on the target controller that controls the faulty port.

[0155] An embodiment of the present application provides a fault location solution. By obtaining the login status of at least one target port in a target link with a fault, wherein the target link is used to connect to the target port of at least one hard disk according to a preset link sequence; querying the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factor corresponding to each target port one by one according to the preset link sequence, and comparing each accumulation result with a preset location threshold; when the accumulation result is greater than the preset location threshold, determining that the target port corresponding to the last accumulated impact factor is the faulty port, the faulty port that caused the fault can be determined in the target link with the fault, thereby achieving the technical effect of accurately locating the fault location of the faulty target link, thereby solving the technical problem that the prior art cannot accurately locate the fault location in the link.

[0156] Those skilled in the art will appreciate that the structure shown in FIG6 is merely illustrative, and the computer terminal may also be a smartphone (such as an Android phone, iOS phone, etc.), a tablet computer, a handheld computer, a mobile internet device (MID), a PAD, or other terminal device. FIG6 does not limit the structure of the aforementioned electronic devices. For example, the computer terminal 60 may include more or fewer components (such as a network interface, a display device, etc.) than shown in FIG6 , or may have a configuration different from that shown in FIG6 .

[0157] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile readable storage medium. The non-volatile readable storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0158] The embodiment of the present application further provides a non-volatile readable storage medium. Optionally, in this embodiment, the non-volatile readable storage medium can be used to store the program code executed by the fault location method provided in the above embodiment.

[0159] Optionally, in this embodiment, the non-volatile readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0160] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: obtaining the login status of at least one target port in a faulty target link, wherein the target link is used to connect the target port of at least one hard disk in a preset link order; querying the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulating the impact factor corresponding to each target port one by one in the preset link order, and comparing each accumulation result with a preset positioning threshold; when the accumulation result is greater than the preset positioning threshold, determining that the target port corresponding to the last accumulated impact factor is a faulty port.

[0161] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: before obtaining the login status of at least one target port in the target link with a fault, obtaining the login status of at least one preset port in the preset link, wherein the preset link is used to connect the preset port of at least one hard disk; querying the impact factor corresponding to each login status in the preset set, wherein the preset set is used to record multiple login statuses and the impact factors corresponding to each login status; accumulating the impact factors of all preset ports in the preset link to determine the evaluation result of the preset link; when the evaluation result is greater than the preset fault threshold, determining that the preset link is the target link with a fault.

[0162] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: before obtaining the login status of at least one preset port in a preset link, sending broadcast information to the hard disk set to be detected, wherein the hard disk set to be detected includes at least one hard disk, and each hard disk includes two preset ports; receiving location information returned by the hard disk set to be detected, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller connected to the preset port of the hard disk in each chassis; determining the preset link based on the preset chassis information and the preset controller information, wherein the preset link is used to cascade controllers with the same identifier in multiple chassis.

[0163] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: detecting frame loss information of each preset port, wherein the frame loss information includes at least the number of frame losses; determining a preset frame loss interval corresponding to the number of frame losses in a preset interval set as a target frame loss interval, wherein the preset interval set includes multiple preset frame loss intervals, and each preset frame loss interval is pre-set with a corresponding preset frame loss state; determining the target frame loss state corresponding to the target frame loss area as a login state.

[0164] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: after accumulating the influence factors of all preset ports in the preset link and determining the evaluation result of the preset link, judging whether the evaluation result is greater than a preset redundancy threshold; when the evaluation result is greater than the preset redundancy threshold, determining that the preset link is an abnormal link; determining the total link of the abnormal link, wherein the total link includes two preset links; adjusting the redundancy mark of the total link, wherein the redundancy mark includes: a first redundant mark indicating that an abnormal link exists in the total link, and a second redundant mark indicating that no abnormal link exists in the total link.

[0165] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: after determining that the last accumulated target port is a faulty port, obtaining target controller information of the faulty port, wherein the target controller information is a unique identifier of the controller connected to the faulty port; obtaining target chassis information of the hard disk where the faulty port is located, wherein the target chassis information is a unique identifier of the chassis of the hard disk where the faulty port is located; and generating alarm information based on the target controller information and the target chassis information.

[0166] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: after obtaining the target controller information of the faulty port and obtaining the target chassis information of the hard disk where the faulty port is located, determining the upstream port of the faulty port, wherein the upstream port is used to transmit data for the faulty port; obtaining the upstream controller information of the upstream port, wherein the upstream controller information is a unique identifier of the upstream port connection controller; obtaining the upstream chassis information of the hard disk where the upstream port is located, wherein the upstream chassis information is a unique identifier of the chassis of the hard disk where the upstream port is located; and generating alarm information based on the target controller information, the target chassis information, the upstream controller information and the upstream chassis information.

[0167] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program codes for executing the following steps: after generating the alarm information, the method further includes: displaying the alarm information through a graphical user interface.

[0168] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: after obtaining the login status of at least one target port in the faulty target link, if the login status indicates that there is an abnormality in the target port, obtaining the login status of the target port at the target moment according to a preset time interval; if the login status of the target port at the target moment still indicates that there is an abnormality in the target port, isolating the hard disk where the target port is located.

[0169] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: determining that the hard disk where the target port is located is the target hard disk; setting the target hard disk to a closed state, wherein, when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

[0170] Optionally, in this embodiment, the non-volatile readable storage medium is configured to store program code for executing the following steps: after determining that the last accumulated target port is a faulty port, obtaining a redundant mark of the total link where the target link is located, wherein the redundant mark includes: a first redundant mark indicating that there is an abnormal link in the total link, and a second redundant mark indicating that there is no abnormal link in the total link; when the second redundant mark exists in the total link, performing fault isolation on the target controller that controls the faulty port.

[0171] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0172] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0173] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0174] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.

[0175] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile readable storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned non-volatile readable storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.

[0177] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A fault location method, characterized in that: include: Acquire a login status of at least one target port in a target link having a fault, wherein the target link is used to connect to a target port of at least one hard disk according to a preset link sequence; Querying the impact factor corresponding to each login state in a preset set, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login state; Accumulating the impact factor corresponding to each of the target ports one by one according to the preset link order, obtaining an accumulated result after each accumulation, and comparing each accumulated result with a preset positioning threshold; When the accumulated result is greater than the preset positioning threshold, the target port corresponding to the last accumulated impact factor is determined to be a faulty port.

2. The method according to claim 1, characterized in that Before obtaining the login status of at least one target port in the target link with the fault, the method further includes: Obtaining a login status of at least one preset port in a preset link, wherein the preset link is used to connect to a preset port of at least one hard disk; Querying the impact factor corresponding to each login state in a preset set, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login state; Accumulating the influence factors of all preset ports in the preset link to determine an evaluation result of the preset link; When the evaluation result is greater than a preset fault threshold, the preset link is determined to be the target link with a fault.

3. The method according to claim 2, characterized in that Before obtaining the login status of at least one preset port in the preset link, the method further includes: Sending broadcast information to a hard disk set to be detected, wherein the hard disk set to be detected includes at least one hard disk, and each hard disk includes two preset ports; Receive location information returned by the hard disk set to be detected, wherein the location information at least includes: preset chassis information and preset controller information, the preset chassis information is used to indicate a unique identifier of a chassis where each hard disk is located, and the preset controller information is used to indicate a unique identifier of a controller in each chassis, and the controller is connected to a preset port of the hard disk; The preset link is determined according to the preset chassis information and the preset controller information, wherein the preset link is used to cascade controllers with the same identifier in multiple chassis.

4. The method according to claim 2, characterized in that: Obtaining the login status of at least one preset port in the preset link includes: Detecting frame loss information of each of the preset ports, wherein the frame loss information at least includes the number of lost frames; Determine a preset frame loss interval corresponding to the frame loss number in a preset interval set as a target frame loss interval, wherein the preset interval set includes a plurality of the preset frame loss intervals, and each of the preset frame loss intervals is pre-set with a corresponding preset frame loss state; Determine that the target frame loss state corresponding to the target frame loss interval is the login state.

5. The method according to claim 2, characterized in that: After accumulating the influence factors of all preset ports in the preset link to determine the evaluation result of the preset link, the method further includes: Determining whether the evaluation result is greater than a preset redundancy threshold; When the evaluation result is greater than the preset redundancy threshold, determining that the preset link is an abnormal link; Determine a total link of the abnormal link, wherein the total link includes two of the preset links; The redundant mark of the total link is adjusted, wherein the redundant mark includes: a first redundant mark indicating that an abnormal link exists in the total link, and a second redundant mark indicating that the abnormal link does not exist in the total link.

6. The method according to claim 1, characterized in that After determining that the target port corresponding to the last accumulated impact factor is a faulty port, the method further includes: Acquire target controller information of the faulty port, wherein the target controller information is a unique identifier of a controller connected to the faulty port; Obtaining target chassis information of the hard disk where the faulty port is located, wherein the target chassis information is a unique identifier of the chassis of the hard disk where the faulty port is located; Generate alarm information according to the target controller information and the target chassis information.

7. The method according to claim 6, characterized in that After obtaining the target controller information of the faulty port and obtaining the target chassis information of the hard disk where the faulty port is located, the method further includes: Determining an upstream port of the faulty port, wherein the upstream port is used to transmit data for the faulty port; Acquire the upstream controller information of the upstream port, wherein the upstream controller information is a unique identifier of the controller connected to the upstream port; Acquire the upstream chassis information of the hard disk where the upstream port is located, wherein the upstream chassis information is a unique identifier of the chassis of the hard disk where the upstream port is located; Alarm information is generated according to the target controller information, the target chassis information, the upstream controller information and the upstream chassis information.

8. The method according to claim 6 or 7, characterized in that: After generating the warning information, the method further includes: The warning information is displayed through a graphical user interface.

9. The method according to claim 1, characterized in that: After obtaining the login status of at least one target port in the target link with the fault, the method further includes: When the login status indicates that the target port is abnormal, obtaining the login status of the target port at a target time according to a preset time interval; When the login status of the target port at the target time still indicates that the target port is abnormal, the hard disk where the target port is located is isolated.

10. The method according to claim 9, characterized in that Isolating the hard disk where the target port is located includes: Determine that the hard disk where the target port is located is the target hard disk; The target hard disk is set to a closed state, wherein when the target hard disk is in the closed state, all ports of the target hard disk are disconnected.

11. The method according to claim 1, characterized in that: After determining that the target port corresponding to the last accumulated impact factor is a faulty port, the method further includes: Acquire a redundant mark of the total link where the target link is located, wherein the redundant mark includes: a first redundant mark indicating that the total link has an abnormal link, and a second redundant mark indicating that the total link does not have the abnormal link; In a case where the second redundant tag exists in the overall link, fault isolation is performed on the target controller controlling the faulty port.

12. A fault location device, characterized in that: include: hard disk, serial bus and chassis managers; A serial bus configured to connect a target port of at least one hard disk in a target link according to a preset link sequence, wherein the target link is a link with a fault; The chassis manager is configured to obtain the login status of the target port, query the impact factor corresponding to each login status in a preset set, accumulate the impact factor corresponding to each target port one by one according to the preset link order, and compare each accumulation result with a preset positioning threshold; when the accumulation result is greater than the preset positioning threshold, determine that the target port corresponding to the last accumulated impact factor is a faulty port, wherein the preset set is used to record multiple login states and the impact factor corresponding to each login state.

13. The device according to claim 12, characterized in that The device also includes: The controller is configured to connect the serial bus to a preset port of the hard disk.

14. The device according to claim 12, characterized in that The device also includes: A bus control chip configured to publish a broadcast event to at least one hard disk and the chassis manager; The chassis manager is also configured to initiate a discovery mechanism to obtain the location information of each hard disk after receiving the broadcast, wherein the location information includes at least: preset chassis information and preset controller information, the preset chassis information is used to indicate the unique identifier of the chassis where each hard disk is located, and the preset controller information is used to indicate the unique identifier of the controller in each chassis, and the controller is connected to the preset port of the hard disk.

15. The device according to claim 14, characterized in that The chassis manager is further configured to, after initiating a discovery mechanism, subscribe to the frame loss information of each of the preset ports, wherein the frame loss information includes at least the number of frame losses; determine a preset frame loss interval corresponding to the number of frame losses in a preset interval set as a target frame loss interval, wherein the preset interval set includes a plurality of the preset frame loss intervals, each of the preset frame loss intervals being pre-set with a corresponding preset frame loss state; and determine a target frame loss state corresponding to the target frame loss interval as the login state.

16. The device according to claim 12, characterized in that The preset ports of the hard disk include: a first preset port and a second preset port; The serial bus includes: a first serial bus and a second serial bus; The first serial bus is configured to connect to the first preset port; and the second serial bus is configured to connect to the second preset port.

17. The device according to claim 16, characterized in that The chassis manager is further configured to obtain the login status of at least one preset port in a preset link, wherein the preset link is a link of the first serial bus or a link of the second serial bus; query the impact factor corresponding to each login status in a preset set, wherein the preset set is used to record multiple login statuses and the impact factor corresponding to each login status; accumulate the impact factors of all preset ports in the preset link to determine an evaluation result of the preset link; determine that the preset link is an abnormal link when the evaluation result is greater than a preset redundancy threshold; adjust the redundant mark of the total link where the abnormal link is located, wherein the total link includes the first serial bus and the second serial bus, and the redundant mark includes: a first redundant mark indicating that the total link has an abnormal link, and a second redundant mark indicating that the total link does not have the abnormal link.

18. The device according to claim 12, characterized in that The device also includes: A timer is configured to start when the login status indicates that the target port is abnormal, and to determine the target time according to a preset time interval; The chassis manager is further configured to obtain the login status of the target port at the target time; and if the login status of the target port at the target time still indicates that the target port is abnormal, isolate the hard disk where the target port is located.

19. The device according to claim 12, characterized in that The chassis manager is further configured to, after determining the faulty port in the target link, obtain a redundant tag of the overall link where the target link is located, wherein the redundant tag includes: a first redundant tag indicating that an abnormal link exists in the overall link, and a second redundant tag indicating that the abnormal link does not exist in the overall link; and in the case where the second redundant tag exists in the overall link, perform fault isolation on the target controller that controls the faulty port.

20. A fault location device, characterized in that: include: an acquisition module, configured to acquire a login status of at least one target port in a target link having a fault, wherein the target link is used to connect to a target port of at least one hard disk according to a preset link sequence; A query module, configured to query an impact factor corresponding to each of the login states in a preset set, wherein the preset set is used to record multiple login states and an impact factor corresponding to each of the login states; A processing module is configured to accumulate the impact factor corresponding to each of the target ports one by one according to the preset link sequence, obtain an accumulated result after each accumulation, and compare each accumulated result with a preset positioning threshold; The determination module is configured to determine that the target port corresponding to the last accumulated impact factor is a faulty port when the accumulated result is greater than the preset positioning threshold.

21. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium is configured to store a program, wherein when the program is executed, the device where the non-volatile readable storage medium is located is controlled to execute the fault location method according to any one of claims 1 to 11.

22. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is configured to run a program stored in the processor, wherein the program executes the fault location method according to any one of claims 1 to 11 when running.

Citation Information

Patent Citations

  • Bearing layer chain monitoring method and system

    CN105227388A

  • Network link quality monitoring method and apparatus

    CN105721184A

  • Fault detection method and device for storage link, equipment and storage medium

    CN111858122A

  • SAS card link state monitoring method, system and device and readable storage medium

    CN113568806A

  • Fault positioning method, equipment and device, storage medium and electronic equipment

    CN116755920A