Control method and apparatus for a storage system

By detecting the operating status and historical fault relationships of storage devices, predicting fault probabilities and implementing data protection, the problem of low data access efficiency in storage systems is solved, achieving efficient data access and proactive protection.

CN119440900BActive Publication Date: 2025-10-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510049359.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-10-24
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

In existing storage systems, erasure coding fault tolerance technology leads to cross-device data transmission and complex data repair operations, which affect data access efficiency.

Method used

By detecting the operating status and historical fault relationships of storage devices, the probability of device failure can be predicted, and data protection operations can be performed in a timely manner to avoid complex cross-device data repair.

Benefits of technology

It improves the data access efficiency of the storage system, reduces resource consumption, and achieves proactive protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440900B_ABST
    Figure CN119440900B_ABST
Patent Text Reader

Abstract

The application provides a control method and device of a storage system, comprising: detecting a current target device state of a target storage device in the storage system according to a plurality of detection items corresponding to a plurality of detection information, the target device state being used to indicate a possibility that a running state of the current target storage device on each detection item causes the target storage device to fail; obtaining a current target failure state of the target storage device according to a target correlation and the target device state, the target correlation being a relationship between a device state of the target storage device and a failure state of the target storage device in a historical time period before a current time; and performing a data protection operation on data stored by the target storage device in a case where a target probability indicated by the target failure state is greater than or equal to a target probability threshold. Through the application, the problem of low data access efficiency of the storage system is solved, and the effect of improving the data access efficiency of the storage system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the computer field, in particular, to a control method and device of a storage system. BACKGROUND

[0002] With the development of computer technology and network technology, data is growing at an explosive speed, and the storage demand of massive information poses a huge challenge to storage devices and storage systems. A kind of error correction code fault tolerance technology is currently used to cope with the storage device failure problem that is prone to occur in the storage system, by storing multiple copies of the encoding information corresponding to the data of the storage device on other storage devices when storing data, so that in the case of failure of the storage device, the multiple copies of the encoding information can be obtained from other storage devices to repair the data stored on the failed storage device. However, such an approach involves cross-device data transmission between multiple storage devices and complex data repair operations, which is difficult to operate, consumes a lot of resources and takes a long time, which seriously affects the data access efficiency of the storage system. SUMMARY

[0003] Embodiments of the present application provide a control method and device of a storage system to at least solve the problem of low data access efficiency of the storage system in the related art.

[0004] According to one embodiment of the present application, a control method of a storage system is provided, comprising:

[0005] detecting a target device state of a target storage device in the storage system according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate the running state of the target storage device on the corresponding detection item, and the target device state is used to indicate the possibility of the target storage device failing due to the running state of the target storage device on each detection item;

[0006] obtaining a target failure state of the target storage device according to a target association relationship and the target device state, wherein the target association relationship is the relationship between the device state of the target storage device and the failure state of the target storage device in a historical time period before the current time, and the failure state is used to indicate the probability of the target storage device failing;

[0007] performing a data protection operation on the data stored by the target storage device in the case where the target probability indicated by the target failure state is greater than or equal to a target probability threshold.

[0008] In one exemplary embodiment, the obtaining of the target failure state of the target storage device according to the target association relationship and the target device state comprises:

[0009] extracting a first fault state corresponding to the target device state from the target correlation relationship;

[0010] adjusting the first fault state to a second fault state of the target storage device to obtain the target fault state, wherein the second fault state is a fault state detected on the target storage device before the current time.

[0011] In an example embodiment, the adjusting the first fault state to the second fault state of the target storage device to obtain the target fault state comprises:

[0012] The target probability is calculated by the following formula:

[0013] ,

[0014] wherein P is the target probability, P n is a first probability indicated by the first fault state, P n-1 is a second probability indicated by the second fault state detected on the target storage device at the last detection, is a weight coefficient corresponding to the first probability, is a weight coefficient corresponding to the second probability.

[0015] In an example embodiment, before the obtaining the target fault state of the target storage device according to the target correlation relationship and the target device state, the method further comprises:

[0016] detecting fault information of the target storage device at a plurality of time points in the historical time period, and collecting device states of the target storage device at the plurality of time points to obtain a plurality of sets of state correlation information, wherein the fault information is used to indicate whether the target storage device has failed, and the state correlation information comprises the fault information and the device state having a corresponding relationship;

[0017] calculating a first fault probability of the target storage device under each device state according to the plurality of sets of state correlation information to obtain the target correlation relationship, wherein the fault state comprises the first fault probability.

[0018] In an example embodiment, the calculating the first fault probability of the target storage device under each device state according to the plurality of sets of state correlation information comprises:

[0019] The first fault probability corresponding to each device state is calculated by the following formula:

[0020] F=N1 / N2,

[0021] F = N2 / N1 wherein F is a first failure probability corresponding to a reference device state, N2 is a number of the reference device state in the plurality of device states, and N1 is a number of the reference device state in the plurality of device states for which the failure information indicates that the target storage device has failed.

[0022] In one example embodiment, the detecting the current target device state of the target storage device in the storage system according to a plurality of detection information corresponding to a plurality of detection items comprises:

[0023] determining an association parameter corresponding to each of the detection items according to a reference range corresponding to each of the detection items and a plurality of item parameters, wherein the plurality of detection information comprises the plurality of item parameters, and wherein the association parameter is used to indicate a possibility of a running state of the target storage device on the corresponding detection item leading to a failure of the target storage device;

[0024] arranging the plurality of association parameters in a target order to obtain a target feature vector, wherein the target device state comprises the target feature vector.

[0025] In one example embodiment, the determining the association parameter corresponding to each of the detection items according to the reference range corresponding to each of the detection items and the plurality of item parameters comprises:

[0026] detecting whether each of the item parameters falls within the corresponding reference range;

[0027] in a case where it is detected that the item parameter falls within the corresponding reference range, determining the association parameter as a first association parameter, wherein the first association parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item leading to the failure of the target storage device is low;

[0028] in a case where it is detected that the item parameter does not fall within the corresponding reference range, determining the association parameter as a second association parameter, wherein the second association parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item leading to the failure of the target storage device is high.

[0029] In one example embodiment, before the determining the association parameter corresponding to each of the detection items according to the reference range corresponding to each of the detection items and the plurality of item parameters, the method further comprises:

[0030] detecting, in a reference time period before a current time, a target parameter corresponding to a target detection item and failure information of the target storage device at a target frequency, to obtain a plurality of sets of reference correlation information, wherein the target parameter is used to indicate a running state of the target storage device at the target detection item, the failure information is used to indicate whether the target storage device has failed, the reference correlation information comprises the failure information and the target parameter having a corresponding relationship, and the plurality of detection items comprises the target detection item;

[0031] calculating, according to the plurality of sets of reference correlation information, a second failure probability of the target storage device when the target parameter is less than each parameter threshold, to obtain a plurality of sets of intermediate correlation information, wherein the intermediate correlation information comprises the parameter threshold and the second failure probability having a corresponding relationship;

[0032] determining, according to the plurality of sets of intermediate correlation information and a detection probability threshold of the target detection item, a target sub-range of the target detection item, wherein the reference range comprises the target sub-range, and a running state indicated by the target parameter in the target sub-range corresponds to a second failure probability less than or equal to the detection probability threshold.

[0033] In an example embodiment, the determining, according to the plurality of sets of intermediate correlation information and the detection probability threshold of the target detection item, the target sub-range of the target detection item comprises:

[0034] determining, according to the plurality of sets of intermediate correlation information, a cumulative distribution function of the target detection item;

[0035] determining, according to the cumulative distribution function and the detection probability threshold, a parameter threshold corresponding to a second failure probability less than or equal to the detection probability threshold from a plurality of parameter thresholds, to obtain a target parameter threshold;

[0036] determining that the target sub-range is zero to the target parameter threshold.

[0037] In an example embodiment, a distributed storage system comprises a standby storage device and a plurality of in-use storage devices, the plurality of in-use storage devices comprising the target storage device, and the plurality of in-use storage devices and the standby storage device are connected to each other;

[0038] the performing, on data stored by the target storage device, a data protection operation comprises:

[0039] copying, to the standby storage device, data stored by the target storage device;

[0040] convert the access to the target storage device in the distributed storage system to the access to the backup storage device, and disable the access to the target storage device in the distributed storage system.

[0041] In one example embodiment, after the data protection operation is performed on the data stored by the target storage device, the method further comprises:

[0042] detecting a failure risk cause of the target storage device according to the plurality of detection information, wherein the failure risk cause is a cause leading to the target probability being greater than or equal to the target probability threshold, and the failure risk cause includes a hardware cause and a software cause;

