Method for prolonging service life of hard disk, and related apparatus

By monitoring the performance and reliability indicators of the hard drive and dynamically adjusting the hard drive level, the problem of short hard drive service life is solved, and the availability of the hard drive is improved and the cost is reduced.

WO2024178921A1PCT designated stage expired Publication Date: 2024-09-06HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/114165
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-28
Filing Date
2023-08-22
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The service life of the hard disk is short, mainly because the hard disk is discarded directly when the wear degree reaches the upper limit, which fails to effectively extend the service life.

Method used

By monitoring the performance and reliability indicators of the hard drive, it dynamically adjusts the level of the hard drive to extend the service life of the hard drive. Specific methods include adjusting between the first level and the second level of the hard drive, determining the level according to the performance and reliability index requirements of the hard drive, and storing different types of data into different levels of hard drives to meet the needs of the data. Indicator requirements.

Benefits of technology

It extends the service life of the hard disk, improves the availability of the hard disk, reduces the cost of use, and avoids the situation where the hard disk is directly discarded because it does not meet a certain indicator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023114165_06092024_PF_FP
    Figure CN2023114165_06092024_PF_FP
Patent Text Reader

Abstract

The present application discloses a method for prolonging the service life of a hard disk, and a related apparatus. The method comprises: monitoring a first indicator of a hard disk, wherein the hard disk is at a first level; and when the first indicator does not meet a first condition, adjusting the hard disk from the first level to a second level, wherein the hard disk comprises a plurality of levels, the plurality of levels comprise the first level and the second level, the indicator requirement for the hard disk at the first level is higher than the indicator requirement at the second level, and the level of the hard disk is determined on the basis of the indicator of the hard disk. Thus, the service life of the hard disk is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

A method for extending the service life of a hard disk and related device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 28, 2023, with application number 202310223534.X and invention name “A method for extending the service life of a hard disk and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of storage technology, and in particular to a method for extending the service life of a hard disk and related devices. Background Art

[0003] Hard disks, including solid-state drives (SSDs) and mechanical hard disks, are one of the most important storage devices in computers. While operating, hard disks can experience various unexpected issues that can affect their lifespan. Currently, hard disk lifespan is typically assessed based on a specific indicator, such as wear and tear. Once the wear and tear reaches a certain limit, the hard disk is no longer in use, resulting in a shorter lifespan.

[0004] Summary of the Invention

[0005] The present application provides a method and related device for extending the service life of a hard disk, which can extend the service life of the hard disk.

[0006] In a first aspect, the present application provides a method for extending the service life of a hard disk, which is applied to the field of storage technology and includes:

[0007] First, a first indicator of a hard drive is monitored, and the hard drive is at level 1. Then, if the first indicator does not meet a first condition, the hard drive is adjusted from level 1 to level 2. The hard drive has multiple levels, including a first level and a second level. The indicator requirements for the hard drive at level 1 are higher than those at level 2. The hard drive is graded based on its indicators.

[0008] In this application, compared to directly discarding a hard disk when it does not meet the relevant requirements of a certain indicator, when the first indicator of the hard disk does not meet the requirements, the first level corresponding to the hard disk is adjusted to the second level, so that the hard disk can continue to be used, thereby improving the availability of the hard disk, extending the service life of the hard disk, and further reducing the cost of use.

[0009] In a possible implementation of the first aspect, the first indicator includes a first performance indicator, and the first condition includes:

[0010] The first performance indicator is within the range of performance indicators corresponding to the hard disk at the first level.

[0011] In this implementation, the availability of the hard disk is evaluated based on the performance indicators of the hard disk to extend the service life of the hard disk.

[0012] In a possible implementation of the first aspect, the first performance indicator includes a read and write latency of I0, and the first condition includes:

[0013] During the accumulated first time period, the proportion of read and write latency of IOs in the hard disk that does not exceed a first value is greater than or equal to a first threshold, and the first threshold is greater than 0 and less than 1.

[0014] In this implementation, the hard disk's IO read and write latency is monitored, and the hard disk's availability is determined based on the hard disk's corresponding IO read and write latency, thereby extending the hard disk's service life.

[0015] In a possible implementation of the first aspect, when the first indicator does not meet the first condition, adjusting the hard disk from the first level to the second level includes:

[0016] Get the range of performance indicators corresponding to each hard disk level;

[0017] When the first performance indicator does not meet the first condition and the first performance indicator is within the range of the performance indicator corresponding to the hard disk at the second level, the hard disk is adjusted from the first level to the second level.

[0018] In this implementation method, based on the indicator range of the hard disk at each level, it is determined whether the first performance indicator corresponding to the hard disk meets the range requirements of the hard disk at the first level, so that when the hard disk cannot meet the performance indicator requirements at the first level, the level of the hard disk can be adaptively adjusted, thereby improving the availability of the hard disk and extending the life of the hard disk.

[0019] In a possible implementation of the first aspect, the first indicator includes a first reliability indicator, and the first condition includes:

[0020] The first reliability index falls within a range of a reliability index corresponding to the hard disk at the first level.

[0021] In this implementation, the availability of the hard disk is evaluated based on the hard disk's reliability index to extend the service life of the hard disk.

[0022] In a possible implementation of the first aspect, the first reliability indicator includes the number of bad sectors, and the first condition includes:

[0023] When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed the second value.

[0024] In this implementation, the number of bad sectors on the hard disk is monitored, and the availability of the hard disk is determined based on the number of bad sectors corresponding to the hard disk, so as to extend the service life of the hard disk.

[0025] In a possible implementation of the first aspect, the first indicator further includes a first performance indicator, and when the first indicator does not meet the first condition, adjusting the hard disk from the first level to the second level includes:

[0026] Get the range of hard drive reliability indicators at each level;

[0027] When the first reliability index does not meet the first condition and the first reliability index falls within the range of the reliability index corresponding to the hard disk at the second level, adjusting the hard disk from the first level to the second level;

