Hard disk detection method and device

By combining the IO parameters of the hard disk and the server, dynamically adjusting the detection threshold, the problem of high error judgment rate of slow disk detection in the prior art is solved, and the accuracy of detection and the stability of the storage array are improved.

CN119322707APending Publication Date: 2025-01-17CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310873593.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The prior art has a high error rate in hard disk slow disk detection, and it is impossible to accurately identify slow disks, which affects the overall performance and business continuity of the storage array.

Method used

By obtaining the IO parameters of the hard disk array and the target server, combining the IO parameters of the service side, dynamically adjusting the detection threshold, considering the IO influence of the hard disk and the server side, and improving the accuracy of slow disk detection.

Benefits of technology

It significantly improves the accuracy of slow disk detection, reduces misjudgment, and ensures the stability and business continuity of the storage array.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322707A_ABST
    Figure CN119322707A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a hard disk detection method and device, relates to the technical field of storage, and can improve the accuracy of slow disk detection. The method comprises the following steps: acquiring first information of a hard disk array; and determining a target hard disk from the hard disk array according to the first information. And isolating the target hard disk. And obtaining second information of the target server. And determining state information of the target hard disk according to the second information. Wherein the first information comprises at least one of IO time delay of hard disks in the hard disk array, IO number per second of the hard disks and bandwidth amount of the hard disks, the hard disk array is used for providing storage service for a target server, the second information comprises at least one of IO time delay, IOPS and bandwidth amount, and the target server is used for providing storage service for the target server. The state information is used for indicating whether the target hard disk is a slow disk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of storage technology, and in particular to a hard disk detection method and device. Background Art

[0002] The hard disk will become slow due to head degradation or other mechanical or environmental problems, which will cause the hard disk input and output (IO) response time to be longer. In the storage array system, user data is stored in a series of hard disks in parallel. If a hard disk is very slow, the overall read and write operations will be slow. In serious cases, it will cause business interruption. Therefore, it is necessary to detect each disk in the storage array in real time to determine the slow disk so that the slow disk can be isolated or backed up in time.

[0003] Related technologies usually detect slow disks based on the average IO service time. For example, if the average IO service time of a disk during the detection period is greater than a preset threshold, the disk is judged as a slow disk. However, related technologies often judge normal hard disks as slow disks, with a high misjudgment rate.

[0004] Therefore, how to improve the accuracy of slow disk detection is one of the problems that technical personnel in this field need to solve urgently. Summary of the invention

[0005] The embodiment of the present application provides a hard disk detection method and device, which can improve the accuracy of slow disk detection. To achieve the above purpose, the embodiment of the present application adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a hard disk detection method, the method comprising: obtaining first information of a hard disk array. Determining a target hard disk from the hard disk array based on the first information. Isolating the target hard disk. Obtaining second information of the target server. Determining status information of the target hard disk based on the second information. The first information comprises at least one of the IO latency of the hard disks in the hard disk array, the number of IOs per second (input and output per second, IOPS) of the hard disks, and the bandwidth of the hard disks, the hard disk array is used to provide storage services for the target server, the second information comprises at least one of the IO latency, IOPS, and bandwidth, and the status information is used to indicate whether the target hard disk is a slow disk.

[0007] Related technologies usually identify slow disks based on absolute comparison (comparison with a unified threshold) or horizontal comparison (comparison between multiple disks, or comparison with a fixed threshold) of the hard disk's IO parameters. Slow disk detection based only on the hard disk's IO parameters does not take into account the actual degree of impact on the business, and the detection is not accurate enough. To this end, the method provided in the embodiment of the present application, by additionally introducing the IO parameters of the business end (i.e., the target server) during the slow disk detection process, determines the actual degree of impact of the hard disk on the business through the IO parameters of the target server. It can be seen that the method provided in the embodiment of the present application, during the slow disk detection process, not only takes into account the IO parameters of the hard disk, but also takes into account the IO parameters of the server end, thereby improving the accuracy of slow disk detection.

[0008] In a possible implementation manner, the target hard disk may be determined from the hard disk array according to the first information and the detection threshold.

[0009] It can be seen that the method provided in the embodiment of the present application can determine the target hard disk (potential slow disk) from the hard disk array through the first information characterizing the hard disk IO parameters, and then further determine whether the potential slow disk is a slow disk through the server IO parameters of the hard disk array. Due to the method provided in the embodiment of the present application, in the slow disk detection process, not only the IO parameters of the hard disk are considered, but also the IO parameters of the server are considered, thereby improving the accuracy of slow disk detection.

[0010] In a possible implementation manner, the detection threshold may be adjusted according to the above state information.

