Target hard disk determination method and device, electronic equipment and storage medium

By using complex programmable logic devices and a three-stage filtering sampling circuit to detect the number of hard drives in place and power signals, the inaccuracy of traditional detection methods when physical connections are abnormal is solved, ensuring accurate identification of hard drive status and system stability.

CN120803355APending Publication Date: 2025-10-17JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510913817.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional hard drive abnormality detection methods cannot accurately identify the abnormal state of the hard drive when the physical connection is abnormal but the power is not completely off, resulting in data loss and system performance degradation.

Method used

The number of hard disks in place is obtained through a complex programmable logic device, and combined with the number of hard disks in place obtained by the hard disk controller, a three-stage filtering sampling circuit is used to detect power signal anomalies, and it is determined that the target hard disk is a hard disk disconnected from the server.

Benefits of technology

It enables accurate detection of hard drive abnormalities even when there is a physical connection failure but no complete power loss, thus preventing data loss and system performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803355A_ABST
    Figure CN120803355A_ABST
Patent Text Reader

Abstract

The invention discloses a target hard disk determining method and device, electronic equipment and a storage medium, and relates to the technical field of communication, the target hard disk determining method comprises the steps that whether the first in-place number of multiple first hard disks is equal to the second in-place number of the multiple first hard disks or not is determined, the first in-place number is obtained through a complex programmable logic device, and the second in-place number is equal to the second in-place number; the second in-place number is obtained through the hard disk controller; when it is determined that the first in-place number is larger than the second in-place number, whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal or not is determined through a three-stage filtering sampling circuit; when it is determined that the first power signals are abnormal, the third hard disks are determined as target hard disks, and the target hard disks are hard disks disconnected with the server. Therefore, the problem that the traditional detection means is inaccurate in detection under the condition that the physical connection is abnormal but the power failure is not complete in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and particularly relates to a target hard disk determination method and device, electronic equipment and storage medium. BACKGROUND

[0002] In a modern server and data center storage system, the stability and reliability of a hard disk are directly related to the integrity of data and the continuity of service. Abnormal hard disk disconnection, that is, the hard disk is unexpectedly disconnected from the server storage system without complete power-off, is one of the common reasons for data loss and system performance degradation.

[0003] Traditional abnormal hard disk disconnection detection methods mainly rely on the polling mechanism of the operating system layer and the monitoring of the hardware link state to determine the working state of the hard disk. However, these methods cannot accurately identify the abnormal state of the hard disk when facing a physical connection exception but not complete power-off.

[0004] In the related art, in the case of a physical connection exception but not complete power-off, the traditional detection method has the problem of inaccurate detection, and no effective solution has been proposed. SUMMARY

[0005] The present application provides a target hard disk determination method and device, electronic equipment and storage medium to at least solve the problem of inaccurate detection of the traditional detection method in the related art in the case of a physical connection exception but not complete power-off.

[0006] The present application provides a target hard disk determination method, comprising: determining whether a first in-place quantity of a plurality of first hard disks is equal to a second in-place quantity of the plurality of first hard disks, wherein the first in-place quantity is obtained by a complex programmable logic device, and the second in-place quantity is obtained by a hard disk controller; in a case where it is determined that the first in-place quantity is greater than the second in-place quantity, determining whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal through a three-stage filter sampling circuit, wherein the plurality of first hard disks contain the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-place quantity, the plurality of second hard disks contain the plurality of third hard disks, and the plurality of third hard disks correspond one-to-one to the plurality of first power signals; in a case where it is determined that the plurality of first power signals are abnormal, determining the plurality of third hard disks as target hard disks, wherein the target hard disks are hard disks disconnected from a server.

[0007] The application further provides a target hard disk determination device, comprising: a first determination module, configured to determine whether a first in-site quantity of a plurality of first hard disks is equal to a second in-site quantity of the plurality of first hard disks, wherein the first in-site quantity is obtained by a complex programmable logic device, and the second in-site quantity is obtained by a hard disk controller; a second determination module, configured to, in a case where the first in-site quantity is determined to be greater than the second in-site quantity, determine whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal by a three-stage filter sampling circuit, wherein the plurality of first hard disks contain the plurality of second hard disks, the plurality of second hard disks correspond to the first in-site quantity, the plurality of second hard disks contain the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals one by one; and a third determination module, configured to, in a case where the plurality of first power signals are determined to be abnormal, determine the plurality of third hard disks as target hard disks, wherein the target hard disks are hard disks disconnected from a server.

[0008] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement the steps of any of the target hard disk determination methods.

[0009] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the target hard disk determination methods.

[0010] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of any of the target hard disk determination methods.

[0011] According to the application, it is determined whether a first in-site quantity of a plurality of first hard disks obtained by a complex programmable logic device is equal to a second in-site quantity of the plurality of first hard disks obtained by a hard disk controller; in a case where the first in-site quantity is determined to be greater than the second in-site quantity, it is determined whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal by a three-stage filter sampling circuit, wherein the plurality of first hard disks contain the plurality of second hard disks, the plurality of second hard disks correspond to the first in-site quantity, the plurality of second hard disks contain the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals one by one; and in a case where the plurality of first power signals are determined to be abnormal, the plurality of third hard disks are determined as target hard disks disconnected from a server. Therefore, the problem that a traditional detection method is inaccurate in a case where a physical connection is abnormal but not completely powered off can be solved, and the plurality of hard disks can be accurately detected. BRIEF DESCRIPTION OF DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described below are only some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0013] Figure 1 A hardware structure block diagram of a target hard disk determination method provided by an embodiment of the present application is shown in FIG. 1.

[0014] Figure 2 A flow chart of a target hard disk determination method provided by an embodiment of the present application is shown in FIG. 2.