[0028] When it is determined that the first performance indicator is within the range of performance indicators corresponding to the hard disk at a certain level, and the level is different from the second level, the hard disk is adjusted to a level with lower requirements for the corresponding indicators of the level and the second level.

[0029] In this implementation method, while monitoring the performance indicators and reliability indicators of the hard disk at the same time, the level with lower indicator requirements is used as the adjustment level of the hard disk to ensure that the adjusted level can simultaneously meet the current performance indicators and reliability indicators requirements of the hard disk and match the actual situation of the hard disk.

[0030] In a possible implementation of the first aspect, the hard disk stores different types of data at different levels. The hard disk stores a first type of data at the first level, and stores a second type of data at the second level. The requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type.

[0031] In this implementation, different types of data have different corresponding index requirements. By storing different types of data in hard disks of different levels, the corresponding index requirements of different types of data can be met.

[0032] In a possible implementation of the first aspect, the hard disk includes a solid-state drive.

[0033] In a second aspect, the present application provides a device for extending the life of a hard disk. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The device has the function of implementing the actions described in the method example of the first aspect. This function can be implemented through hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. In one possible design, the device includes:

[0034] A monitoring module, configured to monitor a first indicator of the hard disk, wherein the hard disk is at a first level;

[0035] An adjustment module is used to adjust the hard disk from the first level to the second level when the first indicator does not meet the first condition. The hard disk includes multiple levels, and the multiple levels include the first level and the second level. The indicator requirements of the hard disk at the first level are higher than the indicator requirements at the second level. The level of the hard disk is divided based on the indicators of the hard disk.

[0036] In a possible implementation of the second aspect, the first indicator includes a first performance indicator, and the first condition includes:

[0037] The first performance indicator is within the range of performance indicators corresponding to the hard disk at the first level.

[0038] In a possible implementation of the second aspect, the first performance indicator includes a read and write latency of I0, and the first condition includes:

[0039] During the accumulated first time period, the proportion of read and write latency of IOs in the hard disk that does not exceed a first value is greater than or equal to a first threshold, and the first threshold is greater than 0 and less than 1.

[0040] In a possible implementation of the second aspect, the adjustment module is further configured to:

[0041] Get the range of performance indicators corresponding to each hard disk level;

[0042] When the first performance indicator does not meet the first condition and the first performance indicator is within the range of the performance indicator corresponding to the hard disk at the second level, the hard disk is adjusted from the first level to the second level.

[0043] In a possible implementation of the second aspect, the first indicator includes a first reliability indicator, and the first condition includes:

[0044] The first reliability index falls within a range of a reliability index corresponding to the hard disk at the first level.

[0045] In a possible implementation of the second aspect, the first reliability indicator includes the number of bad sectors, and the first condition includes:

[0046] When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed the second value.

[0047] In a possible implementation of the second aspect, the first indicator further includes a first performance indicator, and the adjustment module is further configured to:

[0048] Get the range of hard drive reliability indicators at each level;

[0049] When the first reliability index does not meet the first condition and the first reliability index falls within the range of the reliability index corresponding to the hard disk at the second level, adjusting the hard disk from the first level to the second level;

[0050] When it is determined that the first performance indicator is within the range of performance indicators corresponding to the hard disk at a certain level, and the level is different from the second level, the hard disk is adjusted to a level with lower requirements for the corresponding indicators of the level and the second level.

[0051] In a possible implementation of the second aspect, the hard disk stores different types of data at different levels. The hard disk stores a first type of data at the first level, and stores a second type of data at the second level. The requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type.

[0052] In a possible implementation of the second aspect, the hard disk includes a solid-state drive.

[0053] In a third aspect, the present application provides a controller comprising an interface card, a memory and a processor, wherein the interface card is used to receive data, the memory stores data and programs that can be run on the processor, and when the processor executes the program, the controller implements the method in the first aspect or any possible implementation of the first aspect.

[0054] In a fourth aspect, the present application provides a storage system comprising a controller and a hard disk, the controller comprising a memory and a processor, the memory storing a program, and the processor implementing the method in the above-mentioned first aspect or any possible implementation of the first aspect when executing the program.

[0055] In a fifth aspect, the present application provides a storage medium having a program stored thereon, which, when executed by a processor, implements the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0056] In a sixth aspect, the present application provides a computer program product, which, when executed by a computer, implements the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0057] In a seventh aspect, the present application provides a chip system comprising a processor configured to implement the method of the first aspect or any possible implementation of the first aspect. In one possible design, the chip system further comprises a memory configured to store program instructions and / or data. The chip system may be composed of a chip alone or may include a chip and other discrete components.

[0058] The solutions of the second to seventh aspects mentioned above are used to implement or cooperate with the method of the first aspect or any possible implementation method thereof, and therefore can achieve the same or corresponding beneficial effects as the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] FIG1a is a schematic structural diagram of a storage system provided in an embodiment of the present application;

[0060] FIG1b is a structural diagram of a controller in a storage system according to an embodiment of the present application;

[0061] FIG1c is a schematic flow chart of a method for extending the service life of a hard disk provided in an embodiment of the present application;

[0062] FIG2 is another flow chart of a method for extending the service life of a hard disk provided in an embodiment of the present application;

[0063] FIG3 is a schematic diagram of hard disk grading according to an embodiment of the present application;

[0064] FIG4 is a schematic diagram showing an operation of a method for extending the service life of a hard disk provided in an embodiment of the present application;

[0065] FIG5 is a schematic structural diagram of a device for extending the service life of a hard disk provided in an embodiment of the present application;

[0066] FIG6 is a schematic diagram of the structure of a controller provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0068] The terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.

[0069] The term "and / or" as used in this application can be used to describe an association relationship between related objects, indicating that three possible relationships exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application generally indicates that the related objects are in an "or" relationship.