[0043] in a case where the failure risk cause is detected as the software cause, searching for a software recovery operation corresponding to the software cause, performing the software recovery operation on the target storage device, detecting a reference probability of the target storage device after the software recovery operation is performed, wherein the reference probability is a probability that the target storage device will fail after the software recovery operation is performed, and in a case where the reference probability is detected as being less than the target probability threshold, restoring data stored by the backup storage device to the target storage device, and restoring the access to the backup storage device in the distributed storage system to the access to the target storage device, and clearing the data stored on the backup storage device;

[0044] in a case where the failure risk cause is detected as the hardware cause, or in a case where the reference probability is detected as being greater than or equal to the target probability threshold, replacing the target storage device with a reference storage device, wherein the reference storage device does not store data, and determining the reference storage device as the backup storage device.

[0045] According to another embodiment of the present application, a control device of a storage system is provided, comprising:

[0046] a first detection module configured to detect a target device state of a target storage device in a storage system according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate a running state of the target storage device on the corresponding detection item, and the target device state is used to indicate a possibility that a current running state of the target storage device on each detection item leads to a failure of the target storage device;

[0047] The second detection module is configured to acquire a current target fault state of the target storage device according to a target correlation and the target device state, wherein the target correlation is a relationship between a device state of the target storage device and a fault state of the target storage device in a historical time period before a current time point, and the fault state is used to indicate a probability of an upcoming failure of the target storage device.

[0048] The execution module is configured to perform a data protection operation on data stored in the target storage device when a target probability indicated by the target fault state is greater than or equal to a target probability threshold.

[0049] According to yet another embodiment of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed, the steps in any of the above method embodiments are performed.

[0050] According to yet another embodiment of the present application, an electronic device is provided, and the electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.

[0051] According to yet another embodiment of the present application, a computer program product is provided, and the computer program product includes a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0052] According to the application, the possibility of the target storage device to fail due to the current running state of the target storage device on each detection item in the storage system is detected, and then the probability of the target storage device to fail is detected according to the possibility and the relationship between the probability and the probability of the storage device to fail detected in the historical event segment before the current time. The probability of the target storage device to fail is detected by comprehensively considering the influence of the performance of multiple detection items in the historical time segment on whether the target storage device fails, which is more accurate. In the case that the detected probability of the target to fail is greater than or equal to the target probability threshold, the data protection operation is performed on the data stored by the target storage device, that is, the data stored by the target storage device to fail is protected in advance on the basis of accurately predicting that the failure will occur, which realizes the active protection of the storage system, avoids the need to use the complex cross-storage device data repair operation in the case that the failure has occurred, reduces the occupation of the operation resources of the storage system, and leaves more resources for data access of the storage system. Therefore, the problem of low data access efficiency of the storage system can be solved, and the data access efficiency of the storage system is improved. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 is a hardware structure block diagram of a server device of a storage system control method according to an embodiment of the application;

[0054] Figure 2 is a flowchart of a storage system control method according to an embodiment of the application;

[0055] Figure 3 is a schematic diagram of a distributed storage system according to an embodiment of the application;

[0056] Figure 4 is a flowchart of a use process according to an embodiment of the application;

[0057] Figure 5 is a structure block diagram of a storage system control device according to an embodiment of the application. DETAILED DESCRIPTION

[0058] Hereinafter, the embodiments of the application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0059] It should be noted that the terms "first", "second" and the like in the specification and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence.

[0060] The method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing device. Taking the case of running on a server device, Figure 1 is a hardware structure block diagram of a server device of a control method of a storage system according to an embodiment of the present application. As shown in Figure 1 , the server device can include one or more (only one is shown in Figure 1 ) processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned server device. For example, the server device can further include more or less components than those shown in Figure 1 , or have a different configuration from Figure 1 .

[0061] The memory 104 can be used to store computer programs, for example, software programs of application software and modules, such as the computer program corresponding to the control method of the storage system in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the server device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0062] The transmission device 106 is used to receive or send data via a network. The specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module which is used to communicate with the Internet in a wireless manner.

[0063] In the embodiments of the present application, a control method of a storage system is provided, Figure 2 is a flow chart of a control method of a storage system according to an embodiment of the present application, as shown in Figure 2As shown, the flow includes the following steps:

[0064] In step S202, the current target device state of the target storage device in the storage system is detected according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate the running state of the target storage device on the corresponding detection item, and the target device state is used to indicate the possibility that the current running state of the target storage device on each detection item leads to the failure of the target storage device;

[0065] In step S204, the current target failure state of the target storage device is obtained according to the target correlation and the target device state, wherein the target correlation is the relationship between the device state of the target storage device and the failure state of the target storage device in a historical time period before the current time, and the failure state is used to indicate the probability that the target storage device will fail;

[0066] In step S206, the data protection operation is performed on the data stored by the target storage device in the case that the target probability indicated by the target failure state is greater than or equal to the target probability threshold.

[0067] Through the above steps, since the possibility that the current running state of the target storage device on each detection item leads to the failure of the target storage device is detected according to the running state of the target storage device on each detection item, the probability that the target storage device will fail is detected according to such possibility and the relationship between the detected possibility and the probability that the storage device fails in the historical event period before the current time, the probability that the current target storage device will fail is detected by comprehensively considering the influence of the performance of a plurality of detection items in the historical time period on whether the target storage device fails, which is more accurate, and the data protection operation is performed on the data stored by the target storage device in the case that the detected target probability that will fail is greater than or equal to the target probability threshold, that is, the data protection operation is performed on the data stored by the target storage device that will fail in advance on the basis of accurately predicting that the failure will occur, which realizes the active protection of the storage system, avoids the need to use complex cross-storage device data repair operation in the case that the failure has occurred, reduces the occupation of operation resources of the storage system, and leaves more resources for data access of the storage system, so that the problem of low data access efficiency of the storage system can be solved, and the effect of improving the data access efficiency of the storage system is achieved.

[0068] In the embodiment provided in step S202, the target storage device is any one of the storage devices in the storage system, which includes but is not limited to a data storage medium for storing data, and can but is not limited to include a hard disk drive (HDD), a solid state disk (SSD), a flash disk, a tape storage, and a memory device (such as an NVDIMM). By monitoring the health status and potential failure risk of the target storage device through the above method, the imminent failure of the target storage device can be sensed in time, and corresponding protection operations can be taken to protect the safety of the data stored on the data storage medium.

[0069] Optionally, in the embodiment of the present application, the detection items can but are not limited to be key indicators for evaluating the health status of the storage device and predicting potential failures, which reflect the running status of the storage device in different aspects. The detection information can but is not limited to be used to represent the running status of the target storage device on the corresponding detection item, and the detection information can but is not limited to include SMART data, error count data, and workload data. More specifically, the detection items include but are not limited to the number of media errors, the number of data errors (Pending and Uncorrectable sector), the number of reallocated sectors (Reallocated error), the number of Program (write) / Erase (erase) errors, the cumulative power-on time of the disk, the total number of NAND Write, and the total number of NAND Read+Write.

[0070] Optionally, in the embodiment of the present application, the running status of the target storage device on multiple detection items is collected according to a preset period, to obtain multiple detection information, where the specific selection of the preset period can be different according to the device type of the target storage device, or can be set according to the importance of the data stored on the target storage device. For example, for the target storage device whose running status is prone to change, a shorter preset period can be selected to discover the change of the running status of the target storage device in time. Or for example, for the target storage device storing important data, a shorter preset period can be selected.

[0071] Optionally, in the embodiment of the present application, the target device status includes but is not limited to the running status of the current target storage device on each detection item, and the target device status includes but is not limited to a sequence or vector formed by the combination of the probabilities of the target storage device failing caused by the running status corresponding to the multiple detection information. For example, when the detection items are detection item A and detection item B, the detection information corresponding to detection item A is a, and the detection information corresponding to detection item B is b, according to the statistical analysis of the failure of the target storage device in the early stage, it is determined that when the detection information corresponding to detection item A is a, the failure probability of the target storage device is P a, and based on the statistical analysis of the failure of the target storage device in the early stage, it is determined that the failure probability of the target storage device when the detection information corresponding to the detection item B is b is P b , then the device status of the target storage device can be expressed as [P a ,P b ].