[0011] It is understandable that if the detection threshold is set too low, it may result in the inability to determine the target hard disk (potential slow disk) from the hard disk array based on the hard disk IO parameters, and if the detection threshold is set too high, a normal hard disk may be misjudged as the target hard disk (potential slow disk). To this end, the method provided in the embodiment of the present application can also adjust the dynamic detection threshold according to the above-mentioned status information. On the one hand, it can avoid the inability to determine the target hard disk (potential slow disk) from the hard disk array based on the hard disk IO parameters due to the detection threshold being set too low, and on the other hand, it can avoid the misjudgment of a normal hard disk as the target hard disk (potential slow disk) if the detection threshold is set too high.

[0012] In a possible implementation, the target hard disk may be released from isolation if the target hard disk is not a slow disk.

[0013] It is understandable that if the target hard disk (potential slow disk) is not a slow disk, it means that the target hard disk does not affect the server IO business, and the target hard disk can be released from isolation, thereby avoiding long-term isolation of the target hard disk affecting the stability of the hard disk array.

[0014] Optionally, the first information may also include link status information.

[0015] In a possible implementation manner, whether the link of the hard disk array is normal may be determined based on the link status information.

[0016] It can be seen that the method provided in the embodiment of the present application can determine the potential abnormal link from the hard disk array by characterizing the link status information of the hard disk array link, and then further determine whether the potential abnormal link is abnormal by the server IO parameters of the hard disk array. Since the method provided in the embodiment of the present application not only considers the link status but also the server IO parameters in the link detection process, the accuracy of link detection is improved.

[0017] Optionally, the first information also includes interface card status information.

[0018] In a possible implementation manner, whether the interface card of the hard disk array is normal may be determined according to the interface card status information.

[0019] It can be seen that the method provided in the embodiment of the present application can determine the potential abnormal interface card from the hard disk array by characterizing the interface card status information of the hard disk array interface card, and then further determine whether the potential abnormal interface card is abnormal by the server IO parameters of the hard disk array. Due to the method provided in the embodiment of the present application, in the interface card detection process, not only the interface card status but also the server IO parameters are considered, thereby improving the accuracy of interface card detection.

[0020] Optionally, the first information further includes garbage collection (GC) information.

[0021] In a possible implementation manner, whether the GC of the hard disk array is normal may be determined according to the GC information.

[0022] It can be seen that the method provided in the embodiment of the present application can determine the potential abnormal GC module from the hard disk array by characterizing the GC information of the hard disk array GC module, and then further determine whether the potential abnormal GC module is abnormal by the server IO parameters of the hard disk array. Since the method provided in the embodiment of the present application not only considers the GC information but also the server IO parameters in the GC detection process, the accuracy of GC detection is improved.

[0023] In a second aspect, the present application implements a hard disk detection device, which includes: a transceiver unit and a processing unit. The transceiver unit is used to obtain first information of the hard disk array, and the first information includes at least one of the IO latency of the hard disk in the hard disk array, the IOPS of the hard disk, the bandwidth of the hard disk, the average IO service time or the average response time, and the hard disk array is used to provide storage services for the target server. The processing unit is used to determine the target hard disk from the hard disk array according to the first information. The processing unit is also used to isolate the target hard disk. The transceiver unit also obtains second information of the target server, and the second information includes at least one of the IO latency, IOPS, bandwidth, average IO service time or average response time. The processing unit is also used to determine the status information of the target hard disk according to the second information, and the status information is used to indicate whether the target hard disk is a slow disk.

[0024] In a possible implementation manner, the processing unit is specifically configured to: determine a target hard disk from the hard disk array according to the first information and a detection threshold.

[0025] In a possible implementation manner, the processing unit is further configured to: adjust a detection threshold according to the status information.

[0026] In a possible implementation, the processing unit is further configured to: when the target hard disk is not a slow disk, release the isolation of the target hard disk.

[0027] In a possible implementation manner, the first information further includes link status information.

[0028] In a possible implementation, the processing unit is further configured to: determine whether the link of the hard disk array is normal according to the link status information.

[0029] In a possible implementation manner, the first information further includes interface card status information.

[0030] In a possible implementation, the processing unit is further configured to determine whether the interface card of the hard disk array is normal according to the interface card status information.

[0031] In a possible implementation manner, the first information further includes garbage collection (GC) information.

[0032] In a possible implementation, the processing unit is further configured to determine whether the GC of the hard disk array is normal according to the GC information.

[0033] In a third aspect, an embodiment of the present application further provides a hard disk detection device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the method described in the above first aspect or any possible implementation method thereof.

[0034] Optionally, the hard disk detection device may further include at least one memory, and the at least one memory is used to store the program code or instruction.