[0015] Figure 3 A first schematic diagram of a target hard disk determination method provided by an embodiment of the present application is shown in FIG. 3.

[0016] Figure 4 A second schematic diagram of a target hard disk determination method provided by an embodiment of the present application is shown in FIG. 4.

[0017] Figure 5 A structure block diagram of a target hard disk determination device provided by an embodiment of the present application is shown in FIG. 5. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the protection scope of the present application.

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

[0020] The method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing device. Taking the case of running on a server device, Figure 1 A hardware structure block diagram of a target hard disk determination method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the server device can include one or more Figure 1 Figure 1 ​The server device shown in FIG. 1 includes one processor 102 (the processor 102 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. The server device can further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art can understand that Figure 1 The structure shown in FIG. 1 is merely illustrative and does not limit the structure of the server device. For example, the server device can include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG. 1. Figure 1 Figure 1 The structure shown in FIG. 1 is merely illustrative and does not limit the structure of the server device. For example, the server device can include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG. 1.

[0021] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the target hard disk determination method in the embodiments of the present application. The processor 102 can execute various functional applications and data processing by running the computer programs stored in the memory 104, i.e., implement the target hard disk determination method. The memory 104 can include a high-speed random access memory and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and the remote memory can be connected to the server device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0022] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication service provider of the server device. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0023] The embodiments of the present application provide a target hard disk determination method, which is applied to the server device. Figure 2 The flowchart of the target hard disk determination method according to the embodiments of the present application is shown in FIG. 2, which includes the following steps: Figure 2

[0024] ​​Step S202, determining whether a first in-site quantity of a plurality of first hard disks is equal to a second in-site quantity of the plurality of first hard disks, wherein the first in-site quantity is obtained by a complex programmable logic device, and the second in-site quantity is obtained by a hard disk controller;

[0025] Step S204, in a case where it is determined that the first in-site quantity is greater than the second in-site quantity, determining whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal by a three-stage filter sampling circuit, wherein the plurality of first hard disks contain the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-site quantity, the plurality of second hard disks contain the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals one by one.

[0026] Step S206, in a case where it is determined that the plurality of first power signals are abnormal, determining the plurality of third hard disks as target hard disks, wherein the target hard disks are hard disks disconnected from a server.

[0027] Through the above steps, it is determined whether a first in-site quantity of a plurality of first hard disks obtained by a complex programmable logic device is equal to a second in-site quantity of the plurality of first hard disks obtained by a hard disk controller; in a case where it is determined that the first in-site quantity is greater than the second in-site quantity, it is determined whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal by a three-stage filter sampling circuit, wherein the plurality of first hard disks contain the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-site quantity, the plurality of second hard disks contain the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals one by one; in a case where it is determined that the plurality of first power signals are abnormal, the plurality of third hard disks are determined as target hard disks disconnected from a server. Therefore, the problem that a conventional detection method is inaccurate in a case where a physical connection is abnormal but not completely powered off can be solved, and the plurality of hard disks can be accurately detected.

[0028] In one example embodiment, before determining whether the first in-place quantity of the plurality of first hard disks is equal to the second in-place quantity of the plurality of first hard disks, the method further comprises: for a second hard disk in the plurality of first hard disks, acquiring, by the complex programmable logic device, an in-place signal of the second hard disk, wherein the in-place signal is used to indicate whether the second hard disk is connected with the server; in a case where the in-place signal is at a high level, determining that the second hard disk is not connected with the server; in a case where the in-place signal is at a low level, determining that the second hard disk is connected with the server, and determining whether the in-place signal is at the low level within a first preset time interval; in a case where it is determined that the in-place signal is at the low level within the first preset time interval, determining that the second hard disk is in a power-on initialization state, and acquiring a physical ready signal of the second hard disk within a second preset time interval; in a case where it is determined that the physical ready signal is at the low level within the second preset time interval, determining that the second hard disk is abnormal; in a case where it is determined that the physical ready signal is at the high level at a first time within the second preset time interval, determining that the second hard disk is successfully powered on, and determining whether the second hard disk completes link training within a third preset time interval, wherein the link training is used to establish a communication connection between the second hard disk and the server; in a case where it is determined that the second hard disk completes the link training within the third preset time interval, determining whether an active state signal of the second hard disk is at the low level, and determining whether the in-place signal is at the low level, wherein the active state signal is used to represent whether the second hard disk can normally communicate with the server; in a case where it is determined that the active state signal is at the low level and the in-place signal is at the low level, determining that the second hard disk is in a ready state, and continuously monitoring the in-place signal, wherein the ready state is used to indicate that the second hard disk can work normally; in a case where the in-place signal is converted from the low level to the high level, determining whether the in-place signal is at the high level within the first preset time interval; in a case where it is determined that the in-place signal is at the high level within the first preset time interval, determining that the second hard disk is disconnected with the server.