[0072] Optionally, in an embodiment of the present application, the target device status includes but is not limited to being represented as a sequence or vector composed of a combination of probability indicators of whether the operating status corresponding to multiple detection information causes the target storage device to fail. For example, when the detection items are detection items A and B, the detection information corresponding to detection item A is a, and the detection information corresponding to detection item B is b. Based on the previous statistical analysis of the failure conditions of the target storage device, it is determined that when the detection information a corresponding to detection item A is greater than A1, there is a possibility of causing the target storage device to fail (which can also be referred to as a high possibility of causing the target storage device to fail). In this case, the probability index corresponding to detection item A is marked as 1. When the detection information a corresponding to detection item A is less than or equal to A1, there is no possibility of causing the target storage device to fail (which can also be referred to as a low possibility of causing the target storage device to fail). In this case, the probability index corresponding to detection item A is marked as 0. Similarly, based on the previous statistical analysis of the failure conditions of the target storage device, it is determined that when the detection information b corresponding to detection item B is greater than B1, there is a possibility of causing the target storage device to fail (which can also be referred to as a high possibility of causing the target storage device to fail). In this case, the probability index corresponding to detection item B is marked as 1. When the detection information b corresponding to detection item B is less than or equal to B1, there is no possibility of causing the target storage device to fail (which can also be referred to as a low possibility of causing the target storage device to fail). In this case, the probability index corresponding to detection item B is marked as 0. In such a setting, the target device state includes but is not limited to being represented as [0,0] or [0,1] or [1,0] or [0,0].

[0073] In the embodiment provided in step S204, the target association relationship is the relationship between the possibility that the target storage device will fail due to the operating status of the target storage device on each detection item in the historical time period before the current moment and the probability that the target storage device will fail. Referring to the representation of the target device status mentioned in the above example, when the target device status is represented as [P a ,P b ], or the probability that the target storage device will fail when [0,0] or [0,1] or [1,0] or [0,0].

[0074] Optionally, in the embodiments of the present application, the target correlation relationship can be, but is not limited to, corresponding to the target storage device, where the corresponding is not meant to indicate that the target correlation relationship only corresponds to a specific storage device in the storage system, but is meant to indicate that it corresponds to a type of storage device in the storage system, and the storage devices of the type have the same target correlation relationship, for example, a plurality of storage devices with the same manufacturer, the same capacity and the same storage medium type can share one target correlation relationship, and correspondingly, the target correlation relationship can also be formed according to the operation data of the plurality of storage devices.

[0075] Optionally, in the embodiments of the present application, the target storage device current target fault state is obtained according to the target correlation relationship and the target device state, including but not limited to searching for the target device state in the target correlation relationship, and in the case of searching for the target device state, obtaining the fault state corresponding to the target device state in the target correlation relationship as the target fault state.

[0076] In the embodiment provided in step S206, the target probability threshold includes but is not limited to being determined according to statistical analysis of the fault condition of the target storage device in the early stage, or can also be preset according to the experience of engineers. The target probability threshold can be fixed or can be adjusted according to the accuracy of the fault prediction in the process of multiple fault processing, for example, in the case that the number of unforecasted target storage device failures in the target time period exceeds the allowed value, the value of the target probability threshold is reduced.

[0077] Optionally, in the embodiments of the present application, the data protection operation is performed on the data stored by the target storage device, including but not limited to copying the data stored by the target storage device to another storage device in the storage system. In a distributed storage system, the data stored by the target storage device can also be migrated to other storage devices, which can also ensure that the data originally stored in the target storage device in the distributed storage system will not be lost.

[0078] Optionally, the control method of the storage system given in the present application can be applied in a distributed storage system to cope with the problem of large data repair overhead of the distributed storage system. Each storage device in the distributed storage system can be divided into a plurality of target storage devices according to the manufacturer, capacity and type of the storage device, and the plurality of target storage devices correspond to a plurality of target correlation relationships.

[0079] As an optional implementation, the target fault state of the target storage device is obtained according to the target correlation and the target device state, and the method comprises: extracting a first fault state corresponding to the target device state from the target correlation; and adjusting the first fault state to a second fault state of the target storage device to obtain the target fault state, wherein the second fault state is a fault state detected on the target storage device before the current time.

[0080] Optionally, in the embodiments of the present application, the second fault state is a fault state detected on the target storage device according to a device state of the target storage device at a historical time before the current time, wherein the device state of the target storage device at the historical time may be consistent with the target device state or may be inconsistent with the target device state.

[0081] Optionally, in the embodiments of the present application, the second fault state can be one or multiple, and the number of the second fault states can be determined according to the detection capability of the detection item of the target storage device, for example, multiple second fault states can be selected when the detection capability is weak and abnormal data is prone to occur, and only the fault state corresponding to the last detection before the current detection is selected as the second fault state when the detection capability is strong and abnormal data is not prone to occur.

[0082] Optionally, in the embodiments of the present application, because the detection information of the detection item may abnormally jump in actual application and may be detected incorrectly in one or several detections, if no intervention is made in such abnormal situations, the difference between the target fault probability detected by the method provided by the present application and the actual situation will be seriously affected, and thus the fault risk of the target storage device cannot be accurately determined in time.

[0083] Through the above steps, the target fault state of the target storage device is determined by combining the first fault state detected at the current time and the second fault state detected before the current time, which weakens the adverse effects of abnormal jump of the detection information or detection of the detection information on the fault monitoring, and ensures the accuracy of the prediction of the fault state.

[0084] Optionally, in the embodiments of the present application, adjusting the first failure state to the second failure state of the target storage device comprises: detecting a target transition parameter of the second failure state, wherein the target transition parameter is used to indicate a change fluctuation degree of a probability that the target storage device indicated by the second failure state will fail over time; matching a target selection scheme for the target transition parameter from the transition parameter and the selection information having a corresponding relationship, wherein the selection information is used to indicate a target number of the second failure states selected in a time sequence from a current time point backwards in time; selecting the target number of the second failure states in the time sequence from the current time point backwards in time to obtain one or more reference failure states; calculating an average value of one or more probabilities indicated by the one or more reference failure states to obtain a reference probability; calculating an adjustment parameter according to difference information between the first probability indicated by the first failure state and the reference probability, wherein the difference information is used to indicate a difference between the first probability and the reference probability, the adjustment parameter is proportional to a difference parameter in the difference information, and the difference parameter is used to indicate a difference degree between the first probability and the reference probability; and adjusting the first probability to a target probability in a difference direction by the difference parameter, wherein the difference information comprises the difference direction. Through the above steps, by detecting the target transition parameter of the second failure state, i.e., the fluctuation degree of the failure probability over time, the accuracy of the current failure prediction can be identified, different numbers of the second failure states are selected according to different accuracy degrees, i.e., different probability correction degrees are selected according to different accuracy degrees, the average value (reference probability) of the probabilities corresponding to the second failure states is calculated, the difference information between the first probability and the reference probability is calculated, and the adjustment parameter is modified based on this, which can reduce the false positives (i.e., incorrectly predicting that the device will fail) and the false negatives (i.e., failing to predict that the device will fail soon), and improve the accuracy of the failure risk prediction of the target storage device.

[0085] As an optional implementation, adjusting the first failure state to the second failure state of the target storage device to obtain a target failure state comprises: calculating a target probability by the following formula:

[0086] ,

[0087] wherein P is the target probability, P n is the first probability indicated by the first failure state, P n-1 is a second probability indicated by the second failure state detected on the target storage device at a last time point, is a weight coefficient corresponding to the first probability, is a weight coefficient corresponding to the second probability.

[0088] Optionally, in the embodiments of the present application, and including but not limited to, increasing the target probability threshold value when the first probability is greater than or equal to the target probability threshold value a plurality of times, and the target storage device actually has a fault that renders the target storage device unusable. and decreasing the target probability threshold value when the first probability is less than the target probability threshold value a plurality of times, and the target storage device does not have a fault that renders the target storage device unusable. .

[0089] By the above steps, the probability of the target storage device having a fault is determined based on the first probability and the second probability in a weighted manner, the basis for the prediction is more comprehensive, and the result of the prediction is more accurate.

[0090] As an optional implementation, before the target fault state of the target storage device is obtained according to the target correlation and the target device state, the method further includes: detecting fault information of the target storage device at a plurality of time points in a historical time period, and collecting device states of the target storage device at the plurality of time points to obtain a plurality of sets of state correlation information, wherein the fault information is used to indicate whether the target storage device has a fault, and the state correlation information includes the fault information and the device state having a corresponding relationship; and calculating a first fault probability of the target storage device having a fault in each device state according to the plurality of sets of state correlation information to obtain the target correlation, wherein the fault state includes the first fault probability.

[0091] Optionally, in the embodiments of the present application, the historical time period includes but is not limited to any time period before the current time point selected in advance. In order to improve the accuracy of the fault risk prediction of the target storage device, the longer the length of the historical time period is, the better.

[0092] Optionally, in the embodiments of the present application, the plurality of time points at which the fault information and the device state are detected in the historical time period are selected according to a preset collection period. In order to improve the accuracy of the fault risk prediction of the target storage device, the more intensive the time points are selected, the better.