[0035] In a fourth aspect, an embodiment of the present application further provides a chip, comprising: an input interface, an output interface, and at least one processor. Optionally, the chip further comprises a memory. The at least one processor is used to execute the code in the memory, and when the at least one processor executes the code, the chip implements the method described in the first aspect or any possible implementation thereof.

[0036] Optionally, the above chip may also be an integrated circuit.

[0037] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium for storing a computer program, wherein the computer program includes methods for implementing the method described in the above-mentioned first aspect or any possible implementation thereof.

[0038] In a sixth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the method described in the first aspect or any possible implementation thereof.

[0039] The hard disk detection device, computer storage medium, computer program product and chip provided in this embodiment are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the method provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A schematic diagram of a storage system provided in an embodiment of the present application;

[0042] Figure 2 A flowchart of a hard disk detection method provided in an embodiment of the present application;

[0043] Figure 3A schematic diagram of the detection threshold adjustment process provided in the embodiment of the present application

[0044] Figure 4 Another schematic diagram of the detection threshold adjustment process provided in the embodiment of the present application;

[0045] Figure 5 A schematic diagram of the structure of a hard disk detection device provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of the structure of a chip provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of the structure of another hard disk detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0050] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0051] The terms "first" and "second" and the like in the description and drawings of the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0052] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0053] It should be noted that in the description of the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as having priority or advantage over other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0054] First, the terms involved in the embodiments of the present application are explained.

[0055] Slow disk: A slow disk refers to a problem with the hard disk's internal firmware (FW) or media, which increases the latency of the hard disk's external IO access, ultimately affecting the service returned by the array to the server, causing freezes or interruptions.

[0056] The hard disk will become slow due to head degradation or other mechanical or environmental problems, which will cause the hard disk input and output (IO) response time to be longer. In the storage array system, user data is stored in a series of hard disks in parallel. If a hard disk is very slow, the overall read and write operations will be slow. In serious cases, it will cause business interruption. Therefore, it is necessary to detect each disk in the storage array in real time to determine the slow disk so that the slow disk can be isolated or backed up in time.

[0057] Related technologies usually detect slow disks based on the average IO service time. For example, if the average IO service time of a disk during the detection period is greater than a preset threshold, the disk is judged as a slow disk. However, related technologies often judge normal hard disks as slow disks, with a high misjudgment rate.

[0058] To this end, an embodiment of the present application provides a hard disk detection method, which can be applied to a storage system. Figure 1 A schematic diagram of a storage system 100 provided in an embodiment of the present application is shown in FIG. Figure 1 The storage system 100 shown may include: a hard disk array 101 , a hard disk detection device 102 and a server 103 .

[0059] The hard disk array 101 is used to provide storage services for the server 103. The hard disk array 101 includes multiple storage media.

[0060] Optionally, the above storage medium includes but is not limited to a solid state drive, a mechanical hard drive, a memory or a memory disk.

[0061] The hard disk detection device 102 is used to perform slow disk detection on the hard disk array 101 .

[0062] Optionally, the hard disk detection device 102 may be integrated with the hard disk array 101 or the server 103 .

[0063] Optionally, the above schematic diagram is only an example. In actual applications, the components in the above storage system 100 may be added or deleted according to actual needs. Figure 1 It should not be understood as limiting the embodiments of the present invention.

[0064] Figure 2 A hard disk detection method provided in an embodiment of the present application is shown, and the method includes:

[0065] S201: Acquire first information of a hard disk array.

[0066] Among them, the above-mentioned first information includes at least one of the IO latency of the hard disk in the above-mentioned hard disk array, the IOPS of the above-mentioned hard disk, the bandwidth of the above-mentioned hard disk, the IO average service time or the average response time, and the above-mentioned hard disk array is used to provide storage services for the target server.

[0067] Optionally, the above-mentioned first information may also include link status information.

[0068] Optionally, the first information may also include interface card status information.

[0069] Optionally, the first information may also be GC information.

[0070] S202: Determine a target hard disk from a hard disk array according to the first information.

[0071] In a possible implementation manner, the target hard disk may be determined from the hard disk array according to the first information and the detection threshold.

[0072] The detection threshold includes multiple detection thresholds, including at least one of an IO latency detection threshold, an IOPS detection threshold, a bandwidth detection threshold, an IO average service time detection threshold, or an average response time detection threshold.

[0073] Exemplarily, when the IO latency of the hard disk is greater than the IO latency detection threshold, the hard disk can be determined as the above-mentioned target hard disk (i.e., a potential slow disk); when the IO latency of the hard disk is less than the IO latency detection threshold, the hard disk can be determined as a normal hard disk.

[0074] S203: Isolate the target hard disk.