[0029] When the in-place signal is high, it means that the second hard disk is not physically inserted into the backplane of the server and is in the unconnected state. The in-place signal is monitored by a Complex Programmable Logic Device (CPLD), and once it is detected that the in-place signal becomes low, it is considered that the second hard disk is inserted into the backplane of the server. At this time, the CPLD starts an internal counter for debounce detection, and the in-place signal must remain low for 20 ms (first preset time interval) to confirm that the second hard disk is successfully inserted (determines that the second hard disk is in the power-on initialization state). If the in-place signal becomes high again during this period, it means that the second hard disk has not been truly inserted, and at this time, it will return to the unconnected state. Once it is confirmed that the second hard disk is inserted, the CPLD will monitor the physical ready signal of the second hard disk and wait for the second hard disk to complete the power-on initialization process. This process usually takes about 100 ms (second preset time interval) to complete, and if the physical ready signal does not become high after the timeout, it means that the power-on initialization of the second hard disk is abnormal, and the CPLD will trigger an error recovery mechanism to try to reinitialize the second hard disk. Otherwise, the physical ready signal becomes high within 100 ms, and it is determined that the second hard disk is successfully powered on. After the power-on initialization is completed, the second hard disk enters the link training stage, and if the link training is not completed within 500 ms (third preset time interval), the CPLD will forcibly reset the second hard disk to try to start the link training again to ensure the stable connection of the second hard disk with the server. When the second hard disk completes the link training, the active state signal of the second hard disk is low, and the in-place continues to remain low, which means that the second hard disk enters the ready state, indicating that the second hard disk can be used normally and data transmission can be performed. The CPLD continues to monitor the active state signal and the in-place signal of the second hard disk, and once the in-place signal becomes high, it is considered that the second hard disk may be pulled out, and at this time, the second hard disk enters the pull-out detection state. When the in-place signal becomes high, the CPLD will also start a counter for 20 ms of debounce detection. If the in-place signal remains high during this period, it will be confirmed that the second hard disk is pulled out (the second hard disk is disconnected from the server); if the in-place signal becomes low in the middle, it is considered to be a false positive, and the second hard disk is still in the ready state.

[0030] The in-place signal, the physical ready signal, and the active state signal of the hard disk are monitored by the CPLD, and according to the physical and protocol characteristics of the hard disk hot plug, the entire process from unconnected to connected and then pulled out is managed to ensure that the server can accurately detect the in-place state of the hard disk in real time and reduce false positives caused by signal jitter or initialization abnormalities.

[0031] In one example embodiment, before determining whether the first in-site quantity of the plurality of first hard disks is equal to the second in-site quantity of the plurality of first hard disks, the method further comprises: obtaining a third in-site quantity of a plurality of fourth hard disks in the plurality of first hard disks that are successfully powered on, obtaining a fourth in-site quantity of a plurality of fifth hard disks in the plurality of first hard disks that complete the link training, and obtaining a fifth in-site quantity of a plurality of sixth hard disks in the plurality of first hard disks that are in the ready state; and determining the first in-site quantity according to the third in-site quantity, the fourth in-site quantity, and the fifth in-site quantity.

[0032] When the fourth hard disk is successfully powered on, it means that the fourth hard disk is physically in site, and the third in-site quantity of the fourth hard disk is obtained. For the hard disks that are successfully powered on, the next step is to detect which hard disks have completed the link training, i.e., the communication link between the hard disk and the server has been established and is ready. Among them, completing the link training means that the hard disk can start data transmission. By detecting the handshake signal or the active state signal related to the protocol, the fourth in-site quantity of the fifth hard disk that completes the link training is determined. Finally, it is necessary to determine which hard disks have been completely ready for normal data read and write operations. This usually means that the hard disk has passed all initialization stages, including power-on, link training, etc., and its in-site state is stable. The active state signal and the in-site signal of the hard disk are monitored to determine the fifth in-site quantity of the sixth hard disk in the ready state. Finally, by analyzing the third in-site quantity (the number of hard disks successfully powered on), the fourth in-site quantity (the number of hard disks that complete the link training), and the fifth in-site quantity (the number of hard disks in the ready state), the number of hard disks that are actually in site and can work normally, i.e., the first in-site quantity, can be comprehensively determined.

[0033] By detecting the state of the hard disk in stages, from physical in-site to successful power-on, to completion of link training and entering the ready state, the connection and working state of the hard disk are verified layer by layer, and the number of hard disks that are actually in site and can work normally is finally determined comprehensively. Through this series of detection, power supply abnormalities, communication link problems, and hard disk ready states can be accurately distinguished, so that more accurate fault positioning and management can be performed.

[0034] In one example embodiment, whether a plurality of first power signals of a plurality of third hard disks in a plurality of second hard disks are abnormal is determined by a three-stage filtering sampling circuit, comprising: inputting the plurality of first power signals into a first-stage filtering circuit, suppressing a plurality of high-frequency noises in the plurality of first power signals by the first-stage filtering circuit to obtain a plurality of second power signals, wherein the plurality of third hard disks correspond to the plurality of first power signals one by one, the plurality of first power signals correspond to the plurality of high-frequency noises one by one, and the three-stage filtering sampling circuit comprises the first-stage filtering circuit; discretely sampling the plurality of second power signals to obtain a plurality of third power signals; obtaining a first preset number of fourth power signals from the plurality of third power signals, and determining whether a first number of fifth power signals in the threshold range in the fourth power signals is less than a second preset number, wherein the threshold range is used to represent a normal working range of the plurality of first power signals; in a case where it is determined that the first number is less than the second preset number, it is determined that the plurality of first power signals have an abnormal risk; determining whether the plurality of first power signals are all abnormal in a fourth preset time interval; in a case where it is determined that the plurality of first power signals are all abnormal in the fourth preset time, it is determined that the plurality of first power signals are abnormal.

