Method for prolonging service life of hard disk and related device

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.

CN118567916APending Publication Date: 2024-08-30HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310223534.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The service life of a hard disk is short, and the existing technology mainly evaluates the degree of wear, causing the hard disk to stop being used when it reaches the upper limit, and cannot effectively extend the service life.

Method used

By monitoring the performance indicators 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. The specific method includes adjusting between the first level and the second level of the hard drive, determining the level of the hard drive based on the performance index and reliability index of the hard drive, and ensuring that the hard drive continues to be used when it meets the index requirements.

Benefits of technology

It extends the service life of the hard drive, improves the availability of the hard drive, reduces the cost of use, and avoids the problem of the hard drive being discarded directly because it does not meet a certain indicator.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567916A
    Figure CN118567916A
Patent Text Reader

Abstract

The invention discloses a hard disk service life prolonging method and a related device, and the method comprises the steps: monitoring a first index of a hard disk, the hard disk being at a first grade; when the first index does not meet the first condition, the hard disk is adjusted from the first grade to the second grade, the hard disk comprises multiple grades, the multiple grades comprise the first grade and the second grade, the requirement for the index of the hard disk under the first grade is higher than the requirement for the index of the hard disk under the second grade, and the grades of the hard disk are divided based on the index of the hard disk. Therefore, the service life of the hard disk is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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 a related device. Background Art

[0002] Hard disk is one of the most important storage devices in a computer, including solid state disk (SSD), mechanical hard disk, etc. When the hard disk is working, various unexpected situations may occur, which may affect the service life of the hard disk. At present, the service life of the hard disk is generally evaluated by a certain indicator of the hard disk, for example, the degree of wear of the hard disk. When the degree of wear of the hard disk reaches the upper limit, the hard disk will no longer be used, resulting in a shorter service life of the hard disk. Summary of the invention

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

[0004] In a first aspect, the present application provides a method for extending the service life of a hard disk, the method being applied in the field of storage technology, the method comprising:

[0005] First, a first indicator of a hard disk is monitored, and the hard disk is at a first level. Then, when the first indicator does not meet a first condition, the hard disk is adjusted from the first level to a second level. The hard disk includes multiple levels, and the multiple levels include a first level and a second level. The indicator requirement of the hard disk at the first level is higher than the indicator requirement at the second level. The level of the hard disk is divided based on the indicator of the hard disk.

[0006] In the present 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.

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

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

[0009] 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.

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

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

[0012] 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.

[0013] 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:

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

[0015] 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.

[0016] In this implementation, 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.

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

[0018] The first reliability index is within the range of the reliability index corresponding to the hard disk at the first level.

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

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

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

[0022] In this implementation, the number of bad sectors of 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 as a judgment condition, so as to extend the service life of the hard disk.

[0023] In a possible implementation manner 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:

[0024] Get the range of reliability indicators corresponding to each level of the hard disk;

[0025] 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;

[0026] 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.

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

[0028] 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 the hard disk stores a second type of data at the second level, and the requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type.

[0029] In this implementation, different types of data have different corresponding index requirements. Different types of data are stored in hard disks of different levels to meet the corresponding index requirements of different types of data.

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

[0031] In a second aspect, the present application provides a device for extending the service 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 behavior in the method example of the first aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In a possible design, the device includes:

[0032] A monitoring module, used to monitor a first indicator of the hard disk, the hard disk is at a first level;

[0033] The 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 requirements of the indicators of the hard disk at the first level are higher than the requirements of the indicators at the second level. The level of the hard disk is divided based on the indicators of the hard disk.

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

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

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

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

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

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

[0040] 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.

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

[0042] The first reliability index is within the range of the reliability index corresponding to the hard disk at the first level.

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

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

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

[0046] Get the range of reliability indicators corresponding to each level of the hard disk;

[0047] 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;

[0048] 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.

[0049] 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 the hard disk stores a second type of data at the second level, and the requirements for indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type.

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

[0051] 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.

[0052] In a fourth aspect, the present application provides a storage system including a controller and a hard disk, the controller including 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 method of the first aspect when executing the program.

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

[0054] 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.