[0070] It should also be noted that, in some alternative implementations, the functions / acts noted may occur out of the order of the drawings. For example, two figures shown in succession may in fact occur substantially concurrently or may sometimes be executed in the reverse order, depending on the functionality / acts involved.

[0071] In the embodiments of the present application, unless otherwise specified, the meaning of "at least one" refers to one or more, and the meaning of "a plurality of" refers to two or more. It is understood that in the present application, "when...", "if" and "if" all mean that the device will make corresponding processing under certain objective circumstances, and do not limit the time, nor do they require that there must be a judgment action when the device is implemented, nor do they mean that there are other limitations. In addition, the special word "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described as "exemplary" is not necessarily interpreted as being superior to or better than other embodiments.

[0072] First, in order to better understand the solution of the embodiment of the present application, the application scenario of the embodiment of the present application is described below. The hard disk service life extension method provided in the embodiment of the present application is mainly used in a storage system to extend the service life of the hard disk.

[0073] The following, in conjunction with Figures 1a and 1b, illustrates an example application scenario of the method for extending the service life of a hard disk provided in an embodiment of the present application. Referring to Figure 1a, Figure 1a is a schematic diagram of the structure of a storage system provided in an embodiment of the present application. As shown in Figure 1a, the storage system includes at least one controller 11 and multiple hard disks 12.

[0074] The controller 11 is connected to a host computer (not shown). The controller 11 can be a computing device, such as a server or desktop computer. A writing system and application programs are installed on the controller 11. The controller 11 can receive input / output (I / O) requests from the host computer. The controller 11 can also store data contained in the I / O requests and write the data to the hard disk 12.

[0075] The controller 11 is a system controller, which is an independent device and different from the control chip in the hard disk 12. In this embodiment, the control chip of the hard disk 12 is referred to as a hard disk controller. Unless otherwise specified, the controller in this embodiment refers to the system controller.

[0076] It should be noted that Figure 1a is merely an example. The shapes of the controller 11 and hard disk 12 shown in Figure 1a do not represent the actual physical structure of the controller 11 and hard disk 12 and are not intended to be limiting. Furthermore, this application does not specify the connection method between the controller and hard disk 12; it only requires that the controller 11 and hard disk 12 be able to communicate with each other.

[0077] Please refer to Figure 1b, which is a structural diagram of a controller in a storage system according to an embodiment of the present application. As shown in Figure 1b, the controller 11 includes an interface card 110, a memory 111, a processor 112, and an interface card 113.

[0078] The interface card 110 is used to communicate with the host and receive instructions sent by the host. The controller 11 can receive write instructions from the host through the interface card 110 .

[0079] The processor 112 is a central processing unit (CPU). In the embodiment of the present application, the processor 112 can be used to receive write instructions or read instructions from the host and process these instructions. The processor 112 can also send the data in the write instructions to the hard disk 12.

[0080] Optionally, the controller 11 may further include a memory 111 .

[0081] Memory 111 includes volatile memory, non-volatile memory, or a combination thereof. Volatile memory is, for example, random-access memory (RAM). Non-volatile memory is, for example, a floppy disk, hard disk, solid-state disk (SSD), optical disk, or other machine-readable medium capable of storing program code.

[0082] The memory 111 has a power-saving function, which means that even if the system loses power and then powers back on, the data stored in the memory 111 will not be lost. There can be one or more memories 111, which are used to temporarily store data received from the host or read from the hard disk 12. For example, when the controller 11 receives multiple write commands from the host, it can temporarily store the data in the multiple write commands in the memory 111.

[0083] The interface card 113 is used to communicate with the hard disk 12 . The controller 11 can send a write data instruction to the hard disk 12 through the interface card 113 for storage.

[0084] It is understandable that the structure of the storage system shown in Figures 1a and 1b is only an example. The method for extending the service life of a hard disk provided in the embodiment of the present application can be applied to, but is not limited to, the structure described above and is not limited here.

[0085] Currently, various unexpected situations may occur during the operation of the hard disk 12, which may affect the service life of the hard disk. Currently, the service life of the hard disk is generally evaluated by a certain indicator of the hard disk, such as the degree of wear of the hard disk. When the degree of wear of the hard disk reaches an upper limit, the hard disk is no longer used, resulting in a shorter service life of the hard disk.

[0086] To address the above-mentioned issues, an embodiment of the present application provides a method for extending the service life of a hard disk. The method is applied to the controller 11 shown in Figure 1a. Specifically, please refer to Figure 1c, which is a flow chart of a method for extending the service life of a hard disk provided in an embodiment of the present application. The method specifically comprises: S1. Monitoring a first indicator of a hard disk, where the hard disk is at a first level. The first indicator may include a first performance indicator; or the first performance indicator may include a first reliability indicator. The content of the first performance indicator is not limited herein. S2. If the first indicator does not meet a first condition, adjusting the hard disk from the first level to the second level. Hard disks have multiple levels, including a first level and a second level. The requirements for indicators in the first level are higher than those in the second level. Hard disk levels are divided based on the indicators of the hard disk. Compared to directly discarding a hard disk when it does not meet the requirements of a certain indicator, adjusting the corresponding first level of the hard disk to the second level when the first indicator does not meet the requirements allows the hard disk to continue to be used, thereby improving the hard disk's availability, extending its service life, and further reducing its cost.

[0087] The above introduces the application scenarios of the method for extending the service life of a hard disk provided in the embodiment of the present application. The following describes in detail the implementation process of the method for extending the service life of a hard disk provided in the embodiment of the present application.

[0088] First, in order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts that may be involved in the embodiments of the present application are introduced below.

[0089] (1) Hard disk

[0090] The hard disk is the main storage device on the computer.

[0091] (2) Solid-state drives

[0092] A solid-state drive (SSD) is a hard drive made with an array of solid-state electronic memory chips, consisting of a control unit, storage unit, and cache unit. Unlike mechanical hard drives, which are composed of mechanical components such as disks and heads, SSDs are entirely composed of electronic chips and circuit boards. SSDs are free of mechanical components such as heads, platter shafts, and control motors. Without the need for motor acceleration, SSDs have no internal moving parts, are immune to mechanical failure, and are more tolerant to collisions, shocks, and vibrations.