[0093] Optionally, in the embodiments of the present application, a synchronization length is set in advance, and in the case where the device states and the fault information of the target storage device are collected at the plurality of time points, if the fault information collected at a time point is used to indicate that the target storage device has a fault, the fault information corresponding to the device state of the target storage device collected at the time point and in a time period before the time point by the synchronization length is determined as the fault information used to indicate that the target storage device has a fault. By the above method, the range of the fault risk prediction of the storage device is improved, the risk of the storage device having a fault can be predicted as early as possible in the necessary range, and the occurrence of the case where the storage device actually has a fault and cannot be used is reduced.

[0094] Through the above steps, by detecting and recording fault information and device status at multiple time points in a historical time period, a large amount of historical data can be accumulated, and potential correlations between device status and faults can be learned based on the historical data, thereby improving the accuracy and reliability of detecting the current target fault status.

[0095] As an optional implementation, the first failure probability of the target storage device under each device status is calculated according to a plurality of sets of state correlation information, including: the first failure probability corresponding to each device status is calculated by the following formula:

[0096] F = N1 / N2,

[0097] Wherein, F is the first failure probability corresponding to the reference device status, N2 is the number of reference device status in the plurality of device status, N1 is the number of reference device status corresponding to the fault information indicating that the target storage device has failed in the plurality of device status.

[0098] As an optional implementation, the current target device status of the target storage device in the storage system is detected according to a plurality of detection information corresponding to a plurality of detection items, including: determining the correlation parameter corresponding to each detection item according to the reference range corresponding to each detection item and a plurality of item parameters, wherein the plurality of detection information includes a plurality of item parameters, and the correlation parameter is used to indicate the possibility of the running state of the target storage device on the corresponding detection item leading to the failure of the target storage device; arrange the plurality of correlation parameters according to the target order to obtain the target feature vector, wherein the target device status includes the target feature vector.

[0099] Optionally, in the embodiments of the present application, the reference range corresponding to each detection item includes but is not limited to the range of detection information used to characterize that it will cause the target storage device to fail (or the possibility of failure is high), or the range of detection information used to characterize that it will not cause the target storage device to fail (or the possibility of failure is low).

[0100] Optionally, in the embodiments of the present application, each item parameter in the plurality of item parameters includes but is not limited to one-to-one correspondence with each detection item, including but not limited to assigning a correlation parameter to each detection item by detecting whether each item parameter falls into the reference range corresponding to the item parameter.

[0101] Optionally, in the embodiments of the present application, the associated parameter corresponding to each detection item is determined according to the reference range corresponding to each detection item and the plurality of item parameters, including but not limited to determining the associated parameter according to the detection item selection, for the detection item more likely to cause the target storage device to fail, directly determining the corresponding item parameter as the associated parameter, or calculating the ratio between the corresponding item parameter and the preset interval, and rounding the ratio to obtain the associated parameter; for the detection item with low sensitivity to cause the target storage device to fail, a first associated parameter or a second associated parameter is assigned according to whether the corresponding item parameter falls within the corresponding reference range.

[0102] Optionally, in the embodiments of the present application, the target order is the arrangement order of the associated parameters in the feature vector, and the arrangement order of the associated parameters in the feature vector among all the device states detected by the target storage device at any time should be fixed and unchanged, i.e., arranged according to the target order. Through such a setting, the detection information of the plurality of detection items can be prevented from being confused when the failure risk is comprehensively predicted by using the plurality of detection items, and the occurrence of false prediction can be avoided.

[0103] Through the above, the running state and the failure risk of the device are comprehensively evaluated from multiple dimensions through the associated parameters corresponding to the plurality of detection items, and misjudgment or omission caused by single index evaluation is avoided. This makes the failure prediction more comprehensive and comprehensive, and improves the accuracy and reliability of the prediction.

[0104] As an optional implementation, the associated parameter corresponding to each detection item is determined according to the reference range corresponding to each detection item and the plurality of item parameters, including: detecting whether each item parameter falls within the corresponding reference range; in the case where it is detected that the item parameter falls within the corresponding reference range, determining the associated parameter as a first associated parameter, wherein the first associated parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item causing the target storage device to fail is low; in the case where it is detected that the item parameter does not fall within the corresponding reference range, determining the associated parameter as a second associated parameter, wherein the second associated parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item causing the target storage device to fail is high.

[0105] Optionally, in the embodiments of the present application, 0 is set as the first associated parameter, and 1 is set as the second associated parameter.

[0106] By the above steps, the detection information of each detection item is converted into the correlation parameter, which is essentially to quantify the running state of the device and directly correlate it with the possibility of failure. This method not only can clearly show the influence degree of each detection item on the device failure, but also can establish a more accurate failure prediction mechanism based on the quantified correlation parameter, and improve the accuracy of the failure prediction of the target storage device.

[0107] As an optional implementation, before determining the correlation parameter corresponding to each detection item according to the reference range corresponding to each detection item and the plurality of item parameters, the method further includes: detecting, at a target frequency, a target parameter corresponding to a target detection item of the target storage device and failure information of the target storage device within a reference time period before the current time to obtain a plurality of sets of reference correlation information, wherein the target parameter is used to indicate the running state of the target storage device on the target detection item, the failure information is used to indicate whether the target storage device has failed, the reference correlation information includes the failure information and the target parameter having a corresponding relationship, and the plurality of detection items include the target detection item; calculating a second failure probability of the target storage device when the target parameter is less than each parameter threshold according to the plurality of sets of reference correlation information to obtain a plurality of sets of intermediate correlation information, wherein the intermediate correlation information includes the parameter threshold and the second failure probability having a corresponding relationship; and determining a target sub-range of the target detection item according to the plurality of sets of intermediate correlation information and a detection probability threshold of the target detection item, wherein the reference range includes the target sub-range, and the second failure probability corresponding to the running state indicated by the target parameter in the target sub-range is less than or equal to the detection probability threshold.

[0108] Optionally, in the embodiments of the present application, the reference time period includes but is not limited to any time period before the current time preset, and the selection of the reference time period is not affected by the selection of the historical time period. In order to improve the accuracy of the failure risk prediction of the target storage device, the longer the reference time period is, the better.

[0109] Optionally, in the embodiments of the present application, the target frequency is used to indicate the timing of detecting the target parameter and the failure information within the reference time period. In order to improve the accuracy of the failure risk prediction of the target storage device, the greater the target frequency is, the better.

[0110] Optionally, in the embodiments of the present application, the second synchronization time length is set in advance, and in the case that the target parameter corresponding to the target detection item of the target storage device and the fault information of the target storage device are detected according to the target frequency, if the fault information collected at a certain time point indicates that the target storage device has failed, the target parameter of the target storage device detected at the time point and the time period of the second synchronization time length before the time point are determined as the fault information indicating that the target storage device has failed. Through the above manner, the range of the fault risk prediction of the storage device can be improved, and the risk of the failure of the storage device can be predicted as early as possible within the necessary range.

[0111] Optionally, in the embodiments of the present application, after obtaining the plurality of groups of reference correlation information, the third failure probability of the target storage device in each operating state indicated by each target parameter can be calculated according to the plurality of groups of reference correlation information, and a plurality of groups of indirect correlation information are obtained, wherein the indirect correlation information includes the target parameter and the third failure probability having a corresponding relationship; and the target sub-range is determined according to the plurality of groups of indirect correlation information and the detection probability threshold, wherein the third failure probability corresponding to the operating state indicated by the target parameter in the target sub-range is less than or equal to the detection probability threshold. That is, by calculating the third failure probability of the target storage device in the operating state indicated by the target parameter 0, E1, E2, E3,..., E N , the indirect correlation relationship is obtained, wherein E1<E2<E3<...<E N . In order to simplify the preparation process of the risk prediction, the third failure probability of the target storage device in the operating state indicated by the target parameter falling into the parameter interval [0, E1], [E1, E2], [E2, E3],..., [E N-1 , E N ] can also be calculated, and the indirect correlation relationship is obtained, wherein E1<E2<E3<...<E N-1 <E N .

[0112] Optionally, in the embodiments of the present application, the second failure probability of the target storage device when the target parameter is less than each parameter threshold is calculated according to the plurality of groups of reference correlation information, which can be but is not limited to calculating the second failure probability of the target storage device when the target parameter falls into the parameter interval [0, E1], [0, E2], [0, E3],..., [0, E N ], wherein E1<E2<E3<...<E N .

[0113] Optionally, in the embodiments of the present application, the detection probability threshold of each detection item includes but is not limited to the difference in the sensitivity of the target storage device caused by each detection item.

[0114] Through the above, by calculating the second failure probability when the target parameter is less than each parameter threshold, a more detailed failure risk prediction can be constructed for each detection item. This not only quantifies the failure probability under different operating states, but also identifies the low-risk state of the device when operating at a certain parameter threshold, providing a more accurate basis for subsequent state monitoring and failure warning.