[0055] In a seventh aspect, the present application provides a chip system, which includes a processor for implementing the method in the first aspect or any possible implementation of the first aspect. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0056] 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

[0057] Figure 1a A schematic diagram of a storage system provided in an embodiment of the present application;

[0058] Figure 1b A structural example diagram of a controller in a storage system provided in an embodiment of the present application;

[0059] Figure 1c A schematic diagram of a process for extending the service life of a hard disk provided in an embodiment of the present application;

[0060] Figure 2 Another schematic flow chart of a method for extending the service life of a hard disk provided in an embodiment of the present application;

[0061] Figure 3 A schematic diagram of hard disk classification provided in an embodiment of the present application;

[0062] Figure 4 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;

[0063] Figure 5 A schematic diagram of a structure of a device for extending the service life of a hard disk provided in an embodiment of the present application;

[0064] Figure 6 A schematic diagram of the structure of a controller provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] 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.

[0066] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be 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" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.

[0067] The term "and / or" in this application can be a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0068] 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 simultaneously or may sometimes be performed in the reverse order, depending on the functions / acts involved.

[0069] 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 "plurality" refers to two or more. It is understood that in the present application, "when", "if" and "if" all refer to the device making 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 or better than other embodiments.

[0070] 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 applied to a storage system to extend the service life of the hard disk.

[0071] Combine the following Figure 1a and Figure 1b , an example is given to illustrate the application scenario of the method for extending the service life of a hard disk provided in the embodiment of the present application. Figure 1a , Figure 1a A schematic diagram of a storage system provided in an embodiment of the present application. Figure 1a As shown, the storage system includes at least one controller 11 and a plurality of hard disks 12 .

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

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

[0074] It should be noted that FIG. 1 is only an exemplary illustration, and the shapes of the controller 11 and the hard disk 12 shown in FIG. 1 do not represent the actual physical structures of the controller 11 and the hard disk 12, and are not limited here. In addition, the implementation of this application does not limit the connection method between the controller and the hard disk 12, and only needs to ensure that the controller 11 and the hard disk 12 can communicate with each other.

[0075] See also Figure 1b , Figure 1b This is a structural example diagram of a controller in a storage system provided in an embodiment of the present application. Figure 1b As shown, the controller 11 includes an interface card 110 , a memory 111 , a processor 112 , and an interface card 113 .

[0076] 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.

[0077] 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 instruction to the hard disk 12.

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

[0079] The memory 111 includes a volatile memory, a non-volatile memory or a combination thereof. The volatile memory is, for example, a random-access memory (RAM). The non-volatile memory is, for example, a floppy disk, a hard disk, a solid state disk (SSD), an optical disk, or any other machine-readable medium that can store program codes.

[0080] The memory 111 has a power-saving function, which means that when the system loses power and then powers on again, 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 data read from the hard disk 12. For example, when the controller 11 receives multiple write instructions sent by the host, the data in the multiple write instructions can be temporarily stored in the memory 111.

[0081] 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.

[0082] Understandably, Figure 1a and Figure 1b The structure of the storage system shown 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 the structure described above but is not limited thereto, and is not limited thereto herein.

[0083] At present, various unexpected situations may occur when the hard disk 12 is working, which may affect the service life of the hard disk. At present, the service life of the hard disk is generally evaluated by a certain indicator of the hard disk, for example, the wear degree of the hard disk. When the wear degree 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.

[0084] In order to solve the above problems, the present invention provides a method for extending the service life of a hard disk. Figure 1a For details, please refer to Figure 1c , Figure 1c 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 includes: S1, monitoring a first indicator of a hard disk, the hard disk is at a first level. Among them, the first indicator includes a first performance indicator; or, the first performance indicator includes a first reliability indicator, and the content of the first performance indicator is not limited here. S2, when the first indicator does not meet the first condition, adjusting the hard disk 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 hard disk has a higher requirement for the indicator at the first level than the requirement for the indicator at the second level, and the level of the hard disk is divided based on the indicator of the hard disk. Compared with directly discarding the hard disk when the hard disk does not meet the relevant requirements of a certain indicator, when the first indicator of the hard disk does not meet the requirements, by adjusting the first level corresponding to the hard disk to the second level, 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.