[0093] (2) Delay

[0094] Latency refers to the time it takes for a message or packet to be transmitted from one end of a network to the other.

[0095] In the embodiments of the present application, the input and output delays are mainly used as an example for description.

[0096] (3) Bad sectors

[0097] A bad track is an unreadable area on a storage medium, typically consisting of one or more sectors. When a sector's contents cannot be read or written normally, the sector becomes invalid and the track where the sector resides is called a bad track.

[0098] (4) Bad blocks

[0099] A bad block is an area on the storage medium that cannot be erased or written.

[0100] It should be noted that the description of bad sectors is mainly applicable to devices such as mechanical hard disks, and the description of bad blocks is mainly applicable to devices such as solid-state hard disks. In the embodiments of the present application, bad sectors are used as an example for description without limitation.

[0101] (5) Flash memory particles

[0102] Flash memory particles are the physical carriers of solid state hard drive storage.

[0103] The above describes the professional terms involved in the embodiments of this application. To facilitate understanding, the following describes in detail the method for extending the service life of a hard disk provided in the embodiments of this application, in conjunction with the accompanying drawings and application scenarios. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0104] Please refer to Figure 2, which is another flow diagram of a method for extending the service life of a hard disk provided in an embodiment of the present application. The method for extending the service life of a hard disk can be executed by the controller shown in Figure 1a. It is understood that the storage system shown in Figure 1a may include multiple hard disks, and the controller monitors each hard disk to monitor the operating status of each hardware. As shown in Figure 2, the controller can extend the service life of the hard disk by executing the following steps 201 to 203.

[0105] 201 : A controller monitors a hard disk and obtains a first indicator of the hard disk, wherein the hard disk is at a first level.

[0106] In this embodiment of the present application, when the hard drive is at the first level, the controller monitors the hard drive to obtain a first indicator of the hard drive. Hard drives have multiple levels, including the first level. Hard drive levels are divided based on their indicators, and the indicator requirements of hard drives at different levels vary.

[0107] Regarding the hard disk itself, in an optional implementation, the hard disk includes a solid-state drive.

[0108] It should be understood that the main function of a hard disk is to store data. A solid-state drive is only one example. In actual application, the specific type of hard disk used can be set according to actual needs and is not limited here.

[0109] In addition, it is understandable that the content of the first indicator of the hard disk can also be set according to actual needs and is not limited here.

[0110] In an optional implementation, the first indicator includes a first performance indicator.

[0111] In this implementation, the first performance indicator is mainly used to measure the performance of the hard disk.

[0112] Optionally, the first performance indicator includes the read and write latency of I0.

[0113] Specifically, IO latency can be understood as the time it takes from the controller issuing an IO instruction to the IO completion.

[0114] It is understandable that since hard drives are primarily used for reading and writing data, and IO latency is one of the core metrics of hard drives, monitoring IO latency can be used to monitor the operating status of the hard drive.

[0115] Optionally, when the controller monitors the IO latency, it generally obtains latency for reading and writing separately.

[0116] Exemplarily, the controller may obtain the read latency or write latency of a single IO in the following manner.

[0117] After the hard drive receives an IO command from the controller, it records the time it received the command, T1. Subsequently, after completing the read or write operation according to the IO command, the hard drive reports the success or failure status to the controller, recording the time of the feedback as T2. The controller can then use the difference between T2 and T1, obtained from the hard drive's recorded time, as the hard drive's IO latency.

[0118] Optionally, the read latency or write latency of an I0 may also include the average read latency or average write latency, respectively. The average read latency is the quotient of the read latency of all I0s and the number of all I0s, while the average write latency is the quotient of the write latency of all I0s and the number of all I0s. It should be understood that the read latency and write latency of an I0 are calculated separately, and the controller distinguishes them based on the content of the I0 instructions.

[0119] Optionally, the control can be used to calculate the latency of IO statistics, without distinguishing between read and write. The specific setting can be based on actual needs and is not limited here.

[0120] In addition, when the controller monitors the hard disk IO latency, the controller may optionally monitor the hard disk IO latency continuously over a continuous time period. Alternatively, the controller may monitor the hard disk IO latency over intervals, where the monitoring time may be the cumulative result of each time period.

[0121] For example, the controller may continuously monitor the first indicator of the hard disk within an hour, a day, or a week to obtain the hard disk IO latency. Alternatively, the controller may continuously monitor the first indicator for a plurality of cycles, for example, 5 seconds per cycle, to obtain the hard disk IO latency.

[0122] It is understandable that, in actual application, the controller's continuous monitoring time for the hard disk, the interval time, etc. can be set according to actual needs. This is only an example and not a limitation.

[0123] In another optional implementation, the first indicator includes a first reliability indicator.

[0124] In this implementation, the reliability index can be understood as the ability of the hard disk to complete the specified functions within the usage conditions.

[0125] Optionally, the first reliability indicator includes the number of bad sectors.

[0126] Specifically, bad sectors refer to areas on the hard disk that cannot be read.

[0127] It is understandable that since hard disks are mainly used for reading and writing data, and the number of bad sectors is one of the core indicators of hard disks, the number of bad sectors on a hard disk can be monitored to monitor the operating status of the hard disk.

[0128] 202, the controller determines whether the first indicator meets the first condition. If yes, the operation is stopped; if not, step 203 is executed.

[0129] In the embodiment of the present application, after monitoring the hard disk and obtaining a first indicator of the hard disk, the controller determines whether the first indicator meets a preset first condition.

[0130] In an optional implementation, the first indicator includes a first performance indicator. In this implementation, optionally, the first condition includes:

[0131] The first performance indicator is within the range of performance indicators corresponding to the hard disk at the first level.