[0035] The first filtering is mainly realized by a hardware level, i.e. by an RC filter circuit composed of a resistor (R) and a capacitor (C). When multiple first power supply signals are input to the RC filter circuit, the capacitor can smooth the signals because it can store and release or absorb electric charges when the signals change, thereby suppressing high-frequency noises in the signals to obtain multiple second power supply signals. The second filtering is a digital window filtering. The multiple second power supply signals filtered by the RC filter are discretely sampled to obtain multiple third power supply signals, and then a window voting manner is adopted to further remove accidental noises from the multiple third power supply signals. Specifically, the sampling points in a period of time are counted. If the values of at least three points (or the values of five points) in the latest five sampling points fall within a reasonable range, it is considered that the power supply state of the multiple first power supply signals is stable, otherwise it is considered that the multiple first power supply signals have abnormal risks. Optionally, the window size is set to five sampling points (a first preset number), the threshold is set to three (a second preset number), i.e. at least three values of the points in the latest five sampling points fall within the set threshold range, and the power supply state is considered to be stable. The threshold range is set to 12V±5%, i.e. 11.4V to 12.6V. If the value of the sampling point exceeds the threshold range, it is regarded as an abnormal point. In a sequence of time, there are five 12V power supply signal values of the sampling points: 11.5V (within the reasonable range), 13.2V (out of the reasonable range, an abnormal point), 12.8V (out of the reasonable range, an abnormal point), 13.1V (out of the reasonable range, an abnormal point), and 11.6V (within the reasonable range). When the window voting is performed, the five points in the window are: 11.5V, 13.2V, 12.8V, 13.1V, and 11.6V. Among the five points, only two points (11.5V and 11.6V) have values falling within the reasonable range of 11.4V to 12.6V. Therefore, it indicates that the power supply state is unstable and has abnormal risks. The third filtering is a state persistence verification. Specifically, in a continuous three clock periods (a fourth preset time interval), if the power supply signal state remains unchanged (i.e. always normal or always abnormal), the final signal output is reliable, i.e. in the embodiment, if the multiple first power supplies are all abnormal in the fourth preset time, it can be determined that the multiple first power supply signals are abnormal.

[0036] Through the three filtering levels, from the analog filtering on the hardware to the statistical analysis on the digital logic, and to the persistence verification of the state, the power supply state of the hard disk can be accurately judged to be normal or not in a complex power supply environment, and the precision and reliability of the power supply state detection are improved.

[0037] In an exemplary embodiment, after determining whether a first in-place number of multiple first hard disks is equal to a second in-place number of the multiple first hard disks, the method further includes: when it is determined that the first in-place number is equal to the second in-place number, determining that the multiple first hard disks are normally connected to the server; when it is determined that the multiple first hard disks are normally connected to the server, continuously monitoring the multiple first hard disks.