[0115] As an optional implementation, the target sub-range of the target detection item is determined according to the plurality of sets of intermediate correlation information and the detection probability threshold of the target detection item, including: determining a cumulative distribution function of the target detection item according to the plurality of sets of intermediate correlation information; determining a parameter threshold corresponding to a second failure probability less than or equal to the detection probability threshold from the plurality of parameter thresholds according to the cumulative distribution function and the detection probability threshold, to obtain a target parameter threshold; and determining the target sub-range as zero to the target parameter threshold.

[0116] Optionally, in the embodiments of the present application, the cumulative distribution function (CDF, Cumulative Distribution Function) is a function used to describe the probability of a random variable value being less than or equal to a certain value in probability theory. In the scenario of predicting the state of a storage device, the CDF can be used to quantify the probability of a storage device failing when a certain state indicator (such as the number of media errors, cumulative power-on time, etc.) reaches or exceeds a certain value. For example, CDF(1) can equal the proportion of all hard drives that eventually fail when the number of media errors is 0 or 1.

[0117] As an optional implementation, the distributed storage system includes a standby storage device and a plurality of in-use storage devices, the plurality of in-use storage devices including a target storage device, and the plurality of in-use storage devices and the standby storage device are connected to each other; and performing a data protection operation on data stored by the target storage device includes: copying the data stored by the target storage device to the standby storage device; converting access to the target storage device in the distributed storage system to access to the standby storage device, and prohibiting access to the target storage device in the distributed storage system.

[0118] Optionally, in the embodiments of the present application, Figure 3 is a schematic diagram of a distributed storage system according to an embodiment of the present application, as Figure 3 shown, the distributed storage system includes a standby storage device and a plurality of in-use storage devices, wherein the in-use storage devices are storage devices in the distributed storage system that are currently used to store data and accept data access from the outside to the distributed storage system, and correspondingly, the standby storage device is a redundant storage device in the distributed system that is temporarily not storing data, and the standby storage device does not accept data access from the outside to the distributed storage system.

[0119] By the above, the data is copied to the backup storage device, ensuring that even if the target storage device fails, there is still a copy of the data in the system, which can be quickly read from the backup storage device, avoiding a long period of data unavailable state. Converting the access path to the backup storage device and prohibiting access to the target storage device helps to achieve load balancing within the system. When the target storage device is about to or has failed, the tasks it undertakes will be redistributed to the healthy or low-risk backup storage device, which avoids the failed device becoming a performance bottleneck and improves the overall data processing capacity and efficiency of the system.

[0120] As an optional implementation, after performing the data protection operation on the data stored by the target storage device, the method further includes: detecting a failure risk cause of the target storage device according to the plurality of detection information, wherein the failure risk cause is a cause that causes the target probability to be greater than or equal to the target probability threshold, and the failure risk cause includes a hardware cause and a software cause; in a case where the detected failure risk cause is the software cause, finding a software recovery operation corresponding to the software cause; performing the software recovery operation on the target storage device; detecting a size relationship between a reference probability of the target storage device after the software recovery operation is performed and the target probability threshold, wherein the reference probability is a probability that the target storage device after the software recovery operation is performed will fail; in a case where the detected reference probability is less than the target probability threshold, restoring the data stored by the backup storage device to the target storage device, and restoring the access to the backup storage device in the distributed storage system to the access to the target storage device; emptying the data stored on the backup storage device; in a case where the detected failure risk cause is the hardware cause, or in a case where the detected reference probability is greater than or equal to the target probability threshold, replacing the target storage device with a reference storage device, wherein the reference storage device does not store data; and determining the reference storage device as the backup storage device.

[0121] Optionally, in the embodiments of the present application, the hardware reason refers to the target storage device is about to fail due to hardware failure, and the software reason refers to the target storage device is about to fail due to software failure. The hardware failure usually involves the physical components of the storage device, such as the disk surface, the magnetic head, the motor, the circuit board, etc. Such failures can be caused by physical damage, wear and tear, manufacturing defects, or environmental factors, for example: disk scratches or magnetic head damage: scratches on the magnetic coating of the hard disk, or damage caused by the magnetic head contacting the disk, making data unable to be correctly read. Motor failure: the motor of the hard disk cannot start or rotate normally, causing the disk to fail to rotate, affecting data reading and writing. Circuit board damage: components on the circuit board of the hard disk fail or are not properly connected, affecting the power supply and signal processing of the hard disk. Foreign matter inside the disk: dust, water vapor, and other foreign matter enter the inside of the hard disk, affecting its normal operation. For hardware failure, since it involves physical damage to the hard disk, it is usually not possible to repair it through software means. The most direct way to handle it is to replace the failed hard disk. In some cases, professional data recovery services may be able to attempt to recover data without replacing the hard disk, but this usually costs more and cannot guarantee 100% data recovery rate. Software failure is usually related to software-level problems of the storage device, such as data structure, file system, driver, or operating system, for example: file system damage: due to unexpected power failure, software error, or virus attack, the metadata or superblock of the file system is damaged, causing files to be inaccessible. Driver problem: the driver of the hard disk has errors, affecting the normal communication between the hard disk and the computer system. Logical error: the data blocks or sectors on the hard disk are marked as bad tracks, but there is no physical damage, and the data blocks can be recovered by repairing logical errors. Configuration error: the configuration settings of the hard disk are incorrect, such as RAID configuration error, which can be solved by reconfiguring. For software failure, it is usually possible to recover or repair through software operation, for example: file system repair tool: use file system check and repair tools to repair file system errors and make data accessible. Driver update or reinstallation: update or reinstall the hard disk driver to solve compatibility problems or driver errors. Bad track scanning and marking: use bad track scanning tools to detect and mark bad tracks to avoid using these unstable areas when reading and writing. Data recovery software can attempt to recover data in the case of file system damage but no hardware damage. Configuration and reinitialization: reconfigure the hard disk or RAID array to ensure the correct settings and running state of the hard disk.

[0122] As an optional implementation, the application further provides a risk prediction and control method for a distributed storage system solid state disk, which first digitizes the symptoms of the solid state disk, and then designs a solid state disk failure prediction model to find high-risk solid state disks. The system backs up the data of the high-risk solid state disks in advance, so as to convert data repair into replication, effectively reducing the data repair overhead and system performance fluctuation of the erasure code fault tolerance technology, thereby ensuring the stable output of system performance.

[0123] Optionally, the solid state disk risk prediction and control method provided by the application involves two aspects, namely, the data preparation process in the early stage and the use process after being put into use. Through a good preparation process in the early stage, accurate prediction basis can be brought to the use process, so as to ensure the accuracy of the failure risk prediction of the solid state disk.

[0124] Specifically, the preparation process includes the following steps:

[0125] Step SZ1, the solid state disks are divided into multiple disk models (i.e. multiple target storage devices) according to manufacturers, capacities and types. It is assumed that there are M solid state disk models.

[0126] Step SZ2, for different disk models, the state data of the solid state disks are collected according to different preset periods, including: SMART data, error count data and workload data. The state data (i.e. the target parameters and failure information mentioned above) at least includes: media error times, data error (Pending and Uncorrectable sector) times, reallocated sector (Reallocated error) times, Program / Erase error times, disk cumulative power-on time, NAND Write total times, NAND Read+Write total times and failure state (i.e. the failure information mentioned above).

[0127] Step SZ3, for different disk models, the collected state data are statistically analyzed to obtain the cumulative distribution function (CDF) of each state index (i.e. the detection item mentioned above) and failure probability. The analysis of the state data collected in step SZ2 can obtain: the cumulative distribution function of the media error times and the disk failure probability, the cumulative distribution function of the data error times and the disk failure probability, the cumulative distribution function of the reallocated sector times and the disk failure probability, the cumulative distribution function of the Program / Erase error times and the disk failure probability, the cumulative distribution function of the disk power-on time and the disk failure probability, the cumulative distribution function of the NAND Write total times and the disk failure probability, and the cumulative distribution function of the NAND Read+Write total times and the disk failure probability.

