A solid state hard disk fault processing method, product, device and medium

By monitoring the operating status and fault type of the solid-state drive and actively dealing with the fault strategy, the problem of long SSD fault processing time is solved, the fault identification and kicking speed is improved, maintenance costs are reduced and efficiency is improved.

CN118711651BActive Publication Date: 2024-11-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411207161.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-19
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

When a solid state hard disk (SSD) fails, the host system takes a long time to detect and process, affecting business stability.

Method used

Provide a solid-state hard disk fault handling method, by monitoring the operating status of the SSD, judging the fault type and executing the corresponding fault handling strategy, actively sending feedback information to the host, and determining whether the number of input and output request errors exceeds the threshold. If it exceeds the fault, it will cause a fault. The SSD is marked as a fault state and removed from the independent disk redundant array.

Benefits of technology

This greatly improves the identification speed and kicking speed of the faulty SSD, reduces the maintenance cost of the redundant array of independent disks, improves the efficiency of use, and avoids the long-term timeout processing after waiting for the input and output commands to time out.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711651B_ABST
    Figure CN118711651B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, product, device and medium for handling solid-state hard disk faults, and relates to the field of storage technology. The scheme monitors the operating status of the solid-state hard disk, and when it is confirmed that the solid-state hard disk has a fault, determines the fault type of the faulty solid-state hard disk and executes the corresponding fault handling strategy; at the same time, actively sends corresponding feedback information to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information; when the host confirms that the number of input and output request errors exceeds a first threshold, the faulty solid-state hard disk is marked as a fault state, and the faulty solid-state hard disk is removed from the independent disk redundant array. There is no need for the host system to wait for the input and output commands or management commands of the solid-state hard disk to time out, and then kick the disk after a long timeout process, which greatly improves the recognition speed and kick speed of the faulty solid-state hard disk. Effectively reduces the maintenance cost of the independent disk redundant array.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a solid state hard disk fault processing method, product, device and medium. Background Art

[0002] The SSD controller is the core hardware that manages the storage and retrieval of data on the SSD. It supports multiple hardware units to achieve complex functions and performance balance. However, due to the complex internal design of the SSD, its stability may not be as good as that of a mechanical hard disk.

[0003] To ensure the reliability of SSDs, a professional storage server or general server plus software Redundant Array of Independent Disks (RAID) is usually used. When an SSD fails, such as a firmware logic error, a hardware unit failure, or a software-induced central processing unit (CPU) core dump, the SSD is usually set to read-only mode or wait for the host system to kick out the failed disk. However, when a failure occurs, the host system needs to wait for the input and output commands or management commands to the SSD to time out, and then kick out the disk from the Linux system after the timeout processing, which may take a long time and affect business stability.

[0004] In view of the above problems, how to solve the problem that when an SSD fails, the host system takes a long time to detect and process, affecting business stability, is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0005] The purpose of the present invention is to provide a solid state drive fault processing method, product, device and medium to solve the problem that when a current SSD fails, the host system needs a long time to detect and process, affecting business stability.

[0006] In order to solve the above technical problems, the present invention provides a solid state hard disk fault processing method, which is applied to an independent disk redundant array; the method comprises:

[0007] Monitor the operating status of the SSD and determine whether the SSD fails;

[0008] If it is confirmed that the solid state drive is faulty, then the fault type of the faulty solid state drive is determined;

[0009] A corresponding fault handling strategy is executed according to the fault type of the faulty solid-state hard disk, and feedback information of the link corresponding to the fault handling strategy is sent to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information, and judge whether the number of received input and output request errors exceeds a first threshold; if the host confirms that the number of input and output request errors does not exceed the first threshold, the host continues to monitor the number of received input and output request errors; if the host confirms that the number of input and output request errors exceeds the first threshold, the host marks the faulty solid-state hard disk as a faulty state, and removes the faulty solid-state hard disk from the independent disk redundant array.

[0010] On the one hand, when the fault type of the faulty solid state drive is a storage medium error, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive, and sending feedback information of a link corresponding to the fault handling strategy to the host, includes:

[0011] Setting the faulty solid state drive to a read-only mode through the solid state drive firmware;

[0012] When the faulty solid state hard disk receives a write operation request from the host, feedback information of an input / output request error is sent to the host.

[0013] On the other hand, when the fault type of the faulty solid state drive is a software logic error based on an input / output command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive and sending feedback information of a link corresponding to the fault handling strategy to the host include:

[0014] Determine a faulty disk management module in the faulty solid state drive;

[0015] Set the multicast assertion flag of the faulty disk management module;

[0016] When the remaining disk management modules in the faulty solid state drive detect the multicast assertion flag of the faulty disk management module, a target disk management module is selected from the remaining disk management modules;

[0017] The target disk management module processes the input and output requests of the faulty disk management module, and sends corresponding feedback information to the host.

[0018] On the other hand, before determining the faulty disk management module in the faulty solid state drive, the method further includes:

[0019] Setting the priority of all disk management modules in the faulty solid state drive;

[0020] Correspondingly, selecting a target disk management module from the remaining disk management modules includes:

[0021] Obtaining the priority of each disk management module except the faulty disk management module;

[0022] The disk management module with the highest priority is selected as the target disk management module.

[0023] On the other hand, the processing of the input and output requests of the faulty disk management module by the target disk management module and sending corresponding feedback information to the host includes:

[0024] Selecting a current cache from the caches of the faulty disk management module through the target disk management module, and obtaining an input and output command state machine structure of the current cache;

[0025] Determine whether the input / output request in the current cache returns completion information to the host according to the input / output command state machine structure;

[0026] If it is confirmed that no completion information has been returned to the host, feedback information of an input / output request error corresponding to the current cache is sent to the host through the target disk management module;

[0027] If it is confirmed that the completion information is returned to the host, the target disk management module selects the next cache from the remaining cache of the faulty disk management module as the current cache, and enters the step of obtaining the input and output command state machine structure of the current cache until all caches of the faulty disk management module are traversed.

[0028] On the other hand, when the fault type of the faulty solid state drive is a software logic error based on a management command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive and sending feedback information of a link corresponding to the fault handling strategy to the host include:

[0029] Setting an asynchronous assertion flag of the faulty solid state drive;

[0030] When each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to an asynchronous assertion flag;

[0031] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0032] On the other hand, when the fault type of the faulty solid state drive is a hardware unit error based on an input / output command path or a hardware unit error based on a management command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive and sending feedback information of a link corresponding to the fault handling strategy to the host include:

[0033] Setting a hardware unit error flag of the faulty solid state drive;

[0034] When each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to a hardware unit error flag;

[0035] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0036] On the other hand, when the fault type of the faulty solid state hard disk is a solid state hard disk controller fault, the method further includes:

[0037] Monitoring, by the host, the processing time of the input / output request and / or the processing time of the management request of the faulty solid-state drive, and determining whether the processing time of the input / output request and / or the processing time of the management request exceeds a corresponding time threshold;

[0038] If the host confirms that the processing time of the input / output request and / or the processing time of the management request exceeds the corresponding time threshold, the host marks the faulty solid-state drive as a faulty state and removes the faulty solid-state drive from the independent disk redundant array.