[0038] In the server hard disk detection method, the first number of hard disks in place usually refers to the number of hard disks physically in place detected by the hardware layer (such as CPLD), while the second number of hard disks in place is detected by the hard disk controller inside the server (Serial Attached SCSI / Redundant Array of The number of hard disks identified by the server's Independent Disks or Redundant Array of Inexpensive Disks (SAS / RAID cards for short). When these two numbers are equal, it means that each physically present hard disk is correctly identified and connected by the server's logical system. After confirming that the hard disk is connected to the server normally, it is still necessary to continuously monitor the operating status of the multiple first hard disks. This includes but is not limited to monitoring the hard disk's read and write performance, health status, power status, temperature, vibration and other indicators to ensure the stability of the hard disk and the reliability of the data throughout the working cycle. Continuous monitoring can help data centers detect potential problems with hard disks in advance, such as performance degradation, SMART warnings, power fluctuations, overheating, etc., and take preventive measures in time to prevent small problems from turning into major failures. At the same time, continuous monitoring is also the first step in fault response. It can immediately notify operation and maintenance personnel when a hard disk has an abnormality to avoid data loss and service interruption.

[0039] By comparing the first and second in-place counts of physical and logical test results, the correctness and integrity of the initial connection are ensured. Subsequent continuous monitoring is designed to maintain the health of the hard drives over the long term, enabling preventive maintenance and immediate fault response, thereby maximizing the availability and data security of the server storage system.

[0040] In an exemplary embodiment, after determining whether a first in-place number of a plurality of first hard disks is equal to a second in-place number of the plurality of first hard disks, the method further includes: determining that a fault has occurred in the complex programmable logic device when it is determined that the first in-place number is less than the second in-place number; generating a fault report based on the first fault occurring in the complex programmable logic device, and transmitting the fault report to a mobile device of a target object to instruct the target object to detect the complex programmable logic device, wherein the target object is used to maintain the complex programmable logic device.

[0041] When the first number of in-situ reported by the CPLD is less than the second number of in-situ reported by the SAS / RAID card, it may mean that the CPLD does not correctly detect all the hard disks that are actually in-situ. Generally, the physical number of in-situ of the hard disks should not be less than the number of logical identification, because even if the hard disks encounter problems at the logical level, their physical existence should still be detected by the CPLD. After confirming the possible failure of the CPLD, a detailed failure report is automatically generated. This report contains basic information about the failure, possible causes and recommended inspection steps, aiming to help the target object quickly understand the situation and take appropriate action. The report is then transmitted to the target object's mobile device through the network or other communication channels. After receiving the failure report, the target object should immediately detect the CPLD to verify the failure information in the report. This may include checking the hardware status of the CPLD, such as the tightness of the connecting cable, the power supply, and the working status of the CPLD chip itself. If necessary, the target object may restart the server, replace the CPLD or perform deeper hardware debugging until the failure is eliminated.

[0042] This failure judgment and notification mechanism plays a crucial role in the server storage system. It not only can identify possible failures of the CPLD in a timely manner, ensuring accurate detection of hard disks and stable operation of the system, but also ensures that failure information can be quickly communicated to the target object through instant messaging, reducing failure response time and operation and maintenance costs, and helping to improve the overall operation and maintenance efficiency of the data center.

[0043] In an example embodiment, after determining whether the plurality of first power signals of the plurality of third hard disks in the plurality of second hard disks are abnormal through the three-stage filtering sampling circuit, the method further comprises: determining that the hard disk controller fails in a case where the plurality of first power signals are normal; querying failure record data of the hard disk controller according to a second failure of the hard disk controller, and determining whether a first solution corresponding to the second failure exists in the failure record data, wherein the failure record data is used to record a plurality of third failures of the hard disk controller occurring before the current time and a plurality of second solutions corresponding one-to-one to the plurality of third failures; in a case where the first solution exists in the failure record data, sending the first solution to a mobile device of a target object to instruct the target object to repair the hard disk controller according to the first solution, wherein the target object is used to maintain the hard disk controller, and the plurality of second solutions include the first solution.

[0044] In a case where the first in-situ quantity is greater than the second in-situ quantity and the plurality of first power signals are normal, it is determined that a recognition mechanism of the SAS / RAID card is problematic, and the fault record data of the SAS / RAID card is queried according to the second fault of the SAS / RAID card, wherein the fault record data contains a plurality of fault types (the third fault) previously encountered by the SAS / RAID card and a solution (the second solution) for each fault type. If a first solution matching the current fault type (the second fault) is found in the fault record data, the first solution is immediately sent to the mobile device of the target object. After receiving the solution, the target object should perform maintenance work on the hard disk controller according to the provided instructions. The maintenance may include debugging at the software level, hardware detection, restarting the hard disk controller, or replacing the faulty components, etc. It is worth noting that the plurality of second solutions are constantly iterated and optimized.

[0045] The embodiment combines real-time hardware detection and intelligent analysis of historical fault data, can quickly identify potential faults of the hard disk controller, and improves the fault handling capability of the target object through sharing of solutions, effectively speeds up the fault repair speed, and reduces the service interruption time.

[0046] In an example embodiment, in a case where it is determined that the plurality of first hard disks are normally connected to the server, the plurality of first hard disks are continuously monitored, including: for a second hard disk in the plurality of first hard disks, obtaining a read-write condition and a response time of the second hard disk, and determining whether the second hard disk is in an overload state according to the read-write condition and the response time; in a case where it is determined that the second hard disk is in the overload state, suspending sending of read-write tasks to the second hard disk.

[0047] In the embodiment, once it is determined that the second hard disk is overloaded, new read-write tasks are immediately suspended or limited to be sent to the second hard disk, so as to reduce the workload of the second hard disk. In this way, the hard disk can be prevented from entering an unstable state due to overload, and the hard disk is protected from damage.

[0048] In order to better understand the process of determining the target hard disk, the following describes the method for determining the target hard disk in combination with optional embodiments, but is not used to limit the technical solutions of the embodiments of the present application.

[0049] Figure 3 is a first schematic diagram of a method for determining a target hard disk according to an embodiment of the present application, according to Figure 3 The embodiment shown in the figure clearly shows the life cycle of the hard disk, as shown in Figure 3 The specific contents include the following:

[0050] When the in-place signal is high, it means that the second hard disk is not physically inserted into the backplane of the server and is in an unconnected state. By monitoring the in-place signal through a complex programmable logic device (CPLD), once it is detected that the in-place signal becomes low, it is considered that the second hard disk is inserted into the backplane of the server, at this time, the CPLD starts the internal counter to carry out the debouncing detection, and the in-place signal must remain low within 20 ms (the first preset time interval) to confirm that the second hard disk is successfully inserted (determine that the second hard disk is in the power-on initialization state). If the in-place signal becomes high again during this period, it means that the second hard disk has not been truly inserted, at this time, it will return to the unconnected state.

[0051] Once it is confirmed that the second hard disk is inserted, the CPLD will monitor the physical ready signal of the second hard disk, and wait for the second hard disk to complete the power-on initialization process. This process usually takes about 100 ms (the second preset time interval) to complete, if the physical ready signal does not become high within the time, it means that the power-on initialization of the second hard disk is abnormal, the CPLD will trigger the error recovery mechanism to try to reinitialize the second hard disk, otherwise, the physical ready signal becomes high within 100 ms, it is determined that the second hard disk is successfully powered on. After the power-on initialization is completed, the second hard disk enters the link training stage, and the CPLD needs to perform corresponding protocol operations according to different hard disk interface standards (such as serial advanced technology attachment (SATA) or non-volatile memory express (NVMe)) to ensure that the communication link between the hard disk and the server is established. For example, for SATA hard disks, the CPLD will send a COMRESET signal and wait for a COMINIT response; for NVMe hard disks, the CPLD will monitor the state of the PCIe link training state machine to determine whether the link training is completed. If the link training is not completed within 500 ms (the third preset time interval), the CPLD will forcibly reset the second hard disk to try to start the link training again to ensure the stable connection between the second hard disk and the server.

[0052] When the second hard disk completes link training, the activity status signal of the second hard disk is low, and the presence signal continues to remain low, which means that the second hard disk enters the ready state, indicating that the second hard disk can be used normally and transmit data. The CPLD continuously monitors the activity status signal and presence signal of the second hard disk. Once the presence signal becomes high, it is considered that the second hard disk may be unplugged. At this time, the second hard disk enters the unplug detection state. When the presence signal becomes high, the CPLD will also start the counter and perform a 20ms de-jitter test. If the presence signal remains high during this period, it will be confirmed that the second hard disk is unplugged (the second hard disk is disconnected from the server); if the presence signal changes back to a low level midway, it is considered a false positive, and the second hard disk is still in the ready state.

[0053] Figure 4 This is a second schematic diagram of a method for determining a target hard disk according to an embodiment of the present application. Figure 4 The embodiment shown clarifies the overall process of the method for determining the target hard disk, such as Figure 4 Specifically, it includes the following contents:

[0054] When the server's storage system starts, the complex programmable logic device (CPLD) and the hard disk controller SAS / RAID card are initialized. Specifically, during initialization, the CPLD monitors the slot status of multiple first hard disks and determines whether each of the multiple first hard disks is physically in place by detecting hardware signals such as in-place signals. Because the CPLD is directly connected to the physical layer of the hard disk, the CPLD can provide hard disk in-place status information in real time. At the same time, the SAS / RAID card communicates with the multiple first hard disks through protocols such as SAS / SATA / NVMe to obtain topology information of each of the multiple first hard disks, including whether the hard disk is correctly identified and whether the link is established.

[0055] After initialization is complete, the server collects hard drive quantity information from both the CPLD and the SAS / RAID card. The server records the number of hard drives detected by the CPLD as the first in-place quantity and the number of hard drives detected by the SAS / RAID card as the second in-place quantity. The server then determines whether the first in-place quantity equals the second in-place quantity. If the first in-place quantity equals the second in-place quantity, the number of physically in-place hard drives detected by the CPLD matches the number of logical hard drives identified by the SAS / RAID card, indicating that the multiple first hard drives are in normal working order.

[0056] If the first number of in-situ is not equal to the second number of in-situ, there is an abnormal situation. This can be a mismatch between the actual physical state of the hard disk and the SAS / RAID card's understanding of its logical state, indicating that there can be an abnormal disk or identification error of the hard disk. Further, in order to more accurately locate which hard disk produces an abnormality, the server will simultaneously refer to the hard disk slot information recorded by the CPLD and the SAS / RAID card, and find the possible problem hard disk by comparing the differences. Specifically, it is judged whether the first number of in-situ is greater than the second number of in-situ. If the first number of in-situ is less than the second number of in-situ, it means that the CPLD does not correctly detect all the hard disks actually in-situ. In general, the physical number of in-situ of the hard disk should not be less than the number of logical identification, because even if the hard disk encounters a problem at the logical level, its physical existence should still be detected by the CPLD. Therefore, it can be determined that the CPLD has failed, at which time a CPLD hard disk identification abnormality alarm needs to be reported, logs are recorded and the detection mechanism of the CPLD is checked. Conversely, if the first number of in-situ is greater than the second number of in-situ, it means that the CPLD detects more hard disks in-situ, but the SAS / RAID card does not identify so many. This situation can be because some hard disks are physically connected successfully, but the logical connection fails or the power supply is abnormal, causing the SAS / RAID card to fail to normally identify. At this time, the power supply information of the hard disk needs to be further detected. If the power supply is abnormal, a hard disk power supply abnormality alarm is reported, logs are recorded and appropriate measures are taken. If the power supply is normal, it is determined that the identification mechanism of the SAS / RAID card has a problem, a SAS / RAID card hard disk identification abnormality alarm is reported, and logs are recorded and troubleshooting is performed.

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

[0058] The embodiment of the present application also provides a target hard disk determination device, Figure 5 The structural block diagram of a target hard disk determination device provided by the embodiment of the present application is shown in Figure 5 The device comprises:

[0059] The first determination module 52 is configured to determine whether the first number of in-situ of a plurality of first hard disks is equal to the second number of in-situ of the plurality of first hard disks, wherein the first number of in-situ is obtained by a complex programmable logic device, and the second number of in-situ is obtained by a hard disk controller;

[0060] The second determining module 54 is configured to determine, when the first in-place quantity is greater than the second in-place quantity, whether a plurality of first power signals of a plurality of third hard disks are abnormal through a three-stage filter sampling circuit, wherein the plurality of first hard disks include the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-place quantity, the plurality of second hard disks include the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals in a one-to-one manner.

[0061] The third determining module 56 is configured to determine, when the plurality of first power signals are abnormal, the plurality of third hard disks as target hard disks, wherein the target hard disks are hard disks disconnected from the server.

[0062] In the embodiments of the present application, it is determined whether the first in-place quantity of the plurality of first hard disks obtained through the complex programmable logic device is equal to the second in-place quantity of the plurality of first hard disks obtained through the hard disk controller. When the first in-place quantity is greater than the second in-place quantity, it is determined whether the plurality of first power signals of the plurality of third hard disks in the plurality of second hard disks are abnormal through the three-stage filter sampling circuit, wherein the plurality of first hard disks include the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-place quantity, the plurality of second hard disks include the plurality of third hard disks, and the plurality of third hard disks correspond to the plurality of first power signals in a one-to-one manner. When the plurality of first power signals are abnormal, the plurality of third hard disks are determined as target hard disks disconnected from the server. Therefore, the problem that the conventional detection method is inaccurate in the related art when the physical connection is abnormal but not completely powered off can be solved, and the plurality of hard disks can be accurately detected.

[0063] In one example embodiment, the first determining module 52 is further configured to, for a second hard disk of the plurality of first hard disks, acquire, by the complex programmable logic device, a present signal of the second hard disk, wherein the present signal is used to indicate whether the second hard disk is connected with the server; in a case that the present signal is at a high level, determine that the second hard disk is not connected with the server; in a case that the present signal is at a low level, determine that the second hard disk is connected with the server, and determine whether the present signal is at the low level within a first preset time interval; in a case that the present signal is determined to be at the low level within the first preset time interval, determine that the second hard disk is in a power-on initialization state, and acquire a physical ready signal of the second hard disk within a second preset time interval; in a case that the physical ready signal is determined to be at the low level within the second preset time interval, determine that the second hard disk is abnormal; in a case that the physical ready signal is determined to be at the high level at a first time within the second preset time interval, determine that the second hard disk is successfully powered on, and determine whether the second hard disk completes a link training within a third preset time interval, wherein the link training is used to establish a communication connection between the second hard disk and the server; in a case that the second hard disk is determined to complete the link training within the third preset time interval, determine whether an active state signal of the second hard disk is at the low level, and determine whether the present signal is at the low level, wherein the active state signal is used to represent whether the second hard disk can normally communicate with the server; in a case that the active state signal is determined to be at the low level and the present signal is determined to be at the low level, determine that the second hard disk is in a ready state, and continuously monitor the present signal, wherein the ready state is used to indicate that the second hard disk can work normally; in a case that the present signal is converted from the low level to the high level, determine whether the present signal is at the high level within the first preset time interval; in a case that the present signal is determined to be at the high level within the first preset time interval, determine that the second hard disk is disconnected with the server.

[0064] In one example embodiment, the first determining module 52 is further configured to acquire a third present number of a plurality of fourth hard disks of the plurality of first hard disks which are successfully powered on, acquire a fourth present number of a plurality of fifth hard disks of the plurality of first hard disks which complete the link training, and acquire a fifth present number of a plurality of sixth hard disks of the plurality of first hard disks which are in the ready state; and determine the first present number according to the third present number, the fourth present number, and the fifth present number.

[0065] In an exemplary embodiment, the second determination module 54 is further configured to input the plurality of first power signals into a first-stage filtering circuit, suppress a plurality of high-frequency noises in the plurality of first power signals through the first-stage filtering circuit, and obtain a plurality of second power signals, wherein the plurality of third hard disks correspond one-to-one to the plurality of first power signals, and the plurality of first power signals correspond one-to-one to the plurality of high-frequency noises, and the three-stage filtering sampling circuit includes the first-stage filtering circuit; discretely sample the plurality of second power signals to obtain a plurality of third power signals; obtain a first preset number of fourth power signals from the plurality of third power signals, and determine whether a first number of fifth power signals within a threshold range in the fourth power signals is less than a second preset number, wherein the threshold range is used to represent a normal operating range of the plurality of first power signals; determine that the plurality of first power signals have an abnormal risk if the first number is determined to be less than the second preset number; determine whether the plurality of first power signals are all abnormal within a fourth preset time interval; and determine that the plurality of first power signals are abnormal if the plurality of first power signals are all abnormal within the fourth preset time interval.

[0066] In an exemplary embodiment, the first determination module 52 is also used to determine that the multiple first hard disks are normally connected to the server when it is determined that the first in-place number is equal to the second in-place number; and continuously monitor the multiple first hard disks when it is determined that the multiple first hard disks are normally connected to the server.

[0067] In an exemplary embodiment, the first determination module 52 is further used to determine that a fault has occurred in the complex programmable logic device when it is determined that the first in-place number is less than the second in-place number; generate a fault report based on the first fault occurring in the complex programmable logic device, and transmit the fault report to a mobile device of a target object to instruct the target object to detect the complex programmable logic device, wherein the target object is used to maintain the complex programmable logic device.

[0068] In an example embodiment, the second determining module 54 is further configured to, in a case where it is determined that the plurality of first power signals are normal, determine that the hard disk controller has a failure; query failure record data of the hard disk controller according to a second failure occurred in the hard disk controller, and determine whether a first solution corresponding to the second failure exists in the failure record data, wherein the failure record data is used to record a plurality of third failures occurred in the hard disk controller before a current time and a plurality of second solutions corresponding to the plurality of third failures one by one; in a case where it is determined that the first solution exists in the failure record data, send the first solution to a mobile device of a target object to instruct the target object to repair the hard disk controller according to the first solution, wherein the target object is used to maintain the hard disk controller, and the plurality of second solutions include the first solution.

[0069] It should be noted that the description of the features in the embodiments of the determination apparatus of the target hard disk can refer to the related description of the embodiments of the determination method of the target hard disk, which will not be repeated here.

[0070] Embodiments of the present application also provide an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-mentioned embodiments of the determination method of the target hard disk.

[0071] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to perform the steps in any of the above-mentioned embodiments of the determination method of the target hard disk when running.

[0072] In an example embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0073] Embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the determination method of the target hard disk.