[0085] 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 will introduce 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.

[0086] First of all, 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.

[0087] (1) Hard disk

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

[0089] (2) Solid-state drive

[0090] Solid State Disk (SSD) is a hard disk made of solid-state electronic storage chip arrays, consisting of a control unit, a storage unit, and a cache unit. Different from mechanical hard disks, which are composed of mechanical parts such as disks and heads, the entire SSD structure has no mechanical devices and is composed entirely of electronic chips and circuit boards. Solid state drives are free of mechanical parts such as heads, disk shafts, and control motors of mechanical hard disks. There is no process of motor acceleration and rotation, and there are no mechanical moving parts inside. Mechanical failures will not occur, and they have better tolerance to collisions, shocks, and vibrations.

[0091] (2) Delay

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

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

[0094] (3) Bad sectors

[0095] A bad track is an area on the storage medium that cannot be read. It may generally include one or more sectors. When the content of a sector cannot be read or written normally, the sector is invalid and the track where the sector is located is called a bad track.

[0096] (4) Bad blocks

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

[0098] 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 disks. In the embodiments of the present application, bad sectors are used as an example for description without limitation.

[0099] (5) Flash memory particles

[0100] Flash memory particles are the physical carriers of solid state hard disk storage.

[0101] The above introduces the professional terms involved in the embodiments of the present application. For ease of understanding, the following specifically describes the method for extending the service life of a hard disk provided in the embodiments of the present application in combination with the accompanying drawings and application scenarios. A person of ordinary skill in the art will know 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.

[0102] See also Figure 2 , Figure 2Another flow chart of the method for extending the service life of a hard disk provided in the embodiment of the present application is shown in FIG. Figure 1a It is understood that if Figure 1a The storage system shown may include multiple hard disks, and the controller monitors the operating status of each hardware by monitoring each hard disk. Figure 2 As shown, the controller can extend the service life of the hard disk by executing the following steps 201 to 203.

[0103] 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.

[0104] In the embodiment of the present application, when the hard disk is at the first level, the controller monitors the hard disk to obtain the first index of the hard disk. The hard disk includes multiple levels, including the first level. The levels of the hard disk are divided based on the indexes of the hard disk, and the index requirements of the hard disk at different levels are different.

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

[0106] 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 type of hard disk used can be set according to actual needs and is not limited here.

[0107] 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.

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

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

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

[0111] Specifically, IO latency can be understood as the time consumed from the controller sending an IO instruction to the IO completion process.

[0112] It is understandable that since the hard disk is mainly used for reading and writing data, and the IO read and write latency is one of the core indicators of the hard disk, the IO latency of the hard disk can be monitored to monitor the operating status of the hard disk.

[0113] Optionally, when the controller monitors the IO latency, the latency is generally obtained for reading and writing respectively.

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

[0115] After the hard disk receives the IO instruction sent by the controller, the hard disk records the time T1 when the IO instruction is received. After that, after the hard disk completes the related read and write operations according to the IO instruction, it can feedback the success or failure status of the operation to the controller, and record the feedback time as T2. The controller can obtain the time recorded by the hard disk and use the difference between T2 and T1 as the IO latency of the hard disk.

[0116] Optionally, the read latency or write latency of IO may also include an average read latency or an average write latency, respectively. The average read latency refers to the quotient of the read latency of all IOs and the number of all IOs, and the average write latency refers to the quotient of the write latency of all IOs and the number of all IOs. It should be understood that the read latency and write latency of IO are calculated separately, and the controller distinguishes them according to the content of the IO instruction.

[0117] Optionally, the control can be performed in the statistical IO latency, and the reading and writing can be ignored. The specific setting can be based on actual needs and is not limited here.

[0118] In addition, when the controller monitors the IO latency of the hard disk, the controller may optionally monitor the IO latency of the hard disk continuously in a continuous time period. Alternatively, the controller may monitor the IO latency of the hard disk in an interval time period, and the monitoring time may be the cumulative result of each time period.