[0039] On the other hand, it also includes:

[0040] The non-volatile memory of the host drives the setting information of the severe fault state in the status register of the monitoring controller, and determines whether the severe fault state is set according to the setting information;

[0041] If so, the faulty solid state drive is removed from the redundant array of independent disks through a non-volatile memory driver after a command termination timeout period.

[0042] On the other hand, it also includes:

[0043] Monitoring the setting information of the key warning field in the self-monitoring analysis report technical log by the host, and judging whether the key warning field is set according to the setting information;

[0044] If yes, then obtaining the error type and severity of the faulty solid state drive;

[0045] The failed solid state drive is removed from the redundant array of independent disks according to the error type and severity of the failed solid state drive.

[0046] On the other hand, after the host removes the faulty solid state drive from the redundant array of independent disks according to the feedback information, the method further includes:

[0047] Obtaining the time when the faulty solid-state drive fails, detailed information of the faulty solid-state drive, the cause of the fault of the faulty solid-state drive, and steps for removing the faulty solid-state drive;

[0048] A removal log of the faulty solid state drive is generated according to the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the cause of the fault of the faulty solid state drive, and operation steps for removing the faulty solid state drive.

[0049] In order to solve the above technical problems, the present invention also provides another solid state hard disk fault processing method, which is applied to a host; the method comprises:

[0050] Receiving feedback information sent by the independent disk redundant array; wherein the feedback information is feedback information of a link corresponding to the fault handling strategy executed according to the fault type of the faulty solid state hard disk when the faulty solid state hard disk fails;

[0051] Determine the number of input and output request errors corresponding to the faulty solid state drive according to the received feedback information;

[0052] determining whether the number of input and output request errors exceeds a first threshold;

[0053] If it is confirmed that the number of input / output request errors does not exceed the first threshold, continue to monitor the number of received input / output request errors, and return to the step of determining the number of input / output request errors corresponding to the faulty solid state drive according to the received feedback information;

[0054] If it is confirmed that the number of input / output request errors exceeds a first threshold, the faulty solid state drive is marked as a faulty state, and the faulty solid state drive is removed from the redundant array of independent disks.

[0055] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, perform the steps of the above solid state drive failure processing method.

[0056] In order to solve the above technical problems, the present invention further provides a solid state hard disk fault processing device, comprising:

[0057] Memory for storing computer programs;

[0058] The processor is used to implement the steps of the above-mentioned solid state drive failure processing method when executing the computer program.

[0059] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned solid-state hard disk failure handling method are implemented.

[0060] The solid-state hard disk fault processing method provided by the present invention is applied to an independent disk redundant array; specifically monitors the operating status of the solid-state hard disk to determine whether the solid-state hard disk fails; if it is confirmed that the solid-state hard disk fails, determines the fault type of the failed solid-state hard disk; executes the corresponding fault processing strategy according to the fault type of the failed solid-state hard disk, and sends feedback information of the link corresponding to the fault processing strategy to the host, so that the host determines the number of input and output request errors corresponding to the failed solid-state hard disk according to the received feedback information, and determines whether the number of received input and output request errors exceeds a first threshold; if the host confirms that the number of input and output request errors does not exceed the first threshold, the host continues to monitor the number of received input and output request errors; if the host confirms that the number of input and output request errors exceeds the first threshold, the host marks the failed solid-state hard disk as a fault state and removes the failed solid-state hard disk from the independent disk redundant array.

[0061] The beneficial effect of the present invention is that by monitoring the operating status of the solid-state hard disk, when it is confirmed that the solid-state hard disk fails, the fault type of the faulty solid-state hard disk is determined and the corresponding fault handling strategy is executed; at the same time, the corresponding feedback information is actively sent to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information; when the host confirms that the number of input and output request errors exceeds the first threshold, the faulty solid-state hard disk is marked as a fault state, and the faulty solid-state hard disk is removed from the independent disk redundant array. There is no need to make the host system wait for the input and output commands or management commands of the solid-state hard disk to time out, and then kick the disk after a long timeout process, which greatly improves the recognition speed and kicking speed of the faulty solid-state hard disk. The maintenance cost of the independent disk redundant array is effectively reduced, and the use efficiency is improved.

[0062] On the other hand, this solution specifically sets the faulty SSD to read-only mode through the SSD firmware; when the faulty SSD receives a write operation request from the host, it sends feedback information of the input and output request error to the host, realizing the execution of the fault handling strategy under the storage medium error and the sending of feedback information. Determine the faulty disk management module in the faulty solid-state drive; set the multicast assertion flag of the faulty disk management module; when the remaining disk management modules in the faulty solid-state drive detect the multicast assertion flag of the faulty disk management module, select the target disk management module from the remaining disk management modules; process the input and output requests of the faulty disk management module through the target disk management module, and send the corresponding feedback information to the host, realizing the execution of the fault handling strategy under the software logic error based on the input and output command path and the sending of feedback information. Set the asynchronous assertion flag of the faulty solid-state drive; when each disk management core of the faulty solid-state drive processes the input and output requests of the host, it sends feedback information of the input and output request error to the host according to the asynchronous assertion flag, realizing the execution of the fault handling strategy under the software logic error based on the management command path and the sending of feedback information. A hardware unit error flag of a faulty solid-state hard disk is set; when each disk management core of the faulty solid-state hard disk processes the input and output requests of the host, feedback information of the input and output request error is sent to the host according to the hardware unit error flag; the execution of the fault handling strategy based on the hardware unit error of the input and output command path or the hardware unit error based on the management command path and the sending of feedback information are realized.

[0063] In addition, the present invention also provides a solid state drive fault processing device, a computer product and a medium, with the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0065] Figure 1 A flowchart of a solid state drive fault processing method provided by an embodiment of the present invention;

[0066] Figure 2 A flowchart of another solid state drive fault processing method provided by an embodiment of the present invention;

[0067] Figure 3 A schematic diagram of a solid state hard disk fault processing device provided by an embodiment of the present invention;

[0068] Figure 4 A schematic diagram of another solid state drive fault processing device provided by an embodiment of the present invention;

[0069] Figure 5 A schematic diagram of a solid state drive fault processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0071] The core of the present invention is to provide a solid state drive fault processing method, product, device and medium to solve the problem that when a current SSD fails, the host system takes a long time to detect and process, affecting business stability.

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

[0073] As the core hardware, the SSD controller is responsible for managing the storage and retrieval of data in the solid-state drive. It supports multiple hardware units to achieve complex functions and performance balance, including XOR units, memory management units, flash memory interface units, etc. However, due to the complex internal design of the SSD, its stability may not be as good as that of a mechanical hard disk. To ensure the reliability of the SSD, a professional high-end storage server or a general server plus software RAID is usually used. When the SSD fails, such as a firmware logic error, a hardware unit failure, or a CPU core dump caused by software, the SSD is often set to read-only mode or waits for the host system to kick out the faulty disk. However, when a fault occurs, such as a hardware unit failure or an internal firmware error, the host system detects an input / output (IO) timeout and performs operations such as retrying and resetting the controller, resulting in the problem of kicking out the faulty disk for too long. Therefore, in order to solve the above problems, the present invention provides a solid-state hard disk fault handling method. It should be noted that the method provided by the present invention is applied to RAID.