[0074] Embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the determination method of the target hard disk.

[0075] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be implemented in electronic hardware, computer software, or both. As described above, the implementation in hardware and software of the units and algorithms described above is generally a matter of choice depending on the particular application and design constraints imposed on a particular application. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

[0076] The above provides a detailed introduction to the method, device, electronic equipment and storage medium for determining a target hard disk. The principles and implementation manners of the present application are described by applying specific examples, and the above description of the examples is only used to help understand the method and core idea of the present application. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for determining a target hard disk, characterized in that: include: Determine whether a first number of the plurality of first hard disks in place is equal to a second number of the plurality of first hard disks in place, wherein the first number of the plurality of first hard disks in place is obtained by a complex programmable logic device, and the second number of the plurality of hard disks in place is obtained by a hard disk controller; In a case where it is determined that the first in-place number is greater than the second in-place number, determining whether multiple first power signals of multiple third hard disks in the multiple second hard disks are abnormal through a three-stage filtering sampling circuit, wherein the multiple first hard disks include the multiple second hard disks, the multiple second hard disks are hard disks corresponding to the first in-place number, the multiple second hard disks include the multiple third hard disks, and the multiple third hard disks have a one-to-one correspondence with the multiple first power signals; In a case where it is determined that the plurality of first power signals are abnormal, the plurality of third hard disks are determined as target hard disks, wherein the target hard disks are hard disks disconnected from the server.