[0119] Exemplarily, the controller may continuously monitor the first indicator of the hard disk within one hour, one day, or one week to obtain the IO latency of the hard disk. Alternatively, the controller may continuously monitor for several cycles, for example, 5 seconds per cycle, to obtain the IO latency of the hard disk.

[0120] 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.

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

[0122] 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.

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

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

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

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

[0127] In the embodiment of the present application, after the controller monitors the hard disk and obtains the first indicator of the hard disk, it determines whether the first indicator meets a preset first condition.

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

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

[0130] 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.

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

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

[0133] Specifically, within the accumulated first time period, the controller counts the proportion of IO read and write delays in the hard disk that do not exceed a first value, and compares the first value with a first threshold value, thereby determining the level corresponding to the hard disk. The controller counts the read delay and the write delay separately. Specifically, the controller counts the read or write delay of the hard disk, and determines the proportion of the read or write delay that exceeds the first value in the read or write delay.

[0134] It should be understood that hard disks include multiple levels, and the requirements for corresponding performance indicators of hard disks at different levels are different. By monitoring the performance indicators of the hard disk, the performance indicators are matched to the corresponding levels to determine the current level of the hard disk.

[0135] Exemplarily, the controller may classify the hard disks according to the IO latency of the hard disks as follows:

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

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

[0138] At the third level, 99.9% of IO latency does not exceed 100ms.

[0139] Correspondingly, taking the first level as an example, if the controller continuously monitors 0.01% of the IO delay exceeding 1ms for more than 1 hour / day / week. Or, if the controller continuously monitors N cycles with a cycle of 5 seconds, and if there are M cycles with 0.01% of the IO delay exceeding 1ms in N cycles, it means that the first condition is not met. N and M are both positive integers.

[0140] 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.

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

[0142] 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.

[0143] 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.

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

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

[0146] 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.

[0147] It should be understood that hard disks include multiple levels, and the reliability index requirements corresponding to different levels of hard disks are different. By monitoring the reliability index of the hard disk, the reliability index is matched to the corresponding level to determine the current level of the hard disk.

[0148] Exemplarily, the controller classifies 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:

[0149] At the first level, no more than one bad sector can be read for 1PB of data.

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

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

[0152] Correspondingly, taking the first level as an example, if the controller reads 1PB of data and one or more bad sectors appear. Or, if the controller reads 1PB of data as one cycle, if there are M cycles out of N cycles where one or more bad sectors appear when reading 1PB of data, it means that the first condition is not met. N and M are both positive integers.

[0153] 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.

[0154] 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.

[0155] Exemplarily, based on the IO latency of the hard disk and the number of bad sectors corresponding to reading data of a specified capacity in the hard disk, the hard disk can be graded as follows:

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

[0157] At the second level, 99.9% of IO latency does not exceed 10ms, and there is no more than 1 bad sector when reading 100TB of data.

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

[0159] The first level can be understood as a level with high IO latency requirements and bad sector ratio requirements for the hard disk, the second level can be understood as a level with average IO latency requirements and bad sector ratio requirements for the hard disk, and the third level can be understood as a level with low IO latency requirements and bad sector ratio requirements for the hard disk. It should be understood that in actual applications, the level of the hard disk can be set according to actual needs, which is only an example and not a limitation.

[0160] 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.

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

[0162] In the embodiment of the present application, after determining that the first indicator does not meet the first condition, the controller adjusts the level of the hard disk from the first level to the second level, so that the hard disk can continue to be used when the hard disk meets the requirements of the indicator, thereby extending the service life of the hard disk. The hard disk includes multiple levels, and the multiple levels include the first level and the second level. The requirements of the indicators of the hard disk at the first level are higher than those of the indicators at the second level. The levels of the hard disk are divided based on the indicators of the hard disk.

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

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

[0165] 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 controller adjusts the hard disk from the first level to the second level.

[0166] In this implementation, the controller first obtains the range of performance indicators corresponding to the hard disk at each level. When the controller determines that the first performance indicator does not meet the first condition, and determines that the first performance indicator belongs to the range of performance indicators corresponding to the hard disk at the second level, it means that the current performance indicator of the hard disk meets the indicator requirements corresponding to the hard disk at the second level. In this case, the controller adjusts the hard disk from the first level to the second level.