[0128] Step SZ4, preset the failure probability threshold P corresponding to the number of media errors media , according to the cumulative distribution function of the number of media errors and the failure probability of the disk, the corresponding number of media error threshold TH media ; preset the failure probability threshold P corresponding to the number of data errors data , according to the cumulative distribution function of the number of data errors and the failure probability of the disk, the corresponding number of data error threshold TH data ; preset the failure probability threshold P corresponding to the number of reallocation sectors RS , according to the cumulative distribution function of the number of reallocation sectors and the failure probability of the disk, the corresponding number of reallocation sector threshold TH RS ; preset the failure probability threshold P corresponding to the number of Program / Erase errors PE , according to the cumulative distribution function of the number of Program / Erase errors and the failure probability of the disk, the corresponding number of Program / Erase error threshold TH PE ; preset the failure probability threshold P corresponding to the total number of NAND Write write , according to the cumulative distribution function of the total number of NAND Write and the failure probability of the disk, the total number of NAND Write threshold TH write ; preset the failure probability threshold P corresponding to the total number of NAND Read+Write RW , according to the cumulative distribution function of the total number of NAND Read+Write and the failure probability of the disk, the total number of NAND Read+Write threshold TH RW ; preset the failure probability threshold P corresponding to the power-on time of the disk life , according to the cumulative distribution function of the power-on time of the disk and the failure probability of the disk, the power-on time threshold TH life .

[0129] Step SZ5, the state data of the solid state disk is pretreated and represented by a feature vector: X T =[ x type ,x media , x data , x RS , x PE , x write , x RW , x life ], wherein x type indicates which disk type the feature vector belongs to (i.e. which target storage device the feature vector corresponds to), and the value range is 1-M; when the number of disk media errors is less than TH media , x mediais 0; when the disk media error count is greater than or equal to TH media , x media is 1; when the disk data error count is less than TH data , x data is 0; when the disk data error count is greater than or equal to TH data , x data is 1; when the number of times of disk reallocation sector is less than TH RS , x RS is 0; when the number of times of disk reallocation sector is greater than or equal to TH RS , x RS is 1; when the number of times of Program / Erase error is less than TH PE , x PE is 0; when the number of times of Program / Erase error is greater than or equal to TH RS , x PE is 1; when the total number of times of NAND Write is less than TH write , x PE is 0; when the total number of times of NAND Write is greater than or equal to TH write , x PE is 1; when the total number of times of NAND Read+Write is less than TH RW , x RW is 0; when the total number of times of NAND Write is greater than or equal to TH RW , x RW is 1; x life = round (the time of disk power on / T life ), wherein T life is a preset time, and x life is not more than N = round (TH life / T life ). For example, the feature vector [5, 0, 0, 1, 1, 1, 0, 25] represents the disk state data of a disk belonging to disk model 5, wherein the disk media error count of the disk is less than TH media , the disk data error count is less than TH media , the number of times of disk reallocation sector is greater than TH RS , the number of times of Program / Erase error is greater than TH PE , the total number of times of NAND Write is greater than TH write , the total number of times of NAND Read+Write is greater than TH RW , and the time of disk power on is about 25* T life .

[0130] Step SZ6: Perform histogram statistics on the disk status feature vector to obtain a multidimensional array of failure probability. Each member of the array represents the disk status at a preset time T. life The data format of the multidimensional array is F[M][2][2][2][2][2][2][N], where the first dimension represents the solid-state disk model; the second dimension represents the disk medium error status; the third dimension represents the disk data error count status; the fourth dimension represents the reallocation sector count status; the fifth dimension represents the Program / Erase error count status; the sixth dimension represents the total NAND Write count status; the seventh dimension represents the total NAND Read+Write count status; and the eighth dimension represents the disk power-on time status.

[0131] Among them, F[M][2][2][2][2][2][2][2][N]=N1 / N2, N1 is the disk status data feature vector, and X is the feature vector. T0 And at the preset time T life The number of failures in the disk, N2 is the disk status data feature vector, and the feature vector is X T0 The number of

[0132] Figure 4 This is a flowchart of a usage process according to an embodiment of the present application. Figure 4 As shown, based on the preparation process, the use process includes the following steps:

[0133] Step SS1 collects SSD status data, including SMART data, error count data, and workload data. More specifically, it includes the following: disk manufacturer, model, number of media errors, number of pending and uncorrectable sector errors, number of reallocated sector errors, number of Program / Erase errors, disk power-on time, total number of NAND Writes, total number of NAND Read+Writes, and failure status.

[0134] Step SS2: When the failure state of the solid-state disk is failure, the erasure code fault tolerance technology is used to recover the data in the failed solid-state disk using the coded data stored in other solid-state disks in the distributed storage system. When the failure state of the solid-state disk is not failure, the currently collected disk state data is converted into a state feature vector representation, X T2 =[ x type ,x media , x data , x RS , x PE , xwrite , x RW , x life ] (i.e. the aforementioned target device state), wherein: x type represents which type of disk the feature vector belongs to (i.e. which target storage device the feature vector corresponds to), and is determined according to the disk manufacturer and disk model collected; x media is 0 when the disk media error count is less than TH media ; x media is 1 when the disk media error count is greater than or equal to TH media ; x data is 0 when the disk data error count is less than TH data ; x data is 1 when the disk data error count is greater than or equal to TH data ; x RS is 0 when the number of times of disk reallocation sectors is less than TH RS ; x RS is 1 when the number of times of disk reallocation sectors is greater than or equal to TH RS ; x PE is 0 when the number of times of Program / Erase errors is less than TH PE ; x RS is 1 when the number of times of Program / Erase errors is greater than or equal to TH PE ; x write is 0 when the total number of times of NAND Write is less than TH PE ; x write is 1 when the total number of times of NAND Write is greater than or equal to TH PE ; x RW is 0 when the total number of times of NAND Read+Write is less than TH RW ; x RW is 1 when the total number of times of NAND Write is greater than or equal to TH RW ; x life = round (disk power-on time / T life ), wherein T life is a preset time.

[0135] Step SS3, according to the solid state disk state feature vector X Tn = [x type , x media , x data , x RS , x PE , x write , x RW , x life, and then the failure probability P of the current state of the disk data is looked up according to the failure probability multi-dimensional array F[M][2][2][2][2][2][2][N] n , the current hard disk state feature vector X Tn is calculated n , and the corresponding failure probability P

[0136] Step SS4, the failure probability P of the current disk (i.e. the target probability mentioned above) is calculated according to the following formula:

[0137]

[0138] Wherein, P n-1 is the failure probability corresponding to X T(n-1) looked up according to the failure probability multi-dimensional array F[M][2][2][2][2][2][2][N] last time on the disk, and are weight coefficients.

[0139] Step SS5, the current failure probability P of the disk is compared with the preset failure probability threshold P thres (i.e. the target probability threshold mentioned above). If P is greater than P thres , it is considered that the disk is in a high-risk state; if P is less than P thres , it is considered that the disk is not in a high-risk state.

[0140] Step SS6, when the management system of the distributed storage system finds the high-risk state disk, the management system selects a new disk node; then the data of the high-risk disk is backed up to the new node by using the replication method; the management system enables the new node, and at the same time, the old node is offline.

[0141] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method of each embodiment of the present application.

[0142] ​A control device of a storage system according to an embodiment of the present application is also provided in the present embodiment, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0143] Figure 5 A structure block diagram of a control device of a storage system according to an embodiment of the present application is shown in FIG. 5, which comprises: Figure 5

[0144] A first detection module 502 is configured to detect a target device state of a target storage device in the storage system according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate the running state of the target storage device on the corresponding detection item, and the target device state is used to indicate the possibility of the current target storage device on each detection item causing the target storage device to fail;

[0145] A second detection module 504 is configured to obtain a target failure state of the target storage device according to the target correlation and the target device state, wherein the target correlation is the relationship between the device state of the target storage device and the failure state of the target storage device in a historical time period before the current time, and the failure state is used to indicate the probability of the target storage device about to fail;

[0146] An execution module 506 is configured to perform a data protection operation on the data stored by the target storage device in the case that the target probability indicated by the target failure state is greater than or equal to a target probability threshold.

[0147] ​By the above steps, since the possibility that the target storage device fails due to the current running state of the target storage device on each detection item in the storage system is detected according to the running state of the target storage device on each detection item, the probability that the target storage device will fail at the current time is detected according to the possibility and the relationship between the probability that the storage device fails and the possibility detected in the historical event segment before the current time, the probability that the target storage device will fail at the current time is detected by comprehensively considering the influence of the performance of multiple detection items in the historical time period on whether the target storage device fails, which is more accurate. In the case where the detected target probability of failure is greater than or equal to the target probability threshold, the data protection operation is performed on the data stored by the target storage device, that is, the data stored by the target storage device that will fail is protected in advance on the basis of accurately predicting that the failure will occur, active protection of the storage system is realized, and the need for complex cross-storage device data repair operation in the case where the failure has occurred is avoided, the occupation of operation resources of the storage system is reduced, and more resources are left for data access of the storage system. Therefore, the problem of low data access efficiency of the storage system can be solved, and the data access efficiency of the storage system is improved.

[0148] As an optional implementation, the second detection module comprises: an extraction unit configured to extract a first failure state corresponding to the target device state from the target association relationship; and an adjustment unit configured to adjust the first failure state to a second failure state of the target storage device to obtain a target failure state, wherein the second failure state is a failure state detected on the target storage device before the current time.