2. The method for determining the target hard disk according to claim 1, wherein: Before determining whether a first number of the plurality of first hard disks in place is equal to a second number of the plurality of first hard disks in place, the method further includes: For a second hard disk among the plurality of first hard disks, obtaining a presence signal of the second hard disk through the complex programmable logic device, wherein the presence signal is used to indicate whether the second hard disk is connected to the server; When the presence signal is at a high level, determining that the second hard disk is not connected to the server; When the presence signal is at a low level, determining that the second hard disk is connected to the server, and determining whether the presence signal is at the low level within a first preset time interval; When it is determined that the presence signal is at the low level within the first preset time interval, determining that the second hard disk is in a power-on initialization state, and obtaining a physical ready signal of the second hard disk within a second preset time interval; When it is determined that the physical ready signal is at the low level within the second preset time interval, determining that the second hard disk is abnormal; If it is determined that the physical ready signal is at the high level at a first moment within the second preset time interval, determining that the second hard disk is successfully powered on, and determining whether the second hard disk completes link training within a third preset time interval, wherein the link training is used to establish a communication connection between the second hard disk and the server; If it is determined that the second hard disk completes the link training within the third preset time interval, determining whether an activity status signal of the second hard disk is at the low level, and determining whether the presence signal is at a low level, wherein the activity status signal is used to indicate whether the second hard disk can communicate normally with the server; When it is determined that the activity state signal is at the low level and the presence signal is at the low level, determining that the second hard disk is in a ready state, and continuously monitoring the presence signal, wherein the ready state is used to indicate that the second hard disk can work normally; When the presence signal is converted from the low level to the high level, determining whether the presence signal is at the high level within the first preset time interval; If it is determined that the presence signal is at the high level within the first preset time interval, it is determined that the second hard disk is disconnected from the server.