[0167] It is understandable that the controller can adjust the level of the hard disk when any one of the first performance indicator and the first reliability indicator is met, or adjust the level of the hard disk when both the first performance indicator and the first reliability indicator are met. Specifically, the hard disk can be controlled to be downgraded by one, two or more levels according to the actual deterioration of the hard disk. Among them, when the first indicator includes both the first performance indicator and the first reliability indicator, if the controller determines that the first performance indicator belongs to the range of the performance indicator corresponding to the hard disk at the third level, determines that the first reliability indicator belongs to the range of the reliability indicator corresponding to the hard disk at the second level, and the second level is different from the third level, then the controller adjusts the hard disk to the level with lower requirements for the corresponding indicators in the third level and the second level.

[0168] For example, assume that the hard disk has three levels, and the first level of the hard disk is the highest level. When the hard disk is detected to not meet the requirements of the indicators corresponding to the first level, the controller downgrades the hard disk. Figure 3 , Figure 3 A schematic diagram of hard disk grading provided in an embodiment of the present application.

[0169] from Figure 3As can be seen from the figure, if the controller detects that the current indicators of the hard disk meet the requirements of the corresponding indicators of the hard disk at a certain level, it will directly downgrade the hard disk from the first level to this level. Generally, the disk with the worst indicator performance is selected from the first level for downgrading. In addition, this level is not necessarily the second level. The controller can directly downgrade the hard disk by several levels to meet actual needs.

[0170] If the controller detects that the current performance index of the hard disk meets the requirements of the corresponding index of the hard disk at the second level, and the current reliability index of the hard disk meets the requirements of the corresponding index of the hard disk at the third level. If the requirements of the index corresponding to the third level are lower than those of the second level, the controller will downgrade the level of the hard disk to a lower level, that is, the third level.

[0171] 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.

[0172] 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 indicators corresponding to the first type of data are higher than the requirements for indicators corresponding to the second type.

[0173] In this implementation, hard disks of different levels store data of different business types with different index requirements. Data of different business types have different index requirements, and the data is stored in hard disks of different levels according to the requirements.

[0174] Corresponding to the level of the hard disk, data of different business types can also be divided into different levels. For example, the data of the business type of level 1 is stored in the level 1 hard disk, and the business has high requirements for latency and / or reliability. The data of the business type of level 2 is stored in the level 2 hard disk, and the business has average requirements for latency and / or reliability. The data of the business type of level 3 is stored in the level 3 hard disk, and the business has low requirements for latency and / or reliability.

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

[0176] Exemplarily, the user actively specifies the level requirements corresponding to data of different business types. Specifically, the user may specify the requirements of the data for latency or bad sectors, so that the controller stores the data in a hard disk of the corresponding level according to the requirements.

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

[0178] 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.

[0179] Exemplarily, the user can execute the level corresponding to the service on the interface through the display interface. For example, the controller directly provides an interface for selecting the level through the display interface. After the user selects a certain 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 information of the requirements of the latency and bad track indicators corresponding to the level. Optionally, the user can also directly enter the name of the service type, and the controller matches the corresponding level according to the name of the service type.

[0180] 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. Figure 4 , Figure 4 An operation display diagram of a method for extending the service life of a hard disk provided in an embodiment of the present application. When the controller monitors the hard disk's indicators and obtains a first indicator, the screen may display "Hard disk monitoring" to inform the user that the hard disk is currently in the state of indicator detection. When the controller determines that the first indicator does not meet the first condition and adjusts the hard disk's level, the screen may display "Hard disk level adjustment in progress". After the controller adjusts the hard disk's level, the screen may display "Hard disk level adjustment completed".

[0181] 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.

[0182] It is worth noting that, compared to directly discarding a hard disk when the hard disk does not meet the relevant requirements of a certain indicator, the embodiment of the present application matches data of different business types to hard disks of corresponding levels according to the availability of the disk and the indicator requirements of the type corresponding to the data. When the relevant indicators of the hard disk degrade, the hard disk is downgraded for use. Only when the indicator requirements of the hard disk do not meet the set minimum requirements will it be chosen not to be used, so as to extend the service life of the hard disk.