[0075] Exemplarily, when the IO latency of a hard disk is greater than an IO latency detection threshold, the hard disk may be determined as the target hard disk and temporarily isolated.

[0076] S204: Obtain second information of the target server.

[0077] The second information includes at least one of IO latency, IOPS, bandwidth, IO average service time or average response time.

[0078] It should be noted that, unlike the first information which represents the operating status of the hard disk in the hard disk array, the second information is used to represent the operating status of the hard disk on the server side.

[0079] S205: Determine status information of the target hard disk according to the second information.

[0080] The above-mentioned status information is used to indicate whether the above-mentioned target hard disk is a slow disk.

[0081] In a possible implementation, the status information of the target hard disk can be determined based on the second information at the first moment and the second information at the second moment, where the first moment is the moment before isolating the target hard disk and the second moment is the moment after isolating the target hard disk.

[0082] Exemplarily, taking the second information including IO latency as an example, if the IO latency at the first moment (hereinafter referred to as the first IO latency) is greater than the IO latency at the second moment (hereinafter referred to as the second IO latency), it can be determined that the target hard disk is a slow disk.

[0083] It is understandable that if there is a slow disk in the hard disk array, the operating parameters of the hard disk array server will be affected by the slow disk and the performance will be reduced. After isolating the slow disk in the hard disk array, the operating parameters of the hard disk array server will be improved. The first IO delay is greater than the second IO delay, which means that after isolating the potential slow disk, the IO delay of the server is reduced and the IO performance is improved. Therefore, when the first IO delay is greater than the second IO delay, the target hard disk (potential slow disk) can be determined to be a slow disk.

[0084] In a possible implementation, the change amount can be determined based on the second information at the first moment and the second information at the second moment, and the status information of the target hard disk can be determined based on the second information at the first moment, the second information at the second moment and the change amount.

[0085] Exemplarily, taking the second information including IO latency as an example, if the first IO latency is greater than the second IO latency and the change in the first IO latency and the second IO latency (i.e., the absolute value of the difference between the first IO latency and the second IO latency) is greater than a preset change threshold, it can be determined that the target hard disk (potential slow disk) is a slow disk.

[0086] It is understandable that the operating parameters of the hard disk array server have certain fluctuations, because there is a certain probability of misjudgment when judging whether a potential slow disk is a slow disk only by the size of the operating parameters of the hard disk array server before and after the isolation of the potential slow disk. For this reason, the fluctuation of the operating parameters of the hard disk array server can be balanced by introducing a variation, thereby further reducing the probability of misjudgment of slow disk detection.

[0087] In a possible implementation manner, the detection threshold may also be adjusted according to the above state information.

[0088] For example, Figure 3 As shown in the figure, the hard disk array is tested for slow disks at time 1, but no slow disk is detected. The IO latency of the server is increasing between time 1 and time 2, indicating that there may be a slow disk in the hard disk array, which affects the service of the server. However, the current detection threshold is too slow, so the detection threshold can be increased at time 2.

[0089] After increasing the detection threshold at time 2, no slow disk is detected. However, the IO latency of the server is still increasing between time 2 and time 3, indicating that there may be a slow disk in the hard disk array, which affects the service of the server. However, the current detection threshold is too slow, so the detection threshold can be further increased at time 3.

[0090] After the detection threshold is increased at time 3, a potential slow disk (i.e., the target hard disk) is detected. After the potential hard disk is isolated, the IO latency of the server begins to decrease, and it can be determined that the potential hard disk is a slow disk.

[0091] Another example is Figure 4 As shown, at time 1, a slow disk detection is performed on the hard disk array, and a potential slow disk is detected. After the potential hard disk is isolated, the IO latency of the server does not change, indicating that the service of the server is not affected by the potential slow disk. It can be determined that the potential hard disk is a normal hard disk, and the current detection threshold is too sensitive, so the detection threshold can be reduced at time 2.

[0092] After the detection threshold is reduced at time 2, a potential slow disk is detected again. After the potential hard disk is isolated, the IO latency of the server does not change, indicating that the service of the server is not affected by the potential slow disk. It can be determined that the potential hard disk is a normal hard disk, and the current detection threshold is too sensitive. In this case, the detection threshold can be further reduced at time 3.

[0093] After reducing the detection threshold at time 3, no change in the IO latency of the slow disk server was detected, indicating that the service on the server side was not affected by the potential slow disk.

[0094] It is understandable that if the detection threshold is set too low, it may be impossible to determine the target hard disk (potential slow disk) from the hard disk array based on the hard disk IO parameters, and if the detection threshold is set too high, a normal hard disk may be misjudged as the target hard disk (potential slow disk). To this end, the method provided in the embodiment of the present application can also adjust the dynamic detection threshold according to the above-mentioned status information. On the one hand, it can avoid the detection threshold being set too low, resulting in the inability to determine the target hard disk (potential slow disk) from the hard disk array based on the hard disk IO parameters, and on the other hand, it can avoid the detection threshold being set too high, resulting in the normal hard disk being misjudged as the target hard disk (potential slow disk).