3. The method for determining the target hard disk according to claim 2, wherein: Before determining whether a first number of the plurality of first hard disks in place is equal to a second number of the plurality of first hard disks in place, the method further includes: Obtaining a third number of fourth hard disks in position that are successfully powered on among the plurality of first hard disks, obtaining a fourth number of fifth hard disks in position that have completed the link training among the plurality of first hard disks, and obtaining a fifth number of sixth hard disks in position that are in the ready state among the plurality of first hard disks; The first in-place number is determined according to the third in-place number, the fourth in-place number, and the fifth in-place number.

4. The method for determining a target hard disk according to claim 1, wherein: Determining whether a plurality of first power signals of a plurality of third hard disks among the plurality of second hard disks are abnormal by a three-stage filtering sampling circuit includes: Inputting the plurality of first power signals into a primary filtering circuit, suppressing a plurality of high-frequency noises in the plurality of first power signals through the primary filtering circuit to obtain a plurality of second power signals, wherein the plurality of third hard disks correspond one-to-one to the plurality of first power signals, and the plurality of first power signals correspond one-to-one to the plurality of high-frequency noises, and the three-stage filtering sampling circuit includes the primary filtering circuit; discretely sampling the plurality of second power signals to obtain a plurality of third power signals; obtaining a first preset number of fourth power signals from the plurality of third power signals, and determining whether a first number of fifth power signals within a threshold range among the fourth power signals is less than a second preset number, wherein the threshold range is used to represent a normal operating range of the plurality of first power signals; If it is determined that the first number is less than the second preset number, determining that there is an abnormality risk among the plurality of first power signals; determining whether the plurality of first power signals are all abnormal within a fourth preset time interval; When it is determined that the plurality of first power sources are all abnormal within the fourth preset time, it is determined that the plurality of first power signals are abnormal.

5. The method for determining a target hard disk according to claim 1, wherein: After determining whether a first number of the plurality of first hard disks in place is equal to a second number of the plurality of first hard disks in place, the method further includes: When it is determined that the first in-place quantity is equal to the second in-place quantity, determining that the plurality of first hard disks are normally connected to the server; When it is determined that the plurality of first hard disks are normally connected to the server, the plurality of first hard disks are continuously monitored.

6. The method for determining a target hard disk according to claim 1, wherein: After determining whether a first number of the plurality of first hard disks in place is equal to a second number of the plurality of first hard disks in place, the method further includes: In the case of determining that the first in-situ number is less than the second in-situ number, determining that the complex programmable logic device fails; A fault report is generated according to a first fault occurring in the complex programmable logic device, and the fault report is transmitted to a mobile device of a target object to instruct the target object to detect the complex programmable logic device, wherein the target object is used to maintain the complex programmable logic device.

7. The method for determining a target hard disk according to claim 1, wherein: After determining whether the plurality of first power signals of the plurality of third hard disks among the plurality of second hard disks are abnormal by the three-stage filtering sampling circuit, the method further includes: When it is determined that the multiple first power signals are normal, determining that the hard disk controller fails; querying fault record data of the hard disk controller according to a second fault occurring in the hard disk controller, and determining whether a first solution corresponding to the second fault exists in the fault record data, wherein the fault record data is used to record multiple third faults occurring in the hard disk controller before a current moment and multiple second solutions corresponding one-to-one to the multiple third faults; When it is determined that the first solution exists in the fault record data, the first solution is sent to the mobile device of the target object to instruct the target object to repair the hard disk controller according to the first solution, wherein the target object is used to maintain the hard disk controller, and the multiple second solutions include the first solution.

8. A device for determining a target hard disk, characterized in that: include: a first determining module, configured to determine whether a first number of in-place hard disks is equal to a second number of in-place hard disks, wherein the first number of in-place hard disks is obtained by a complex programmable logic device, and the second number of in-place hard disks is obtained by a hard disk controller; a second determining module, configured to, when determining that the first in-place number is greater than the second in-place number, determine, through a three-stage filtering sampling circuit, whether a plurality of first power signals of a plurality of third hard disks among the plurality of second hard disks are abnormal, wherein the plurality of first hard disks include the plurality of second hard disks, the plurality of second hard disks are hard disks corresponding to the first in-place number, the plurality of second hard disks include the plurality of third hard disks, and the plurality of third hard disks have a one-to-one correspondence with the plurality of first power signals; The third determining module is configured to determine the plurality of third hard disks as target hard disks when it is determined that the plurality of first power signals are abnormal, wherein the target hard disks are hard disks disconnected from the server.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for determining a target hard disk according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for determining a target hard disk according to any one of claims 1 to 7 are implemented.