[0183] In Figures 1 to Figure 4 On the basis of the corresponding embodiments, in order to better implement the above solutions of the embodiments of the present application, the following also provides related devices for implementing the above solutions. Figure 5 , Figure 5 A schematic diagram of a hard disk service life extension device provided in an embodiment of the present application. The hard disk service life extension device may be located in Figure 1a The hard disk service life extension device 5000 comprises:

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

[0185] 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 requirement of the indicator of the hard disk at the first level is higher than the requirement of the indicator at the second level. The level of the hard disk is divided based on the indicator of the hard disk.

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

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

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

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

[0190] In a possible implementation, the adjustment module is further used to:

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

[0192] 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.

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

[0194] The first reliability index is within the range of the reliability index corresponding to the hard disk at the first level.

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

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

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

[0198] Get the range of reliability indicators corresponding to each level of the hard disk;

[0199] 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;

[0200] 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.

[0201] In one possible implementation, 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.

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

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

[0204] See also Figure 6 , Figure 6 A schematic diagram of the structure of a controller provided in an embodiment of the present application. Figure 6 As shown, the controller 6000 is implemented by a general bus architecture.

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

[0206] The processor 6001, the memory 6003, and the communication interface 6004 communicate via the communication bus 6002, and can 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 codes, and the processor 6001 can call the program codes stored in the memory 6003 to execute Figure 2 For specific implementation of steps 201 to 203 in the embodiment shown, please refer to Figure 2The specific description of steps 201 to 203 in the illustrated embodiment is not repeated here.

[0207] Optionally, the 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), or other programmable logic devices (PLD), transistor logic devices, hardware components, or any combination thereof. The above-mentioned PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0208] The communication bus 6002 is used to transmit information between the processor 6001, the memory 6003 and the communication interface 6004. The communication bus 6002 is divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0209] Optionally, 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 disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited to this. Optionally, the memory 6003 exists independently and is connected to the processor 6001 through the communication bus 6002. Optionally, the memory 6003 and the processor 6001 are integrated together.

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

[0211] In a specific implementation, as an embodiment, the processor 6001 includes one or more CPUs, such as Figure 6 CPU0 and CPU1 are shown in the figure.

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

[0213] In some embodiments, the memory 6003 is used to store program codes for executing the solution of the present application, and the processor 6001 executes the program codes stored in the memory 6003. That is, the hard disk service life extension device 6000 implements the embodiment of the hard disk service life extension method through the processor 6001 and the program codes in the memory 6003.

[0214] It is to be understood that the method steps in the embodiments of the present application may be implemented in hardware or in software instructions executable by the processor 6001. The software instructions may be composed of corresponding software modules, and the software modules may 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 thereto, and the structure of the device may not be limited thereto. Figure 6 A device may be a stand-alone device or may be part of a larger device. For example, a device may be:

[0215] (1) Independent integrated circuit IC, or chip, or chip system or subsystem;

[0216] (2) having a set of one or more ICs, and optionally, the IC set may also include a storage component for storing data and / or instructions;

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

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

[0219] (5)Others

[0220] 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.

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

[0222] Those of ordinary skill 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 to be beyond the scope of this application.

[0223] Those skilled in the art can 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.

[0224] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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.

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

[0226] 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.

[0227] 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 can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods 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.

[0228] 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 change 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 the units in this application is a logical division. There may be other division methods when implemented in actual applications. For example, multiple units can be combined 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 in multiple circuit units, and some or all of the units can be selected according to actual needs to achieve the purpose of the present application scheme.

[0229] The above is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The various digital 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 the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic.

[0230] 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, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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. It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is characterized in that The hard disk comprises a solid state disk.

10. A device for extending the service life of a hard disk, It is 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, It is 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, It is 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.

13. The device according to claim 11 or 12, It is 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, It is 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, It is 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, It is 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, It is 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, It is characterized in that The hard disk comprises a solid state disk.

19. A controller, It is 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, It is 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, It is 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

Cited By

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

    EP4664294A1

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

    WO2024178921A1