Hard disk exception handling method, device and equipment and readable storage medium
Through the analysis of the signal status of the hard disk and the control of the power protection circuit, the system downtime caused by repeated online and offline hard disks is solved, the system stability and reliability are improved, and the impact of re-malfunction after the hard disk reconstruction is prevented.
Patent Information
- Application Number
- CN202411370245.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-10
AI Technical Summary
In the server system, the data reconstruction and recovery process caused by repeated online and offline hard disks affects the performance of the customer system, and in severe cases, the system may be down.
By analyzing the received hard disk signal status, determining the hard disk error and diagnosing it, data reconstruction and recovery will be carried out after success; if the reconstruction fails, record the data reconstruction and recovery information, and control the hard disk to be offline through the power protection circuit when the repeated reconstruction fails. Prevent re-malfunction.
It effectively reduces the probability of system downtime caused by system access to a failed hard disk, improves system stability, reliability and maintainability, and avoids the performance impact caused by repeated hard disk reconstruction.
Smart Images

Figure CN119292812A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a hard disk exception processing method, device, equipment and computer-readable storage medium. Background Art
[0002] With the increase in business volume, in order to store large amounts of data in server systems, more and more hard disks are used, requiring higher and higher stability of hard disks.
[0003] In the use of hard disks in servers, the method of connecting hard disks with disk arrays (Redundant Array of Independent Disks, RAID) cards is currently a widely used method. Disk array cards can form different disk arrays. When a faulty disk appears in the disk array group, the data can be restored through the data reconstruction function of the disk array card. There are two situations for data recovery: the first situation is when the SAS (Serial Attached SCSI) link is abnormal. In the case of uncertainty whether the hard disk failure or the link failure occurs, the disk array card performs a diagnosis. If the diagnosis passes, the hard disk will be put back online for data reconstruction and recovery; the other situation is that the hard disk does fail, the disk array card removes the faulty hard disk, and after the next replacement, the disk array card performs data reconstruction and recovery on the new disk. In the first situation, if the hard disk reports an error again during the reconstruction process, the disk array card performs a diagnosis again. If the diagnosis passes, the hard disk will be put back online for data reconstruction and recovery. As a result, the hard disk is repeatedly online and offline, affecting the customer's system performance, and seriously causing system downtime.
[0004] In summary, how to effectively solve the problem of repeated data reconstruction and recovery of the hard disk, which causes the hard disk to be repeatedly online and offline, affects the customer's system performance, and seriously causes system downtime, is an issue that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a hard disk exception handling method, which greatly reduces the probability of system crashes when the system accesses a faulty hard disk, improves the stability, reliability, maintainability of the system and the competitiveness of the product; another purpose of the present invention is to provide a hard disk exception handling device, system and computer-readable storage medium.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] A hard disk abnormality processing method, comprising:
[0008] Analyze the received hard disk signal status of the target hard disk to obtain the current hard disk status information of the target hard disk;
[0009] When it is determined according to the current hard disk status information that the target hard disk has a hard disk error, performing hard disk error diagnosis on the target hard disk to obtain a diagnosis result;
[0010] When the diagnosis result shows that the hard disk is normal, data reconstruction and recovery are performed on the target hard disk;
[0011] When data reconstruction and recovery fails, obtaining data reconstruction and recovery record information corresponding to the target hard disk;
[0012] When it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, the target hard disk is controlled to go offline through a power protection circuit.
[0013] In a specific embodiment of the present invention, it also includes:
[0014] When the diagnosis result is a hard disk failure, the target hard disk is removed from the system through a disk array card.
[0015] In a specific implementation of the present invention, when it is determined according to the current hard disk status information that the target hard disk has a hard disk error, the method further includes:
[0016] The target hard disk is placed in a protection state through a disk array card.
[0017] In a specific implementation of the present invention, the received hard disk signal status of the target hard disk is parsed to obtain the current hard disk status information of the target hard disk, including:
[0018] Receiving a hard disk signal status of a target hard disk sent by a disk array card via a serial general purpose input and output signal;
[0019] Analyze the hard disk signal status to obtain the hard disk error signal setting status;
[0020] Correspondingly, when it is determined according to the current hard disk status information that the target hard disk has a hard disk error, hard disk error diagnosis is performed on the target hard disk, including:
[0021] When the hard disk error signal setting state is a hard disk error enabling state, determining that a hard disk error exists in the target hard disk;
[0022] Recording a hard disk drive failure assertion in a system event log, and performing hard disk error diagnosis on the target hard disk;
[0023] Accordingly, data reconstruction and recovery of the target hard disk includes:
[0024] The hard disk error signal setting state is set to a hard disk error disabled state, and the data reconstruction recovery signal setting state is set to a data reconstruction recovery enabled state;
[0025] Recording hard disk drive failure resolution and data reconstruction and recovery assertions in the system event log to perform data reconstruction and recovery on the target hard disk;
[0026] Correspondingly, obtaining the data reconstruction and recovery record information corresponding to the target hard disk includes:
[0027] Retrieving data reconstruction and recovery record information corresponding to the target hard disk from the system event record log;
[0028] Accordingly, controlling the target hard disk to go offline through a power protection circuit includes:
[0029] Receiving an enable control signal for a target power protection circuit corresponding to the target hard disk;
[0030] The target power protection circuit is enabled according to the enable control signal to cut off the power supply of the target hard disk with a preset amplitude to make the target hard disk offline.
[0031] In a specific embodiment of the present invention, it also includes:
[0032] When the data reconstruction and recovery are successful, reconstruction completion information is recorded in the system event log.
[0033] A hard disk abnormality processing device, comprising:
[0034] A hard disk status acquisition module is used to parse the hard disk signal status of the received target hard disk to obtain the current hard disk status information of the target hard disk;
[0035] A diagnosis result obtaining module, for performing hard disk error diagnosis on the target hard disk to obtain a diagnosis result when it is determined according to the current hard disk status information that the target hard disk has a hard disk error;
[0036] A data reconstruction and recovery module, used for reconstructing and recovering data on the target hard disk when the diagnosis result shows that the hard disk is normal;
[0037] A reconstruction and recovery record acquisition module, used for acquiring data reconstruction and recovery record information corresponding to the target hard disk when data reconstruction and recovery fails;
[0038] The hard disk offline control module is used to control the target hard disk to go offline through a power protection circuit when it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information.
[0039] A hard disk abnormality processing system, comprising:
[0040] A disk array card, used for receiving a hard disk signal status reported by a target hard disk, and forwarding the hard disk signal status to a complex programmable logic device; performing hard disk error diagnosis on the target hard disk according to an error diagnosis instruction, obtaining a diagnosis result, and sending the diagnosis result to the complex programmable logic device;
[0041] The complex programmable logic device is used to analyze the hard disk signal status to obtain the current hard disk status information of the target hard disk; when it is determined that the target hard disk has a hard disk error according to the current hard disk status information, the error diagnosis instruction is sent to the disk array card; when the diagnosis result is that the hard disk is normal, the data of the target hard disk is rebuilt and restored, and a reconstruction and recovery monitoring instruction is sent to the baseboard management controller; according to the hard disk offline instruction, a power protection circuit enable control signal corresponding to the target hard disk is generated, and the power protection circuit enable control signal is sent to the power protection circuit;
[0042] The baseboard management controller is used to obtain data reconstruction and recovery record information corresponding to the target hard disk when a data reconstruction and recovery failure is detected; when it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, send a hard disk offline instruction to the complex programmable logic device;
[0043] The power protection circuit is used to control the target hard disk to go offline according to the power protection circuit enable control signal.
[0044] In a specific embodiment of the present invention, the complex programmable logic device is specifically used to generate a power protection circuit enable control signal corresponding to the power protection branch where the target hard disk is located according to the hard disk offline instruction, and send the power protection circuit enable control signal to the power protection branch where the target hard disk is located in the power protection circuit;
[0045] The power protection circuit is specifically used to control the power protection branch where the target hard disk is located to enable according to the power protection circuit enable control signal, so as to control the target hard disk to go offline.
[0046] In a specific embodiment of the present invention, the baseboard management controller is specifically used to parse the reconstruction and recovery monitoring instruction to obtain the hard disk identification of the target hard disk; and obtain the data reconstruction and recovery record information corresponding to the target hard disk according to the hard disk identification.
[0047] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hard disk abnormality processing method described above are implemented.
[0048] The hard disk exception processing method provided by the present invention analyzes the hard disk signal status of the received target hard disk to obtain the current hard disk status information of the target hard disk; when it is determined that the target hard disk has a hard disk error according to the current hard disk status information, the hard disk error diagnosis is performed on the target hard disk to obtain the diagnosis result; when the diagnosis result is that the hard disk is normal, the data of the target hard disk is reconstructed and recovered; when the data reconstruction and recovery fails, the data reconstruction and recovery record information corresponding to the target hard disk is obtained; when it is determined that the current data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit.
[0049] It can be seen from the above technical solution that when the hard disk signal status of the target hard disk is analyzed and it is determined that the target hard disk has a hard disk error according to the current hard disk status information analyzed, the target hard disk is diagnosed for hard disk error, and when the diagnosis result is that the hard disk is normal, the target hard disk is reconstructed and restored for data. When data reconstruction and recovery fails, and it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the acquired data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit. By controlling the target hard disk to go offline through the power protection circuit when repeated reconstruction failures occur, it is effectively prevented that the hard disk fails again after reconstruction, and the problem of repeated online reconstruction and offline affects the customer's business performance, and the probability of system downtime due to system access to the faulty hard disk is greatly reduced, and the stability, reliability, maintainability of the system and the competitiveness of the product are improved.
[0050] Correspondingly, the present invention also provides a hard disk exception handling device, system and computer-readable storage medium corresponding to the above-mentioned hard disk exception handling method, which have the above-mentioned technical effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] FIG1 is a flow chart of a normal hard disk initialization power-on process;
[0053] FIG2 is a logic diagram of a hard disk failure processing in the related art;
[0054] FIG3 is a block diagram of a hardware circuit design in the related art;
[0055] FIG4 is a logic diagram of a hard disk status monitoring in the related art;
[0056] FIG5 is a flowchart of a method for handling hard disk abnormality according to an embodiment of the present invention;
[0057] FIG6 is a flowchart of another method for handling hard disk abnormalities according to an embodiment of the present invention;
[0058] FIG7 is a logic diagram of a hard disk abnormality processing process according to an embodiment of the present invention;
[0059] FIG8 is a logic diagram of a hard disk fault diagnosis post-processing process according to an embodiment of the present invention;
[0060] FIG9 is a logic diagram of a hard disk status monitoring according to an embodiment of the present invention;
[0061] FIG10 is a structural block diagram of a hard disk abnormality processing device according to an embodiment of the present invention;
[0062] FIG11 is a block diagram of a hard disk exception processing system according to an embodiment of the present invention;
[0063] FIG. 12 is a structural block diagram of another hard disk exception processing system according to an embodiment of the present invention.
[0064] The following are marked in the accompanying drawings:
[0065] 1-disk array card, 2-complex programmable logic device, 3-baseboard management controller, 4-power protection circuit. DETAILED DESCRIPTION
[0066] See Figure 1, which is a flow chart of a normal hard disk initialization power-on process. Normal hard disk power-on process: Press the power button (power button) to power on the server. After the system P12V power-on is completed, it will send a power good signal (PGOOD) to the complex programmable logic device (Complex Programmable Logic Device, CPLD). After receiving the signal, the complex programmable logic device sends an enable signal for the hard disk 12V power supply (P12V_HDD) and the hard disk 5V power supply (P5V_HDD) according to the power-on timing sequence designed by the system. The P12V and P5V power modules output P12V and P5V to the hard disk respectively, and the hard disk initialization power-on can work normally.
[0067] Refer to Figure 2, which is a processing logic diagram of a hard disk failure in the related art. When there is a faulty hard disk, the faulty hard disk reports an exception to the disk array card, and the disk array card transmits the hard disk status information to the complex programmable logic device. The complex programmable logic device parses the hard disk status information, sets the error flag bit to a high or low signal position, and sets the reconstruction flag bit to a low signal enable flag bit. When it is determined that the hard disk has indeed failed, the disk array card removes the faulty hard disk; when the disk array card detects the reconstruction enable signal, data reconstruction and recovery are performed. According to the reconstruction result, the corresponding identifiers in the reconstruction, remapping abort, completion, and hard disk drive failure information are transmitted to the baseboard management controller (Baseboard Management Controller, BMC) through the serial communication bus (Inter-Integrated Circuit, I2C) signal, and the baseboard management controller records the reconstruction result in the log.
[0068] See Figure 3, which is a block diagram of a hardware circuit design in the related art. The disk array card monitors the hard disk through the serial attached storage (SAS), and the disk array card transmits the hard disk status information to the complex programmable logic device. The complex programmable logic device transmits the corresponding identification of the drive failure or reconstruction, completion, and hard disk drive failure information to the baseboard management controller through the serial communication bus signal. When the complex programmable logic device detects a hard disk abnormality, it pulls the error signal low and lights up the hard disk error indicator.
[0069] See Figure 4, which is a hard disk status monitoring logic diagram in the related art. When there is a faulty hard disk, the faulty hard disk reports an exception to the disk array card, the disk array card transmits the hard disk status information to the complex programmable logic device, the complex programmable logic device parses the hard disk status information, and sets the reconstruction flag. When the disk array card detects the reconstruction enable signal, data reconstruction and recovery are performed. When the complex programmable logic device determines that the data reconstruction and recovery are successful, it transmits the hard disk drive reconstruction completion information to the baseboard management controller through the serial communication bus signal, and the baseboard management controller records the reconstruction completion information in the log.
[0070] In the use of hard disks in servers, there are serial ATA (SATA Advanced Technology Attachment, SATA) disks that are directly connected to the peripheral component interconnect host controller (PCH), which are relatively rare, and the speed can only reach 6Gb / s, and the performance is not high; there are also disk array cards / serial attached SCSI (SAS) cards that convert SAS signals through PCIE (Peripheral Component Interconnect Express, Peripheral Component Interconnect Extension Bus) signals, which can connect SAS disks and SATA disks. The speed of SAS disks can reach 12Gb / s. This method of using raid cards to connect hard disks is currently a widely used method. Raid cards have many functions, one of which is that they can form different disk arrays, such as RAID1, 5, 6, 10, etc. Different disk arrays are used in different scenarios, have different hard disk utilization rates, and have different effects on system read and write performance. However, these four types of disk arrays have data redundancy and fault tolerance. When a failed disk appears in the disk array group, the data can be restored through the data reconstruction function of the disk array card.
[0071] There are two situations for data recovery: the first situation is when the SAS (Serial Attached SCSI) link is abnormal, and it is uncertain whether the hard disk is faulty or the link is abnormal, the disk array card performs a diagnosis, and if the diagnosis is successful, the hard disk will be put back online for data reconstruction and recovery; the other situation is that the hard disk is indeed faulty, and the disk array card removes the faulty hard disk, and after the next replacement, the disk array card performs data reconstruction and recovery on the new disk. In the first situation, if the hard disk reports an error again during the reconstruction process, the disk array card performs another diagnosis, and if the diagnosis is successful, the hard disk will be put back online for data reconstruction and recovery. This causes the hard disk to be repeatedly online and offline, affecting the customer's system performance, and in serious cases, causing the system to crash.
[0072] To this end, the hard disk exception handling method provided in the present application greatly reduces the probability of system downtime due to system access to a faulty hard disk, thereby improving the system's stability, reliability, maintainability and product competitiveness.
[0073] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0074] Referring to FIG. 5 , FIG. 5 is a flowchart of a method for handling hard disk abnormality according to an embodiment of the present invention. The method may include the following steps:
[0075] S501: Analyze the received hard disk signal status of the target hard disk to obtain current hard disk status information of the target hard disk.
[0076] The hard disk signal status of the target hard disk can be detected by the disk array card, and the detected hard disk signal status of the target hard disk is transmitted to the complex programmable logic device. The complex programmable logic device receives the hard disk signal status of the target hard disk, and analyzes the received hard disk signal status of the target hard disk to obtain the current hard disk status information of the target hard disk.
[0077] The current hard disk status information may include hard disk error and hard disk normal.
[0078] The target hard disk can be any hard disk whose hard disk signal status is to be detected.
[0079] S502: When it is determined according to the current hard disk status information that a hard disk error exists in the target hard disk, hard disk error diagnosis is performed on the target hard disk to obtain a diagnosis result.
[0080] After parsing and obtaining the current hard disk status information of the target hard disk, it is determined whether the current hard disk status information indicates that the target hard disk has a hard disk error. When it is determined that the target hard disk has a hard disk error according to the current hard disk status information, a hard disk error diagnosis is performed on the target hard disk using a disk array card to obtain a diagnosis result.
[0081] The process of the disk array card performing hard disk error diagnosis on the target hard disk may include hard disk status detection by checking the hard disk health status, Self-Monitoring, Analysis and Reporting Technology (SMART) information, error count, etc. If the disk array card detects that the hard disk has an error, exceeds the threshold or other abnormal conditions, it will issue an alarm and record the corresponding event, which can be achieved through an alarm indicator, sound prompt or the alarm mechanism of the management software. By using the disk array card to perform hard disk error diagnosis on the target hard disk, effective monitoring of the hard disk health status is achieved. By timely issuing hard disk error warnings when hard disk abnormalities are detected, it is convenient for operation and maintenance personnel to perform hard disk maintenance in a timely manner.
[0082] S503: When the diagnosis result shows that the hard disk is normal, data reconstruction and recovery are performed on the target hard disk.
[0083] After performing hard disk error diagnosis on the target hard disk and obtaining the diagnosis result, if the diagnosis result shows that the hard disk is normal, it means that the hard disk error may be caused by an unstable link, and the data of the target hard disk is rebuilt (Rebuild) for recovery.
[0084] S504: When data reconstruction and recovery fails, obtaining data reconstruction and recovery record information corresponding to the target hard disk.
[0085] The data reconstruction and recovery process of the target hard disk is recorded in advance. After the data reconstruction and recovery of the target hard disk is performed, the data reconstruction and recovery result is monitored, and when the data reconstruction and recovery failure is detected, the data reconstruction and recovery record information corresponding to the target hard disk is obtained.
[0086] S505: When it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, the target hard disk is controlled to go offline through the power protection circuit.
[0087] The data reconstruction and recovery record information corresponding to the target hard disk records the data reconstruction and recovery process of the target hard disk. It is possible to determine whether the target hard disk has undergone a data reconstruction and recovery before this data reconstruction and recovery based on the data reconstruction and recovery process, and whether the data reconstruction and recovery result was a failure. When it is determined that the current data reconstruction and recovery failure is a repeated reconstruction failure based on the data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit. By controlling the target hard disk to go offline through the power protection circuit when repeated reconstruction failures occur, it is effectively prevented that the hard disk fails again after reconstruction, and the problem of repeated online reconstruction and offline causing impact on customer business performance is prevented, and the probability of system downtime due to system access to a faulty hard disk is greatly reduced, thereby improving the stability, reliability, and maintainability of the system.
[0088] It can be seen from the above technical solution that when the hard disk signal status of the target hard disk is analyzed and it is determined that the target hard disk has a hard disk error according to the current hard disk status information analyzed, the target hard disk is diagnosed for hard disk error, and when the diagnosis result is that the hard disk is normal, the target hard disk is reconstructed and restored for data. When data reconstruction and recovery fails, and it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the acquired data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit. By controlling the target hard disk to go offline through the power protection circuit when repeated reconstruction failures occur, it is effectively prevented that the hard disk fails again after reconstruction, and the problem of repeated online reconstruction and offline affects the customer's business performance, and the probability of system downtime due to system access to the faulty hard disk is greatly reduced, and the stability, reliability, maintainability of the system and the competitiveness of the product are improved.
[0089] It should be noted that, based on the above embodiment, the embodiment of the present invention also provides corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.
[0090] Referring to FIG. 6 , FIG. 6 is a flowchart of another method for handling hard disk abnormality according to an embodiment of the present invention. The method may include the following steps:
[0091] S601: Receive a hard disk signal status of a target hard disk sent by a disk array card via a serial general purpose input / output signal.
[0092] After the disk array card detects the hard disk signal status of the target hard disk, the disk array card sends the hard disk signal status of the target hard disk to the complex programmable logic device through the serial general purpose input / output (SGPIO) signal. The complex programmable logic device receives the hard disk signal status of the target hard disk sent by the disk array card through the serial general purpose input / output signal. The hard disk signal status transmission through the serial general purpose input / output signal fully utilizes the advantages of the serial general purpose input / output signal using a single line for input and output, saving resources, supporting high-speed transmission, and low power consumption.
[0093] S602: Analyze the hard disk signal status to obtain the hard disk error signal setting status.
[0094] After receiving the hard disk signal status of the target hard disk, the hard disk signal status is analyzed to obtain the hard disk error (Fault) signal setting status.
[0095] S603: When the hard disk error signal setting state is the hard disk error enabling state, it is determined that a hard disk error exists in the target hard disk, and the target hard disk is set to a protection state through the disk array card.
[0096] After the hard disk error signal setting state is obtained through analysis, when the hard disk error signal setting state is the hard disk error enabling state, it can be set to enable the hard disk error when the hard disk error signal setting state is low, and it is determined that the target hard disk has a hard disk error, and the target hard disk is set to the protection state through the disk array card. By setting the target hard disk with a hard disk error to the protection state, the security and reliability of the data are enhanced.
[0097] S604: Record the hard disk drive failure assertion in the system event log, and perform hard disk error diagnosis on the target hard disk to obtain a diagnosis result.
[0098] After determining that the target hard disk has a hard disk error, the baseboard management controller records a hard disk drive fault assertion in the system event log, and performs hard disk error diagnosis on the target hard disk to obtain a diagnosis result. By recording the hard disk drive fault assertion in the system event log, effective recording of hard disk error status information is achieved, which facilitates subsequent decision-making by querying the status record information of the target hard disk.
[0099] S605: When the diagnosis result is that the hard disk is faulty, the target hard disk is removed from the system through the disk array card.
[0100] After the diagnosis result of the target hard disk is obtained, when the diagnosis result is a hard disk failure, the target hard disk is removed from the system through the disk array card. By removing the faulty hard disk in time, interference from the faulty hard disk is avoided.
[0101] S606: When the diagnosis result is that the hard disk is normal, the hard disk error signal setting state is set to a hard disk error disabled state, and the data reconstruction recovery signal setting state is set to a data reconstruction recovery enabled state.
[0102] When the diagnosis result is that the hard disk is normal, the hard disk error signal setting state is set to the hard disk error disabled state, such as it can be set to the hard disk error disabled state when the hard disk error signal setting state is high, and the data reconstruction recovery signal setting state is set to the data reconstruction recovery enabled state, such as it can be set to the data reconstruction recovery enabled state when the data reconstruction recovery signal setting state is low.
[0103] S607: Record the hard disk drive failure resolution and data reconstruction and recovery assertions in the system event log to perform data reconstruction and recovery on the target hard disk.
[0104] After the data reconstruction recovery signal setting state is set to the data reconstruction recovery enable state, the baseboard management controller is used to record the hard disk drive fault removal (disk drive fault deassert) and the data reconstruction recovery assertion (rebuid assert) in the system event log, and then the target hard disk is reconstructed and recovered. By recording the hard disk drive fault removal and the data reconstruction recovery assertion in the system event log, the target hard disk state is updated in a timely manner.
[0105] S608: When data reconstruction and recovery fails, retrieve data reconstruction and recovery record information corresponding to the target hard disk from the system event record log.
[0106] The data reconstruction and recovery process of the target hard disk is recorded in the system event log in advance. When the data reconstruction and recovery of the target hard disk is performed, the data reconstruction and recovery process is monitored. When the data reconstruction and recovery failure is detected, the data reconstruction and recovery record information corresponding to the target hard disk is retrieved from the system event log. By using the system event log to record the data reconstruction and recovery process of the target hard disk, a quick query of the data reconstruction and recovery record information corresponding to the target hard disk is achieved.
[0107] S609: When the data reconstruction and recovery is successful, the reconstruction completion information is recorded in the system event log.
[0108] When data reconstruction and recovery are successful, the reconstruction completion information is recorded in the system event log. By recording the reconstruction completion information in the system event log, it is convenient to track the data reconstruction and recovery results of the target hard disk in a timely manner by checking the system event log.
[0109] S610: When it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, receiving an enable control signal for a target power protection circuit corresponding to the target hard disk.
[0110] When the baseboard management controller determines that the data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information, it sends an enable control signal for the target power protection circuit corresponding to the target hard disk to the complex programmable logic device. The complex programmable logic device receives the enable control signal for the target power protection circuit corresponding to the target hard disk.
[0111] S611: controlling the target power protection circuit to be enabled according to the enable control signal to cut off the power supply of the target hard disk with a preset amplitude to make the target hard disk offline.
[0112] After receiving the enable control signal of the target power protection circuit corresponding to the target hard disk, the complex programmable logic device controls the target power protection circuit to be enabled according to the enable control signal, thereby cutting off the power supply of the target hard disk with a preset amplitude to make the target hard disk offline, such as cutting off the 12V power supply of the target hard disk. By controlling the target hard disk to go offline according to the enable control signal of the target power protection circuit corresponding to the target hard disk when repeated reconstruction failures occur, accurate control of the online status of the target hard disk is achieved.
[0113] See Figure 7, which is a logic diagram of a hard disk exception handling process in an embodiment of the present invention. When an exception occurs in the storage link and the system accesses the hard disk timeout, the disk array card monitors the hard disk information and sends it to the complex programmable logic device through the serial general purpose input and output signal. When the complex programmable logic device parses the serial general purpose input and output signal and obtains the hard disk error signal is set to low, the complex programmable logic device sends the fault hard disk drive fault information to the baseboard management controller through the serial communication bus signal, and the baseboard management controller system event log (sel) records the hard disk drive fault assertion information.
[0114] See Figure 8, which is a logic diagram of a hard disk fault diagnosis post-processing process in an embodiment of the present invention. The disk array card starts the diagnostic function and diagnoses the faulty hard disk. If the diagnosis passes, the complex programmable logic device obtains the hard disk error signal by parsing the serial general input and output signal and is set to high, and the reconstruction signal is set to low. The complex programmable logic device sends the fault hard disk error and reconstruction setting information to the baseboard management controller through the serial communication bus signal, and the baseboard management controller system event log will record the hard disk drive fault removal and data reconstruction recovery assertion information.
[0115] Refer to FIG9 , which is a logic diagram of hard disk status monitoring in an embodiment of the present invention. The hard disk is rebuilt, and the completion of the reconstruction will be recorded in the log of the baseboard management controller (complete rebuild). If the hard disk fails again during the hard disk reconstruction process, the disk array card sends the hard disk information to the complex programmable logic device through the serial general input and output signal, and the complex programmable logic device reports the hard disk error signal to the baseboard management controller by parsing. The baseboard management controller determines that the same hard disk is re-obtained after the reconstruction and the error information is set to low. The baseboard management controller sends a low signal to the complex programmable logic device through the serial communication bus signal. After the complex programmable logic device receives it, it pulls down the enable signal of the hard disk 12V power protection circuit that reports the error signal, so that the hard disk working voltage is powered off, thereby making the hard disk offline, thereby protecting the system. The logic of the baseboard management controller and the complex programmable logic device monitoring is as follows: when the baseboard management controller detects that hard disk X is being rebuilt, it will then start monitoring whether hard disk X has a drive error or is rebuilt. If a drive error occurs, a low signal will be sent to the complex programmable logic device through the serial communication bus, and the complex programmable logic device will pull down the enable signal of the hard disk 2V power protection circuit that reports the error signal; if the reconstruction is complete, the monitoring of the faulty hard disk is terminated.
[0116] The baseboard management controller monitors the rebuild of hard disk X and the related code of judgment logic is as follows:
[0117] #include<stdio.h>
[0118] #include<string.h>
[0119] #include<stdbool.h>
[0120] / / Function declaration
[0121] void sendLowCommand(const char *disk);
[0122] void endProcess(const char *disk);
[0123] void monitorKeywords(const char *input, bool *isRebuilding);
[0124] int main() {
[0125] / / Example input
[0126] const char *inputs[] = {
[0127] "disk1 rebuild",
[0128] "disk1 drive fault",
[0129] "disk1 rebuild complete",
[0130] "disk2 rebuild",
[0131] "disk2 drive fault",
[0132] "disk2 rebuild complete"
[0133] };
[0134] bool isRebuilding
[10] = {false}; / / Assume at most 10 disks
[0135] int diskCount = sizeof(inputs) / sizeof(inputs[0]);
[0136] / / Process input
[0137] for (int i = 0; i < diskCount; i++) {
[0138] monitorKeywords(inputs[i], isRebuilding);
[0139] }
[0140] return 0;
[0141] }
[0142] / / Send the "low" command
[0143] void sendLowCommand(const char *disk) {
[0144] printf("Disk %s: Sending low command...\n", disk);
[0145] }
[0146] / / End the process
[0147] void endProcess(const char *disk) {
[0148] printf("Disk %s: Rebuild process complete. Ending process.\n", disk);
[0149] }
[0150] / / Monitor keywords and trigger corresponding actions
[0151] void monitorKeywords(const char *input, bool *isRebuilding) {
[0152] char disk
[10] ;
[0153] char action
[30] ;
[0154] / / Parse the input string
[0155] if (sscanf(input, "%s %s", disk, action) == 2) {
[0156] / / Check the "diskX rebuild" keyword and set the rebuild status
[0157] if (strcmp(action, "rebuild") == 0) {
[0158] isRebuilding[disk[4] - '1'] = true; / / Update disk rebuild status
[0159] printf("Disk %s is under rebuild process.\n", disk);
[0160] } else if (strcmp(action, "fault") == 0 && isRebuilding[disk[4] - '1']) {
[0161] sendLowCommand(disk);
[0162] } else if (strcmp(action, "complete") == 0 && isRebuilding[disk[4] -'1']) {
[0163] endProcess(disk);
[0164] isRebuilding[disk[4] - '1'] = false; / / End the rebuilding state
[0165] } else {
[0166] printf("No action taken for %s.\n", input);
[0167] }
[0168] } else {
[0169] printf("Invalid input format: %s\n", input);
[0170] }
[0171] } else {
[0172] printf("Invalid input format: %s\n", input);
[0173] }
[0174] }
[0175] The CPLD control logic related codes are as follows:
[0176] library IEEE;
[0177] use IEEE.STD_LOGIC_1164.ALL;
[0178] Entity SignalDetector is
[0179] Port (
[0180] diskX_in : in STD_LOGIC; -- Input signal pin
[0181] diskX_enable_out : out STD_LOGIC -- output enable pin );
[0183] endSignalDetector;
[0184] architecture Behavioral of SignalDetector is
[0185] begin
[0186] process( diskX_in)
[0187] begin
[0188] if diskX_in = '0' then
[0189] diskX_enable_out <= '0'; -- When the input is low, the output is enabled to be low
[0190] else
[0191] diskX_enable_out <= '1'; -- When the input is high, the output is enabled high
[0192] end if;
[0193] end process;
[0194] end Behavioral;
[0195] Corresponding to the above method embodiment, the present invention further provides a hard disk exception processing device. The hard disk exception processing device described below and the hard disk exception processing method described above can be referenced to each other.
[0196] Referring to FIG. 10 , FIG. 10 is a structural block diagram of a hard disk abnormality processing device according to an embodiment of the present invention. The device may include:
[0197] The hard disk status obtaining module 11 is used to analyze the hard disk signal status of the received target hard disk to obtain the current hard disk status information of the target hard disk;
[0198] The diagnosis result obtaining module 12 is used to perform hard disk error diagnosis on the target hard disk to obtain a diagnosis result when it is determined that the target hard disk has a hard disk error according to the current hard disk status information;
[0199] The data reconstruction and recovery module 13 is used to reconstruct and recover the data of the target hard disk when the diagnosis result shows that the hard disk is normal;
[0200] The reconstruction and recovery record acquisition module 14 is used to obtain the data reconstruction and recovery record information corresponding to the target hard disk when the data reconstruction and recovery fails;
[0201] The hard disk offline control module 15 is used to control the target hard disk to go offline through the power protection circuit when it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information.
[0202] It can be seen from the above technical solution that when the hard disk signal status of the target hard disk is analyzed and it is determined that the target hard disk has a hard disk error according to the current hard disk status information analyzed, the target hard disk is diagnosed for hard disk error, and when the diagnosis result is that the hard disk is normal, the target hard disk is reconstructed and restored for data. When data reconstruction and recovery fails, and it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the acquired data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit. By controlling the target hard disk to go offline through the power protection circuit when repeated reconstruction failures occur, it is effectively prevented that the hard disk fails again after reconstruction, and the problem of repeated online reconstruction and offline affects the customer's business performance, and the probability of system downtime due to system access to the faulty hard disk is greatly reduced, and the stability, reliability, maintainability of the system and the competitiveness of the product are improved.
[0203] In a specific embodiment of the present invention, the device may further include:
[0204] The hard disk removal module is used to remove the target hard disk from the system through the disk array card when the diagnosis result is a hard disk failure.
[0205] In a specific embodiment of the present invention, the device may further include:
[0206] The hard disk status setting module is used to set the target hard disk to a protection state through a disk array card when it is determined that a hard disk error exists in the target hard disk according to the current hard disk status information.
[0207] In a specific implementation of the present invention, the hard disk status obtaining module 11 includes:
[0208] The hard disk signal status receiving submodule is used to receive the hard disk signal status of the target hard disk sent by the disk array card through the serial general input and output signal;
[0209] The hard disk setting state obtaining submodule is used to analyze the hard disk signal state and obtain the hard disk error signal setting state;
[0210] The diagnosis result obtaining module 12 includes:
[0211] A hard disk error determination submodule, used to determine that a hard disk error exists in a target hard disk when the hard disk error signal setting state is a hard disk error enabling state;
[0212] A hard disk error diagnosis submodule, used for recording hard disk drive failure assertions in a system event log and performing hard disk error diagnosis on a target hard disk;
[0213] The data reconstruction and recovery module 13 includes:
[0214] The reconstruction recovery enable state setting submodule is used to set the hard disk error signal setting state to the hard disk error disabled state, and set the data reconstruction recovery signal setting state to the data reconstruction recovery enabled state;
[0215] The data reconstruction and recovery submodule is used to record the hard disk drive failure elimination and data reconstruction and recovery assertions in the system event log, so as to perform data reconstruction and recovery on the target hard disk;
[0216] The reconstruction and recovery record acquisition module 14 is specifically a module for retrieving data reconstruction and recovery record information corresponding to the target hard disk from the system event record log;
[0217] The hard disk offline control module 15 includes:
[0218] An enable control signal receiving submodule, used to receive an enable control signal of a target power protection circuit corresponding to a target hard disk;
[0219] The hard disk offline control submodule is used to control the target power protection circuit to enable according to the enable control signal, so as to cut off the power supply of the target hard disk with a preset amplitude to make the target hard disk offline.
[0220] In a specific embodiment of the present invention, the device may further include:
[0221] The reconstruction completion information recording module is used to record the reconstruction completion information in the system event log when the data reconstruction and recovery are successful.
[0222] Referring to FIG. 11 , FIG. 11 is a structural block diagram of a hard disk abnormality processing system according to an embodiment of the present invention. The system may include:
[0223] The disk array card 1 is used to receive the hard disk signal status reported by the target hard disk, and forward the hard disk signal status to the complex programmable logic device 2; perform hard disk error diagnosis on the target hard disk according to the error diagnosis instruction, obtain the diagnosis result, and send the diagnosis result to the complex programmable logic device 2;
[0224] The complex programmable logic device 2 is used to analyze the hard disk signal status and obtain the current hard disk status information of the target hard disk; when it is determined that the target hard disk has a hard disk error according to the current hard disk status information, an error diagnosis instruction is sent to the disk array card 1; when the diagnosis result is that the hard disk is normal, data reconstruction and recovery are performed on the target hard disk, and a reconstruction and recovery monitoring instruction is sent to the baseboard management controller 3; according to the hard disk offline instruction, an enable control signal of the power protection circuit 4 corresponding to the target hard disk is generated, and the enable control signal of the power protection circuit 4 is sent to the power protection circuit 4;
[0225] The baseboard management controller 3 is used to obtain the data reconstruction and recovery record information corresponding to the target hard disk when the data reconstruction and recovery failure is detected; when it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information, send a hard disk offline instruction to the complex programmable logic device 2;
[0226] The power protection circuit 4 is used to control the target hard disk to go offline according to the power protection circuit 4 enable control signal.
[0227] By adopting a new hardware architecture design, optimizing the hardware circuit design, and controlling the opening and closing of each hard disk power protection circuit through the interaction between the disk array card, baseboard management controller, and complex programmable logic device, it is possible to prevent the hard disk from failing again after being rebuilt, and repeatedly going online to rebuild and then offline, which may affect customer business performance.
[0228] It can be seen from the above technical solution that when the hard disk signal status of the target hard disk is analyzed and it is determined that the target hard disk has a hard disk error according to the current hard disk status information analyzed, the target hard disk is diagnosed for hard disk error, and when the diagnosis result is that the hard disk is normal, the target hard disk is reconstructed and restored for data. When data reconstruction and recovery fails, and it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the acquired data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit. By controlling the target hard disk to go offline through the power protection circuit when repeated reconstruction failures occur, it is effectively prevented that the hard disk fails again after reconstruction, and the problem of repeated online reconstruction and offline affects the customer's business performance, and the probability of system downtime due to system access to the faulty hard disk is greatly reduced, and the stability, reliability, maintainability of the system and the competitiveness of the product are improved.
[0229] In a specific implementation of the present invention, the disk array card 1 is also used to remove the target hard disk from the system when the diagnosis result is a hard disk failure.
[0230] In a specific implementation of the present invention, the disk array card 1 is further used to place the target hard disk into a protection state when it is determined according to the current hard disk state information that a hard disk error exists in the target hard disk.
[0231] In a specific embodiment of the present invention, the disk array card 1 is specifically used to send the hard disk signal status of the target hard disk to the complex programmable logic device 2 through a serial general purpose input and output signal;
[0232] The complex programmable logic device 2 is specifically used to analyze the hard disk signal state and obtain the hard disk error signal setting state; when the hard disk error signal setting state is the hard disk error enable state, it is determined that there is a hard disk error in the target hard disk, an error diagnosis instruction is sent to the disk array card 1, and hard disk error information is sent to the baseboard management controller 3; the hard disk error signal setting state is set to the hard disk error non-enable state, and the data reconstruction recovery signal setting state is set to the data reconstruction recovery enable state; the reconstruction setting information is sent to the baseboard management controller 3, and data reconstruction and recovery are performed on the target hard disk; and the target power protection circuit 4 is enabled according to the enable control signal.
[0233] The disk array card 1 is specifically used to perform hard disk error diagnosis on the target hard disk according to the error diagnosis instruction;
[0234] The baseboard management controller 3 is further used to record the hard disk drive failure assertion in the system event log according to the hard disk error information; record the hard disk drive failure removal and data reconstruction recovery assertion in the system event log according to the reconstruction setting information; retrieve the data reconstruction recovery record information corresponding to the target hard disk from the system event log; when it is determined that the data reconstruction recovery failure is a repeated reconstruction failure according to the data reconstruction recovery record information, send an enable control signal for the target power protection circuit 4 corresponding to the target hard disk to the complex programmable logic device 2;
[0235] The power protection circuit 4 is specifically used to cut off the power supply of the target hard disk with a preset amplitude according to the enable control signal to make the target hard disk offline.
[0236] In a specific implementation of the present invention, the baseboard management controller 3 is further configured to record reconstruction completion information in a system event log when data reconstruction and recovery are successful.
[0237] In a specific embodiment of the present invention, the complex programmable logic device 2 is specifically used to generate an enable control signal of the power protection circuit 4 corresponding to the power protection branch where the target hard disk is located according to the hard disk offline instruction, and send the enable control signal of the power protection circuit 4 to the power protection branch where the target hard disk is located in the power protection circuit 4;
[0238] The power protection circuit 4 is specifically used to control the power protection branch where the target hard disk is located to enable according to the power protection circuit 4 enable control signal, so as to control the target hard disk to go offline.
[0239] Refer to Figure 12, which is a block diagram of a hard disk exception handling system in an embodiment of the present invention. A corresponding 12V power protection circuit 4 is set for each hard disk in advance. The complex programmable logic device 2 generates an enable control signal for the power protection circuit 4 corresponding to the power protection branch where the target hard disk is located according to the hard disk offline instruction, and sends the enable control signal for the power protection circuit 4 to the power protection branch where the target hard disk is located in the power protection circuit 4. The power protection circuit 4 controls the power protection branch where the target hard disk is located to enable according to the enable control signal for the power protection circuit 4, thereby controlling the target hard disk to go offline. By setting a corresponding power protection branch for each hard disk, precise control of the offline of the faulty hard disk is achieved, avoiding the impact on other hard disks.
[0240] In a specific embodiment of the present invention, the baseboard management controller 3 is specifically used to parse the reconstruction and recovery monitoring instruction to obtain the hard disk identification of the target hard disk; and obtain the data reconstruction and recovery record information corresponding to the target hard disk according to the hard disk identification.
[0241] The baseboard management controller 3 obtains the hard disk identification of the target hard disk by parsing the reconstruction and recovery monitoring instruction, and obtains the data reconstruction and recovery record information corresponding to the target hard disk according to the hard disk identification. By obtaining the data reconstruction and recovery record information corresponding to the target hard disk according to the hard disk identification, the data reconstruction and recovery record information can be accurately and quickly retrieved.
[0242] Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0243] The received hard disk signal status of the target hard disk is parsed to obtain the current hard disk status information of the target hard disk; when it is determined that the target hard disk has a hard disk error based on the current hard disk status information, the hard disk error diagnosis is performed on the target hard disk to obtain the diagnosis result; when the diagnosis result is that the hard disk is normal, the data of the target hard disk is reconstructed and recovered; when the data reconstruction and recovery fails, the data reconstruction and recovery record information corresponding to the target hard disk is obtained; when it is determined that the current data reconstruction and recovery failure is a repeated reconstruction failure based on the data reconstruction and recovery record information, the target hard disk is controlled to go offline through the power protection circuit.
[0244] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0245] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be elaborated here.
[0246] Corresponding to the above method embodiment, the present invention further provides a computer program product, including a computer program, which implements the steps of the above hard disk exception processing method when executed by a processor.
[0247] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device, system and computer-readable storage medium disclosed in the embodiment, since they correspond to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0248] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the technical solution and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A hard disk abnormality processing method, characterized in that: include: Analyze the received hard disk signal status of the target hard disk to obtain the current hard disk status information of the target hard disk; When it is determined according to the current hard disk status information that the target hard disk has a hard disk error, performing hard disk error diagnosis on the target hard disk to obtain a diagnosis result; When the diagnosis result shows that the hard disk is normal, data reconstruction and recovery are performed on the target hard disk; When data reconstruction and recovery fails, obtaining data reconstruction and recovery record information corresponding to the target hard disk; When it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, the target hard disk is controlled to go offline through a power protection circuit.
2. The hard disk abnormality processing method according to claim 1, characterized in that: Also includes: When the diagnosis result is a hard disk failure, the target hard disk is removed from the system through a disk array card.
3. The hard disk abnormality processing method according to claim 1, characterized in that: When it is determined according to the current hard disk status information that the target hard disk has a hard disk error, the method further includes: The target hard disk is placed in a protection state through a disk array card.
4. The hard disk abnormality processing method according to claim 1, characterized in that: Parsing the received hard disk signal status of the target hard disk to obtain the current hard disk status information of the target hard disk includes: Receiving a hard disk signal status of a target hard disk sent by a disk array card via a serial general purpose input and output signal; Analyze the hard disk signal status to obtain the hard disk error signal setting status; Correspondingly, when it is determined according to the current hard disk status information that the target hard disk has a hard disk error, hard disk error diagnosis is performed on the target hard disk, including: When the hard disk error signal setting state is a hard disk error enabling state, determining that a hard disk error exists in the target hard disk; Recording a hard disk drive failure assertion in a system event log, and performing hard disk error diagnosis on the target hard disk; Accordingly, data reconstruction and recovery of the target hard disk includes: The hard disk error signal setting state is set to a hard disk error disabled state, and the data reconstruction recovery signal setting state is set to a data reconstruction recovery enabled state; Recording hard disk drive failure resolution and data reconstruction and recovery assertions in the system event log to perform data reconstruction and recovery on the target hard disk; Correspondingly, obtaining the data reconstruction and recovery record information corresponding to the target hard disk includes: Retrieving data reconstruction and recovery record information corresponding to the target hard disk from the system event record log; Accordingly, controlling the target hard disk to go offline through a power protection circuit includes: Receiving an enable control signal for a target power protection circuit corresponding to the target hard disk; The target power protection circuit is enabled according to the enable control signal to cut off the power supply of the target hard disk with a preset amplitude to make the target hard disk offline.
5. The hard disk abnormality processing method according to claim 4, characterized in that: Also includes: When the data reconstruction and recovery are successful, reconstruction completion information is recorded in the system event log.
6. A hard disk abnormality processing device, characterized in that: include: A hard disk status acquisition module is used to parse the hard disk signal status of the received target hard disk to obtain the current hard disk status information of the target hard disk; A diagnosis result obtaining module, for performing hard disk error diagnosis on the target hard disk to obtain a diagnosis result when it is determined according to the current hard disk status information that the target hard disk has a hard disk error; A data reconstruction and recovery module, used for reconstructing and recovering data on the target hard disk when the diagnosis result shows that the hard disk is normal; A reconstruction and recovery record acquisition module, used for acquiring data reconstruction and recovery record information corresponding to the target hard disk when data reconstruction and recovery fails; The hard disk offline control module is used to control the target hard disk to go offline through a power protection circuit when it is determined that the data reconstruction and recovery failure is a repeated reconstruction failure according to the data reconstruction and recovery record information.
7. A hard disk abnormality processing system, characterized in that: include: A disk array card, used for receiving a hard disk signal status reported by a target hard disk, and forwarding the hard disk signal status to a complex programmable logic device; performing hard disk error diagnosis on the target hard disk according to an error diagnosis instruction, obtaining a diagnosis result, and sending the diagnosis result to the complex programmable logic device; The complex programmable logic device is used to analyze the hard disk signal status to obtain the current hard disk status information of the target hard disk; when it is determined that the target hard disk has a hard disk error according to the current hard disk status information, the error diagnosis instruction is sent to the disk array card; when the diagnosis result is that the hard disk is normal, the data of the target hard disk is rebuilt and restored, and a reconstruction and recovery monitoring instruction is sent to the baseboard management controller; according to the hard disk offline instruction, a power protection circuit enable control signal corresponding to the target hard disk is generated, and the power protection circuit enable control signal is sent to the power protection circuit; The baseboard management controller is used to obtain data reconstruction and recovery record information corresponding to the target hard disk when a data reconstruction and recovery failure is detected; when it is determined according to the data reconstruction and recovery record information that the current data reconstruction and recovery failure is a repeated reconstruction failure, send a hard disk offline instruction to the complex programmable logic device; The power protection circuit is used to control the target hard disk to go offline according to the power protection circuit enable control signal.
8. The hard disk abnormality processing system according to claim 7, characterized in that: The complex programmable logic device is specifically used to generate a power protection circuit enable control signal corresponding to the power protection branch where the target hard disk is located according to the hard disk offline instruction, and send the power protection circuit enable control signal to the power protection branch where the target hard disk is located in the power protection circuit; The power protection circuit is specifically used to control the power protection branch where the target hard disk is located to enable according to the power protection circuit enable control signal, so as to control the target hard disk to go offline.
9. The hard disk abnormality processing system according to claim 7, characterized in that: The baseboard management controller is specifically used to parse the reconstruction and recovery monitoring instruction to obtain the hard disk identification of the target hard disk; and obtain the data reconstruction and recovery record information corresponding to the target hard disk according to the hard disk identification.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the hard disk abnormality processing method according to any one of claims 1 to 5 are implemented.