[0132] Specifically, when the hard disk is at the first level, the controller evaluates the availability of the hard disk by determining whether the first performance indicator satisfies a range of performance indicators corresponding to the hard disk at the first level.

[0133] Furthermore, in an optional implementation, the first performance indicator includes the read and write latency of I0. In this implementation, optionally, the first condition includes:

[0134] During the accumulated first time period, the proportion of read and write latency of IOs in the hard disk that does not exceed a first value is greater than or equal to a first threshold, and the first threshold is greater than 0 and less than 1.

[0135] Specifically, within a first accumulated time period, the controller counts the proportion of read and write latencies of the hard disk I / O that do not exceed a first value, and compares the first value with a first threshold to determine the corresponding level of the hard disk. The controller counts read and write latencies separately. Specifically, the controller counts the read or write latencies of the hard disk and determines the proportion of read or write latencies that exceed the first value.

[0136] It should be understood that hard drives come in multiple grades, and different grades have different performance requirements. By monitoring the hard drive's performance indicators and matching them to the corresponding grades, the current grade of the hard drive can be determined.

[0137] For example, the controller may classify hard disks according to their IO latency, which may be:

[0138] At the first level, 99.9% of IOs have a latency of no more than 1ms.

[0139] At the second level, 99.9% of IOs have a latency of no more than 10ms.

[0140] At the third level, 99.9% of IOs have a latency of no more than 100ms.

[0141] For example, at the first level, if the controller continuously monitors 0.01% of I / O latency exceeding 1ms for more than one hour, one day, or one week, or if, for N 5-second cycles, 0.01% of I / O latency exceeds 1ms in M ​​cycles out of N, the first condition is not met. Both N and M are positive integers.

[0142] It should be noted that this example is only one optional implementation method and is not limited here. In addition, the first value and the first threshold can be set according to actual needs and are not limited here.

[0143] In an optional implementation, the first indicator includes a first reliability indicator.

[0144] In this implementation, optionally, the first condition includes that the first reliability index is within a range of a reliability index corresponding to the hard disk at the first level.

[0145] Specifically, when the hard disk is at the first level, the controller evaluates the availability of the hard disk by determining whether the first reliability index satisfies a range of the reliability index corresponding to the hard disk at the first level.

[0146] Furthermore, in an optional manner, the first reliability indicator includes the number of bad sectors. In this implementation, optionally, the first condition includes:

[0147] When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed the second value.

[0148] Specifically, when reading data of a specified capacity in the hard disk, the controller counts the number of bad sectors and compares the number of bad sectors with the second value, thereby determining the corresponding grade of the hard disk.

[0149] It should be understood that hard drives come in multiple grades, and different grades have different corresponding reliability requirements. By monitoring the hard drive's reliability indicators and matching them to the corresponding grades, the hard drive's current grade can be determined.

[0150] Exemplarily, the controller may classify the hard disk according to the number of bad sectors corresponding to the data of a specified capacity read from the hard disk, which may be:

[0151] At the first level, no more than one bad sector can be found when reading 1PB of data.

[0152] Level 2: Read 100TB of data with no more than one bad sector.

[0153] Level 3: No more than one bad sector can be read in 1TB of data.

[0154] Correspondingly, using the first level as an example, if the controller reads 1PB of data and one or more bad sectors appear, or if each PB of data read by the controller is counted as one cycle, if one or more bad sectors appear in M ​​cycles out of N cycles, then the first condition is not met. Both N and M are positive integers.

[0155] It should be noted that this example is only one optional implementation method and is not limited here. In addition, the size of the second value can be set according to actual needs and is not limited here.

[0156] In addition, it should be noted that, in actual application, the first indicator may include a first performance indicator and / or a first reliability indicator. When the first indicator includes both the first performance indicator and the first reliability indicator, the first condition needs to meet the requirements of both the first performance indicator and the first reliability indicator.

[0157] For example, hard disks may be graded based on their IO latency and the number of bad sectors corresponding to reading a specified amount of data from the hard disk:

[0158] At the first level, 99.9% of IO latency does not exceed 1ms, and no more than 1 bad sector is found when reading 1PB of data.

[0159] At the second level, 99.9% of IO latency does not exceed 10ms, and no more than one bad sector will be found when reading 100TB of data.

[0160] Level 3: 99.9% of IO latency does not exceed 100ms, and there is no more than one bad sector when reading 1TB of data.

[0161] The first level can be understood as a level with high requirements for both hard disk IO latency and bad sector ratio. The second level can be understood as a level with moderate requirements for both. The third level can be understood as a level with low requirements for both. It should be understood that in actual applications, the hard disk level can be set according to actual needs. This is for illustrative purposes only and is not intended to be limiting.

[0162] In addition, it should be noted that the content of the first indicator and the content of the first condition can also be set according to actual needs and are not limited here.

[0163] 203 , the controller adjusts the hard disk from the first level to the second level.

[0164] In the embodiment of the present application, after determining that the first indicator does not meet the first condition, the controller adjusts the hard drive's level from the first level to the second level, allowing the hard drive to continue to be used while meeting the indicator requirements, thereby extending the hard drive's service life. Hard drives are classified into multiple levels, including a first level and a second level. The indicator requirements for a hard drive at the first level are higher than those for the hard drive at the second level. Hard drives are classified into different levels based on their indicators.

[0165] In an optional implementation, the controller adjusts the hard disk from the first level to the second level, including:

[0166] The controller obtains the range of performance indicators corresponding to the hard disk at each level;

[0167] When the first performance indicator does not meet the first condition and the first performance indicator is within the range of performance indicators corresponding to the hard disk at the second level, the controller adjusts the hard disk from the first level to the second level.

[0168] In this implementation, the controller first obtains the performance ranges corresponding to the hard drive at each level. If the controller determines that the first performance indicator does not meet the first condition, but is within the range of the hard drive's performance indicator at the second level, then the hard drive's current performance indicator meets the requirements for the second level. In this case, the controller adjusts the hard drive from the first level to the second level.