[0095] In a possible implementation, the target hard disk may be released from isolation when the target hard disk is not a slow disk.

[0096] Exemplarily, taking the case where the second information includes IO latency, if the IO latency at the first moment is smaller than the IO latency at the second moment, it can be determined that the target hard disk is a normal hard disk, and the target hard disk can be released from isolation.

[0097] In a possible implementation manner, whether the link of the hard disk array is normal may also be determined based on the link status information.

[0098] Exemplarily, the link status information of the first hard disk link in the first information can be compared with a preset link status threshold to determine whether the first hard disk link is an abnormal hard disk link. If it is determined that the first hard disk link is a potential abnormal hard disk link, the first hard disk link can be isolated, and then the second information before and after the isolation of the first hard disk link can be compared to determine whether the first hard disk link is an abnormal link. The first hard disk link is any hard disk link in the above hard disk array.

[0099] It is understandable that if there is an abnormal hard disk link in the hard disk array, the operating parameters of the hard disk array server will be affected by the abnormal hard disk link and the performance will be reduced. After isolating the abnormal hard disk link in the hard disk array, the operating parameters of the hard disk array server will be improved. Therefore, by comparing the second information before and after isolating the first hard disk link to determine whether the operating parameters of the hard disk array server are improved, it can be determined whether the first hard disk link is an abnormal hard disk link.

[0100] In a possible implementation manner, the preset link status threshold may also be adjusted according to the status information.

[0101] In a possible implementation manner, it may also be determined whether the interface card of the hard disk array is normal according to the interface card status information.

[0102] Exemplarily, the interface card status information of the first interface card in the first information can be compared with a preset interface card status threshold to determine whether the first interface card is an abnormal interface card. If it is determined that the first interface card is a potential abnormal interface card, the first interface card can be isolated, and then the second information before and after the isolation of the first interface card can be compared to determine whether the first interface card is an abnormal link. The first interface card is any interface card in the above-mentioned hard disk array.

[0103] It is understandable that if there is an abnormal interface card in the hard disk array, the operating parameters of the hard disk array server will be affected by the abnormal interface card and the performance will be reduced. After isolating the abnormal interface card in the hard disk array, the operating parameters of the hard disk array server will be improved. Therefore, by comparing the second information before and after isolating the first interface card, it can be determined whether the operating parameters of the hard disk array server are improved, thereby determining whether the first interface card is an abnormal interface card.

[0104] In a possible implementation manner, the preset interface card status threshold may also be adjusted according to the interface card status information.

[0105] In a possible implementation manner, it may also be determined whether the GC of the hard disk array is normal according to the GC information.

[0106] Exemplarily, the GC information of the first GC module in the first information can be compared with a preset CG threshold to determine whether the first GC module is an abnormal GC module. If it is determined that the first GC module is a potential abnormal GC module, the first GC module can be isolated, and then the second information before and after the isolation of the first GC module can be compared to determine whether the first GC module is an abnormal link. The first GC module is any GC module in the above-mentioned hard disk array.

[0107] It is understandable that if there is an abnormal GC module in the hard disk array, the operating parameters of the hard disk array server will be affected by the abnormal GC module and the performance will be reduced. After isolating the abnormal GC module in the hard disk array, the operating parameters of the hard disk array server will be improved. Therefore, by comparing the second information before and after isolating the first GC module, it can be determined whether the operating parameters of the hard disk array server are improved, thereby determining whether the first GC module is an abnormal GC module.

[0108] In a possible implementation, the preset CG threshold may also be adjusted according to the GC information.

[0109] In a possible implementation, whether a target device in the hard disk array is abnormal can be determined according to the first information and the second information, and the target device includes at least one of a hard disk, a hard disk link, an interface card or a GC module.

[0110] Optionally, whether multiple target devices are abnormal can be determined simultaneously based on the first information and the second information, or can be determined in sequence.

[0111] Exemplarily, it may be determined whether the hard disk is a slow disk based on the first information and the second information.

[0112] In the case that the hard disk is a slow disk, the detection of whether the remaining undetected target devices are abnormal is stopped or the detection of whether the remaining undetected target devices are abnormal is continued.

[0113] When the hard disk is normal, it is determined whether the hard disk link is faulty according to the first information and the second information.

[0114] In the case of a hard disk link abnormality, stop detecting whether the remaining undetected target devices are abnormal or continue detecting whether the remaining undetected target devices are abnormal.