[0074] Figure 1 The present invention provides a flowchart of a method for handling a solid state drive failure. Figure 1 As shown, the method includes:

[0075] S10: Monitor the operating status of the solid state drive to determine whether the solid state drive fails; if so, proceed to step S11.

[0076] In the specific implementation, it is first necessary to monitor the operating status of the SSD to determine whether the SSD fails. In this embodiment, there is no restriction on the specific method of determining whether the SSD fails. For example, check the firmware version and status of the SSD to ensure that the SSD firmware is the latest version and check whether the firmware status is normal; some SSDs will provide firmware update tools or status check tools, and these tools can be used to check the firmware status. Monitor the temperature of the SSD. The SSD will generate heat during normal operation, but if the temperature is too high, it may cause performance degradation or failure; some tools can be used to monitor the temperature of the SSD. Check the read and write error rate of the SSD. The read and write error rate of the SSD is an important indicator for judging its health status. If the read and write error rate suddenly increases, it may be a sign of SSD failure. Check the service life of the SSD. When it approaches or exceeds its design life, performance degradation or failure may occur. Check the bad blocks of the SSD. The bad blocks in the SSD are data blocks that cannot be read and written normally. If the number of bad blocks is too large, it may cause performance degradation or failure. You can also check the interfaces and connections of the SSD to ensure that the interfaces and connections of the SSD are normal and not loose or damaged. When it is confirmed that the SSD fails, the process proceeds to step S11 ; when it is confirmed that the SSD does not fail, the process returns to continue monitoring the operating status of the SSD.

[0077] S11: Determine the fault type of the faulty solid state drive.

[0078] Among them, the fault types include at least storage medium errors, software logic errors based on input and output command paths, software logic errors based on management command paths, hardware unit errors based on input and output command paths, and hardware unit errors based on management command paths.

[0079] After confirming that the SSD has failed, it is necessary to determine the failure type of the failed SSD. It is worth noting that the failure type of the SSD in this embodiment should at least include storage medium errors, software logic errors based on IO command paths, software logic errors based on management (admin) command paths, hardware unit errors based on IO command paths, and hardware unit errors based on admin command paths. The above error types are described in detail below:

[0080] Storage media errors refer to faults or problems related to storage media detected by the firmware of the SSD during operation, such as NAND flash memory (NAND FLASH) errors and electrically erasable programmable read-only memory (EEPROM) errors. The errors may include: Bad block errors: There are data blocks in the storage medium that cannot be read or written normally, which may be caused by manufacturing defects, wear and tear, or data corruption; Read and write errors: When reading and writing to the storage medium, data reading or writing fails due to various reasons (such as interference, voltage fluctuations, etc.); Error Checking and Correction (ECC) In addition: SSD uses ECC technology to detect and correct errors in data, but if the number of errors exceeds the correction capability of ECC, it will cause ECC errors; Wear level: The storage medium has a certain service life. When the number of erases and writes of a block reaches a certain threshold, it may be marked as worn, which affects the performance and reliability of the SSD.

[0081] Software logic errors based on the IO command path refer to errors caused by software logic problems during the IO command processing of the SSD. These errors may occur in the firmware, driver, or operating system of the SSD, specifically including the following aspects: Firmware logic errors: Logic errors in the SSD firmware may cause incorrect command processing, such as incorrect mapping of logical block addresses to physical block addresses, or incorrect processing of ECC checks for data; Driver errors: The SSD driver in the operating system may have logic errors, such as incorrect parsing or processing of I / O commands from the host, or incorrect communication with the SSD firmware; Operating system errors: The file system or block device layer in the operating system may have logic errors, such as incorrect processing of the mapping relationship of file system metadata or data blocks. The generation of software logic errors based on the IO command path will trigger an assertion (ASSERT), which will eventually cause the SSD CPU to become unresponsive.

[0082] Software logic errors based on the admin command path are errors caused by software logic problems during the SSD's admin command processing. These errors may occur in the SSD's firmware, driver, or operating system, specifically including the following aspects: Firmware logic errors: Logic errors in the SSD firmware may cause incorrect admin command processing, such as incorrect parsing or executing admin commands, or incorrect processing of command parameters and return values; Driver errors: The SSD driver in the operating system may have logic errors, such as incorrect parsing or processing admin commands from the host, or incorrect communication with the SSD firmware; Operating system errors: The SSD management software or tools in the operating system may have logic errors, such as incorrectly calling or processing admin commands, or incorrectly parsing the output results of commands. The generation of software logic errors based on the admin command path will also trigger ASSERT, ultimately causing the SSD's CPU to become unresponsive.

[0083] Hardware unit errors based on the IO command path are errors caused by hardware unit failures during the I / O command processing of the SSD. These errors may occur in multiple hardware units inside the SSD, including the following aspects: NAND Flash error: If the NAND Flash has problems such as bad blocks, wear, or read and write errors, data may not be read and written correctly; Controller error: The SSD controller is responsible for managing and controlling the read and write operations of data. If the controller fails, such as register errors, clock errors, or data bus errors, command processing may fail; Cache error: The cache in the SSD is used to temporarily store data. If the cache fails, such as data loss, data corruption, or access errors, data inconsistency or loss may occur; Interface error: If the interface between the SSD and the host fails, such as signal loss, signal interference, or connection errors, commands may not be transmitted or received correctly. These hardware unit errors may cause the SSD to fail to execute IO commands correctly, thereby affecting the read and write performance or data integrity of the data.

[0084] Hardware unit errors based on the admin command path refer to errors caused by hardware unit failures during the SSD's admin command processing. These errors may occur in multiple hardware units inside the SSD, including the following aspects: Controller error: The SSD controller is responsible for managing and controlling the execution of admin commands. If the controller fails, such as register errors, state machine errors, or control logic errors, the admin command may not be executed correctly; Interface error: If the interface between the SSD and the host fails, such as signal loss, signal interference, or connection errors, the admin command may not be transmitted or received correctly; Cache error: The cache in the SSD is used to temporarily store the parameters and results of admin commands. If the cache fails, such as data loss, data corruption, or access errors, the admin command execution may fail or the result may be incorrect; Power management unit error: The SSD's power management unit is responsible for providing a stable power supply to the SSD. If the power management unit fails, such as voltage anomalies, current anomalies, or power switch errors, the admin command execution process may be interrupted or fail. These hardware unit errors may cause the SSD to fail to execute admin commands correctly, thereby affecting the SSD's management functions or system configuration. In severe cases, these errors may cause SSD failure or data loss.

[0085] S12: Execute a corresponding fault handling strategy according to the fault type of the faulty solid-state hard disk, and send feedback information of the corresponding link of the fault handling strategy to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information, and judge whether the number of received input and output request errors exceeds a first threshold; if the host confirms that the number of input and output request errors does not exceed the first threshold, the host continues to monitor the number of received input and output request errors; if the host confirms that the number of input and output request errors exceeds the first threshold, the host marks the faulty solid-state hard disk as a faulty state, and removes the faulty solid-state hard disk from the independent disk redundant array.