[0169] It is understandable that the controller can adjust the hard disk level when either the first performance indicator or the first reliability indicator is met, or adjust the hard disk level when both the first performance indicator and the first reliability indicator are met. Specifically, the hard disk can be downgraded by one, two, or more levels based on the actual deterioration of the hard disk. Specifically, when the first indicator includes both the first performance indicator and the first reliability indicator, if the controller determines that the first performance indicator falls within the range of the hard disk's performance indicator at the third level, and determines that the first reliability indicator falls within the range of the hard disk's reliability indicator at the second level, and the second level is different from the third level, the controller will adjust the hard disk to the level with the lower requirement of the corresponding indicator between the third level and the second level.

[0170] For example, assume that hard drives have three levels, with the first level being the highest. If a hard drive is detected to not meet the first level's corresponding performance requirements, the controller will downgrade the hard drive. Refer to Figure 3, which is a schematic diagram of hard drive grading according to an embodiment of the present application.

[0171] As shown in Figure 3, if the controller detects that a drive's current performance indicators meet the requirements for a specific tier, it will directly downgrade the drive from tier 1 to that tier. Typically, the drive with the worst performance indicators in tier 1 is downgraded. This tier doesn't necessarily need to be tier 2; the controller can downgrade the drive several tiers to meet actual needs.

[0172] If the controller detects that the hard drive's current performance indicators meet the requirements for the corresponding indicators at Level 2, and the hard drive's current reliability indicators meet the requirements for the corresponding indicators at Level 3, and if the requirements for the indicators at Level 3 are lower than those at Level 2, the controller will downgrade the hard drive to the lower level, Level 3.

[0173] It is understandable that in actual operation, if testers or other personnel detect that the disk at the first level is degraded, they will replenish the first-level hard disk after the hard disk at the first level is degraded to store data with higher index requirements.

[0174] In another optional implementation, the hard disk stores different types of data at different levels. The hard disk stores the first type of data at the first level, and stores the second type of data at the second level. The requirements for the indicators corresponding to the first type of data are higher than the requirements for the indicators corresponding to the second type.

[0175] In this implementation, different levels of hard disks store data of different business types with different performance requirements. Different business types have different performance requirements, and the data is stored in hard disks of different levels according to these requirements.

[0176] Corresponding to the hard drive tiers, data for different business types can also be divided into different tiers. For example, a tier 1 hard drive stores data for tier 1 businesses, which have high latency and / or reliability requirements. A tier 2 hard drive stores data for tier 2 businesses, which have average latency and / or reliability requirements. A tier 3 hard drive stores data for tier 3 businesses, which have low latency and / or reliability requirements.

[0177] Optionally, the user can set the index requirements corresponding to data of different business types so that the controller stores the data in the hard disk of the corresponding level.

[0178] For example, the user can actively specify the level requirements corresponding to different business types of data. Specifically, the user can specify the data's requirements for latency or bad sectors, so that the controller stores the data in a hard disk of the corresponding level according to the requirements.

[0179] Optionally, in a possible implementation, the user may set the requirements for the indicators corresponding to the data through the display screen.

[0180] In this possible implementation, the user can operate an external device such as a computer or a display screen, input relevant requirements, and complete relevant settings.

[0181] For example, the user can select the level corresponding to the service through the display interface. For example, the controller directly provides an interface for selecting a level through the display interface. After the user selects a level, the data of the corresponding service type is stored in the hard disk of level 1. In addition, the interface displaying the level can also additionally display the latency and bad sector indicator requirements corresponding to the level. Optionally, the user can also directly enter the name of the service type, and the controller will match the corresponding level based on the name of the service type.

[0182] Correspondingly, after the user specifies the storage level of data of different business types through the display device, the hardware level adjustment process can also be displayed through the display device during the process of the controller monitoring the hard disk. For example, please refer to Figure 4, which is an operation display diagram of the method for extending the service life of the hard disk provided in the embodiment of the present application. In the process of the controller monitoring the indicators of the hard disk and obtaining the first indicator, the content "Hard disk monitoring" can be displayed on the screen to inform the user that the current hard disk is in a state of ongoing indicator detection. When the controller determines that the first indicator does not meet the first condition and adjusts the level of the hard disk, the content "Hard disk level adjustment" can be displayed on the screen. After the controller adjusts the level of the hard disk, the content "Hard disk level adjustment completed" can be displayed on the screen.

[0183] It should be noted that the specific content displayed on the display screen and the device type of the display screen can be set according to actual needs and are not limited here.

[0184] It is worth noting that, compared to simply discarding a hard drive when it fails to meet certain performance requirements, the present embodiment matches data of different business types to hard drives of corresponding levels based on the availability of the drive and the performance requirements of the data type. When the performance of a hard drive degrades, the hard drive is downgraded and only discontinued when its performance requirements do not meet the minimum set requirements, thereby extending the hard drive's service life.

[0185] Based on the embodiments corresponding to Figures 1a to 4 , in order to better implement the above-mentioned solutions of the embodiments of the present application, the following also provides related devices for implementing the above-mentioned solutions. Please refer to Figure 5 , which is a schematic diagram of the structure of a hard disk service life extension device provided in an embodiment of the present application. The hard disk service life extension device can be located in the controller shown in Figure 1a . The hard disk service life extension device 5000 includes:

[0186] The monitoring module 5001 is used to monitor the first indicator of the hard disk, and the hard disk is at the first level.

[0187] Adjustment module 5002 is used to adjust the hard disk from the first level to the second level when the first indicator does not meet the first condition. The hard disk includes multiple levels, and the multiple levels include the first level and the second level. The indicator requirements of the hard disk at the first level are higher than the indicator requirements at the second level. The level of the hard disk is divided based on the indicators of the hard disk.

[0188] In one possible implementation, the first indicator includes a first performance indicator, and the first condition includes:

[0189] The first performance indicator is within the range of performance indicators corresponding to the hard disk at the first level.