[0115] When the hard disk link is normal, it is determined whether the interface card is faulty according to the first information and the second information.

[0116] In the case of an abnormality in the interface card, the detection of whether the remaining undetected target devices are abnormal is stopped or the detection of whether the remaining undetected target devices are abnormal is continued.

[0117] When the interface card is normal, it is determined whether the GC module is faulty according to the first information and the second information.

[0118] In the case of an abnormality in the GC module, the detection of whether the remaining undetected target devices are abnormal is stopped or the detection of whether the remaining undetected target devices are abnormal is continued.

[0119] When the GC module is normal, detect whether the remaining undetected target devices are abnormal.

[0120] If the above-mentioned multiple target devices are all normal, the detection thresholds of the multiple target devices can be lowered and detection can be continued, and the cycle is repeated until an abnormal target device is detected.

[0121] It is understandable that there are multiple devices in the hard disk array, and the failure of each of the multiple devices may cause the hard disk array failure (such as abnormal IO operating parameters, IO errors or IO hangs). Therefore, the multiple devices in the hard disk array can be detected simultaneously or polled according to the operating parameters of the hard disk array and the operating parameters of the hard disk array server until the abnormal device in the hard disk array is determined and processed to restore the hard disk array to normal.

[0122] In a possible implementation, when there is an IO error or IO hang in the hard disk array, it can be determined whether the target device in the hard disk array is abnormal according to the first information and the second information.

[0123] The following will be combined Figure 5 A hard disk detection device for executing the hard disk detection method is introduced.

[0124] It is understandable that, in order to realize the above functions, the hard disk detection device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the embodiments of the present application.

[0125] The embodiment of the present application can divide the hard disk detection device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0126] In the case of dividing each functional module into corresponding functional modules, Figure 5 A possible schematic diagram of the hard disk detection device involved in the above embodiment is shown. Figure 5 As shown, the hard disk detection device 700 may include: a transceiver unit 501 and a processing unit 502 .

[0127] The transceiver unit 501 is used to obtain first information of a hard disk array, wherein the first information includes at least one of the IO latency of the hard disks in the hard disk array, the IOPS of the hard disks, the bandwidth of the hard disks, the average IO service time or the average response time, and the hard disk array is used to provide storage services for the target server.

[0128] The processing unit 502 is configured to determine a target hard disk from the hard disk array according to the first information.

[0129] The processing unit 502 is also used to isolate the target hard disk.

[0130] The transceiver unit 501 further obtains second information of the target server, where the second information includes at least one of IO latency, IOPS, bandwidth, IO average service time or average response time.

[0131] The processing unit 502 is further configured to determine status information of the target hard disk according to the second information, where the status information is used to indicate whether the target hard disk is a slow disk.

[0132] In a possible implementation, the processing unit 502 is specifically configured to: determine a target hard disk from the hard disk array according to the first information and a detection threshold.

[0133] In a possible implementation, the processing unit 502 is further configured to: adjust a detection threshold according to the state information.

[0134] In a possible implementation, the processing unit 502 is further configured to: if the target hard disk is not a slow disk, release the isolation of the target hard disk.

[0135] In a possible implementation manner, the first information further includes link status information.

[0136] In a possible implementation, the processing unit 502 is further configured to determine whether the link of the hard disk array is normal according to the link status information.

[0137] In a possible implementation manner, the first information further includes interface card status information.

[0138] In a possible implementation, the processing unit 502 is further configured to determine whether the interface card of the hard disk array is normal according to the interface card status information.

[0139] In a possible implementation manner, the first information further includes garbage collection (GC) information.

[0140] In a possible implementation, the processing unit 502 is further configured to determine whether the GC of the hard disk array is normal according to the GC information.

[0141] The embodiment of the present application also provides a chip. Figure 6 Schematic diagram of the structure of a chip 600 is shown. The chip 600 includes one or more processors 601 and an interface circuit 602. Optionally, the chip 600 may also include a bus 603.

[0142] The processor 601 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the hard disk detection method may be completed by an integrated logic circuit of hardware in the processor 601 or by instructions in the form of software.

[0143] Optionally, the processor 601 may be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods and steps disclosed in the embodiments of the present application may be implemented or executed. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0144] The interface circuit 602 can be used to send or receive data, instructions or information. The processor 601 can use the data, instructions or other information received by the interface circuit 602 to process, and can send the processing completion information through the interface circuit 602.

[0145] Optionally, the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory (NVRAM).

[0146] Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operating system).

[0147] Optionally, the chip can be used in the hard disk detection device involved in the embodiment of the present application. Optionally, the interface circuit 602 can be used to output the execution result of the processor 601. The hard disk detection method provided by one or more embodiments of the embodiment of the present application can refer to the aforementioned embodiments, which will not be repeated here.