[0086] After determining the fault type of the faulty solid state drive, it is necessary to execute the corresponding fault handling strategy to handle the faulty solid state drive. At the same time, it is necessary to send feedback information corresponding to the execution link of the fault handling strategy to the host. In this embodiment, there is no restriction on the specific process of executing the corresponding fault handling strategy according to the fault type of the faulty solid state drive and sending feedback information corresponding to the link of the fault handling strategy to the host.

[0087] After the host receives the feedback information of the IO request error sent by the faulty SSD, it can determine the number of IO request errors corresponding to the faulty SSD based on the feedback information, and judge whether the number of received IO request errors exceeds the first threshold. In this embodiment, there is no restriction on the first threshold, which depends on the specific implementation situation. If the host confirms that the number of IO request errors does not exceed the first threshold, the host continues to monitor the number of received IO request errors; if the host confirms that the number of IO request errors exceeds the first threshold, the host marks the faulty SSD as a faulty state and removes the faulty SSD from the independent disk redundant array. In this way, the removal of the faulty SSD is achieved.

[0088] In this embodiment, by monitoring the operating status of the solid-state hard disk, when it is confirmed that the solid-state hard disk fails, the fault type of the faulty solid-state hard disk is determined and the corresponding fault handling strategy is executed; at the same time, the corresponding feedback information is actively sent to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information; when the host confirms that the number of input and output request errors exceeds the first threshold, the faulty solid-state hard disk is marked as a fault state, and the faulty solid-state hard disk is removed from the independent disk redundant array. There is no need to make the host system wait for the input and output commands or management commands of the solid-state hard disk to time out, and then kick the disk after a long timeout process, which greatly improves the recognition speed and kicking speed of the faulty solid-state hard disk. The maintenance cost of the independent disk redundant array is effectively reduced, and the use efficiency is improved.

[0089] On the basis of the above embodiments, in some embodiments, when the fault type of the faulty solid state drive is a storage medium error, a corresponding fault handling strategy is executed according to the fault type of the faulty solid state drive, and feedback information of a link corresponding to the fault handling strategy is sent to the host, including:

[0090] S120: Set the faulty SSD to read-only mode through the SSD firmware;

[0091] S121: When the faulty solid state drive receives a write operation request from the host, it sends feedback information of an input / output request error to the host.

[0092] When it is confirmed that the fault type of the faulty SSD is a storage medium error, the corresponding fault handling strategy is executed, specifically, the faulty solid state drive is set to read-only mode through the SSD firmware. When the faulty SSD receives a write operation request from the host again, it cannot process the host's write operation request because the current faulty SSD is in read-only mode; at this time, feedback information about the input and output request error is sent to the host, so that the host can remove the faulty SSD from the independent disk redundant array based on the feedback information.

[0093] In this embodiment, the faulty SSD is set to read-only mode through the SSD firmware; when the faulty SSD receives a write operation request from the host, feedback information of the input and output request error is sent to the host, thereby implementing the execution of the fault handling strategy under the storage medium error and the sending of feedback information.

[0094] On the basis of the above embodiments, in some embodiments, when the fault type of the faulty solid state drive is a software logic error based on an input / output command path, a corresponding fault handling strategy is executed according to the fault type of the faulty solid state drive, and feedback information of a link corresponding to the fault handling strategy is sent to the host, including:

[0095] S122: Determine a faulty disk management module in the faulty solid state drive;

[0096] S123: Setting the multicast assertion flag of the faulty disk management module;

[0097] S124: When the remaining disk management modules in the faulty solid state drive detect the multicast assertion flag of the faulty disk management module, a target disk management module is selected from the remaining disk management modules;

[0098] S125: Processing the input and output requests of the faulty disk management module through the target disk management module, and sending corresponding feedback information to the host.

[0099] When it is confirmed that the fault type of the faulty SSD is a software logic error based on an IO command path, a corresponding fault handling strategy is executed to specifically determine a faulty disk management (DM) module in the faulty SSD.

[0100] It is understandable that in the SSD firmware architecture design, the IO request path is generally multi-core designed to meet performance requirements, that is, multiple CPUs process the host's IO requests at the same time, so the CPU can also be called an IO core; and because there is a DM module in the CPU, the DM module is specifically responsible for processing the host's IO requests, so the CPU can also be called a DM core. For example, there are 4 CPUs in the SSD to process the host's IO requests, and the DM modules corresponding to each CPU can be defined as DM0-DM3. In this embodiment, the faulty DM module that has failed is first determined.

[0101] Furthermore, the multicast assertion flag dm_assert_flag of the faulty DM module is set to 1. In this embodiment, a bitmap may be specifically used to represent the multicast assertion flag. When the remaining DM modules in the faulty SSD detect the multicast assertion flag dm_assert_flag of the faulty DM module, a target DM module is selected from the remaining DM modules. In this embodiment, there is no restriction on the selection method of the target DM module, for example, it may be randomly selected or selected according to a selection rule, depending on the specific implementation situation.

[0102] Finally, the target DM module processes the IO request of the faulty DM module and sends corresponding feedback information to the host. In this embodiment, the specific process of the target DM module processing the IO request of the faulty DM module is not limited.

[0103] In this embodiment, a faulty disk management module in a faulty solid-state hard disk is determined; a multicast assertion flag of the faulty disk management module is set; when the remaining disk management modules in the faulty solid-state hard disk detect the multicast assertion flag of the faulty disk management module, a target disk management module is selected from the remaining disk management modules; the input and output requests of the faulty disk management module are processed by the target disk management module, and corresponding feedback information is sent to the host, thereby realizing the execution of the fault handling strategy and the sending of feedback information under the software logic error based on the input and output command path.

[0104] In order to better select the target DM module, based on the above embodiments, in some embodiments, before determining the faulty disk management module in the faulty solid state drive, the method further includes:

[0105] S126: Setting the priorities of all disk management modules in the faulty solid state drive.

[0106] Specifically, the priority of all DM modules in the faulty SSD is set. Taking DM0-DM3 in the above embodiment as an example, the priority of the DM module can be set to DM0 <DM1<DM2<DM3。

[0107] Correspondingly, a target disk management module is selected from the remaining disk management modules, including:

[0108] S127: Obtaining the priority of each disk management module except the faulty disk management module;

[0109] S128: Select the disk management module with the highest priority as the target disk management module.

[0110] When a target DM module needs to be selected, the priorities of all DM modules except the faulty DM module can be obtained, and the DM module with the highest priority is selected as the target DM module. Taking DM0 - DM3 in the above - mentioned embodiment as an example, the priority order of DM0 - DM3 is DM0 < DM1 < DM2 < DM3. Then, when only DM0 fails, DM3 is used as the target DM module; if DM3 fails, DM2 is used as the target DM module. In this way, the selection of the target DM module is realized.

[0111] In order to enable the target DM module to handle the IO requests of the faulty DM module on behalf, based on the above - mentioned embodiment, in some embodiments, the target disk management module processes the input - output requests of the faulty disk management module and sends the corresponding feedback information to the host, including:

[0112] S129: The target disk management module selects the current cache from the caches of the faulty disk management module and obtains the input - output command state machine structure of the current cache;

[0113] S130: Determine whether the input - output requests in the current cache return completion information to the host according to the input - output command state machine structure; if not, go to step S131; if so, go to step S132;

[0114] S131: The target disk management module sends feedback information indicating that the input - output request corresponding to the current cache is in error to the host;

[0115] S132: The target disk management module selects the next cache in the remaining caches of the faulty disk management module as the current cache, and enters the step of obtaining the input - output command state machine structure of the current cache until all caches of the faulty disk management module are traversed.

[0116] Specifically, the target DM module selects the current cache from the caches of the faulty DM module and obtains the IO command state machine structure of the current cache. Determine whether the IO requests in the current cache return completion information to the host according to the IO command state machine structure;

[0117] If it is confirmed that the completion information has not been returned to the host, the target DM module sends feedback information indicating that the IO request corresponding to the current cache is in error to the host; if it is confirmed that the completion information has been returned to the host, directly skip the current cache, and the target DM module selects the next cache in the remaining caches of the faulty DM module as the current cache, and enters the step of obtaining the IO command state machine structure of the current cache until all caches of the faulty DM module are traversed and all IOs are executed. In this way, the target DM module realizes the proxy - processing of the IO requests of the faulty DM module.

[0118] Based on the above embodiments, in some embodiments, when the fault type of the faulty solid state drive is a software logic error based on a management command path, a corresponding fault handling strategy is executed according to the fault type of the faulty solid state drive, and feedback information of a link corresponding to the fault handling strategy is sent to the host, including:

[0119] S133: setting the asynchronous assertion flag of the faulty solid state drive;

[0120] S134: when each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to an asynchronous assertion flag;

[0121] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0122] When it is confirmed that the fault type of the faulty SSD is a software logic error based on the admin command path, the corresponding fault handling strategy is executed, specifically setting the asynchronous assertion flag am_assert_flag of the faulty SSD to 1. When each DM core of the faulty SSD processes the IO request of the host, if it is confirmed that the asynchronous assertion flag am_assert_flag is 1, it is necessary to send feedback information of the IO request error to the host. It can be understood that the DM core is the CPU in the SSD that runs the DM module and is used to process IO requests.

[0123] In this embodiment, an asynchronous assertion flag of the faulty solid-state hard disk is set; when each disk management core of the faulty solid-state hard disk processes the input and output requests of the host, feedback information of the input and output request errors is sent to the host according to the asynchronous assertion flag, thereby realizing the execution of the fault handling strategy and the sending of feedback information under the software logic error based on the management command path.

[0124] On the basis of the above embodiments, in some embodiments, when the fault type of the faulty solid state drive is a hardware unit error based on an input / output command path or a hardware unit error based on a management command path, a corresponding fault handling strategy is executed according to the fault type of the faulty solid state drive, and feedback information of a link corresponding to the fault handling strategy is sent to the host, including:

[0125] S135: Setting a hardware unit error flag of the faulty solid state drive;

[0126] S136: when each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to a hardware unit error flag;

[0127] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0128] When it is confirmed that the fault type of the faulty SSD is a hardware unit error based on the IO command path or a hardware unit error based on the admin command path, the corresponding fault handling strategy is executed, specifically setting the hardware unit error flag hard_unit_error_flag of the faulty SSD to 1. When each DM core of the faulty SSD processes the IO request of the host, if it is confirmed that the hardware unit error flag hard_unit_error_flag is 1, it is necessary to send feedback information of the IO request error to the host. It can be understood that the DM core is the central processor that runs the DM module in the SSD and is used to process IO requests.

[0129] In this embodiment, a hardware unit error flag of the faulty solid-state hard disk is set; when each disk management core of the faulty solid-state hard disk processes the input and output requests of the host, feedback information of the input and output request error is sent to the host according to the hardware unit error flag; the execution of the fault handling strategy based on the hardware unit error of the input and output command path or the hardware unit error based on the management command path and the sending of feedback information are realized.

[0130] In the above embodiments, the execution of the processing strategies for several types of faults and the generation of feedback information are described. However, there is another type of fault, specifically a solid state drive controller fault. Under this fault, the faulty SSD will not be able to perform any operations and will not be able to send any information to the host. In order to handle the solid state drive controller fault, when the fault type of the faulty solid state drive is a solid state drive controller fault, the method further includes:

[0131] S150: monitoring the processing time of the input / output request and / or the processing time of the management request of the faulty solid state drive through the host, and determining whether the processing time of the input / output request and / or the processing time of the management request exceeds the corresponding time threshold; if so, proceeding to step S151;

[0132] S151: The host marks the faulty solid-state drive as a faulty state and removes the faulty solid-state drive from the redundant array of independent disks.

[0133] Specifically, the host monitors the processing time of the IO request and / or the processing time of the admin request of the faulty SSD to determine whether the processing time of the IO request and / or the processing time of the admin request exceeds the corresponding time threshold. It should be noted that the time threshold is not limited in this embodiment and is determined according to the specific implementation situation.

[0134] If the host confirms that the processing time of the IO request and the processing time of the admin request do not exceed the corresponding time threshold, the current SSD is considered to be operating normally. If the host confirms that the processing time of the IO request and / or the processing time of the admin request exceed the corresponding time threshold, it is confirmed that all the IO cores of the faulty SSD have logical errors or errors in its completion queue element (CQE) hardware unit, which will cause the IO requests in the current cache to fail to return to the host normally; in this case, the SSD firmware cannot process the IO and return completion to the host. Therefore, the host marks the faulty SSD as a faulty state and removes the faulty SSD from the independent disk redundant array.

[0135] In a specific implementation, the host may have other ways to kick the disk. Based on the above embodiments, in some embodiments, the method further includes:

[0136] S161: The host non-volatile memory driver monitors the setting information of the serious fault status in the status register of the controller, and determines whether the serious fault status is set according to the setting information; if so, proceeds to step S162;

[0137] S162: Remove the failed solid state drive from the redundant array of independent disks through the non-volatile memory driver after the command termination timeout period.

[0138] Non-Volatile Memory Express (NVMe) is a high-speed transmission protocol for accessing SSDs. In the NVMe controller, there is a controller status (CSTS) register, which contains the status information of the controller. In the specific implementation, the host's NVMe driver monitors the setting information of the fatal status in the CSTS register. When a serious fault occurs in the SSD, the fatalStatus bit in the CSTS register will be set, indicating that a fatal error has occurred. After the NVMe driver senses this status, it will wait for the Command Abort Time-out (CAP.TO) time, and then kick the faulty SSD out of the Linux system. In this way, the faulty SSD is removed.

[0139] It should be noted that the CAP.TO time is a configurable parameter that specifies how long the system waits before kicking out the failed SSD after a fatal error occurs.

[0140] Based on the above embodiments, in some embodiments, the method further includes:

[0141] S163: monitoring the setting information of the key warning field in the self-monitoring analysis report technical log through the host, and judging whether the key warning field is set according to the setting information; if so, proceeding to step S164;