[0149] Optionally, the adjustment unit is further configured to calculate the target probability by the following formula:

[0150] ,

[0151] wherein P is the target probability, P n is a first probability indicated by the first failure state, P n-1 is a second probability indicated by the second failure state detected on the target storage device at the last detection, is a weight coefficient corresponding to the first probability, is a weight coefficient corresponding to the second probability.

[0152] As an optional implementation, the control device of the storage system further comprises: a third detection module, configured to detect fault information of the target storage device at a plurality of time points in a historical time period, and collect device states of the target storage device at the plurality of time points to obtain a plurality of sets of state correlation information, wherein the fault information is used to indicate whether the target storage device has a fault, and the state correlation information comprises the fault information and the device state having a corresponding relationship; and a calculation module, configured to calculate a first fault probability of the target storage device having a fault in each device state according to the plurality of sets of state correlation information to obtain a target correlation relationship, wherein the fault state comprises the first fault probability.

[0153] Optionally, the calculation module comprises: a first calculation unit, configured to calculate the first fault probability corresponding to each device state by the following formula:

[0154] F=N1 / N2,

[0155] wherein F is the first fault probability corresponding to the reference device state, N2 is the number of the reference device state in the plurality of device states, and N1 is the number of the reference device state in the plurality of device states corresponding to the fault information indicating that the target storage device has a fault.

[0156] As an optional implementation, the first detection module comprises: a first determination unit, configured to determine the correlation parameter corresponding to each detection item according to the reference range corresponding to each detection item and the plurality of item parameters, wherein the plurality of detection information comprises the plurality of item parameters, and the correlation parameter is used to indicate the possibility of the running state of the target storage device on the corresponding detection item leading to the target storage device having a fault; and an arrangement unit, configured to arrange the plurality of correlation parameters in a target order to obtain a target feature vector, wherein the target device state comprises the target feature vector.

[0157] Optionally, the first determination unit is further configured to: detect whether each item parameter falls within the corresponding reference range; in a case where it is detected that the item parameter falls within the corresponding reference range, determine that the correlation parameter is a first correlation parameter, wherein the first correlation parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item leading to the target storage device having a fault is low; and in a case where it is detected that the item parameter does not fall within the corresponding reference range, determine that the correlation parameter is a second correlation parameter, wherein the second correlation parameter is used to indicate that the possibility of the running state of the target storage device on the corresponding detection item leading to the target storage device having a fault is high.

[0158] Optionally, the first detecting module further comprises: a detecting unit, configured to detect, in a reference time period before the current time, the target parameter corresponding to the target detection item and the failure information of the target storage device according to the target frequency, to obtain a plurality of groups of reference association information, wherein the target parameter is used to indicate the running state of the target storage device on the target detection item, the failure information is used to indicate whether the target storage device has failed, the reference association information comprises the failure information and the target parameter having a corresponding relationship, and the plurality of detection items comprises the target detection item; a second calculating unit, configured to calculate, according to the plurality of groups of reference association information, the second failure probability of the target storage device when the target parameter is less than each parameter threshold, to obtain a plurality of groups of intermediate association information, wherein the intermediate association information comprises the parameter threshold and the second failure probability having a corresponding relationship; and a second determining unit, configured to determine, according to the plurality of groups of intermediate association information and the detection probability threshold of the target detection item, the target sub-range of the target detection item, wherein the reference range comprises the target sub-range, and the running state indicated by the target parameter in the target sub-range corresponds to the second failure probability less than or equal to the detection probability threshold.

[0159] Optionally, the second determining unit is further configured to: determine, according to the plurality of groups of intermediate association information, the cumulative distribution function of the target detection item; determine, according to the cumulative distribution function and the detection probability threshold, the parameter threshold corresponding to the second failure probability less than or equal to the detection probability threshold from the plurality of parameter thresholds, to obtain the target parameter threshold; and determine that the target sub-range is zero to the target parameter threshold.

[0160] As an optional implementation, the distributed storage system comprises a standby storage device and a plurality of in-use storage devices, the plurality of in-use storage devices comprises a target storage device, and the plurality of in-use storage devices and the standby storage device are connected to each other; and the execution module comprises: a copying unit, configured to copy the data stored in the target storage device to the standby storage device; and a converting unit, configured to convert the access to the target storage device in the distributed storage system into the access to the standby storage device, and prohibit the access to the target storage device in the distributed storage system.

[0161] Optionally, the control device of the storage system further comprises: a fourth detection module configured to detect a failure risk cause of the target storage device according to the plurality of detection information, wherein the failure risk cause is a cause leading to the target probability being greater than or equal to the target probability threshold, and the failure risk cause comprises a hardware cause and a software cause; a searching module configured to, in a case where the failure risk cause is detected as the software cause, search for a software recovery operation corresponding to the software cause; perform the software recovery operation on the target storage device; detect a size relationship between a reference probability of the target storage device after the software recovery operation is performed and the target probability threshold, wherein the reference probability is a probability that the target storage device after the software recovery operation is performed will fail; in a case where the reference probability is detected as being less than the target probability threshold, restore data stored in the backup storage device to the target storage device, and restore access to the backup storage device in the distributed storage system to access to the target storage device; empty the data stored in the backup storage device; and a replacing module configured to, in a case where the failure risk cause is detected as the hardware cause, or in a case where the reference probability is detected as being greater than or equal to the target probability threshold, replace the target storage device with a reference storage device, wherein the reference storage device does not store data; and determine the reference storage device as the backup storage device.

[0162] It should be noted that each of the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all of the above modules are located in the same processor; or the above modules are located in different processors in any combination.

[0163] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is configured to execute the steps in any of the above method embodiments when running.

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

[0165] Embodiments of the present application also provide an electronic device, which comprises a memory storing a computer program and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.

[0166] In an example embodiment, the above electronic device can further comprise a transmission device connected to the processor and an input / output device connected to the processor.

[0167] An embodiment of the present application further provides a computer program product, which comprises a computer program. The computer program is executed by a processor to implement the steps in any of the method embodiments.

[0168] An embodiment of the present application further provides another computer program product, which comprises a non-volatile computer readable storage medium. The non-volatile computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps in any of the method embodiments.

[0169] An embodiment of the present application further provides a computer program, which comprises computer instructions. The computer instructions are stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the steps in any of the method embodiments.

[0170] The specific examples in the present embodiment can refer to the examples described in the above embodiments and exemplary embodiments, which will not be repeated here.

[0171] Obviously, a person skilled in the art should understand that each module or step of the present application described above can be implemented by a general computing device. They can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device. In some cases, the steps shown or described can be executed in an order different from here, or they can be manufactured into each integrated circuit module respectively, or multiple modules or steps among them can be manufactured into a single integrated circuit module to implement. Thus, the present application is not limited to any particular combination of hardware and software.

[0172] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A control method of a storage system, comprising: detecting a current target device state of a target storage device in the storage system according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate an operation state of the target storage device on the corresponding detection item, and the target device state is used to indicate a possibility that a current operation state of the target storage device on each detection item leads to a failure of the target storage device; obtaining a current target failure state of the target storage device according to a target correlation and the target device state, wherein the target correlation is a relationship between a device state of the target storage device and a failure state of the target storage device in a historical time period before a current time, and the failure state is used to indicate a probability that the target storage device is about to fail; performing a data protection operation on data stored by the target storage device in a case where a target probability indicated by the target failure state is greater than or equal to a target probability threshold; and wherein the detecting the current target device state of the target storage device in the storage system according to the plurality of detection information corresponding to the plurality of detection items comprises: determining an associated parameter corresponding to each detection item according to a reference range corresponding to each detection item and a plurality of item parameters, wherein the plurality of detection information comprises the plurality of item parameters, and the associated parameter is used to indicate a possibility that an operation state of the target storage device on the corresponding detection item leads to a failure of the target storage device; and arranging the plurality of associated parameters in a target order to obtain a target feature vector, wherein the target device state comprises the target feature vector. ​ The determining the correlation parameter corresponding to each detection item according to the reference range corresponding to each detection item and the item parameter comprises: determining the correlation parameter corresponding to each first detection item as the item parameter corresponding to each first detection item, and detecting whether each item parameter corresponding to each second detection item falls within the corresponding reference range, wherein the plurality of detection items comprise each first detection item and each second detection item, the first detection item and the second detection item are divided according to the difficulty of causing the target storage device to fail, and the first detection item has a greater degree of difficulty in causing the target storage device to fail than the second detection item; in the case where it is detected that the item parameter corresponding to each second detection item falls within the corresponding reference range, the correlation parameter corresponding to each second detection item is determined as a first correlation parameter, wherein the first correlation parameter is used to indicate that the running state of the target storage device on the corresponding detection item has a low possibility of causing the target storage device to fail; in the case where it is detected that the item parameter corresponding to each second detection item does not fall within the corresponding reference range, the correlation parameter corresponding to each second detection item is determined as a second correlation parameter, wherein the second correlation parameter is used to indicate that the running state of the target storage device on the corresponding detection item has a high possibility of causing the target storage device to fail; Before the obtaining the current target failure state of the target storage device according to the target correlation relationship and the target device state, the method further comprises: detecting failure information of the target storage device at a plurality of time points in the historical time period, and collecting device states of the target storage device at the plurality of time points to obtain a plurality of sets of state correlation information, wherein the failure information is used to indicate whether the target storage device fails, and the state correlation information comprises the failure information and the device state having a corresponding relationship; calculating a first failure probability corresponding to each device state by the following formula to obtain the target correlation relationship, wherein the failure state comprises the first failure probability: F=N1 / N2, wherein F is a first failure probability corresponding to a reference device state, N2 is the number of the reference device state in the plurality of device states, and N1 is the number of the reference device state in the plurality of device states, for which the corresponding failure information indicates that the target storage device fails.