[0148] It should be noted that the functions corresponding to the processor 601 and the interface circuit 602 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.

[0149] Figure 7 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device 700 may be a processor or a chip or functional module in a processor. Figure 7 As shown, the electronic device 700 includes a processor 701 , a transceiver 702 and a communication circuit 703 .

[0150] Among them, the processor 701 is used to execute any step in the hard disk detection method provided in the embodiment of the present application, and in the process of executing any step in the hard disk detection method provided in the embodiment of the present application, the transceiver 702 and the communication line 703 can be selectively called to complete the corresponding operation.

[0151] Furthermore, the electronic device 700 may further include a memory 704 . The processor 701 , the memory 704 and the transceiver 702 may be connected via a communication line 703 .

[0152] The processor 701 is a processor, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 701 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.

[0153] The transceiver 702 is used to communicate with other devices or other communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The transceiver 702 can be a module, a circuit, a transceiver or any device capable of achieving communication.

[0154] The transceiver 702 is mainly used for sending and receiving commands and information, etc., and may include a transmitter and a receiver, which respectively send and receive commands and information, etc.; operations other than sending and receiving commands and information, etc. are implemented by the processor.

[0155] The communication line 703 is used to transmit information between the components included in the electronic device 700.

[0156] In one design, the processor may be considered as the logic circuit and the transceiver may be considered as the interface circuit.

[0157] The memory 704 is used to store instructions, where the instructions may be computer programs.

[0158] The memory 704 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus RAM (DRRAM). The memory 704 may also be a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc. It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0159] It should be noted that the memory 704 can exist independently of the processor 701, or can be integrated with the processor 701. The memory 704 can be used to store instructions or program codes or some data, etc. The memory 704 can be located inside the electronic device 700, or outside the electronic device 700, without limitation. The processor 701 is used to execute the instructions stored in the memory 704 to implement the method provided in the above embodiment of the present application.

[0160] In one example, the processor 701 may include one or more processors, such as Figure 7 Processor 0 and processor 1 in.

[0161] As an optional implementation, the electronic device 700 includes multiple processors, for example, Figure 7 In addition to the processor 701, a processor 707 may also be included.

[0162] As an optional implementation, the electronic device 700 further includes an output device 705 and an input device 706. Exemplarily, the input device 706 is a keyboard, a mouse, a microphone, a joystick, and the like, and the output device 705 is a display screen, a speaker, and the like.

[0163] It should be noted that the electronic device 700 may be a chip system or a Figure 7 Devices with similar structures in the chip system. Among them, the chip system can be composed of chips, or it can include chips and other discrete devices. The actions, terms, etc. involved in the various embodiments of this application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiment of this application is only an example, and other names can also be used in the specific implementation without limitation. In addition, Figure 7 The components shown in the figure do not constitute a limitation on the electronic device 700. Figure 7 In addition to the components shown, the electronic device 700 may include Figure 7 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0164] The processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0165] Figure 8This is a schematic diagram of the structure of a hard disk detection device provided in an embodiment of the present application. The hard disk detection device can be applied to the scenario shown in the above method embodiment. For the convenience of explanation, Figure 8 Only the main components of the hard disk detection device are shown, including a processor 801, a memory 802, a control circuit 803, and an input-output device 804. The processor 801 is mainly used to process the communication protocol and communication data, execute the software program, and process the data of the software program. The memory 802 is mainly used to store the software program and data. The control circuit 803 is mainly used for power supply and transmission of various electrical signals. The input-output device 804 is mainly used to receive data input by the user and output data to the user.

[0166] When the hard disk detection device is a processor 801, the control circuit 803 can be a mainboard, the memory 802 includes a hard disk, RAM, ROM and other media with storage functions, the processor 801 can include a baseband processor 801 and a central processing unit, the baseband processor is mainly used to process the communication protocol and communication data, the central processing unit is mainly used to control the entire hard disk detection device, execute software programs, and process the data of the software programs, and the input and output device 804 includes a display screen, a keyboard and a mouse, etc.; the control circuit 803 can further include or connect a transceiver circuit or a transceiver, such as: a network cable interface, etc., for sending or receiving data or signals, such as data transmission and communication with other devices. Further, it can also include an antenna for sending and receiving wireless signals, and for data / signal transmission with other devices.

[0167] An embodiment of the present application also provides a hard disk detection device, which includes: at least one processor, when the at least one processor executes program code or instructions, the above-mentioned related method steps are implemented to implement the hard disk detection method in the above embodiment.

[0168] Optionally, the device may further include at least one memory, and the at least one memory is used to store the program code or instruction.