[0142] S164: Get the error type and severity of the faulty solid state drive;

[0143] S165: Remove the faulty solid state drive from the redundant array of independent disks according to the error type and severity of the faulty solid state drive.

[0144] Self-Monitoring, Analysis, and Reporting Technology (SMART) is a hard disk health monitoring technology that can monitor various hard disk indicators, such as temperature, error rate, etc., and report the status of these indicators.

[0145] In this embodiment, the host monitors the setting information of the critical warning (criticalWarn) field in the SMART log (smartLog). When there is a problem with the health status of the SSD, the criticalWarn field in the smartLog will be set, indicating that a critical warning field has appeared. The host software can monitor this field regularly. When it is set, the error type and severity of the faulty SSD are obtained, and based on the type and severity of the error, it is decided whether to actively kick out the faulty SSD. The following is a detailed description:

[0146] To decide whether to actively kick out the faulty SSD based on the error type and severity, the following steps can be taken: Define the error type and severity level. First, it is necessary to clearly define the error type and corresponding severity level that occurs in the SSD. For example, the fault type mentioned in the above embodiment, and define different severity levels according to its impact on the system, such as fatal, critical, major, minor, etc.

[0147] Further monitoring of the SSD health status, when a critical warning is detected, the host evaluates it based on the error type and severity. Specifically based on the defined error type and severity level, the impact of the current error on the system is evaluated. For example, a fatal error may immediately cause data loss or system crash, requiring immediate action; while a minor error may only affect performance and can be handled later. Then, based on the evaluation results, decide whether to proactively kick out the failed SSD. For example, for fatal or serious errors, the failed SSD should be kicked out immediately to protect data and system stability; for major or minor errors, it can be determined based on the situation, such as replacing it within the maintenance window without affecting the business.

[0148] Finally, if you decide to kick out the failed SSD, you can perform the kick operation through software RAID tools (such as mdadm) or system management tools to remove the failed SSD from the system.

[0149] Through the above steps, you can reasonably decide whether to proactively kick out the faulty SSD based on the error type and severity to ensure system reliability and data security.

[0150] Based on the above embodiments, in some embodiments, after the host removes the failed solid state drive from the redundant array of independent disks according to the feedback information, the method further includes:

[0151] S171: Obtaining the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the fault cause of the faulty solid state drive, and operation steps for removing the faulty solid state drive;

[0152] S172: Generate a removal log of the faulty solid state drive according to the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the fault cause of the faulty solid state drive, and operation steps for removing the faulty solid state drive.

[0153] When the host removes the faulty SSD from the RAID, in order to enable the user to better understand the removal of the faulty SSD, in this embodiment, the time when the faulty SSD fails, the detailed information of the faulty SSD, the cause of the fault of the faulty SSD, and the operation steps for removing the faulty SSD are specifically obtained. Further, according to the time when the faulty SSD fails, the detailed information of the faulty SSD, the cause of the fault of the faulty SSD, and the operation steps for removing the faulty SSD, a removal log of the faulty SSD is generated, so that the user can view the entire process of removing the faulty SSD according to the removal log.

[0154] In addition, if a data backup or recovery operation is performed before the failed SSD is removed, the removal log can also record relevant details, such as the backup time, recovery process, and method for verifying data integrity. If a new SSD is added after the failed SSD is removed, the removal log can also record the information of the new SSD and the process of adding it to the RAID. If a RAID reconstruction operation is performed, the removal log can also record the reconstruction start time, completion time, and any warning or error information during the process. Finally, the removal log can also record the process of verifying and testing the repaired RAID, such as checking data integrity and performing performance tests. By generating a removal log, it can help system administrators or maintenance personnel track the fault handling process, analyze the cause of the fault, and take appropriate measures to ensure system reliability and data security.

[0155] Figure 2A flowchart of another solid state drive fault processing method provided by an embodiment of the present invention. The method is applied to a host, such as Figure 2 As shown, the method includes:

[0156] S20: receiving feedback information sent by the redundant array of independent disks.

[0157] The feedback information is feedback information of a link corresponding to the fault handling strategy executed according to the fault type of the faulty solid state hard disk when the faulty solid state hard disk fails.

[0158] S21: Determine the number of input / output request errors corresponding to the faulty solid state drive according to the received feedback information.

[0159] S22: Determine whether the number of input / output request errors exceeds a first threshold; if not, proceed to step S23; if yes, proceed to step S24.

[0160] S23: Continue to monitor the number of received input and output request errors, and return to step S21.

[0161] S24: Mark the faulty solid-state drive as a faulty state, and remove the faulty solid-state drive from the redundant array of independent disks.

[0162] In this embodiment, the operating status of the solid-state hard disk is monitored by an independent disk redundant array. When it is confirmed that the solid-state hard disk fails, the fault type of the failed solid-state hard disk is determined and the corresponding fault handling strategy is executed; at the same time, the independent disk redundant array actively sends corresponding feedback information to the host. The host determines the number of input and output request errors corresponding to the failed solid-state hard disk based on the received feedback information; when the host confirms that the number of input and output request errors exceeds the first threshold, the failed solid-state hard disk is marked as a fault state, and the failed solid-state hard disk is removed from the independent disk redundant array. There is no need for the host system to wait for the input and output commands or management commands of the solid-state hard disk to time out, and then kick the disk after a long timeout process, which greatly improves the recognition speed and kick speed of the failed solid-state hard disk. The maintenance cost of the independent disk redundant array is effectively reduced, and the use efficiency is improved.

[0163] In the above-mentioned embodiments, the method for handling a solid state hard disk fault is described in detail. The present invention also provides an embodiment corresponding to the device for handling a solid state hard disk fault.

[0164] Figure 3 A schematic diagram of a solid state disk fault processing device provided by an embodiment of the present invention. The device is applied to a redundant array of independent disks; Figure 3 As shown, the device comprises:

[0165] The first monitoring module 10 is used to monitor the operating status of the solid state drive and determine whether the solid state drive fails; if it is confirmed that the solid state drive fails, the determination module is triggered;

[0166] A first determination module 11 is used to determine the fault type of the faulty solid state drive; wherein the fault type includes at least a storage medium error, a software logic error based on an input-output command path, a software logic error based on a management command path, a hardware unit error based on an input-output command path, and a hardware unit error based on a management command path;

[0167] The execution module 12 is used to execute a corresponding fault handling strategy according to the fault type of the faulty solid-state hard disk, and send feedback information of the link corresponding to the fault handling strategy to the host, so that the host can determine the number of input and output request errors corresponding to the faulty solid-state hard disk according to the received feedback information, and judge whether the number of received input and output request errors exceeds a first threshold; if the host confirms that the number of input and output request errors does not exceed the first threshold, the host continues to monitor the number of received input and output request errors; if the host confirms that the number of input and output request errors exceeds the first threshold, the host marks the faulty solid-state hard disk as a faulty state, and removes the faulty solid-state hard disk from the independent disk redundant array.

[0168] In some embodiments, the execution module 12 includes:

[0169] A first setting submodule is used to set the faulty solid state drive to a read-only mode through the solid state drive firmware;

