Method and device for detecting life consumption of mechanical hard disk
By periodically monitoring the temperature, vibration amplitude, and ECC information of mechanical hard drives, the degree of lifespan degradation can be determined, thus solving the problem of shortened mechanical hard drive lifespan, enabling timely detection and preventive operation, and avoiding economic losses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR BUSINESS MACHINE CO LTD
- Filing Date
- 2022-05-24
- Publication Date
- 2026-06-23
AI Technical Summary
Mechanical hard drives may experience shortened lifespans due to factors such as high temperatures, physical impacts, or logical errors during use, leading to problems such as task interruptions and data loss. Current technologies struggle to detect and prevent these issues in a timely manner.
By periodically acquiring the temperature value, disk vibration amplitude, and ECC information of the hard drive, the degree of lifespan loss is determined, and a new current lifespan is calculated based on the current lifespan and the degree of loss, and corresponding operations are performed in a timely manner.
It enables accurate detection of the lifespan of mechanical hard drives, avoiding problems such as task interruption and data loss due to low lifespan, and reducing economic losses.
Smart Images

Figure CN114936004B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hard disk drive (HDD) lifespan testing, and in particular to a method and apparatus for testing the lifespan loss of HDDs. Background Technology
[0002] During operation, mechanical hard drives (HDDs) can experience various unexpected situations that affect their lifespan. For example, prolonged operation in high-temperature environments, sudden physical impacts, internal logical errors, or the development of bad sectors can all accelerate the deterioration of an HDD's lifespan. If the current lifespan of an HDD cannot be determined, when its lifespan is too low, it can easily lead to slow or interrupted task execution, system crashes or freezes, and even data loss, resulting in financial losses. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for detecting the lifespan of a mechanical hard drive, which can periodically determine the current lifespan of the mechanical hard drive so as to perform corresponding operations in a timely manner according to the lifespan of the mechanical hard drive, thereby avoiding various situations caused by the low lifespan of the mechanical hard drive and thus avoiding economic losses.
[0004] To address the aforementioned technical problems, this invention provides a method for detecting the lifespan degradation of a hard disk drive, comprising:
[0005] Obtain information on the impact of mechanical hard disk on lifespan in the current cycle. The lifespan impact information includes one or more of the following: the temperature value of the mechanical hard disk, the vibration amplitude of the platters in the mechanical hard disk, and the ECC information generated by the mechanical hard disk.
[0006] The degree of lifespan degradation of the hard disk drive in the current cycle is determined based on the lifespan impact information.
[0007] The new current lifespan of the hard drive is determined based on the degree of lifespan degradation of the hard drive during the current period and the current lifespan of the hard drive.
[0008] Preferably, when the lifespan impact information includes the temperature value, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0009] S21: Take the start time of the current period as the current time;
[0010] S22: Determine whether the current time is the end time of the current cycle; if yes, proceed to the step of determining the new current lifespan of the hard disk based on the degree of lifespan wear of the hard disk in the current cycle and the current lifespan of the hard disk; if no, proceed to S23.
[0011] S23: Obtain the temperature value of the hard disk drive at the current moment;
[0012] S24: Determine whether the current temperature value is greater than the preset temperature value; if yes, proceed to S25; if no, proceed to S27.
[0013] S25: Increase the overheating time of the mechanical hard drive by a first preset duration, and proceed to S26;
[0014] S26: Determine whether the overheating time is greater than a first preset time threshold; if yes, increase the lifespan wear of the mechanical hard drive in the current cycle by a first preset value and proceed to S27; if no, proceed to S28.
[0015] S27: Reset the overheating time to zero and proceed to S28;
[0016] S28: Take the time point after the first preset duration from the current time as the new current time, and return to S22;
[0017] Wherein, the duration of the current period is N times the first preset duration, and N is an integer not less than 2.
[0018] Preferably, when the lifespan impact information includes the vibration amplitude, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0019] S31: Take the start time of the current period as the current time;
[0020] S32: Determine whether the current time is the end time of the current cycle; if yes, proceed to the step of determining the new current lifespan of the hard disk based on the degree of lifespan wear of the hard disk in the current cycle and the current lifespan of the hard disk; if no, proceed to S33.
[0021] S33: Obtain the vibration amplitude of the disk platter in the hard disk at the current moment;
[0022] S34: Determine whether the vibration amplitude at the current moment is greater than the preset amplitude; if yes, proceed to S35; if no, proceed to S37.
[0023] S35: Increase the impact time of the mechanical hard drive by a second preset duration, and proceed to S36;
[0024] S36: Determine whether the impact time has reached the second preset time threshold; if yes, increase the lifespan wear of the mechanical hard disk in the current cycle by the second preset value, and proceed to S37; if no, proceed to S38.
[0025] S37: Reset the impact time to zero and proceed to S38;
[0026] S38: Take the time point after the second preset duration from the current time as the new current time, and return to S32;
[0027] Wherein, the duration of the current period is M times the second preset duration, and M is an integer not less than 2.
[0028] Preferably, when the lifespan impact information includes ECC information generated by the hard disk drive, determining the degree of lifespan degradation of the hard disk drive in the current period based on the lifespan impact information includes:
[0029] When the hard disk generates any ECC, obtain the generation time and disappearance time of the ECC;
[0030] For any of the ECCs, determine whether the time difference between the disappearance time and the generation time of the ECC is greater than a preset time difference;
[0031] If the time difference is greater than a preset time difference, the lifespan degradation of the hard disk in the current cycle will be increased by a third preset value.
[0032] Preferably, when the lifespan impact information includes ECC information generated by the hard disk drive, determining the degree of lifespan degradation of the hard disk drive in the current period based on the lifespan impact information includes:
[0033] When the hard disk generates any ECC, the number of times the ECC is generated in the current cycle is determined;
[0034] Determine whether the number of generation attempts is greater than the preset number of generation attempts;
[0035] If the number of generation times exceeds the preset number, the lifespan degradation of the hard disk in the current cycle will be increased by a fourth preset value.
[0036] Preferably, when the lifespan impact information includes the vibration amplitude, obtaining the lifespan impact information of the hard disk in the current cycle includes:
[0037] The acceleration value in the non-rotational direction experienced by the disk platter in the mechanical hard disk during the current cycle is obtained as the vibration amplitude.
[0038] Preferably, after determining the new current lifespan of the hard drive based on its lifespan degradation during the current period and its current lifespan, the method further includes:
[0039] Determine whether the current lifespan of the hard drive is less than a preset lifespan value;
[0040] If so, an alarm message will be issued.
[0041] Preferably, information on the impact of mechanical hard drive lifespan on the current cycle is obtained, including:
[0042] The system acquires information on the lifespan impact of the mechanical hard drive in the current cycle, collected by the preset parameter storage and processing module.
[0043] Preferably, determining the new current lifespan of the hard disk drive based on its lifespan degradation during the current period and its current lifespan includes:
[0044] The absolute value of the difference between the current lifespan of the hard drive and the value of the degree of lifespan deterioration is taken as the new current lifespan of the hard drive.
[0045] This application also provides a device for detecting the lifespan loss of a hard disk drive, comprising:
[0046] Memory, used to store computer programs;
[0047] A processor is used to execute the computer program to implement the steps of the mechanical hard disk lifespan wear detection method described above.
[0048] This invention provides a method and apparatus for detecting the lifespan loss of a hard disk drive (HDD), relating to the field of HDD lifespan detection. First, it acquires lifespan impact information of the HDD within the current cycle. This information includes one or more of the following: the HDD's temperature value, the vibration amplitude of the platters, and ECC information generated by the HDD. Based on the relationship between this lifespan impact information and lifespan loss, the degree of lifespan loss corresponding to each lifespan impact information is determined. Finally, based on the degree of lifespan loss of the HDD in the current cycle and the HDD's current lifespan, the new current lifespan of the HDD is determined. Based on this, the current lifespan of the HDD can be periodically determined, allowing for timely execution of corresponding operations based on the HDD's lifespan status, avoiding various situations caused by excessively low HDD lifespan, and thus preventing economic losses. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A flowchart of a lifespan wear detection method for a mechanical hard disk provided in this application;
[0051] Figure 2 A schematic diagram of a testing environment provided for this application;
[0052] Figure 3 A flowchart of another method for detecting the lifespan loss of a mechanical hard drive provided in this application;
[0053] Figure 4 This is a schematic diagram of a mechanical hard drive lifespan loss detection device provided in this application. Detailed Implementation
[0054] The core of this invention is to provide a method and apparatus for detecting the lifespan of a mechanical hard drive, which can periodically determine the current lifespan of the mechanical hard drive so as to perform corresponding operations in a timely manner according to the lifespan of the mechanical hard drive, thereby avoiding various situations caused by the low lifespan of the mechanical hard drive and thus avoiding economic losses.
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Please refer to Figure 1 , Figure 1 A flowchart of a method for detecting the lifespan loss of a hard disk drive provided in this application includes:
[0057] S1: Obtain information on the lifespan impact of the hard drive in the current cycle. The lifespan impact information includes one or more of the following: the temperature value of the hard drive, the vibration amplitude of the platters in the hard drive, and the ECC information generated by the hard drive.
[0058] S2: Determine the degree of lifespan degradation of the hard drive within the current cycle based on lifespan impact information;
[0059] S3: Determine the new current lifespan of the hard drive based on the degree of wear and tear during the current cycle and the current lifespan of the hard drive.
[0060] A hard disk drive (HDD) contains components such as platters, a spindle, a motor, and read / write heads. When an HDD is working, the motor drives the spindle to rotate, causing the platters to rotate as well. The read / write heads contact the platters, allowing the computer to read data from the HDD, similar to how a record player plays music. When an HDD's lifespan is low, various physical structural problems may occur, such as: head breakage, contamination, resonance, and loose connections; motor or spindle failure, bearing wear, excessive derailment, and failure to rotate normally; platter scratches or defects; and internal circuitry or chip malfunctions, short circuits, and solder joint failures. Because the function of an HDD is based on its physical structure, problems with this structure can lead to various adverse effects, such as slow data read / write speeds, abnormal task interruptions, computer crashes, or data loss.
[0061] To promptly determine the lifespan of a hard disk drive (HDD) and avoid economic losses due to prematurely shortened lifespan, this application addresses the issue of heat generation during contact between the read / write head and the high-speed rotating platters. An abnormally high temperature indicates a problem with the motor or spindle. Overheating can impair data access speed and, with prolonged overheating, may lead to motor failure or spindle loosening, accelerating the HDD's lifespan. Therefore, the HDD's temperature can be used to determine its lifespan. Furthermore, if the HDD experiences a physical impact during contact with the rotating platters (e.g., dropping from the drive rack), the head may suddenly move in the non-rotating direction of the platters, potentially causing damage or head deformation. This impact can also loosen components. Thus, the vibration amplitude of the platters can also be used to determine the HDD's lifespan. Finally, if the HDD experiences a logical error and generates an ECC (Error Correcting Code) during operation due to internal firmware or circuit malfunctions, further investigation is needed. Error Check Code (ECC) is a logical error that a mechanical hard drive's own processor can usually handle. However, when a mechanical hard drive is in an abnormal state, it may produce difficult-to-handle logical errors or a large number of logical errors. Therefore, the degree of wear and tear on a mechanical hard drive can be determined by factors such as the number of ECCs generated within a certain period of time, the number of times an ECC occurs repeatedly, and the efficiency of the mechanical hard drive's processor in handling ECCs.
[0062] Furthermore, the impact of various lifespan-related factors on the degree of hard drive wear can be predetermined. Through analysis of external stress and hard drive failure modes, it's possible to identify which parameters affect the degree of hard drive wear, such as temperature, vibration amplitude, and ECC. Please refer to [the relevant guidelines] when conducting tests. Figure 2 , Figure 2 This application provides a schematic diagram of a test environment. The hard disk drive (HDD) can be placed in a server within a 40°C constant-temperature test chamber to simulate the ambient temperature of the HDD in a real-world working environment. The server is connected to external devices such as a computer, power supply, keyboard, and mouse. These external devices are used to operate the server's cooling fan at full speed, and the HDD operates at full power and load to simulate the HDD's working state in a real-world environment. A noise simulation source is set up in the constant-temperature test chamber to simulate the vibration effects experienced by the HDD in a real-world working environment. Based on this test environment, multiple HDDs with 100% lifespan are tested continuously until irreversible hardware damage occurs. That is, brand-new HDDs are continuously tested until they are completely damaged. This allows for the determination of the impact of various lifespan-related factors on the degree of lifespan degradation of the HDD. Please refer to [reference needed]. Figure 3 , Figure 3 The flowchart of another method for detecting the lifespan loss of a mechanical hard drive provided in this application is as follows: the accelerated test is the test in which a brand-new mechanical hard drive is continuously tested until it is completely damaged. Based on the actual wear and tear of the mechanical hard drive during the test, a lifespan loss model can be determined. After conducting tests to determine the algorithm that includes the influence of various lifespan impact information on the degree of lifespan loss of the mechanical hard drive, the algorithm is built into the processor for practical use.
[0063] For example, if a hard disk drive (HDD) remains operational throughout the current cycle, and its temperature remains excessively high for 24 hours, its lifespan is estimated to be 3% degraded. If the vibration amplitude of the HDD platters exceeds a predetermined number of times, equivalent to the HDD experiencing a predetermined number of physical impacts, its lifespan is estimated to be 5% degraded. If ECC occurs in the HDD and the processor takes 48 hours to process it, its lifespan is estimated to be 2% degraded. Based on the lifespan degraded values corresponding to each lifespan impact within the current cycle, and the HDD's current lifespan, its new current lifespan can be determined.
[0064] In summary, the first step is to obtain information on the lifespan impact of the hard drive within the current cycle. This information includes one or more of the following: the hard drive's temperature, the vibration amplitude of the platters, and the ECC information generated by the hard drive. Based on the relationship between these lifespan impact information and lifespan degradation, the degree of lifespan degradation corresponding to each lifespan impact information is determined. Finally, based on the degree of lifespan degradation of the hard drive in the current cycle and the current lifespan of the hard drive, the new current lifespan of the hard drive is determined. Based on this, the current lifespan of the hard drive can be determined periodically, so that corresponding operations can be performed in a timely manner according to the lifespan of the hard drive, avoiding various situations caused by the low lifespan of the hard drive, and thus avoiding economic losses.
[0065] Based on the above embodiments:
[0066] As a preferred embodiment, when the lifespan impact information includes temperature values, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0067] S21: Take the start time of the current period as the current time;
[0068] S22: Determine whether the current moment is the end of the current cycle; if yes, proceed to the step of determining the new current lifespan of the hard drive based on the degree of lifespan wear and tear of the hard drive in the current cycle and the current lifespan of the hard drive; if no, proceed to S23.
[0069] S23: Obtain the temperature value of the hard disk drive at the current moment;
[0070] S24: Determine whether the current temperature value is greater than the preset temperature value; if yes, proceed to S25; if no, proceed to S27.
[0071] S25: Increase the overheating time of the mechanical hard drive by the first preset duration, and proceed to S26;
[0072] S26: Determine whether the overheating time is greater than the first preset time threshold; if yes, increase the lifespan wear of the mechanical hard drive in the current cycle by the first preset value and proceed to S27; if no, proceed to S28.
[0073] S27: Reset the overheating time to zero and proceed to S28;
[0074] S28: Take the time point after the first preset duration from the current time as the new current time, and return to S22;
[0075] The duration of the current cycle is N times the first preset duration, where N is an integer not less than 2.
[0076] To determine the impact of hard disk drive (HDD) temperature on its lifespan, this application considers an HDD that continuously reads and writes data during operation. This reading and writing process generates continuous heat, and the presence of a motor and the rotation of the platters also contribute to the heat. Since an HDD is a self-contained, enclosed structure, the internal temperature rises when it heats up. Based on the principle of thermal expansion and contraction, the gas inside the HDD may expand due to the heat, potentially affecting the stability of the platter rotation. Furthermore, overheating can also impact other electronic components. When determining the impact of hard drive temperature on the lifespan of a hard drive within the current cycle, it is considered that a brief period of overheating has little effect on the lifespan of the hard drive. Only prolonged overheating will affect its lifespan. Based on this, the current temperature of the hard drive is continuously monitored. When the current temperature exceeds a preset temperature value, it indicates that the hard drive is overheating at that moment, and the overheating time is recorded. When the overheating time reaches a first preset time threshold, it can be determined that the hard drive has been overheating for a long time, and the lifespan of the hard drive in the current cycle is increased by the first preset value. During the monitoring of the overheating time, if the current temperature of the hard drive is detected to be lower than the preset temperature value, it indicates that the temperature of the hard drive has returned to normal, and the overheating time is reset to zero so that the overheating time can be recalculated the next time the hard drive overheats. For example, with a preset temperature of 70 degrees Celsius and a first preset duration of 1 minute, the current temperature of the hard drive is monitored every 1 minute. If the current temperature exceeds 70 degrees Celsius, the overheating time is increased by 1 minute. Similarly, if the temperature exceeds 70 degrees Celsius in the next cycle, the overheating time is increased by another 1 minute. If the temperature is below 70 degrees Celsius in the next cycle, the overheating time is reset to zero. When the overheating time reaches the first preset time threshold, such as 24 hours, it can be determined that the hard drive has been overheating for an extended period, and the lifespan degradation of the hard drive is increased by the first preset value, for example, by 3%. Therefore, by understanding the relationship between the overheating time and the first preset time threshold, the impact of the hard drive's temperature on its lifespan degradation can be accurately determined.
[0077] As a preferred embodiment, when the lifespan impact information includes vibration amplitude, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0078] S31: Take the start time of the current period as the current time;
[0079] S32: Determine whether the current moment is the end of the current cycle; if yes, proceed to the step of determining the new current lifespan of the hard drive based on the degree of lifespan wear and tear of the hard drive in the current cycle and the current lifespan of the hard drive; if no, proceed to S33.
[0080] S33: Obtain the vibration amplitude of the disk platter in the hard disk at the current moment;
[0081] S34: Determine whether the vibration amplitude at the current moment is greater than the preset amplitude; if yes, proceed to S35; if no, proceed to S37.
[0082] S35: Increase the impact time of the mechanical hard drive by the second preset duration, and proceed to S36;
[0083] S36: Determine whether the impact time has reached the second preset time threshold; if yes, increase the lifespan wear of the mechanical hard drive in the current cycle by the second preset value and proceed to S37; if no, proceed to S38.
[0084] S37: Reset the impact time to zero and proceed to S38;
[0085] S38: Take the time point after the second preset duration from the current time as the new current time, and return to S32;
[0086] Wherein, the duration of the current cycle is M times the second preset duration, where M is an integer not less than 2.
[0087] To determine the impact of platter vibration amplitude on the lifespan of a hard disk drive (HDD), this application considers that a single physical impact has little effect on the lifespan of an HDD. However, multiple consecutive physical impacts, such as those occurring when the HDD's rack is unstable and vibrates continuously, can significantly affect its lifespan. Therefore, the vibration amplitude of the HDD platters is continuously monitored. When the vibration amplitude exceeds a preset value, it indicates a significant physical impact, and the impact time is recorded. When the impact time reaches a second preset threshold, it confirms multiple consecutive physical impacts, and the lifespan of the HDD in the current period is increased by the second preset value. If the vibration amplitude falls below the preset threshold during the impact time monitoring, the impact time is reset to zero so that it can be recalculated the next time the HDD experiences a physical impact. For example, the vibration amplitude of the hard drive is detected at a 10-second interval. If the detected vibration amplitude exceeds a preset amplitude, the impact time is increased by 10 seconds; if the detected vibration amplitude is below the preset amplitude, the impact time is reset to zero. Similarly, this process is repeated for each subsequent cycle. When the impact time reaches a second preset time threshold, such as 10 minutes, it can be determined that the hard drive has undergone multiple consecutive physical impacts, and the lifespan degradation of the hard drive is increased by the second preset value, for example, by 5%. Therefore, by understanding the relationship between the impact time and the second preset time threshold, the impact of the vibration amplitude of the hard drive platters on the lifespan degradation of the hard drive can be accurately determined.
[0088] As a preferred embodiment, when the lifespan impact information includes ECC information generated by the hard disk drive, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0089] When a mechanical hard drive generates any ECC, obtain the time of ECC generation and the time of its disappearance;
[0090] For any ECC, determine whether the time difference between the ECC's disappearance time and its generation time is greater than a preset time difference;
[0091] If the time difference exceeds the preset time difference, the lifespan of the hard drive in the current cycle will be increased by a third preset value.
[0092] To determine the impact of ECCs generated by a hard disk drive (HDD) on its lifespan, this application involves generating a corresponding ECC message when an error occurs in the HDD's operating logic. The HDD's processor can then process this ECC message to mitigate the impact of the error. However, since there are various reasons for HDD operating logic errors, and considering that a lower HDD lifespan increases the likelihood of various problems, if the HDD takes a long time to resolve a particular ECC, it indicates that the low lifespan may be causing the difficult-to-handle ECC or that the processor's performance may be degraded. The lifespan of the HDD is determined based on the relationship between the time difference between the generation and disappearance times of each ECC and a preset time difference. For example, if the preset time difference is 48 hours, and the processor takes 50 hours to resolve a particular ECC, the lifespan of the HDD in the current period is increased by a third preset value, such as 2%. It is evident that by determining whether the time difference between the disappearance and generation time of the ECC generated by the hard drive is greater than the preset time difference, the impact of ECC on the lifespan of the hard drive can be accurately determined.
[0093] As a preferred embodiment, when the lifespan impact information includes ECC information generated by the hard disk drive, determining the degree of lifespan degradation of the hard disk drive within the current cycle based on the lifespan impact information includes:
[0094] When a mechanical hard drive generates any ECC, determine the number of times the ECC is generated in the current cycle;
[0095] Determine if the number of generation attempts exceeds the preset number of generation attempts;
[0096] If the number of generation attempts exceeds the preset number, the lifespan of the hard drive in the current cycle will be increased by a fourth preset value.
[0097] To determine the impact of ECC (Error Correction Code) generated by a hard disk drive (HDD) on its lifespan, this application involves generating an ECC message corresponding to the HDD's operational logic when an error occurs. The HDD's processor processes this ECC message to mitigate the impact of the operational logic error. However, since there are various reasons for operational logic errors in HDDs, and considering that a lower lifespan increases the likelihood of various problems, if a particular ECC message appears multiple times in the current cycle, it indicates that the HDD may have some irreversible physical structural errors due to its low lifespan. For example, when a physical bad sector appears on a platter, an ECC message is generated every time the read / write head passes over it. If the number of times the same ECC message is generated in the current cycle exceeds a preset number, the lifespan degradation of the HDD in the current cycle will be increased by a fourth preset value, such as 2%. Furthermore, for a single ECC message, even if the number of generation exceeds the preset number, regardless of the exact number of generations, the fourth preset value will only be increased once in the current cycle to avoid misjudging the actual lifespan of the HDD due to an excessive number of ECC message generations. As can be seen, by determining the number of times the same ECC occurs, the impact of ECC on the lifespan of a hard drive can be accurately determined.
[0098] As a preferred embodiment, when the lifespan impact information includes vibration amplitude, the lifespan impact information of the hard disk drive in the current cycle is obtained, including:
[0099] The non-rotational acceleration value of the disk platter in the mechanical hard drive during the current cycle is obtained as the vibration amplitude.
[0100] To accurately determine the vibration amplitude experienced by the platters in a hard disk drive (HDD), this application addresses the following: During HDD operation, the platters rotate around their center point. Therefore, under normal operating conditions, the platters possess acceleration and velocity in the rotational direction. Since this acceleration exists regardless of whether the HDD experiences a physical impact, it is unnecessary to determine the vibration amplitude based on this acceleration. When the HDD experiences a physical impact, the platters experience acceleration in other directions. For example, when the HDD is placed flat on a rack, if the rack is unstable and continuously shakes, the platters may experience an acceleration pointing towards or opposite to the center of the platter—that is, acceleration in a non-rotational direction. Since this acceleration is not due to the HDD's own rotation under normal operating conditions but rather originates from external influences, the vibration amplitude experienced by the platters can be accurately determined based on the non-rotational acceleration.
[0101] As a preferred embodiment, after determining the new current lifespan of the hard drive based on its lifespan degradation during the current cycle and its current lifespan, the method further includes:
[0102] Determine if the current lifespan of the hard drive is less than the preset lifespan value;
[0103] If so, an alarm message will be issued.
[0104] To enable users to promptly detect when a mechanical hard drive's lifespan is too low, this application also determines whether the current lifespan of the mechanical hard drive is less than a preset lifespan value. For example, if the preset lifespan value is 10%, and the current lifespan of the mechanical hard drive is less than 10%, an alarm message will be issued to remind the user that the mechanical hard drive's lifespan is too low. This allows the customer to perform preventative maintenance, such as transferring the data from the mechanical hard drive to a new hard drive or replacing the mechanical hard drive with a new one. This can prevent the mechanical hard drive from failing due to its low lifespan and thus affecting the user's data and business.
[0105] As a preferred embodiment, obtaining information on the lifespan impact of the hard disk drive in the current cycle includes:
[0106] The system acquires information on the lifespan impact of mechanical hard drives in the current cycle from the preset parameter storage and processing module.
[0107] To alleviate the computational burden on the processor, this application considers that the processor's need to continuously determine the lifespan of the hard disk drive (HDD) would increase the processor's computational burden and potentially raise its temperature, affecting its operational lifespan. Therefore, an additional preset parameter storage and processing module can be set up. This module acquires information on the lifespan impact of the HDD, allowing the processor to determine the HDD's lifespan based on this information. For example, when the processor is a BMC (Baseboard Management Controller), the preset parameter storage and processing module can also be, but is not limited to, a BMC. When acquiring lifespan impact information, the preset parameter storage and processing module determines the actual temperature of the HDD by acquiring the temperature gradient within the HDD and calculating it over a time period; it determines the vibration amplitude of the HDD platters by acquiring the G-values experienced by the platters and the number of times these G-values are acquired, and calculates it over a time period; and it determines the ECC information by acquiring the number of ECCs, the generation time of each ECC, and the disappearance time of each ECC, and calculates it over a time period. This information constitutes the lifespan impact information, which is then sent to the processor so that the processor can determine the degree of lifespan loss corresponding to different lifespan impact information. To further reduce the processor's processing burden, the preset parameter storage and processing module can also be responsible for determining the degree of lifespan loss corresponding to different lifespan impact information. The processor only needs to determine the new current lifespan of the hard drive based on the degree of lifespan loss of the hard drive in the current cycle and the current lifespan of the hard drive. It can be seen that by setting the preset parameter storage and processing module, part of the processor's computing burden can be distributed to this module, thereby reducing the processor's computing burden.
[0108] As a preferred embodiment, the new current lifespan of the hard drive is determined based on the degree of lifespan degradation of the hard drive in the current cycle and the current lifespan of the hard drive, including:
[0109] The absolute value of the difference between the current lifespan of the hard drive and the value of its lifespan deterioration is taken as the new current lifespan of the hard drive.
[0110] To determine the new current lifespan of a hard disk drive (HDD), subtract the calculated lifespan degradation level from the current lifespan value. The absolute value of the difference is the new current lifespan of the HDD, and it has a minimum value of 0%. For example, if the current lifespan of the HDD is 100%, and the calculated lifespan degradation level for the current period is as follows: 6% for temperature-related degradation, 5% for vibration-related degradation, and 2% for ECC information degradation, meaning the total lifespan degradation in the current period is 13%, then the new current lifespan of the HDD is 87%. Based on this, the current lifespan of the HDD can be determined intuitively.
[0111] Please refer to Figure 4 , Figure 4 A schematic diagram of a lifespan degradation detection device for a hard disk drive provided in this application includes:
[0112] Memory 21 is used to store computer programs;
[0113] The processor 22 is used to implement the steps of the above-described method for detecting the lifespan and wear of a mechanical hard disk when executing a computer program.
[0114] For a detailed description of the hard disk drive lifespan testing device provided in this application, please refer to the embodiments of the hard disk drive lifespan testing method described above; further details will not be repeated here.
[0115] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0116] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of detecting a life consumption of a mechanical hard disk, characterized by, The method comprises the following steps: obtaining life influence information of the mechanical hard disk in a current period, the life influence information comprising vibration amplitude of a disk in the mechanical hard disk and ECC generated by the mechanical hard disk; determining a degree of life loss of the mechanical hard disk in the current period according to the life influence information; determining a new current life of the mechanical hard disk according to the degree of life loss of the mechanical hard disk in the current period and the current life of the mechanical hard disk; determining the degree of life loss of the mechanical hard disk in the current period according to the life influence information comprises: S31: taking a starting time of the current period as a current time; S32: judging whether the current time is an ending time of the current period; if yes, proceeding to the step of determining the new current life of the mechanical hard disk according to the degree of life loss of the mechanical hard disk in the current period and the current life of the mechanical hard disk; if no, proceeding to S33; S33: obtaining the vibration amplitude of the disk in the mechanical hard disk at the current time; S34: judging whether the vibration amplitude at the current time is greater than a preset amplitude; if yes, proceeding to S35; if no, proceeding to S37; S35: increasing an impact time of the mechanical hard disk by a second preset time length, and proceeding to S36; S36: judging whether the impact time reaches a second preset time threshold; if yes, increasing the degree of life loss of the mechanical hard disk in the current period by a second preset value, and proceeding to S37; if no, proceeding to S38; S37: clearing the impact time, and proceeding to S38; S38: taking a time point, at which the current time passes through the second preset time length, as a new current time, and returning to S32; wherein the time length of the current period is M times of the second preset time length, and M is an integer not less than 2; determining the degree of life loss of the mechanical hard disk in the current period according to the life influence information comprises: when the mechanical hard disk generates any ECC, obtaining a generation time and a disappearance time of the ECC; for any ECC, judging whether a time difference between the disappearance time and the generation time of the ECC is greater than a preset time difference; if greater than the preset time difference, increasing the degree of life loss of the mechanical hard disk in the current period by a third preset value; or, when the mechanical hard disk generates any ECC, determining a generation frequency of the same ECC in the current period; judging whether the generation frequency is greater than a preset generation frequency; if greater than the preset generation frequency, increasing the degree of life loss of the mechanical hard disk in the current period by a fourth preset value.
2. The method of claim 1, wherein the step of detecting the life consumption of the mechanical hard disk is characterized by, obtaining life influence information of the mechanical hard disk in a current period comprises: obtaining an acceleration value in a non-rotation direction of the disk in the mechanical hard disk in the current period as the vibration amplitude.
3. The method for detecting the lifespan loss of a hard disk drive as described in claim 1, characterized in that, after determining the new current life of the mechanical hard disk according to the degree of life loss of the mechanical hard disk in the current period and the current life of the mechanical hard disc, further comprising: judging whether the value of the current life of the mechanical hard disk is less than a preset life value; if yes, issuing an alarm information.
4. The method of claim 1, wherein the step of detecting the life consumption of the mechanical hard disk is characterized by, Obtaining the life influence information of the mechanical hard disk in the current period, including: Obtaining the life influence information of the mechanical hard disk in the current period collected by the preset parameter storage and processing module.
5. The method of claim 1 to 4, wherein Determining the new current life of the mechanical hard disk according to the life consumption degree of the mechanical hard disk in the current period and the current life of the mechanical hard disk, including: Taking the absolute value of the quantity difference between the numerical value of the current life of the mechanical hard disk and the numerical value of the life consumption degree as the new current life of the mechanical hard disk.
6. A device for detecting the lifespan and wear of a mechanical hard drive, characterized in that, Including: A memory for storing a computer program; A processor for executing the computer program to realize the steps of the life consumption detection method of the mechanical hard disk according to any one of claims 1 to 5.