[0169] An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on a hard disk detection device, the hard disk detection device executes the above-mentioned related method steps to implement the hard disk detection method in the above-mentioned embodiment.

[0170] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the hard disk detection method in the above-mentioned embodiment.

[0171] The embodiment of the present application also provides a hard disk detection device, which can be a chip, an integrated circuit, a component or a module. Specifically, the device can include a connected processor and a memory for storing instructions, or the device includes at least one processor for obtaining instructions from an external memory. When the device is running, the processor can execute instructions so that the chip executes the hard disk detection method in each of the above method embodiments.

[0172] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, 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 devices or units, which can be electrical, mechanical or other forms.

[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0178] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read Only Memory (ROM), Random Access Memory (RAM), disk or optical disk, and other media that can store program codes.

[0179] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A hard disk detection method, characterized in that: The method comprises: Acquire first information of a hard disk array, the first information including at least one of an input / output (IO) latency of a hard disk in the hard disk array, an IO number per second (IOPS) of the hard disk, a bandwidth of the hard disk, an IO average service time, or an average response time, wherein the hard disk array is used to provide storage services for a target server; determining a target hard disk from the hard disk array according to the first information; Isolating the target hard disk; Acquire second information of the target server, where the second information includes at least one of IO latency, IOPS, bandwidth, IO average service time, or average response time; The status information of the target hard disk is determined according to the second information, where the status information is used to indicate whether the target hard disk is a slow disk.

2. The method according to claim 1, characterized in that The step of determining a target hard disk from the hard disk array according to the first information includes: A target hard disk is determined from the hard disk array according to the first information and a detection threshold.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: The detection threshold is adjusted according to the status information.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: In the case that the target hard disk is not a slow disk, the target hard disk is released from isolation.

5. The method according to any one of claims 1 to 4, characterized in that The first information also includes link status information, and the method further includes: Whether the link of the hard disk array is normal is determined according to the link status information.

6. The method according to any one of claims 1 to 5, characterized in that The first information also includes interface card status information, and the method further includes: Determine whether the interface card of the hard disk array is normal according to the interface card status information.

7. The method according to any one of claims 1 to 6, characterized in that The first information also includes garbage collection (GC) information, and the method further includes: Determine whether the GC of the hard disk array is normal according to the GC information.

8. A hard disk detection device, characterized in that: The device comprises a transceiver unit and a processing unit; The transceiver unit is used to obtain first information of a hard disk array, wherein the first information includes at least one of an IO latency of a hard disk in the hard disk array, an IOPS of the hard disk, a bandwidth of the hard disk, an IO average service time, or an average response time, and the hard disk array is used to provide storage services for a target server; The processing unit is used to determine a target hard disk from the hard disk array according to the first information; The processing unit is further used to isolate the target hard disk; The transceiver unit further acquires second information of the target server, wherein the second information includes at least one of IO latency, IOPS, bandwidth, IO average service time, or average response time; The processing unit is further used to determine status information of the target hard disk according to the second information, where the status information is used to indicate whether the target hard disk is a slow disk.

9. The device according to claim 8, characterized in that The processing unit is specifically used for: A target hard disk is determined from the hard disk array according to the first information and a detection threshold.

10. The device according to claim 8 or 9, characterized in that The processing unit is also used for: The detection threshold is adjusted according to the status information.

11. The device according to any one of claims 8 to 10, characterized in that The processing unit is also used for: In the case that the target hard disk is not a slow disk, the target hard disk is released from isolation.

12. The device according to any one of claims 8 to 11, characterized in that The first information also includes link status information, and the processing unit is further configured to: Whether the link of the hard disk array is normal is determined according to the link status information.

13. The device according to any one of claims 8 to 12, characterized in that The first information also includes interface card status information, and the processing unit is further used for: Determine whether the interface card of the hard disk array is normal according to the interface card status information.

14. The device according to any one of claims 8 to 13, characterized in that The first information also includes garbage collection (GC) information, and the processing unit is further used for: Determine whether the GC of the hard disk array is normal according to the GC information.

15. A hard disk detection device, comprising at least one processor and a memory, characterized in that: The at least one processor executes a program or instruction stored in the memory so that the hard disk detection device implements the method described in any one of claims 1 to 7.

16. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed on a computer or a processor, the computer or the processor is enabled to implement the method according to any one of claims 1 to 7.

17. A computer program product, comprising instructions, characterized in that: When the instructions are executed on a computer or a processor, the computer or the processor is enabled to implement the method according to any one of claims 1 to 7.

18. A chip comprising at least one processor and a memory, characterized in that: The at least one processor executes a program or instruction stored in the memory so that the hard disk detection device implements the method described in any one of claims 1 to 7.