Solid state disk life prediction method and device, equipment and storage medium
By calculating the changes in hard disk usage and wear of solid-state drives, directly predicting their lifespan, solving the problems of large resource occupation and inaccurate prediction in the existing technology, and achieving lightweight and accurate solid-state drive life prediction.
Patent Information
- Application Number
- CN202411128434.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the solid-state drive life prediction method is large in size and occupies a large amount of storage resources and computing resources. Not all systems support it, and a large amount of fault disk information is required, which may affect the accuracy of the prediction results.
By collecting data from the target solid-state drive, calculate the time interval of the change in hard disk usage, update the target array, and calculate the time spent per percentage of life. If the wear rate does not reach the preset threshold, calculate the hard disk life expiration time to achieve lightweight life prediction , avoid interference from collecting other hard disk data.
It realizes lightweight solid-state drive life prediction, saves storage and computing resources, ensures the accuracy of prediction, only predicts the target hard disk, and avoids interference from other hard disk data in the data.
Smart Images

Figure CN118939493A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for predicting the life of a solid state drive. Background Art
[0002] With the development of intelligent life, a huge amount of data is generated in daily life. Traditional HDD (Hard Disk Drive) mechanical disks are no longer sufficient to meet the needs of high data access rates. SSD (Solid State Disk or Solid State Drive) solid state disks are widely used in the storage field due to their high performance, low power consumption, and high reliability. However, the flash memory unit of the SSD hard disk has a limited erase and write life limit, that is, each storage unit can only withstand a limited number of erase and write operations. If the hard disk life expires, it will cause serious failures such as hard disk offline, resulting in accidents such as storage data loss or business downtime, which will have a serious impact on customer business. Therefore, it is necessary to make an accurate life prediction for the hard disk, and promptly remind customers or maintenance personnel to replace the hard disk that is about to expire in advance to ensure stable operation of the system and ensure user data security. Therefore, life prediction of the target disk has become an important direction.
[0003] In the prior art, a large model training method is usually used to predict the life of solid-state hard disks. It is necessary to collect information about hard disks that have failed and extract SMART information from hard disk logs. Based on the unified hard disk standard, several performance status parameters of each failed hard disk are obtained. A weighted model is established for training to obtain the optimal weighted value. Then, a function model is obtained based on the optimal weighted value and the service life value of the failed disk. Finally, the hard disk life prediction operation is performed based on the unified standard obtained by the function model and the target disk. However, the method in the prior art is too large in size, and prediction through the model requires a large amount of storage resources and computing power resources. Not all systems have the ability to support hard disk life prediction through the model, and a large amount of failed disk information needs to be collected. Since the failed disk information may contain information about other hard disks, it may have a certain impact on the prediction results.
[0004] It can be seen that how to design a lightweight and accurate solid-state drive life prediction method is a problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, device, equipment and storage medium for predicting the life of a solid-state hard disk, which can collect data of a target solid-state hard disk and only predict the life of the target solid-state hard disk, thereby avoiding the problem of other solid-state hard disk data or mechanical hard disk data appearing in the collected data and ensuring the accuracy of the hard disk prediction. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a solid state drive life prediction method, which is applied to a cluster system manager of a storage system cluster, comprising:
[0007] Determine the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect current target data related to the current wear condition of the target solid-state hard disk through a data collection tool pre-configured in the storage node where the target solid-state hard disk is located;
[0008] Calculating the time interval of the hard disk usage change based on the current target data, and updating the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array; the target array is an array used to record the hard disk usage change information;
[0009] Determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold value through the current target data; if the preset wear rate threshold value is not reached, calculate the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage;
[0010] The hard disk wear condition is determined according to the updated array and the life consumption time per percentage, and whether to issue a hard disk warning is determined according to the hard disk wear condition and the hard disk life expiration time.
[0011] Optionally, determining the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collecting current target data related to the current wear condition of the target solid-state hard disk through a data collection tool pre-configured in the storage node where the target solid-state hard disk is located, includes:
[0012] Based on a preset timer, a hard disk inspection task is triggered regularly, so as to determine a target solid-state hard disk to be inspected from each storage node of the storage system cluster based on the hard disk inspection task;
[0013] Collecting hard disk data of the target solid state hard disk through a data collection tool pre-configured in the storage node where the target solid state hard disk is located;
[0014] Current target data related to the current wear condition of the target solid state hard disk is intercepted from the hard disk data.
[0015] Optionally, before calculating the time interval of the hard disk usage change based on the current target data and updating the target array according to the time interval of the hard disk usage change to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array, the method further includes:
[0016] Reading the current hard disk wear rate in the current target data, and reading the previous hard disk wear rate from the historical target data;
[0017] Calculating the difference between the current hard disk wear rate and the previous hard disk wear rate to obtain a wear rate change value;
[0018] If the wear rate change value is greater than the preset wear rate change threshold, jump to the step of calculating the time interval of the hard disk usage change based on the current target data; if the wear rate change value is not greater than the preset wear rate change threshold, stop the solid state drive life prediction.
[0019] Optionally, the calculating the time interval of the hard disk usage change based on the current target data includes:
[0020] Obtaining the current time recorded in the current target data and the historical time corresponding to the last time the hard disk wear rate changed;
[0021] determining a first target time interval between the current moment and the historical moment;
[0022] Determining whether the first target time interval is zero, and stopping the solid state drive life prediction if the first target time interval is zero;
[0023] If the first target time interval is not zero, taking the ratio of the first target time interval and the preset time base as the second target time interval;
[0024] Comparing the second target time interval with a first preset interval threshold and a second preset interval threshold; the first preset interval threshold is less than the second preset interval threshold;
[0025] If the second target time interval is smaller than the first preset interval threshold, the first preset interval threshold is used as the time interval for the hard disk usage rate change;
[0026] If the second target time interval is not less than the first preset interval threshold and not greater than the second preset interval threshold, the second target time interval is used as the time interval for the hard disk usage change;
[0027] If the second target time interval is greater than the second preset interval threshold, the second preset interval threshold is used as the time interval for the hard disk usage change.
[0028] Optionally, updating the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array, includes:
[0029] Determine the current data insertion index from the current target data, and update the time interval of the hard disk usage change to the position corresponding to the current data insertion index in the target array to obtain an updated array;
[0030] Traversing the updated array to determine the number of valid values of the target values in the updated array and the sum of the valid values of each target value; the target value is the time interval of the hard disk usage change in the updated array;
[0031] If the number of valid values is zero, assigning each percentage life consumption time of the target solid state drive to zero;
[0032] If the number of valid values is not zero, the ratio of the total of the valid values to the number of valid values is used as the life consumption time per percentage of the target solid state drive.
[0033] Optionally, determining whether the wear rate of the target solid state drive reaches a preset wear rate threshold value by using the current target data, and if the preset wear rate threshold value is not reached, calculating the hard disk life expiration time of the target solid state drive according to the current target data and the life consumption time per percentage, includes:
[0034] Determine whether the current hard disk wear rate is greater than or equal to a preset wear rate threshold, and if the current hard disk wear rate is greater than or equal to the preset wear rate threshold, use the current time recorded in the current target data as the hard disk life expiration time of the target solid state drive;
[0035] If the current hard disk wear rate is less than the preset wear rate threshold, the remaining hard disk life of the target solid-state hard disk is determined based on the current hard disk wear rate, the per percentage life consumption time and the preset time base, and the sum of the current moment and the remaining hard disk life is used as the hard disk life expiration time of the target solid-state hard disk.
[0036] Optionally, determining the hard disk wear condition according to the updated array and the life consumption time per percentage, and determining whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time, includes:
[0037] Determine whether the effective array length of the updated array is greater than a preset array length threshold;
[0038] If the effective length of the array is not greater than the preset array length threshold, then determine whether the sum of the effective values is greater than the preset target threshold; if the sum of the effective values is less than the preset target threshold, issue a hard disk usage exceeding standard warning;
[0039] If the effective length of the array is greater than the preset array length threshold, determining whether the per-percentage life consumption time is greater than a third preset interval threshold;
[0040] If the per-percent life consumption time is not greater than the third preset interval threshold, a hard disk usage over-limit warning is issued; if the per-percent life consumption time is greater than the third preset interval threshold and not greater than the fourth preset interval threshold, a hard disk usage abnormality warning is issued; the third preset interval threshold is less than the fourth preset interval threshold;
[0041] It is determined whether the hard disk life expiration time exceeds the preset hard disk service life. If the hard disk life expiration time exceeds the preset hard disk service life, a hard disk service life warning is issued.
[0042] In a second aspect, the present application discloses a solid state drive life prediction device, which is applied to a cluster device system, comprising:
[0043] A data acquisition module, used to determine the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect current target data related to the current wear condition of the target solid-state hard disk through a data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located;
[0044] A data calculation module, used to calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array; the target array is an array used to record the hard disk usage change information;
[0045] A life prediction module, used to determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold through the current target data, and if it does not reach the preset wear rate threshold, calculate the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage;
[0046] The hard disk warning module is used to determine the hard disk wear condition according to the updated array and the life consumption time per percentage, and determine whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
[0047] In a third aspect, the present application discloses an electronic device, comprising:
[0048] Memory, used to store computer programs;
[0049] A processor is used to execute the computer program to implement the solid state drive life prediction method as described above.
[0050] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the solid-state drive life prediction method as described above.
[0051] It can be seen that in the present application, it is necessary to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect the current target data related to the current wear condition of the target solid-state hard disk through the data collection tool pre-configured in the storage node where the target solid-state hard disk is located; then calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid-state hard disk through the updated array obtained; the target array is an array for recording hard disk usage change information; and determine whether the wear rate of the target solid-state hard disk reaches the preset wear rate threshold through the current target data, if the preset wear rate threshold is not reached, calculate the hard disk life expiration time of the target solid-state hard disk according to the current target data and the life consumption time per percentage; finally, determine the hard disk wear condition according to the updated array and the life consumption time per percentage, and determine whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
[0052] Beneficial effect: Through the method of the present application, it is necessary to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the inspection task, so as to collect the current target data of the target solid-state hard disk through the data collection tool, and then calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the target solid-state hard disk through the updated array, and then calculate the hard disk life expiration time of the target solid-state hard disk according to the current target data and the hard disk life expiration time of the target solid-state hard disk when the wear rate of the target solid-state hard disk does not reach the preset wear rate threshold. In this way, on the one hand, only by collecting the data of the target solid-state hard disk, the hard disk life expiration time of the target solid-state hard disk can be calculated, which realizes the lightweight prediction of the hard disk life, and avoids the problem of using a model for prediction and occupying a large amount of storage resources and computing power resources; on the other hand, by collecting the data of the target solid-state hard disk, only the service life of the target solid-state hard disk can be predicted, which avoids the problem of other solid-state hard disk data or mechanical hard disk data appearing in the collected data, and ensures the accuracy of the hard disk prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A flow chart of a solid state drive life prediction method provided by an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of calculating a time interval for a hard disk usage change provided by an embodiment of the present invention;
[0056] Figure 3 An interactive schematic diagram of a solid state drive life prediction method provided by an embodiment of the present invention;
[0057] Figure 4 A flow chart of a specific solid state drive life prediction method provided by an embodiment of the present invention;
[0058] Figure 5 Another specific flow chart of a method for predicting the life of a solid state drive provided by an embodiment of the present invention;
[0059] Figure 6 A schematic diagram of the structure of a solid state drive life prediction device provided by an embodiment of the present invention;
[0060] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In the prior art, large model training is usually used to predict the life of solid-state drives. However, the volume of prediction through large models is too large and requires a lot of storage resources and computing power resources. Not all systems have the ability to support hard drive life prediction through models, and a large amount of faulty disk information needs to be collected. Since the faulty disk information may contain information about other hard drives, it may have a certain impact on the prediction results.
[0063] In order to overcome the above-mentioned technical problems, the present application discloses a solid-state hard drive life prediction method, device, equipment and storage medium, which can achieve lightweight prediction by collecting data prediction of the target solid-state hard drive, and can only predict the service life of the target solid-state hard drive, avoiding the problem of other solid-state hard drive data or mechanical hard drive data appearing in the collected data, thereby ensuring the accuracy of the hard drive prediction.
[0064] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0065] See also Figure 1 As shown, the embodiment of the present application discloses a solid state drive life prediction method, which is applied to a cluster system manager of a storage system cluster, including:
[0066] Step S11, determining the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collecting current target data related to the current wear condition of the target solid-state hard disk through a data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located.
[0067] In this embodiment, it is necessary to collect hard disk data of the solid-state hard disk through the data acquisition module. Specifically, the function of the data acquisition module is deployed in each storage node of the storage system cluster, and it is necessary to trigger the hard disk patrol task based on a preset timer to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster based on the hard disk patrol task. That is, after the storage system cluster is built, the storage node will start a fixed timer, and then through the preset patrol function, trigger the hard disk patrol task after each timer ends, and then traverse the target solid-state hard disk to be inspected identified in the storage system cluster based on the hard disk patrol task. After identifying the target SSD, it is necessary to collect the hard disk data of the target SSD through the data collection tool pre-configured in the storage node where the target SSD is located. Specifically, it is necessary to encapsulate the inspection IO (Input / Output), set the callback, and then send the inspection IO to the target SSD, so that the data collection tool pre-configured in the storage node where the target SSD is located reads the hard disk data of the target SSD from the fixed position of the target SSD based on the inspection IO. If the read is successful, the current target data related to the current wear condition of the target SSD is intercepted from the hard disk data. Specifically, it is necessary to intercept the current target data related to the current wear condition of the target SSD corresponding to the preset data structure from the hard disk data. Among them, the preset data structure is as follows:
[0068] Struct {
[0069] Uint32 last_change_time;
[0070] Uint32 current_time;
[0071] Uint32 predict_failure_time;
[0072] Uint8 DWPD_CONSUMPTION;
[0073] Uint8 dwpd_consumption_usage_rate;
[0074] Uint8 *days_per_percent_array;
[0075] Uint8 current_index;
[0076] }
[0077] Among them, Uint32 means that the data is 32 bytes, Uint8 means that the data is 8 bytes, and Uint8 * means that the data is forcibly converted to 8 bytes.
[0078] Step S12, calculating the time interval of the hard disk usage change based on the current target data, and updating the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the updated array; the target array is an array used to record the hard disk usage change information.
[0079] In this embodiment, Figure 2As shown, before each percentage of the life consumption time of the target solid-state hard disk, it is necessary to determine whether it is necessary to calculate each percentage of the life consumption time of the target solid-state hard disk. If not, the solid-state hard disk life prediction is stopped. First, the current hard disk wear rate in the current target data needs to be read, and the last hard disk wear rate is read from the historical target data, that is, the current hard disk wear rate, that is, the value of DWPD_CONSUMPTION, needs to be read from the current target data, and then the value of DWPD_CONSUMPTION of the last change needs to be read from the historical data, and then the difference between the current hard disk wear rate and the last hard disk wear rate needs to be calculated to obtain the wear rate change value, and then it is necessary to determine whether the wear rate change value is greater than the preset wear rate change threshold. In this embodiment, the preset wear rate change threshold is 1. It should be noted that if the wear rate change value is greater than 1, it indicates that the wear degree of the solid-state hard disk is high during this wear rate change, and the subsequent solid-state hard disk life prediction process can be performed. If the wear rate change value is less than 1, it indicates that the wear degree of the solid-state hard disk is low during this wear rate change, or the hard disk has not been worn, and the solid-state hard disk life prediction is no longer performed. In this way, when the hard disk wear rate is low, the hard disk life prediction can be ended directly to save computing resources.
[0080] Furthermore, if the wear rate change value is greater than the preset wear rate change threshold, the time interval of the hard disk usage change can be calculated according to the current target data. Specifically, Figure 2 As shown, it is necessary to obtain the current moment current_time recorded in the current target data and the historical moment last_changed_time corresponding to the last change in the hard disk wear rate, and then determine the first target time interval between the current moment and the historical moment, that is, it is necessary to calculate the difference between the current moment current_time and the historical moment last_changed_time, and use the obtained difference as the first target time interval, and judge whether the first target time interval is zero. If the first target time interval is zero, it indicates that the hard disk wear rate has not changed, and the solid state drive life prediction can be stopped directly. If the first target time interval is not zero, it is necessary to use the ratio of the first target time interval and the preset time base as the second target time interval, wherein the preset time base is 86400, which is the number of seconds in a day. In this way, the Gap value in days can be obtained, and the obtained Gap value is used as the second target time interval for characterizing the interval time of the hard disk usage change.
[0081] It needs to be explained that if Figure 2As shown, after obtaining the second target time interval for characterizing the interval time of the hard disk usage change, it is also necessary to determine the final Gap value according to the second target time interval, that is, the time interval of the hard disk usage change, wherein the second target time interval needs to be compared with the first preset interval threshold and the second preset interval threshold, and the first preset interval threshold is less than the second preset interval threshold, if the second target time interval is less than the first preset interval threshold, then the first preset interval threshold is used as the time interval of the hard disk usage change, wherein the first preset interval threshold is 1 day, if the second target time interval is less than 1 day, then the time interval of the hard disk usage change is determined to be 1 day, That is, Gap=1; if the second target time interval is not less than the first preset interval threshold and not greater than the second preset interval threshold, the second target time interval is used as the time interval for the hard disk usage change, wherein the second preset interval threshold is 255 days. If the second target time interval is between 1 day and 255 days, the value of the second target time interval can be directly determined as the Gap value; if the second target time interval is greater than the second preset interval threshold, the second preset interval threshold is used as the time interval for the hard disk usage change, that is, if the second target time interval is greater than 255 days, the time interval for the hard disk usage change is determined to be 255 days, that is, Gap=255. In this way, the accurate time interval value for the hard disk usage change can be determined by comparing the time interval for the hard disk usage change, so as to ensure the accuracy of the prediction when the time interval value for the hard disk usage change is used to predict the hard disk life in the future.
[0082] In this embodiment, Figure 3 As shown in the figure, after determining the time interval of the hard disk usage change, it is necessary to update the target array days_per_percent_array according to the time interval Gap of the hard disk usage change, and calculate the target solid state drive life consumption time per percentage through the updated array. Specifically, it is necessary to determine the data insertion index from the current target data, that is, current_index, and then as Figure 2As shown, the time interval Gap of the hard disk usage change is updated to the position in the target array corresponding to the data insertion index to obtain the updated array. After the update is completed, the current_index and the historical moment last_changed_time corresponding to the last hard disk wear rate change need to be updated. The update of the target array is: days_per_percent_array[current_index]=Gap, and the update of the index is: current_index=(current_index+1)%8. The update of the historical moment corresponding to the last hard disk wear rate change is last_changed_time=current_time. After the update is completed, the next time the life of the target solid state drive is predicted, the prediction is based on the updated data. It should be noted that days_per_percent_array is an array of length 8, which maintains the time intervals of the last 8 changes. If it exceeds 8 times, it will be cyclically overwritten.
[0083] Further, after obtaining the updated array, the life consumption time per percentage of the target solid-state hard disk can be calculated according to the updated array. Specifically, it is necessary to traverse the updated array to determine the number of valid values cal_sum of the target value in the updated array and the sum of the valid values of each target value days_percent_sum. It should be noted that the target value is the time interval Gap of the hard disk usage change in the updated array. If the value of the number of valid values cal_sum is 0, the life consumption time per percentage ave_gap of the target solid-state hard disk needs to be assigned to zero. If the value of the number of valid values cal_sum is not zero, the ratio of the sum of the valid values to the number of valid values is used as the life consumption time per percentage of the target solid-state hard disk, that is, ave_gap = days_percent_sum / cal_sum. In this way, the life consumption time per percentage of the target solid-state hard disk under different conditions can be calculated to ensure the accuracy of the solid-state hard disk life prediction.
[0084] Step S13: determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold through the current target data; if it does not reach the preset wear rate threshold, calculate the hard disk life expiration time of the target solid state hard disk based on the current target data and the life consumption time per percentage.
[0085] In this embodiment, it is necessary to determine whether the current hard disk wear rate in the current target data is greater than the preset wear rate threshold. If the current hard disk wear rate is greater than or equal to the preset wear rate threshold, it indicates that the hard disk has reached the expiration time. The current moment in the current target data collected when collecting the target solid-state hard disk can be used as the hard disk life expiration time of the target solid-state hard disk. If the current hard disk wear rate is less than the preset wear rate threshold, it indicates that the hard disk has not yet reached the expiration time. The remaining life of the hard disk can be calculated based on the current hard disk wear rate, the time consumed per percentage of life, and the preset time base. In this way, the hard disk life of the target solid-state hard disk can be predicted through the collected hard disk data, so as to achieve the prediction of only the service life of the target solid-state hard disk, avoiding the problem of other solid-state hard disk data or mechanical hard disk data appearing in the collected data, and ensuring the accuracy of the hard disk prediction.
[0086] Step S14, determining the hard disk wear condition according to the updated array and the life consumption time per percentage, and determining whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
[0087] In this embodiment, it is necessary to determine the hard disk wear according to the time interval of the array after update and the hard disk usage rate change. Specifically, it is necessary to determine the specific alarm scenario according to the effective length of the array in the updated array. If the effective length of the array is greater than the preset array length threshold, it is necessary to determine whether the life consumption time per percentage is greater than the third preset interval threshold. If the life consumption time per percentage is not greater than the third preset interval threshold, it indicates that the hard disk is used too frequently and an alarm for exceeding the hard disk usage rate is required. If the life consumption time per percentage is between the third preset interval threshold and the fourth preset interval threshold, it indicates that the hard disk is used frequently and an abnormal hard disk usage rate alarm is required. If the effective length of the array is not greater than the preset array length threshold, it is necessary to issue an alarm according to the sum of the effective values in the array of the updated array. Specifically, if the sum of the effective values is less than the preset target threshold, an alarm for exceeding the hard disk usage rate is issued. Further, an alarm for the hard disk service life can also be issued according to the hard disk life expiration time. If the hard disk life expiration time exceeds the preset hard disk service life, an alarm for the hard disk service life can be issued. In this way, a hard disk alarm can be issued in time according to the hard disk usage to avoid hard disk failure when the hard disk is overloaded, thereby causing hard disk damage and data loss.
[0088] It can be seen that, through the method of the present application, it is necessary to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the inspection task, so as to collect the current target data of the target solid-state hard disk through the data collection tool, and then calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the target solid-state hard disk through the updated array, and then calculate the hard disk life expiration time of the target solid-state hard disk according to the current target data and the life consumption time per percentage when the wear rate of the target solid-state hard disk does not reach the preset wear rate threshold. In this way, on the one hand, only by collecting the data of the target solid-state hard disk, the hard disk life expiration time of the target solid-state hard disk can be calculated, which realizes the lightweight prediction of the hard disk life, and avoids the problem of using a model for prediction and occupying a large amount of storage resources and computing power resources; on the other hand, by collecting the data of the target solid-state hard disk, only the service life of the target solid-state hard disk can be predicted, which avoids the problem of other solid-state hard disk data or mechanical hard disk data appearing in the collected data, and ensures the accuracy of the hard disk prediction.
[0089] Based on the above embodiments, it can be known that through the method of the present application, it is necessary to calculate the hard disk life expiration time of the target solid state drive according to the current target data and the life consumption time per percentage, and then predict the hard disk life of the solid state drive. To this end, this embodiment describes in detail how to predict the hard disk life of the solid state drive through these two types of data, see Figure 4 As shown, the embodiment of the present application discloses a method for predicting the life of a solid state drive, including:
[0090] Step S21, determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect current target data related to the current wear condition of the target solid-state hard disk through a data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located.
[0091] Step S22, calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the updated array; the target array is an array used to record the hard disk usage change information.
[0092] Step S23, determine whether the current hard disk wear rate is greater than or equal to the preset wear rate threshold. If the current hard disk wear rate is greater than or equal to the preset wear rate threshold, the current time recorded in the current target data is used as the hard disk life expiration time of the target solid state drive.
[0093] In this embodiment, it is necessary to determine whether the current hard disk wear rate DWPD_CONSUMPTION is greater than or equal to the preset wear rate threshold, where the preset wear rate threshold is 100 in this embodiment. If the current hard disk wear rate DWPD_CONSUMPTION is greater than or equal to the preset wear rate threshold 100, it indicates that the target solid-state hard disk has reached the failure time, and the current time current_time recorded in the current target data needs to be used as the hard disk life expiration time of the target solid-state hard disk, that is, predict_failure_time=current_time.
[0094] Step S24: If the current hard disk wear rate is less than the preset wear rate threshold, the remaining hard disk life of the target solid-state hard disk is determined based on the current hard disk wear rate, the life consumption time per percentage and the preset time base, and the sum of the current moment and the remaining hard disk life is used as the hard disk life expiration time of the target solid-state hard disk.
[0095] In this embodiment, if the current hard disk wear rate DWPD_CONSUMPTION is less than the preset wear rate threshold of 100, it indicates that the target solid state hard disk has not yet reached the failure time, and the remaining hard disk life of the target solid state hard disk needs to be determined according to the current hard disk wear rate DWPD_CONSUMPTION, the life consumption time ave_gap per percentage, and the preset time base 86400. The formula for calculating the remaining hard disk life using the above parameters is as follows:
[0096] Remaining life = (100-DWPD_SONSUMPTION) * ave_gap * 86400;
[0097] It should be noted that the calculated remaining life of the hard disk is the estimated remaining time of the hard disk, so it is necessary to add the remaining life of the hard disk to the time of collecting the current target data, that is, the hard disk life expiration time of the target solid-state hard disk, so the hard disk life expiration time predict_failure_time of the solid-state hard disk is the sum of the current time in the current target data and the remaining time of the hard disk, that is, predict_failure_time=current_time+remaining life of the hard disk. It should be noted that if the calculated per-percent life consumption time ave_gap value is 0 or the value of the current hard disk wear rate DWPD_CONSUMPTION is an invalid value, the remaining life of the hard disk predict_failure_time is directly set to 0. It should be further noted that after calculating the remaining life of the hard disk predict_failure_time, when the user requests the information of the solid-state hard disk, the remaining life of the hard disk predict_failure_time can be spliced into the target format and returned to the user, and the user can reasonably arrange the hard disk replacement process according to the predicted time. The target format is YY-MM_DD, where YY is the last two digits of the year, MM is the month, and DD is the day, which means the last two digits of the year and a specific day are displayed. Furthermore, the remaining life of the hard disk is displayed as empty by default. When the state of the target disk changes, from the use state to other states, such as the unused state, the data of predict_failure_time will be cleared and the field will be displayed as empty. After the target solid state disk is converted to the use state again, the life prediction will be restarted, and the interface will display the refreshed hard disk life expiration time predict_failure_time.
[0098] Step S25, determining the hard disk wear condition according to the updated array and the life consumption time per percentage, and determining whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
[0099] It should be noted that for a more detailed description of step S21, step S22 and step S25, reference can be made to the aforementioned embodiments, which will not be repeated here.
[0100] It can be seen that in this embodiment, the current hard disk wear rate needs to be compared with the preset wear rate threshold, and the hard disk life expiration time of the solid-state hard disk is determined based on the comparison result. In one case, if the current hard disk wear rate is greater than or equal to the preset wear rate threshold, the current moment recorded in the current target data is used as the hard disk life expiration time of the target solid-state hard disk. In another case, if the current hard disk wear rate is less than the preset wear rate threshold, the remaining hard disk life of the target solid-state hard disk is determined based on the current hard disk wear rate, the life consumption time per percentage, and the preset time base, and the sum of the current moment and the remaining hard disk life is used as the hard disk life expiration time of the target solid-state hard disk. In this way, the hard disk life expiration time of the solid-state hard disk can be inferred only by the collected hard disk data of the solid-state hard disk, avoiding the prediction of the hard disk life through the model. Compared with the method of predicting the hard disk life through the model, it effectively saves computing resources.
[0101] Based on the above embodiments, it can be known that through the method of the present application, it is possible to determine whether to perform a hard disk warning according to the hard disk wear and the hard disk life expiration time. To this end, this embodiment provides a detailed description of the hard disk warning. Figure 5 As shown, the embodiment of the present application discloses a method for predicting the life of a solid state drive, including:
[0102] Step S31, determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect the current target data related to the current wear condition of the target solid-state hard disk through the data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located.
[0103] Step S32, calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the updated array; the target array is an array used to record the hard disk usage change information.
[0104] Step S33: determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold through the current target data; if it does not reach the preset wear rate threshold, calculate the hard disk life expiration time of the target solid state hard disk based on the current target data and the life consumption time per percentage.
[0105] Step S34: determine whether the effective array length of the updated array is greater than a preset array length threshold.
[0106] In this embodiment, when the hard disk alarm is issued, there are two scenarios, the first scenario is the usage alarm, and the second scenario is the hard disk life alarm. In the usage alarm scenario, there are two scenarios, one is the scenario where the array effective length of the updated array is greater than the preset array length threshold, and the other is the scenario where the array effective length of the updated array is not greater than the preset array length threshold. Therefore, it is necessary to compare the array effective length of the updated array and the preset array length threshold to determine which scenario it belongs to when the usage alarm of the solid state hard disk is issued.
[0107] Step S35: If the effective length of the array is not greater than the preset array length threshold, determine whether the total effective value is greater than the preset target threshold; if the total effective value is less than the preset target threshold, issue a hard disk usage exceeding standard warning.
[0108] In this embodiment, if the effective length of the array after the update is not greater than the preset array length threshold, which is 8 in this embodiment, that is, the number of hard disk wear rate changes is less than 8 times, then it is necessary to calculate the effective value sum of the effective data in the array, that is, the cal_sum value. If the effective value sum cal_sum is greater than the preset target threshold of 160 days, it indicates that the utilization rate of the solid-state hard disk is normal and no utilization rate warning is required. If the effective value sum cal_sum is less than or equal to the preset target threshold of 160 days, it indicates that the utilization rate of the solid-state hard disk is too high and a hard disk utilization rate exceeding standard warning is required.
[0109] Step S36: If the effective length of the array is greater than the preset array length threshold, determine whether the per-percentage life consumption time is greater than a third preset interval threshold.
[0110] In this embodiment, if the effective array length of the new array is greater than the preset array length threshold, that is, the hard disk wear rate changes more than 8 times, it is necessary to compare whether the ave_gap consumed time per percentage of life is greater than the third preset interval threshold to determine whether to issue a hard disk warning based on the comparison results.
[0111] Step S37: If the per-percent life consumption time is not greater than the third preset interval threshold, a hard disk usage excess warning is issued; if the per-percent life consumption time is greater than the third preset interval threshold and not greater than the fourth preset interval threshold, a hard disk usage abnormality warning is issued; the third preset interval threshold is less than the fourth preset interval threshold.
[0112] In this embodiment, if the per-percent life consumption time ave_gap is not greater than the third preset interval threshold, in this embodiment, the third preset interval threshold is 16 days, it indicates that the hard disk usage is too high, and the life of the solid-state hard disk is reduced by 1% every 16 days on average, so it is necessary to issue an alarm for excessive hard disk usage. If the per-percent life consumption time ave_gap is greater than the third preset interval threshold but not greater than the fourth preset interval threshold, in this embodiment, the fourth preset interval threshold is 20 days, it indicates that the hard disk usage is relatively high, and the life of the solid-state hard disk is reduced by 1% every 16 to 20 days on average, and an abnormal hard disk usage alarm is required. If the per-percent life consumption time ave_gap is greater than the fourth preset interval threshold, it indicates that the hard disk is in normal use, and no hard disk alarm is required.
[0113] Step S38, determining whether the hard disk life expiration time exceeds the preset hard disk service life, if the hard disk life expiration time exceeds the preset hard disk service life, issuing a hard disk service life warning.
[0114] In this embodiment, it is necessary to determine whether the hard disk life expiration time predict_failure_time exceeds the preset hard disk service life. If the calculated hard disk life expiration time predict_failure_time is already greater than the preset hard disk service life, it indicates that continued use of the hard disk may cause hard disk damage, resulting in data loss or equipment failure, so a hard disk life warning is required.
[0115] It should be noted that when performing a hard disk warning, several different methods can be combined for warning. In the first specific implementation scenario, the corresponding audio can be played to remind the user of the hard disk abnormality while performing a hard disk usage warning and a hard disk service life warning. Specifically, when the array effective length of the updated array is not greater than the preset array length threshold, a first usage abnormality reminder audio corresponding to the situation where the sum of effective values is greater than the preset target threshold can be set. If the sum of effective values is greater than the preset target threshold, the first usage abnormality reminder audio is played while performing a hard disk usage over-standard warning; when the array effective length of the updated array is greater than the preset array length threshold, a second usage abnormality reminder audio corresponding to the situation where the life consumption time per percentage is not greater than the third preset interval threshold can be set, and a third usage abnormality reminder audio corresponding to the situation where the life consumption time per percentage is greater than the third preset interval threshold but not greater than the fourth preset interval threshold can be set, so that when the hard disk warning is performed accordingly, the second usage abnormality reminder audio and the third usage abnormality reminder audio are played at the same time. Further, when a hard disk service life warning is required, a fourth usage abnormality reminder audio corresponding to the situation where the hard disk life expiration time exceeds the preset hard disk service life can be set. It should be noted that the first abnormal usage reminder audio, the second abnormal usage reminder audio, the third abnormal usage reminder audio and the fourth abnormal usage reminder audio are different. In this way, after hearing the abnormal reminder audio, the user can directly judge the abnormal usage of the hard disk based on the audio heard.
[0116] In another specific implementation scenario, there may be a situation where the device needs to continue to run, but the user cannot receive abnormal reminders in time. In this case, a list of abnormal reminders can be set in advance, and the abnormal reminder emails corresponding to the abnormal reminder list can be saved. When any hard disk warning is carried out, an abnormal reminder email can be generated and sent to the abnormal reminder email saved in the abnormal reminder list, so that the user can be aware of the abnormal hard disk usage in time.
[0117] See also Figure 6 As shown, the embodiment of the present application discloses a solid state drive life prediction device, which is applied to a cluster system manager of a storage system cluster, including:
[0118] The data acquisition module 11 is used to determine the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect the current target data related to the current wear condition of the target solid-state hard disk through the data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located;
[0119] The data calculation module 12 is used to calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state hard disk through the obtained updated array; the target array is an array used to record the hard disk usage change information;
[0120] The life prediction module 13 is used to determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold value through the current target data, and if it does not reach the preset wear rate threshold value, calculate the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage;
[0121] The hard disk warning module 14 is used to determine the hard disk wear condition according to the updated array and the life consumption time per percentage, and determine whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
[0122] In the present application, it is necessary to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect the current target data related to the current wear condition of the target solid-state hard disk through the data collection tool pre-configured in the storage node where the target solid-state hard disk is located; then calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid-state hard disk through the updated array obtained; the target array is an array for recording hard disk usage change information; and determine whether the wear rate of the target solid-state hard disk reaches a preset wear rate threshold through the current target data, if the preset wear rate threshold is not reached, calculate the hard disk life expiration time of the target solid-state hard disk according to the current target data and the life consumption time per percentage; finally, determine the hard disk wear condition according to the updated array and the life consumption time per percentage, and determine whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time. It can be seen that, through the method of the present application, it is necessary to determine the current target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the inspection task, so as to collect the current target data of the target solid-state hard disk through the data collection tool, and then calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the target solid-state hard disk through the updated array, and then calculate the hard disk life expiration time of the target solid-state hard disk according to the current target data and the life consumption time per percentage when the wear rate of the target solid-state hard disk does not reach the preset wear rate threshold. In this way, on the one hand, only by collecting the data of the target solid-state hard disk, the hard disk life expiration time of the target solid-state hard disk can be calculated, which realizes the lightweight prediction of the hard disk life, and avoids the problem of using a model for prediction and occupying a large amount of storage resources and computing power resources; on the other hand, by collecting the data of the target solid-state hard disk, only the service life of the target solid-state hard disk can be predicted, which avoids the problem of other solid-state hard disk data or mechanical hard disk data appearing in the collected data, and ensures the accuracy of the hard disk prediction.
[0123] In some embodiments, the data acquisition module 11 may specifically include:
[0124] A hard disk inspection unit, used to trigger a hard disk inspection task based on a preset timer, so as to determine a target solid-state hard disk to be inspected from each storage node of the storage system cluster based on the hard disk inspection task;
[0125] A data acquisition unit, configured to acquire hard disk data of the target solid state hard disk through a data acquisition tool pre-configured in a storage node where the target solid state hard disk is located;
[0126] The data interception unit is used to intercept current target data related to the current wear condition of the target solid state hard disk from the hard disk data.
[0127] In some embodiments, the solid state drive life prediction device may further include:
[0128] a wear rate determination unit, configured to read the current hard disk wear rate in the current target data, and read the previous hard disk wear rate from the historical target data;
[0129] a wear rate change calculation unit, used to calculate the difference between the current hard disk wear rate and the previous hard disk wear rate to obtain a wear rate change value;
[0130] The prediction judgment unit is used to jump to the step of calculating the time interval of the hard disk usage change based on the current target data if the wear rate change value is greater than the preset wear rate change threshold, and stop the solid state hard disk life prediction if the wear rate change value is not greater than the preset wear rate change threshold.
[0131] In some embodiments, the data calculation module 12 may specifically include:
[0132] A time determination unit, used to obtain the current time recorded in the current target data and the historical time corresponding to the last time the hard disk wear rate changed;
[0133] A first time interval determination unit, configured to determine a first target time interval between the current moment and the historical moment;
[0134] an interval determination unit, configured to determine whether the first target time interval is zero, and to stop the life prediction of the solid state drive if the first target time interval is zero;
[0135] a second time interval determining unit, configured to use a ratio of the first target time interval and a preset time base as a second target time interval if the first target time interval is not zero;
[0136] a time interval comparison unit, configured to compare the second target time interval with a first preset interval threshold and a second preset interval threshold; the first preset interval threshold being smaller than the second preset interval threshold;
[0137] a first interval assignment unit, configured to use the first preset interval threshold as the time interval for the hard disk usage rate change if the second target time interval is smaller than the first preset interval threshold;
[0138] a second interval assignment unit, configured to use the second target time interval as the time interval for changing the hard disk usage rate if the second target time interval is not less than the first preset interval threshold and not greater than the second preset interval threshold;
[0139] The third interval assignment unit is configured to use the second preset interval threshold as the time interval for the hard disk usage change if the second target time interval is greater than the second preset interval threshold.
[0140] In some embodiments, the data calculation module 12 may specifically include:
[0141] An array updating unit, used to determine the current data insertion index from the current target data, and update the time interval of the hard disk usage change to the position corresponding to the current data insertion index in the target array to obtain an updated array;
[0142] An effective value sum calculation unit, used for traversing the updated array to determine the number of effective values of target values in the updated array and the sum of effective values of each target value; the target value is the time interval of the hard disk usage change in the updated array;
[0143] A first data assignment unit, configured to assign a value of zero to each percentage life consumption time of the target solid state drive if the number of valid values is zero;
[0144] The second data assignment unit is used to use the ratio of the total effective value to the number of effective values as the life consumption time per percentage of the target solid state drive if the number of effective values is not zero.
[0145] In some embodiments, the life prediction module 13 may specifically include:
[0146] A first life prediction unit, used to determine whether the current hard disk wear rate is greater than or equal to a preset wear rate threshold, and if the current hard disk wear rate is greater than or equal to the preset wear rate threshold, use the current time recorded in the current target data as the hard disk life expiration time of the target solid state drive;
[0147] The second life prediction unit is used to determine the remaining hard disk life of the target solid-state hard disk based on the current hard disk wear rate, the per percentage life consumption time and the preset time base if the current hard disk wear rate is less than the preset wear rate threshold, and use the sum of the current moment and the remaining hard disk life as the hard disk life expiration time of the target solid-state hard disk.
[0148] In some embodiments, the hard disk warning module 14 may specifically include:
[0149] A first array length comparison unit, used to determine whether the effective array length of the updated array is greater than a preset array length threshold;
[0150] A first warning unit is used to determine whether the sum of the effective values is greater than a preset target threshold if the effective length of the array is not greater than the preset array length threshold, and to issue a warning of a hard disk usage exceeding the standard if the sum of the effective values is less than the preset target threshold;
[0151] A second array length comparison unit is used to determine whether the time interval of the rate change is greater than a third preset interval threshold;
[0152] A second warning unit is configured to issue a hard disk usage over-limit warning if the per-percent life consumption time is not greater than the third preset interval threshold; and issue a hard disk usage abnormality warning if the per-percent life consumption time is greater than the third preset interval threshold and not greater than the fourth preset interval threshold; and the third preset interval threshold is less than the fourth preset interval threshold;
[0153] The third warning unit is used to determine whether the hard disk life expiration time exceeds the preset hard disk service life, and if the hard disk life expiration time exceeds the preset hard disk service life, a hard disk service life warning is issued.
[0154] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the solid state drive life prediction method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0155] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0156] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0157] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the solid state drive life prediction method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0158] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the solid-state hard disk life prediction method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0159] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0160] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0161] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0162] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0163] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for predicting the life of a solid state drive, characterized in that: A cluster system manager for a storage system cluster, including: Determine the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect current target data related to the current wear condition of the target solid-state hard disk through a data collection tool pre-configured in the storage node where the target solid-state hard disk is located; Calculating the time interval of the hard disk usage change based on the current target data, and updating the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array; the target array is an array used to record the hard disk usage change information; Determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold value through the current target data; if the preset wear rate threshold value is not reached, calculate the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage; The hard disk wear condition is determined according to the updated array and the life consumption time per percentage, and whether to issue a hard disk warning is determined according to the hard disk wear condition and the hard disk life expiration time.
2. The solid state drive life prediction method according to claim 1, characterized in that: The step of determining the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collecting current target data related to the current wear condition of the target solid-state hard disk through a data collection tool pre-configured in the storage node where the target solid-state hard disk is located, includes: Based on a preset timer, a hard disk inspection task is triggered regularly, so as to determine a target solid-state hard disk to be inspected from each storage node of the storage system cluster based on the hard disk inspection task; Collecting hard disk data of the target solid state hard disk through a data collection tool pre-configured in the storage node where the target solid state hard disk is located; Current target data related to the current wear condition of the target solid state hard disk is intercepted from the hard disk data.
3. The solid state drive life prediction method according to claim 1 or 2, characterized in that: Before calculating the time interval of the hard disk usage change based on the current target data and updating the target array according to the time interval of the hard disk usage change to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array, the method further includes: Reading the current hard disk wear rate in the current target data, and reading the previous hard disk wear rate from the historical target data; Calculating the difference between the current hard disk wear rate and the previous hard disk wear rate to obtain a wear rate change value; If the wear rate change value is greater than the preset wear rate change threshold, jump to the step of calculating the time interval of the hard disk usage change based on the current target data; if the wear rate change value is not greater than the preset wear rate change threshold, stop the solid state drive life prediction.
4. The solid state drive life prediction method according to claim 3, characterized in that: The calculating the time interval of the hard disk usage change based on the current target data includes: Obtaining the current time recorded in the current target data and the historical time corresponding to the last time the hard disk wear rate changed; determining a first target time interval between the current moment and the historical moment; Determining whether the first target time interval is zero, and stopping the solid state drive life prediction if the first target time interval is zero; If the first target time interval is not zero, taking the ratio of the first target time interval and the preset time base as the second target time interval; Comparing the second target time interval with a first preset interval threshold and a second preset interval threshold; the first preset interval threshold is less than the second preset interval threshold; If the second target time interval is smaller than the first preset interval threshold, the first preset interval threshold is used as the time interval for the hard disk usage rate change; If the second target time interval is not less than the first preset interval threshold and not greater than the second preset interval threshold, the second target time interval is used as the time interval for the hard disk usage change; If the second target time interval is greater than the second preset interval threshold, the second preset interval threshold is used as the time interval for the hard disk usage change.
5. The solid state drive life prediction method according to claim 4, characterized in that: The updating of the target array according to the time interval of the change of the hard disk usage rate, so as to calculate the life consumption time per percentage of the target solid state hard disk through the obtained updated array, comprises: Determine the current data insertion index from the current target data, and update the time interval of the hard disk usage change to the position corresponding to the current data insertion index in the target array to obtain an updated array; Traversing the updated array to determine the number of valid values of the target values in the updated array and the sum of the valid values of each target value; the target value is the time interval of the hard disk usage change in the updated array; If the number of valid values is zero, assigning each percentage life consumption time of the target solid state drive to zero; If the number of valid values is not zero, the ratio of the total of the valid values to the number of valid values is used as the life consumption time per percentage of the target solid state drive.
6. The method for predicting the life of a solid state drive according to claim 5, characterized in that: The determining whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold value by using the current target data, and if the preset wear rate threshold value is not reached, calculating the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage, includes: Determine whether the current hard disk wear rate is greater than or equal to a preset wear rate threshold, and if the current hard disk wear rate is greater than or equal to the preset wear rate threshold, use the current time recorded in the current target data as the hard disk life expiration time of the target solid state drive; If the current hard disk wear rate is less than the preset wear rate threshold, the remaining hard disk life of the target solid-state hard disk is determined based on the current hard disk wear rate, the per percentage life consumption time and the preset time base, and the sum of the current moment and the remaining hard disk life is used as the hard disk life expiration time of the target solid-state hard disk.
7. The method for predicting the life of a solid state drive according to claim 5, characterized in that: The determining of the hard disk wear condition according to the updated array and the life consumption time per percentage, and determining whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time, includes: Determine whether the effective array length of the updated array is greater than a preset array length threshold; If the effective length of the array is not greater than the preset array length threshold, then determine whether the sum of the effective values is greater than the preset target threshold; if the sum of the effective values is less than the preset target threshold, issue a hard disk usage exceeding standard warning; If the effective length of the array is greater than the preset array length threshold, determining whether the per-percentage life consumption time is greater than a third preset interval threshold; If the per-percent life consumption time is not greater than the third preset interval threshold, a hard disk usage over-limit warning is issued; if the per-percent life consumption time is greater than the third preset interval threshold and not greater than the fourth preset interval threshold, a hard disk usage abnormality warning is issued; the third preset interval threshold is less than the fourth preset interval threshold; It is determined whether the hard disk life expiration time exceeds the preset hard disk service life. If the hard disk life expiration time exceeds the preset hard disk service life, a hard disk service life warning is issued.
8. A solid state hard disk life prediction device, characterized in that: A cluster system manager for a storage system cluster, including: A data acquisition module, used to determine the target solid-state hard disk to be inspected from each storage node of the storage system cluster according to the hard disk inspection task, and collect current target data related to the current wear condition of the target solid-state hard disk through a data acquisition tool pre-configured in the storage node where the target solid-state hard disk is located; A data calculation module, used to calculate the time interval of the hard disk usage change based on the current target data, and update the target array according to the time interval of the hard disk usage change, so as to calculate the life consumption time per percentage of the target solid state drive through the obtained updated array; the target array is an array used to record the hard disk usage change information; A life prediction module, used to determine whether the wear rate of the target solid state hard disk reaches a preset wear rate threshold through the current target data, and if it does not reach the preset wear rate threshold, calculate the hard disk life expiration time of the target solid state hard disk according to the current target data and the life consumption time per percentage; The hard disk warning module is used to determine the hard disk wear condition according to the updated array and the life consumption time per percentage, and determine whether to issue a hard disk warning according to the hard disk wear condition and the hard disk life expiration time.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the solid state drive life prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the solid state drive life prediction method as described in any one of claims 1 to 7.
Citation Information
Cited By
Storage equipment reliability prediction method and device, equipment and storage medium
CN119718826A
Storage device reliability prediction method, device, equipment and storage medium
CN119718826B