[0170] The first sending submodule is used to send feedback information of input / output request error to the host when the faulty solid state hard disk receives a write operation request from the host.

[0171] In some embodiments, the execution module 12 includes:

[0172] A first determination submodule is used to determine a faulty disk management module in a faulty solid state drive;

[0173] The second setting submodule is used to set the multicast assertion flag of the faulty disk management module;

[0174] A first selection submodule is used to select a target disk management module from the remaining disk management modules when the remaining disk management modules in the failed solid state hard disk detect the multicast assertion flag of the failed disk management module;

[0175] The second sending submodule is used to process the input and output requests of the faulty disk management module through the target disk management module, and send corresponding feedback information to the host.

[0176] In some embodiments, the execution module 12 further includes:

[0177] The third setting submodule is used to set the priority of all disk management modules in the faulty solid state drive;

[0178] Correspondingly, the first selection submodule includes:

[0179] A first acquisition submodule is used to acquire the priority of each disk management module except the faulty disk management module;

[0180] The second selection submodule is used to select the disk management module with the highest priority as the target disk management module.

[0181] In some embodiments, the second sending submodule includes:

[0182] The third selection submodule is used to select the current cache from the caches of the faulty disk management module through the target disk management module, and obtain the input and output command state machine structure of the current cache;

[0183] The first judgment submodule is used to judge whether the input and output request in the current cache returns completion information to the host according to the input and output command state machine structure; if not, the third sending submodule is triggered; if yes, the fourth selection submodule is triggered;

[0184] The third sending submodule is used to send feedback information of input and output request errors corresponding to the current cache to the host through the target disk management module;

[0185] The fourth selection submodule is used to select the next cache as the current cache from the remaining cache of the faulty disk management module through the target disk management module, and enter the step of obtaining the input and output command state machine structure of the current cache until all caches of the faulty disk management module are traversed.

[0186] In some embodiments, the execution module 12 includes:

[0187] The fourth setting submodule is used to set an asynchronous assertion flag of the faulty solid state drive;

[0188] A fourth sending submodule, configured to send feedback information of an input / output request error to the host according to an asynchronous assertion flag when each disk management core of the faulty solid state drive processes an input / output request of the host;

[0189] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0190] In some embodiments, the execution module 12 includes:

[0191] The fifth setting submodule is used to set a hardware unit error flag of the faulty solid state drive;

[0192] A fifth sending submodule, configured to send feedback information of an input / output request error to the host according to a hardware unit error flag when each disk management core of the faulty solid state drive processes an input / output request of the host;

[0193] Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

[0194] In some embodiments, it also includes:

[0195] A second judgment submodule is used to monitor the processing time of the input and output requests and / or the processing time of the management request of the faulty solid-state hard disk through the host, and determine whether the processing time of the input and output requests and / or the processing time of the management request exceeds the corresponding time threshold; if so, trigger the mark removal submodule;

[0196] The marking removal submodule is used for the host to mark the faulty solid-state drive as a faulty state and remove the faulty solid-state drive from the independent disk redundant array.

[0197] In some embodiments, it also includes:

[0198] a third judgment submodule, configured to drive the monitoring controller status register through the non-volatile memory of the host to monitor the setting information of the severe fault state, and determine whether the severe fault state is set according to the setting information; if so, trigger the first removal submodule;

[0199] The first removal submodule is used to remove the failed solid state hard disk from the independent disk redundant array through the non-volatile memory driver after the command termination timeout period.

[0200] In some embodiments, it also includes:

[0201] The fourth judgment submodule is used to monitor the setting information of the key warning field in the self-monitoring analysis report technical log through the host, and judge whether the key warning field is set according to the setting information; if so, trigger the second acquisition submodule;

[0202] The second acquisition submodule is used to obtain the error type and severity of the faulty solid state drive;

[0203] The second removal submodule is used to remove the faulty solid state drive from the redundant array of independent disks according to the error type and severity of the faulty solid state drive.

[0204] In some embodiments, it also includes:

[0205] The third acquisition submodule is used to obtain the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the fault cause of the faulty solid state drive, and the operation steps for removing the faulty solid state drive;

[0206] The log generation submodule is used to generate a removal log of the faulty solid state drive according to the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the cause of the fault of the faulty solid state drive, and the operation steps for removing the faulty solid state drive.

[0207] Figure 4 Schematic diagram of another solid state drive fault processing device provided by an embodiment of the present invention. The device is applied to a host, such as Figure 4 As shown, the device comprises:

[0208] The receiving module 15 is used to receive feedback information sent by the independent disk redundant array. The feedback information is feedback information of the corresponding link of the fault handling strategy when the faulty solid state drive fails and the corresponding fault handling strategy is executed according to the fault type of the faulty solid state drive.

[0209] The second determining module 16 is configured to determine the number of input / output request errors corresponding to the faulty solid state drive according to the received feedback information.

[0210] The judging module 17 is used to judge whether the number of input / output request errors exceeds a first threshold; if not, the second monitoring module 18 is triggered; if yes, the removal module 19 is triggered.

[0211] The second monitoring module 18 is configured to continue monitoring the number of received input and output request errors and trigger the second determining module 16 .

[0212] The removal module 19 is used to mark the faulty solid state drive as a faulty state and remove the faulty solid state drive from the redundant array of independent disks.

[0213] Since the embodiments and beneficial effects of the device part correspond to the embodiments and beneficial effects of the method part, please refer to the description of the embodiments of the method part for the embodiments and beneficial effects of the device part, and will not be repeated here.

[0214] In addition, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned solid state drive failure processing method when executed by a processor.

[0215] Figure 5 A schematic diagram of a solid state drive fault processing device provided by an embodiment of the present invention. Figure 5 As shown, the SSD fault handling device includes:

[0216] A memory 20, for storing computer programs;

[0217] The processor 21 is used to implement the steps of the solid state drive failure processing method mentioned in the above embodiment when executing the computer program.

[0218] The solid state drive fault processing device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0219] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit; the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0220] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the solid-state hard disk fault handling method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include but is not limited to data related to the solid-state hard disk fault handling method.

[0221] In some embodiments, the solid state drive fault processing device may further include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0222] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the solid state drive failure processing device, and may include more or fewer components than those shown in the figure.

[0223] Since the beneficial effects of the equipment part correspond to the beneficial effects of the method part, please refer to the description of the beneficial effects of the method part for the beneficial effects of the equipment part, which will not be repeated here.

[0224] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps described in the above method embodiment (which may be a method corresponding to the independent redundant array of disks side, or a method corresponding to the host side, or a method corresponding to the independent redundant array of disks side and the host side) are implemented.

[0225] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.

[0226] Since the beneficial effects of the medium part correspond to the beneficial effects of the method part, please refer to the description of the beneficial effects of the method part for the beneficial effects of the medium part, which will not be repeated here.