[0190] In one possible implementation, the first performance indicator includes a read and write latency of I0, and the first condition includes:

[0191] During the accumulated first time period, the proportion of read and write latency of IOs in the hard disk that does not exceed a first value is greater than or equal to a first threshold, and the first threshold is greater than 0 and less than 1.

[0192] In one possible implementation, the adjustment module is further configured to:

[0193] Get the range of performance indicators corresponding to each hard disk level;

[0194] When the first performance indicator does not meet the first condition and the first performance indicator is within the range of the performance indicator corresponding to the hard disk at the second level, the hard disk is adjusted from the first level to the second level.

[0195] In one possible implementation, the first indicator includes a first reliability indicator, and the first condition includes:

[0196] The first reliability index falls within a range of a reliability index corresponding to the hard disk at the first level.

[0197] In one possible implementation, the first reliability indicator includes the number of bad sectors, and the first condition includes:

[0198] When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed the second value.

[0199] In one possible implementation, the first indicator further includes a first performance indicator, and the adjustment module is further configured to:

[0200] Get the range of hard drive reliability indicators at each level;

[0201] When the first reliability index does not meet the first condition and the first reliability index falls within the range of the reliability index corresponding to the hard disk at the second level, adjusting the hard disk from the first level to the second level;

[0202] When it is determined that the first performance indicator is within the range of performance indicators corresponding to the hard disk at a certain level, and the level is different from the second level, the hard disk is adjusted to a level with lower requirements for the corresponding indicators of the level and the second level.

[0203] In one possible implementation, the hard disk stores different types of data at different levels. The hard disk stores the first type of data at the first level and stores the second type of data at the second level. The requirements for the indicators corresponding to the first type of data are higher than the requirements for the indicators corresponding to the second type.

[0204] In one possible implementation, the hard disk includes a solid-state drive.

[0205] In this embodiment, the operations performed by each unit in the hard disk service life extension device 5000 are similar to those described in the method embodiment shown in Figure 2 above, and can be used to implement the functions of the controller in the above method embodiment, and can also achieve the beneficial effects of the above method embodiment, which will not be repeated here.

[0206] Please refer to Figure 6, which is a schematic diagram of the structure of a controller provided in an embodiment of the present application. As shown in Figure 6, the controller 6000 is implemented by a general bus architecture.

[0207] The controller 6000 includes at least one processor 6001 , a communication bus 6002 , a memory 6003 , and at least one interface card 6004 .

[0208] The processor 6001, memory 6003, and interface card 6004 communicate via a communication bus 6002, and may also communicate via other means such as wireless transmission. The memory 6003 is used to store instructions, and the processor 6001 is used to execute the instructions stored in the memory 6003. The memory 6003 stores program code, and the processor 6001 can call the program code stored in the memory 6003 to execute steps 201 to 203 in the embodiment shown in Figure 2. For specific implementation, please refer to the detailed description of steps 201 to 203 in the embodiment shown in Figure 2, which will not be repeated here.

[0209] Optionally, processor 6001 is a general-purpose central processing unit (CPU), and may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices (PLD), transistor logic devices, hardware components, or any combination thereof. The aforementioned PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0210] Communication bus 6002 is used to transmit information between processor 6001, memory 6003, and interface card 6004. Communication bus 6002 is divided into an address bus, a data bus, and a control bus. For ease of illustration, the figure uses only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0211] Alternatively, the memory 6003 is a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. Alternatively, the memory 6003 is a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions. Alternatively, the memory 6003 is an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code with the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Alternatively, the memory 6003 exists independently and is connected to the processor 6001 via a communication bus 6002. Alternatively, the memory 6003 and the processor 6001 are integrated together.

[0212] Interface card 6004 uses any transceiver-like device for communicating with other devices or communication networks. Interface card 6004 includes a wired communication interface. Optionally, interface card 6004 also includes a wireless communication interface. The wired communication interface, for example, is an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface can be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0213] In a specific implementation, as an embodiment, the processor 6001 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG6 .

[0214] In a specific implementation, as an embodiment, the controller 6000 includes multiple processors, such as processor 6001 and processor 6005 shown in FIG6 . Each of these processors is a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0215] In some embodiments, the memory 6003 is used to store program code for executing the solution of the present application, and the processor 6001 executes the program code stored in the memory 6003. In other words, the hard disk service life extension device 6000 implements the above-mentioned hard disk service life extension method embodiment through the processor 6001 and the program code in the memory 6003.

[0216] It is understood that the method steps in the embodiments of the present application can be implemented in hardware or in software instructions that can be executed by the processor 6001. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. In addition, the scope of the device described in the present application is not limited to this, and the structure of the device may not be limited to Figure 6. The device can be an independent device or can be part of a larger device. For example, the device can be:

[0217] (1) An independent integrated circuit (IC), or chip, or chip system or subsystem;

[0218] (2) having a set of one or more ICs, optionally including a storage component for storing data and / or instructions;

[0219] (3) Modules that can be embedded in other devices;

[0220] (4) Receivers, terminals, intelligent terminals, wireless devices, handheld devices, mobile units, vehicle-mounted devices, artificial intelligence devices, machinery and equipment, household appliances, medical equipment, industrial equipment, etc.;

[0221] (5)Others, etc.

[0222] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0223] An embodiment of the present application further provides a storage medium having a program stored thereon, which, when executed by a processor, implements the method for extending the service life of a hard disk in each of the above embodiments.

[0224] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0225] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0226] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0227] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0228] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0229] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0230] The naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps can be changed in the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when implementing in actual applications. For example, multiple units can be combined into or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or subunits described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed to multiple circuit units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present application solution.

[0231] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the scope of protection of the present application. The various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of each process does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic.