2. The method of claim 1, wherein the obtaining the current target failure state of the target storage device according to the target correlation relationship and the target device state comprises: extracting a first failure state corresponding to the target device state from the target correlation relationship; adjusting the first failure state to a second failure state of the target storage device to obtain the target failure state, wherein the second failure state is a failure state detected on the target storage device before the current time. ​ 3. The method of claim 2, wherein the adjusting the first failure state to the second failure state of the target storage device to obtain the target failure state comprises: calculating the target probability according to the following formula:

4. The method of claim 1, wherein before the determining the correlation parameter corresponding to each detection item according to the reference range corresponding to each detection item and the plurality of item parameters, the method further comprises: , wherein P is the target probability, P n is a first probability indicated by the first failure state, n-1 is a second probability indicated by the second failure state detected on the target storage device at the last detection, is a weight coefficient corresponding to the first probability, is a weight coefficient corresponding to the second probability. detecting, in a reference time period before the current time, a target parameter corresponding to a target detection item of the target storage device and failure information of the target storage device according to a target frequency to obtain a plurality of sets of reference correlation information, wherein the target parameter is used to indicate a running state of the target storage device on the target detection item, the failure information is used to indicate whether the target storage device has failed, the reference correlation information comprises the failure information and the target parameter having a corresponding relationship, and the plurality of detection items comprise the target detection item; calculating, according to the plurality of sets of reference correlation information, a second failure probability of the target storage device failing when the target parameter is less than each parameter threshold value to obtain a plurality of sets of intermediate correlation information, wherein the intermediate correlation information comprises the parameter threshold value and the second failure probability having a corresponding relationship; determining a target sub-range of the target detection item according to the plurality of sets of intermediate correlation information and a detection probability threshold value of the target detection item, wherein the reference range comprises the target sub-range, and a running state indicated by the target parameter in the target sub-range corresponds to a second failure probability less than or equal to the detection probability threshold value.

5. The method of claim 4, wherein the determining the target sub-range of the target detection item according to the plurality of sets of intermediate correlation information and the detection probability threshold value of the target detection item comprises: determining a cumulative distribution function of the target detection item according to the plurality of sets of intermediate correlation information; determining, according to the cumulative distribution function and the detection probability threshold value, a target parameter threshold value from the plurality of parameter threshold values, wherein the corresponding second failure probability of the target parameter threshold value is less than or equal to the detection probability threshold value; and determining the target sub-range as zero to the target parameter threshold value.

6. The method of claim 1, wherein the distributed storage system comprises a standby storage device and a plurality of in-use storage devices, the plurality of in-use storage devices comprise the target storage device, and the plurality of in-use storage devices and the standby storage device are connected to each other. The performing a data protection operation on the data stored by the target storage device comprises: copying the data stored by the target storage device to the standby storage device; converting, in the distributed storage system, an access to the target storage device to an access to the standby storage device, and prohibiting, in the distributed storage system, an access to the target storage device.

7. The method of claim 6, wherein the converting, in the distributed storage system, the access to the target storage device to the access to the standby storage device comprises: converting, in the distributed storage system, the access to the target storage device to the access to the standby storage device according to a mapping relationship between the target storage device and the standby storage device. ​ ​ ​ After the data protection operation is performed on the data stored in the target storage device, the method further comprises: detecting a failure risk cause of the target storage device according to the plurality of detection information, wherein the failure risk cause is a cause leading to the target probability being greater than or equal to the target probability threshold, and the failure risk cause comprises a hardware cause and a software cause; in a case where the failure risk cause is the software cause, searching for a software recovery operation corresponding to the software cause, performing the software recovery operation on the target storage device, detecting a reference probability of the target storage device after the software recovery operation is performed and the target probability threshold, wherein the reference probability is a probability of the target storage device to be failed after the software recovery operation is performed, and in a case where the reference probability is less than the target probability threshold, restoring the data stored in the backup storage device to the target storage device, restoring access to the backup storage device in the distributed storage system to access to the target storage device, and emptying the data stored in the backup storage device; in a case where the failure risk cause is the hardware cause, or in a case where the reference probability is greater than or equal to the target probability threshold, replacing the target storage device with a reference storage device, wherein the reference storage device does not store data, and determining the reference storage device as the backup storage device.

8. A control device of a storage system, comprising: a first detection module configured to detect a target device state of a target storage device in a storage system according to a plurality of detection information corresponding to a plurality of detection items, wherein the detection information is used to indicate a running state of the target storage device on the corresponding detection item, and the target device state is used to indicate a possibility of the target storage device to be failed due to a running state of the target storage device on each detection item; a second detection module configured to acquire a target failure state of the target storage device according to a target association relationship and the target device state, wherein the target association relationship is a relationship between a device state of the target storage device and a failure state of the target storage device in a historical time period before a current time, and the failure state is used to indicate a probability of the target storage device to be failed; an execution module configured to perform a data protection operation on data stored in the target storage device in a case where a target probability indicated by the target failure state is greater than or equal to a target probability threshold. ​ The first detection module comprises: a first determination unit configured to determine, according to a reference range corresponding to each detection item and a plurality of item parameters, an association parameter corresponding to each detection item, wherein the plurality of detection information comprises the plurality of item parameters, and the association parameter is used to indicate a possibility of a running state of the target storage device on the corresponding detection item leading to a failure of the target storage device; and an arrangement unit configured to arrange the plurality of association parameters in a target order to obtain a target feature vector, wherein the target device state comprises the target feature vector. The first determination unit is further configured to: determine that the association parameter corresponding to each first detection item is an item parameter corresponding to each first detection item, and detect whether each item parameter corresponding to each second detection item falls within a corresponding reference range, wherein the plurality of detection items comprises each first detection item and each second detection item, the first detection item and the second detection item are divided according to a degree of difficulty of leading to a failure of the target storage device, and the first detection item has a greater degree of difficulty of leading to a failure of the target storage device than the second detection item; in a case where it is detected that the item parameter corresponding to each second detection item falls within the corresponding reference range, determine that an association parameter corresponding to each second detection item is a first association parameter, wherein the first association parameter is used to indicate that a running state of the target storage device on the corresponding detection item leads to a low possibility of a failure of the target storage device; and in a case where it is detected that the item parameter corresponding to each second detection item does not fall within the corresponding reference range, determine that the association parameter corresponding to each second detection item is a second association parameter, wherein the second association parameter is used to indicate that a running state of the target storage device on the corresponding detection item leads to a high possibility of a failure of the target storage device. The control device of the storage device further comprises: a third detection module configured to detect, at a plurality of time points in the historical time period, failure information of the target storage device, and collect, at the plurality of time points, a device state of the target storage device to obtain a plurality of sets of state association information, wherein the failure information is used to indicate whether the target storage device has a failure, and the state association information comprises the failure information and the device state having a corresponding relationship; and a first calculation unit configured to calculate, according to the following formula, a first failure probability corresponding to each device state to obtain the target association relationship, wherein the failure state comprises the first failure probability: F = N1 / N2, wherein F is a first failure probability corresponding to a reference device state, N2 is a quantity of the reference device state in the plurality of device states, and N1 is a quantity of the reference device state in the plurality of device states, for which corresponding failure information is used to indicate that the target storage device has a failure.

9. A computer-readable storage medium, The computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the method in any one of claims 1 to 7.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, wherein, The computer program, when executed by a processor, implements the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fault prediction method and device, computing device and computer readable storage medium

    CN110851342A

  • Hard disk maintenance method and device, equipment and storage medium

    CN115098324A