[0227] The above is a detailed introduction to a solid-state hard disk fault handling method, product, device and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0228] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for handling a solid state hard disk failure, characterized in that: Applied to a redundant array of independent disks; the method comprises: Monitor the operating status of the SSD and determine whether the SSD fails; If it is confirmed that the solid state drive is faulty, then the fault type of the faulty solid state drive is determined; Execute a corresponding fault handling strategy according to the fault type of the faulty solid-state hard disk, and send feedback information of a link corresponding to the fault handling strategy to the host, so that the host determines the number of input-output request errors corresponding to the faulty solid-state hard disk according to the received feedback information, and judges whether the number of received input-output request errors exceeds a first threshold value; if the host confirms that the number of input-output request errors does not exceed the first threshold value, the host continues to monitor the number of received input-output request errors; if the host confirms that the number of input-output request errors exceeds the first threshold value, the host marks the faulty solid-state hard disk as a faulty state, and removes the faulty solid-state hard disk from the redundant array of independent disks; Also includes: The non-volatile memory of the host drives the setting information of the severe fault state in the status register of the monitoring controller, and determines whether the severe fault state is set according to the setting information; If so, the faulty solid state drive is removed from the redundant array of independent disks through a non-volatile memory driver after a command termination timeout period.

2. The method for handling solid state hard disk failure according to claim 1, characterized in that: When the fault type of the faulty solid state drive is a storage medium error, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive, and sending feedback information of a link corresponding to the fault handling strategy to the host, includes: Setting the faulty solid state drive to a read-only mode through the solid state drive firmware; When the faulty solid state hard disk receives a write operation request from the host, feedback information of an input / output request error is sent to the host.

3. The method for handling solid state hard disk failure according to claim 1, characterized in that: When the fault type of the faulty solid state drive is a software logic error based on an input / output command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive, and sending feedback information of a link corresponding to the fault handling strategy to the host, includes: Determine a faulty disk management module in the faulty solid state drive; Set the multicast assertion flag of the faulty disk management module; When the remaining disk management modules in the faulty solid state drive detect the multicast assertion flag of the faulty disk management module, a target disk management module is selected from the remaining disk management modules; The target disk management module processes the input and output requests of the faulty disk management module, and sends corresponding feedback information to the host.

4. The method for handling solid state hard disk failure according to claim 3, characterized in that: Before determining the faulty disk management module in the faulty solid state hard disk, the method further includes: Setting the priority of all disk management modules in the faulty solid state drive; Correspondingly, selecting a target disk management module from the remaining disk management modules includes: Obtaining the priority of each disk management module except the faulty disk management module; The disk management module with the highest priority is selected as the target disk management module.

5. The method for handling solid state hard disk failure according to claim 3, characterized in that: The step of processing the input and output request of the faulty disk management module by the target disk management module and sending corresponding feedback information to the host comprises: Selecting a current cache from the caches of the faulty disk management module through the target disk management module, and obtaining an input and output command state machine structure of the current cache; Determine whether the input / output request in the current cache returns completion information to the host according to the input / output command state machine structure; If it is confirmed that no completion information has been returned to the host, feedback information of an input / output request error corresponding to the current cache is sent to the host through the target disk management module; If it is confirmed that the completion information is returned to the host, the target disk management module selects the next cache from the remaining cache of the faulty disk management module as the current cache, and enters the step of obtaining the input and output command state machine structure of the current cache until all caches of the faulty disk management module are traversed.

6. The method for handling solid state hard disk failure according to claim 1, characterized in that: When the fault type of the faulty solid state drive is a software logic error based on a management command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive, and sending feedback information of a link corresponding to the fault handling strategy to the host, includes: Setting an asynchronous assertion flag of the faulty solid state drive; When each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to an asynchronous assertion flag; Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

7. The method for handling solid state hard disk failure according to claim 1, characterized in that: When the fault type of the faulty solid state drive is a hardware unit error based on an input / output command path or a hardware unit error based on a management command path, executing a corresponding fault handling strategy according to the fault type of the faulty solid state drive and sending feedback information of a link corresponding to the fault handling strategy to the host include: Setting a hardware unit error flag of the faulty solid state drive; When each disk management core of the faulty solid state drive processes an input / output request of the host, feedback information of an input / output request error is sent to the host according to a hardware unit error flag; Among them, the disk management core is the central processing unit in the solid-state drive that runs the disk management module and is used to process input and output requests.

8. The method for handling solid state hard disk failure according to claim 1, characterized in that: When the fault type of the faulty solid state drive is a solid state drive controller fault, the method further includes: Monitoring, by the host, the processing time of the input / output request and / or the processing time of the management request of the faulty solid-state drive, and determining whether the processing time of the input / output request and / or the processing time of the management request exceeds a corresponding time threshold; If the host confirms that the processing time of the input / output request and / or the processing time of the management request exceeds the corresponding time threshold, the host marks the faulty solid-state drive as a faulty state and removes the faulty solid-state drive from the independent disk redundant array.

9. The method for handling solid state hard disk failure according to claim 1, characterized in that: Also includes: Monitoring the setting information of the key warning field in the self-monitoring analysis report technical log by the host, and judging whether the key warning field is set according to the setting information; If yes, then obtaining the error type and severity of the faulty solid state drive; The failed solid state drive is removed from the redundant array of independent disks according to the error type and severity of the failed solid state drive.

10. The method for handling solid state hard disk failure according to any one of claims 1 to 9, characterized in that: After the host removes the faulty solid state drive from the redundant array of independent disks according to the feedback information, the method further includes: Obtaining the time when the faulty solid-state drive fails, detailed information of the faulty solid-state drive, the cause of the fault of the faulty solid-state drive, and steps for removing the faulty solid-state drive; A removal log of the faulty solid state drive is generated according to the time when the faulty solid state drive fails, detailed information of the faulty solid state drive, the cause of the fault of the faulty solid state drive, and operation steps for removing the faulty solid state drive.

11. A method for handling a solid state hard disk failure, characterized in that: Applied to a host; the method comprises: Receiving feedback information sent by the independent disk redundant array; wherein the feedback information is feedback information of a link corresponding to the fault handling strategy executed according to the fault type of the faulty solid state hard disk when the faulty solid state hard disk fails; Determine the number of input and output request errors corresponding to the faulty solid state drive according to the received feedback information; determining whether the number of input and output request errors exceeds a first threshold; If it is confirmed that the number of input / output request errors does not exceed the first threshold, continue to monitor the number of received input / output request errors, and return to the step of determining the number of input / output request errors corresponding to the faulty solid state drive according to the received feedback information; If it is confirmed that the number of input and output request errors exceeds a first threshold, the faulty solid-state hard disk is marked as a faulty state, and the faulty solid-state hard disk is removed from the redundant array of independent disks; Also includes: The non-volatile memory of the host drives the setting information of the severe fault state in the status register of the monitoring controller, and determines whether the severe fault state is set according to the setting information; If so, the faulty solid state drive is removed from the redundant array of independent disks through a non-volatile memory driver after a command termination timeout period.

12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the solid state drive failure processing method described in any one of claims 1 to 11 are implemented.

13. A solid state hard disk fault processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the solid state drive failure processing method as described in any one of claims 1 to 11 when executing the computer program.

14. 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 solid-state hard disk failure processing method according to any one of claims 1 to 11 are implemented.