[0232] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for extending the service life of a hard disk, characterized in that: include: Monitoring a first indicator of a hard disk, wherein the hard disk is at a first level; When the first indicator does not meet the first condition, the hard disk is adjusted from the first level to the second level, the hard disk includes multiple levels, the multiple levels include the first level and the second level, the indicator requirement of the hard disk at the first level is higher than the indicator requirement at the second level, and the level of the hard disk is divided based on the indicators of the hard disk.

2. The method according to claim 1, characterized in that The first indicator includes a first performance indicator, and the first condition includes: The first performance indicator belongs to the range of the performance indicator corresponding to the hard disk at the first level.

3. The method according to claim 2, characterized in that The first performance indicator includes the read and write latency of I0, and the first condition includes: In a first accumulated time period, a proportion of the read and write delays of the IOs in the hard disk that do not exceed a first value is greater than or equal to a first threshold, and the first threshold is greater than 0 and less than 1.

4. The method according to claim 2 or 3, characterized in that: When the first indicator does not meet the first condition, adjusting the hard disk from the first level to the second level includes: Obtaining the range of the performance indicator corresponding to the hard disk at each level; When the first performance indicator does not meet the first condition and the first performance indicator belongs to the range of the performance indicator corresponding to the hard disk at the second level, the hard disk is adjusted from the first level to the second level.

5. The method according to claim 1, characterized in that: The first indicator includes a first reliability indicator, and the first condition includes: The first reliability index is within a range of the reliability index corresponding to the hard disk at the first level.

6. The method according to claim 5, characterized in that The first reliability indicator includes the number of bad sectors, and the first condition includes: When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed a second value.

7. The method according to claim 5 or 6, characterized in that: The first indicator further includes a first performance indicator, and when the first indicator does not meet the first condition, adjusting the hard disk from the first level to the second level includes: Obtaining the range of the reliability index corresponding to the hard disk at each level; When the first reliability index does not meet the first condition and the first reliability index is within the range of the reliability index corresponding to the hard disk at the second level, adjusting the hard disk from the first level to the second level; When it is determined that the first performance indicator is within the range of performance indicators corresponding to the hard disk at a certain level, and the level is different from the second level, the hard disk is adjusted to a level with lower requirements for the indicators corresponding to the level and the second level.

8. The method according to any one of claims 1 to 7, characterized in that: The hard disk stores different types of data at different levels. The hard disk stores a first type of data at the first level, and stores a second type of data at the second level. The requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type of data.

9. The method according to any one of claims 1 to 8, characterized in that: The hard disk comprises a solid state disk.

10. A device for extending the service life of a hard disk, characterized in that: include: A monitoring module, used for monitoring a first indicator of a hard disk, wherein the hard disk is at a first level; An adjustment module is used to adjust the hard disk from the first level to the second level when the first indicator does not meet the first condition, the hard disk includes multiple levels, the multiple levels include the first level and the second level, the indicator requirement of the hard disk at the first level is higher than the indicator requirement at the second level, and the level of the hard disk is divided based on the indicators of the hard disk.

11. The device according to claim 10, characterized in that The first indicator includes a first performance indicator, and the first condition includes: The first performance indicator belongs to the range of the performance indicator corresponding to the hard disk at the first level.

12. The device according to claim 11, characterized in that The first performance indicator includes the read and write latency of I0, and the first condition includes: In the accumulated first time period, the proportion of the read and write delays of the IOs in the hard disk that do not exceed the first value is greater than or equal to the first value. A threshold value, wherein the first threshold value is greater than 0 and less than 1.

13. The device according to claim 11 or 12, characterized in that The adjustment module is also used for: Obtaining the range of the performance indicator corresponding to the hard disk at each level; When the first performance indicator does not meet the first condition and the first performance indicator belongs to the range of the performance indicator corresponding to the hard disk at the second level, the hard disk is adjusted from the first level to the second level.

14. The device according to claim 10, characterized in that The first indicator includes a first reliability indicator, and the first condition includes: The first reliability index is within a range of the reliability index corresponding to the hard disk at the first level.

15. The device according to claim 14, characterized in that The first reliability indicator includes the number of bad sectors, and the first condition includes: When reading data of a specified capacity in the hard disk, the number of bad sectors obtained does not exceed a second value.

16. The device according to claim 14 or 15, characterized in that The first indicator also includes a first performance indicator, and the adjustment module is further used for: Obtaining the range of the reliability index corresponding to the hard disk at each level; When the first reliability index does not meet the first condition and the first reliability index is within the range of the reliability index corresponding to the hard disk at the second level, adjusting the hard disk from the first level to the second level; When it is determined that the first performance indicator is within the range of performance indicators corresponding to the hard disk at a certain level, and the level is different from the second level, the hard disk is adjusted to a level with lower requirements for the indicators corresponding to the level and the second level.

17. The device according to any one of claims 10 to 16, characterized in that The hard disk stores different types of data at different levels. The hard disk stores a first type of data at the first level, and stores a second type of data at the second level. The requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type of data.

18. The device according to any one of claims 10 to 17, characterized in that The hard disk comprises a solid state disk.

19. A controller, characterized in that: The invention comprises an interface card, a memory and a processor, wherein the interface card is used to receive data, the memory stores the data and a program that can be run on the processor, and when the processor executes the program, the controller implements the method for extending the service life of a hard disk as described in any one of claims 1 to 9.

20. A storage system, characterized in that: The invention comprises a controller and a hard disk, wherein the controller comprises a memory and a processor, wherein the memory stores a program, and when the processor executes the program, the method for extending the service life of the hard disk as claimed in any one of claims 1 to 9 is implemented.

21. A storage medium, characterized in that: The storage medium stores a program, and when the program is executed by the processor, the method for extending the service life of a hard disk as claimed in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method for prolonging service life of hard disk and related device

    CN118567916A

  • Hard disk adapting method, device and system

    CN109189333A

  • Hard disk health degree state prediction method and device, equipment and storage medium

    CN114418002A

  • Hard disk health monitoring method, system and device and readable storage medium

    CN115168155A

  • Hard disk driver state detection method

    US6574751B1