Hard disk scanning method and server

By dividing the hard disk into multiple areas and selecting a scanning strategy based on the failure risk level of each area, the problem of excessive scanning time in the existing hard disk scanning method is solved, and more efficient hard disk detection is achieved.

CN119668951APending Publication Date: 2025-03-21XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311232105.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing hard disk scanning method requires a full disk scanning of large-capacity hard disks, resulting in too long scanning time and reducing the efficiency of hard disk detection.

Method used

By obtaining the specification information of the hard disk and sample failure information in the fault database, divide the hard disk into multiple areas, and selecting different scanning strategies based on the fault risk level of each area to realize sub-region scanning.

Benefits of technology

It reduces the hard disk scanning time and improves the efficiency of hard disk detection, especially suitable for large-capacity hard disks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668951A_ABST
    Figure CN119668951A_ABST
Patent Text Reader

Abstract

The hard disk scanning method comprises the steps of obtaining specification information of a to-be-scanned hard disk; based on the specification information of the hard disk and a hard disk fault database, determining a first area with a first-level fault risk on the to-be-scanned hard disk; wherein specification information of a plurality of hard disk samples and fault information on each hard disk sample are recorded in the hard disk fault database; and based on the first-level fault risk, scanning the first area according to a first strategy. Regional scanning of the hard disk is realized, the scanning time is shortened, and the detection efficiency of the hard disk is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of servers, and in particular to a hard disk scanning method and a server. Background Art

[0002] During operation, the mechanical hard disk drive (HDD) is affected by particles, dirt, weak writing, etc., which will produce defects such as bad sectors and bad blocks on the disc. These defects need to be detected by scanning and other methods. The existing industry-wide HDD scanning method is long DST, which is a 100% full disk scan of the hard disk. Under normal circumstances, the rate of full disk scanning is about 1.7H / T. As the capacity of HDD gradually increases, the time spent on full disk scanning is also getting longer and longer. For large-capacity disks such as 18T and 20T, the scanning time is usually more than 30H. Excessive scanning time leads to lower and lower HDD detection efficiency. Summary of the invention

[0003] The embodiments of the present application provide a hard disk scanning method and a server, which realizes the scanning of hard disk by area, reduces the scanning time, and improves the detection efficiency of hard disk.

[0004] In a first aspect, an embodiment of the present application provides a hard disk scanning method, including: obtaining specification information of a hard disk to be scanned; determining a first area on the hard disk to be scanned that has a first level failure risk based on the specification information of the hard disk and a hard disk failure database; wherein the hard disk failure database records specification information of multiple hard disk samples and failure information of each hard disk sample; based on the first level failure risk, scanning the first area according to a first strategy.

[0005] In this solution, the hard disk to be scanned is divided into at least one area. For the first area in the at least one area, the fault risk level of the first area is determined to be the first level according to the fault information of the hard disk sample stored in the hard disk fault database. Then, according to the fault risk level of the first area, the first area is scanned according to the first strategy. By partitioning the hard disk to be scanned and selecting different scanning strategies according to the risk levels of different areas, the hard disk to be scanned is scanned in different areas, thereby improving the scanning efficiency of the hard disk.

[0006] In one possible implementation, based on the specification information of the hard disk and a hard disk fault database, determining a first area on the hard disk to be scanned that has a first level failure risk includes: obtaining, from the hard disk fault database, according to the specification information of the hard disk, failure information of a hard disk sample that has the same specification information as the hard disk to be scanned; determining, based on the failure information of the hard disk sample, a probability of failure occurring in the first area on the hard disk to be scanned when the number of hard disk samples obtained is greater than or equal to a first threshold; and determining, based on the failure information of the hard disk sample, that the failure risk level of the first area is the first level when the probability of failure occurring in the first area is greater than or equal to a second threshold.

[0007] That is to say, when judging the fault risk level of the first area on the hard disk to be scanned, the fault information of the hard disk sample with the same specification information can be obtained from the hard disk fault database according to the specification information of the hard disk to be scanned. When the number of hard disk samples obtained is greater than or equal to the first threshold, the fault risk level of the first area is determined according to the fault information of the hard disk samples. By judging the number of hard disk samples obtained, it is ensured that the more hard disk samples are obtained from the hard disk fault database. The more hard disk samples are obtained from the hard disk sample database, the more accurate the probability of fault in the first area predicted by the fault information of the obtained hard disk samples.

[0008] In one possible implementation, the probability of a fault occurring in a first area on a hard disk to be scanned is determined based on the fault information of the hard disk sample, including: determining the probability of a fault occurring in the first area on the hard disk to be scanned based on the fault area information carried in the fault information of the hard disk sample, the fault area information including at least: an address range of the fault area, and the number of faults in the fault area; or, determining the probability of a fault occurring in the first area on the hard disk to be scanned based on the fault address information carried in the fault information of the hard disk sample.

[0009] That is to say, the hard disk sample information stored in the hard disk fault database can be stored in two ways. The first storage method is to store the hard disk sample fault information by region. Under the first storage method, the regions divided on the hard disk to be scanned need to correspond to the regions divided in the hard disk sample in the hard disk fault database; after obtaining the fault region information in the hard disk sample fault information, the probability of a possible fault in the first region is determined based on the fault probability occurring in the fault region corresponding to the first region on the hard disk to be scanned. The second storage method is to store the hard disk sample fault information in units of hard disks. Under the second storage method, after obtaining the hard disk sample fault information, the probability of a possible fault in the first region on the hard disk to be scanned is determined based on the fault address information carried in the fault information.

[0010] In a possible implementation, the method also includes: when the probability of a failure occurring in the first area is less than a second threshold, determining that the failure risk level of the first area is a second level; wherein the risk level of the second level failure risk is less than the first level failure risk; and based on the second level failure risk, scanning the first area according to a second strategy.

[0011] That is to say, when the probability of failure in the first area is less than the second threshold, the failure risk level of the first area can be determined to be the second level, and the first area is scanned according to the second strategy based on the failure risk level of the first area. When the probability of failure in the first area is low, the second strategy with a lower scanning coverage is used to scan the first area, thereby improving the scanning efficiency of the hard disk.

[0012] In a possible implementation, the method further includes: when the number of hard disk samples obtained is less than a first threshold, determining that the failure risk level of the first area on the hard disk to be scanned is a first level.

[0013] That is, when the number of hard disk samples obtained from the hard disk failure database is not enough, such as less than the first threshold, in order to ensure the accuracy of the hard disk scanning result, all areas of the second hard disk need to be marked as the first risk level to ensure the scanning accuracy of the hard disk to be scanned.

[0014] In a possible implementation, scanning the first area according to a first strategy based on the first level failure risk includes: scanning all sectors in the first area.

[0015] In a possible implementation, based on the second level failure risk, the first area is scanned according to a second strategy, including: performing interval scanning on sectors in the first area; if a sector in the first area has defects, scanning sectors adjacent to the sector.

[0016] That is to say, during the process of scanning the sectors in the low-risk area, if a sector in the low-risk area has a defect, the sectors adjacent to the defective sector also have the risk of defects. Therefore, in order to improve the accuracy of the hard disk scanning results, it is necessary to scan all sectors adjacent to the defective sector.

[0017] In a possible implementation, the method further includes: saving specification information of the hard disk to be scanned and the scanning result of the first area into the hard disk fault database.

[0018] That is to say, after scanning the first area of ​​the hard disk to be scanned, the scanning result needs to be saved in the hard disk information database to achieve the purpose of updating the hard disk fault information in the hard disk information database in real time.

[0019] In a possible implementation, saving the scanning result of the first area to the hard disk fault database includes: saving the range information of the first area, the number of faults occurring in the first area, and the type of faults occurring in the first area to the hard disk fault database.

[0020] That is to say, when the scanning result of the first area is saved in the hard disk fault database, it can be stored in units of areas divided on the hard disk to be scanned.

[0021] In one possible implementation, after saving the scanning results of the first area in the hard disk fault database, the method also includes: obtaining, from the hard disk fault database, fault information of a hard disk sample having the same specification information as the hard disk to be scanned, based on the specification information of the hard disk; and redetermining the failure risk level of the first area based on the failure information of the hard disk sample.

[0022] That is, after the scan result of the hard disk to be scanned is stored in the hard disk fault database, the risk level of each area on the hard disk to be scanned can be updated in real time according to the fault information of the hard disk sample stored in the hard disk fault database.

[0023] In one possible implementation, the failure risk level of the first area is redetermined based on the failure information of the hard disk sample, including: redetermining the probability of failure occurring in the first area on the hard disk to be scanned based on the failure information of the hard disk sample; if the failure risk level of the first area is the first level, and the redetermined probability of failure occurring in the first area is less than or equal to a third threshold, adjusting the failure risk level of the first area to the second level, and the third threshold is less than the second threshold; if the failure risk level of the first area is the second level, and the redetermined probability of failure occurring in the first area is greater than or equal to the second threshold, adjusting the failure risk level of the first area to the first level.

[0024] That is to say, after the scanning result of the first area is saved in the hard disk fault database, the risk level of the first area can also be updated according to the hard disk sample fault information in the hard disk fault database. For example, when the current risk level of the first area is the first level, if the probability of failure in the first area determined based on the fault information of the hard disk sample in the newly acquired hard disk fault database is less than the third threshold, the fault risk level of the first area can be adjusted to the second level. When the current risk level of the first area is the second level, if the probability of failure in the first area determined based on the fault information of the hard disk sample in the newly acquired hard disk fault database is greater than or equal to the second threshold, the fault risk level of the first area can be adjusted to the first level. Dynamic adjustment of the risk level of each area on the hard disk to be scanned is achieved.

[0025] In a second aspect, an embodiment of the present application further provides a server, including:

[0026] at least one memory for storing a program;

[0027] At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0028] In a third aspect, an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0031] Figure 1 A schematic diagram of sectors of a hard disk provided in an embodiment of the present application;

[0032] Figure 2a A schematic diagram of an application scenario provided for an embodiment of the present application;

[0033] Figure 2b A schematic diagram of another application scenario provided for an embodiment of the present application;

[0034] Figure 2c A schematic diagram of another application scenario provided for an embodiment of the present application;

[0035] Figure 3 A schematic diagram of the hardware structure of a server provided in an embodiment of the present application;

[0036] Figure 4 A flowchart of a hard disk scanning method provided in an embodiment of the present application;

[0037] Figure 5 A flowchart of a hard disk scanning method provided in an embodiment of the present application;

[0038] Figure 6A partial structural diagram of a hard disk provided in an embodiment of the present application;

[0039] Figure 7 A schematic diagram of a hard disk provided in an embodiment of the present application;

[0040] Figure 8 A schematic diagram of scanning a high / risk area on a target hard disk provided in an embodiment of the present application;

[0041] Fig. 9 A schematic diagram of bad block / bad track distribution on a target hard disk provided in an embodiment of the present application;

[0042] Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0044] In the description of the embodiments of the present application, any embodiment or design scheme of "exemplary", "for example" or "for example" should not be understood as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0046] Hard disks can be installed in various servers as the basic hardware for server operation, storing data or codes required for running hardware. The most basic component of a hard disk is a disk made of hard metal material coated with magnetic media. The number of disks in hard disks of different capacities varies. Each disk has two sides, both of which can record information. The disk is divided into many sector-shaped areas, each of which is called a sector. Concentric circles of different radii on the surface of the disk with the center of the disk as the center are called tracks. The cylinder composed of tracks of the same radius on different disks is called a cylinder.

[0047] The addressing methods on the hard disk include: CHS addressing mode and LBA addressing mode. Among them, CHS stands for Cylinder, Heads, and Sector. These three parameters are used to locate a sector. The cylinder parameter is used to move the head arm to a certain radius, the head parameter is used to determine which track on the disk surface, and the sector parameter is used to determine the specific location of a sector on the track.

[0048] LBA, logical block address (LBA), in the LBA address, the address no longer represents the actual physical address (cylinder, head and sector) of the actual hard disk. The LBA addressing method converts the three-dimensional addressing method of CHS into a one-dimensional linear addressing method. It converts the C / H / S numbers of all physical sectors of the hard disk into linear numbers according to certain rules. Assuming that CHS addressing is represented by the triple CHS=(C, H, S), then LBA=(C×number of heads+H)×number of sectors+(S-1). Among them, C represents the cylinder parameter, H represents the head parameter, S represents the sector parameter, and (C×number of heads+H)×number of sectors+(S-1) is the linear number.

[0049] Hard disks include mechanical hard disks HDDs and solid-state hard disks SSDs. Mechanical hard disks are mainly composed of several parts such as a magnetic head assembly, a magnetic head drive mechanism, a disk group, a control circuit and an interface. A solid-state hard disk is a hard disk made of a solid-state electronic storage chip array. In the embodiments of the present application, there is no limitation on the type of hard disk.

[0050] Since the hard disk will be affected by particles, dirt, weak writing, etc. during operation, bad sectors, bad blocks and other defects will be generated on the hard disk. To find these defects, the hard disk needs to be scanned. DST (Disk Self Test) is the self-test function of the hard disk, including Short DST (short hard disk self-test) and Long DST (full hard disk self-test). These two self-test functions can be implemented using the smartctl command in the Linux system. The current common hard disk scanning method is Long DST, which is to perform a 100% full disk scan on the hard disk.

[0051] For example, Figure 1 A schematic diagram showing sectors on a hard disk is shown. Figure 1 , Figure 1 Each small square "Y" in the diagram represents a sector on the hard disk. Performing a Long DST scan on a hard disk means scanning all sectors on the hard disk in sequence according to the LBS address of each sector on the hard disk.

[0052] Although Long DST scanning of the hard disk can detect all defects on the hard disk, as the hard disk capacity gradually increases, the time spent on the full disk scan of the hard disk is getting longer and longer, reducing the efficiency of hard disk detection.

[0053] In view of this, an embodiment of the present application provides a hard disk scanning method, which divides a hard disk to be scanned into multiple areas. Then, based on the database information storing the hard disk information and the pre-set high-risk and low-risk area division criteria, a risk level is defined for each area on the hard disk to be scanned. Then, different scanning methods are selected for different risk levels of each area.

[0054] For example, Figure 2a A schematic diagram of an application scenario provided by an embodiment of the present application is shown, such as Figure 2a As shown, the scenario includes: a server 100 and a hard disk 200. The server 100 and the hard disk 200 can be connected via a communication interface. The server 100 includes a hard disk fault database storing hard disk fault information. When the processor in the server 100 scans the hard disk 200, it is necessary to divide the hard disk 200 into multiple areas, and define a risk level for each area on the hard disk 200 according to the fault information stored in the hard disk fault database and the pre-set high- and low-risk area division standards. Then, the processor in the server 100 selects different scanning strategies for different areas according to the risk level defined for each area on the hard disk 200. For example, the scanning strategy selected for the high-risk area is full-area scanning, and the scanning strategy selected for the low-risk area is interval scanning, and the scanning results of the hard disk are recorded in the database.

[0055] Figure 2b FIG. 2 shows another application scenario schematic diagram provided by an embodiment of the present application. Figure 2b As shown, the scenario includes: a server 100, a hard disk 200 and a remote server 300. The server 100 and the hard disk 200 can be connected via a communication interface, and the remote server 300 includes a hard disk fault database storing hard disk fault information. When the processor in the server 100 scans the hard disk 200, it is necessary to divide the hard disk 200 into multiple areas. Then, the processor in the server 100 defines a risk level for each area on the hard disk 200 based on the fault information obtained from the hard disk fault database on the remote server 300 and the pre-set high- and low-risk area division criteria. The processor in the server 100 selects different scanning strategies for different areas based on the risk level defined for each area on the hard disk 200, and records the obtained scanning results in the database on the remote server 300. The remote server 300 can be a cloud server or other server, and the application embodiments of the present invention do not limit this.

[0056] It is understandable that the server 100 and the hard disk 200 may be independent of each other, and the server 100 serves as a hard disk scanning device specifically used to scan the hard disk 200. The hard disk 200 may also be integrated in the server 100.

[0057] Figure 2c FIG. 2 shows another application scenario schematic diagram provided by an embodiment of the present application. Figure 2a and Figure 2b The application scenario shown is different in that Figure 2a and Figure 2b The application scenario shown is mainly for the scenario where the server manufacturer detects the hard disk in the server before the server leaves the factory. Figure 2c It is mainly aimed at the scenario of testing the hard disk on the server used by the user. Figure 2c As shown, the scenario includes: a server 100, a remote server 300, and a detection server 400, wherein the detection server 400 includes a hard disk 200. The server 100 is a server on the manufacturer's side, and the detection server 400 is a server on the user's side. When using the detection server 400, the user can regularly scan the hard disk 200 on the detection server 400 to understand whether there are defects on the hard disk 200. Before scanning the hard disk 200, the processor in the detection server 400 can obtain the scanning strategy of the hard disk 200 from the server 100. Specifically, the detection server 400 can send the specification information of the hard disk 200 to the server 100. The server 100 determines the scanning strategy of the hard disk 200 based on the received specification information of the hard disk 200, and the specification information of multiple hard disk samples and the fault information of the hard disk samples stored in the hard disk fault database in the remote server 300. The server 100 sends the scanning strategy of the hard disk 200 to the detection server 400, so that the detection server 400 can scan the hard disk 200 according to the scanning strategy.

[0058] For example, Figure 3 1 shows a schematic diagram of the structure of a server. The server 100 includes hardware, and the server 100 may be, but is not limited to, a server, a personal computer (PC), a tablet computer, or other electronic device. The type of the server 100 in the embodiment of the present application is not specifically limited. Figure 3 As shown, the server 100 includes: a processor 110, a network interface 120, and a memory 130. The processor 110, the network interface 120, and the memory 130 may be connected via a bus or other means.

[0059] The processor 110 is the computing core and control core of the server 100. The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors.

[0060] The memory 130 is composed of hardware or other storage devices. The memory 130 may store a program, which can be executed by the processor 110, so that the processor 110 executes part or all of the methods required to be executed by the server 100 provided in the embodiments of the present application.

[0061] The memory 130 may also store data. The processor 110 may read the data stored in the memory 130. The memory 130 and the processor 110 may be provided separately. Optionally, the memory 130 may also be integrated in the processor 110.

[0062] The network interface 120 may include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), and is controlled by the processor 110 to send and receive data.

[0063] In some embodiments, the server 100 may further include an input device 140. Information may be input to the server 100 and / or control instructions may be issued via the input device 140. For example, the input device 140 may be, but is not limited to, a mouse, a keyboard, or the like.

[0064] It is understandable that the embodiments of the present application Figure 3 The illustrated structure does not constitute a specific limitation on the server 100. In other embodiments of the present application, the server 100 may include more or fewer components than those shown in the figure, or combine some components, or split some components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0065] Next, based on the above description, a hard disk scanning method provided by an embodiment of the present application is introduced. It can be understood that the method is proposed based on the above description, and part or all of the contents of the method can refer to the above description. Figure 4 is a flowchart of a hard disk scanning method provided by an embodiment of the present application. The method can be Figure 3 The processor in the server 100 shown executes, as shown in FIG. Figure 4 As shown, the method includes the steps: step 401-step 403.

[0066] Step 401, obtaining specification information of the hard disk to be scanned.

[0067] In this embodiment, the hard disk to be scanned may be a hard disk built into the server 100 or a hard disk not built into the server 100 .

[0068] Before scanning the hard disk to be scanned, it is necessary to first obtain the specification information of the hard disk to be scanned. The specification information of the hard disk to be scanned may include: one or more of the hard disk model, the hard disk capacity, and the hard disk manufacturer.

[0069] Step 402: Based on the specification information of the hard disk and the hard disk failure database, determine a first area on the hard disk to be scanned that has a first level of failure risk.

[0070] In this embodiment, it is necessary to establish a hard disk fault database in advance, and the hard disk database can be deployed on the server 300. The hard disk fault database records the specification information of multiple hard disk samples and the fault information on each hard disk sample. The fault risk level of the hard disk to be scanned includes: a first level and a second level, wherein the risk level of the second level is lower than the risk level of the first level. The first level may correspond to the high risk in the above embodiment, and the second level may correspond to the low risk in the above embodiment.

[0071] After the processor obtains the specification information of the hard disk to be scanned, the processor needs to obtain the fault information of the hard disk sample with the same specification as the hard disk to be scanned from the hard disk fault database according to the obtained specification information of the hard disk to be scanned.

[0072] In a possible example, the acquired fault information of the hard disk sample may be information of the area where the fault occurs on the hard disk sample. The fault area information includes at least: the address range of the fault area and the number of faults in the fault area. The address range of the fault area may refer to the address range of the fault area on the hard disk sample. For example, it may be a logical block address LBA or a CHS address.

[0073] The acquired fault information of the hard disk sample may also be information about the fault that occurs on the hard disk sample, wherein the information about the fault that occurs on the hard disk sample includes: the type of the fault, the address of the fault on the hard disk sample, and the like.

[0074] In a possible example, the specification information of the target hard disk includes: hard disk model, manufacturer, hard disk capacity and other information. When the number of hard disk sample failure information stored in the hard disk failure database is sufficient, the server can obtain the failure information of the hard disk sample with the same model as the target hard disk from the hard disk failure database according to the model of the target hard disk. When the number of hard disk sample failure information stored in the hard disk failure database is limited, the server can also obtain the failure information of the hard disk sample with the same size and capacity as the target hard disk from the hard disk failure database according to the hard disk capacity of the target hard disk. The server can also obtain the failure information of the hard disk sample with the same manufacturer as the target hard disk from the hard disk failure database according to the manufacturer of the target hard disk.

[0075] After the processor obtains the fault information of the hard disk sample with the same specification information as the target hard disk in the hard disk fault database, it is also necessary to determine whether the number of hard disk samples obtained is greater than the first threshold. If the number of hard disk samples obtained is greater than or equal to the first threshold, it indicates that the hard disk sample quantity obtained by the processor is sufficient, and the probability of a fault occurring in the first area of ​​the hard disk to be scanned can be predicted based on the fault information of the hard disk sample obtained. Specifically, the processor corresponds the defect to the hard disk to be scanned based on the address information of the defect carried in the fault information of the hard disk sample. Then, the processor determines the number of defects corresponding to the first area, and determines the probability of defects occurring in the first area based on the number of defects in the first area and the number of hard disk samples obtained. If the probability of defects occurring in the first area is greater than or equal to the second threshold, it can be determined that the fault risk level of the first area is the first level (high risk). If the probability of faults occurring in the first area is less than the second threshold, it can be determined that the fault risk level of the first area is the second level (low risk).

[0076] If the number of hard disk samples acquired by the processor is less than the first threshold, it indicates that the number of hard disk samples acquired is too small to be used to predict the probability of failure in each area of ​​the hard disk to be scanned. At this time, in order to ensure the accuracy of the hard disk to be scanned, the risk level of the entire hard disk to be scanned needs to be set to the first level, that is, the risk level of the first area is also the first level.

[0077] Step 403: Based on the first level of failure risk, scan the first area according to the first strategy.

[0078] In this embodiment, when the fault risk level of the first area is the first level, the processor needs to scan the first area according to the first strategy, wherein the first strategy may be to scan all sectors in the first area.

[0079] When the fault risk level of the first area is the second level, the processor needs to perform interval scanning on the sectors in the first area. For example, 25% and 50% of the sectors in the first area are scanned. In the process of performing interval scanning on the sectors in the first area, if a defective sector is scanned, it is also necessary to scan the sectors adjacent to the sector.

[0080] In one possible example, after scanning the first area on the hard disk to be scanned, the processor may also update the fault risk level of the first area according to the scanning result. For example, when the fault risk level of the first area is the second level, the processor determines the probability of a fault occurring in the first area according to the number of defects scanned in the first area. When the probability of a fault occurring in the first area is greater than or equal to the second threshold, the fault risk level of the first area is updated to the first level. When the fault risk level of the first area is the first level, the processor determines the probability of a fault occurring in the first area according to the number of defects scanned in the first area. When the probability of a fault occurring in the first area is less than or equal to the third threshold, the fault risk level of the first area is updated to the second level.

[0081] After the processor completes scanning the hard disk to be scanned, it is also necessary to save the specification information of the hard disk to be scanned and the scanning result of the hard disk to be scanned into the hard disk fault database. In a possible example, the range information of the first area, the number of faults occurring in the first area, and the type of faults occurring in the first area can be saved into the hard disk fault database.

[0082] In one possible example, the processor may periodically obtain the fault information of hard disk samples in the hard disk fault database that have the same specification information as the hard disk to be scanned. Then, the processor redetermines the fault risk level of the first area based on the acquired fault information of the hard disk samples. Specifically, the processor may redetermine the probability of a fault occurring in the first area based on the acquired fault information of the hard disk samples. If the fault risk level of the first area is the first level, and the redetermined probability of a fault occurring in the first area is less than or equal to a third threshold, the fault risk level of the first area is adjusted to the second level. If the fault risk level of the first area is the second level, and the redetermined probability of a fault occurring in the first area is greater than or equal to the second threshold, the fault risk level of the first area is adjusted to the first level.

[0083] It is understandable that the first threshold, the second threshold and the third threshold can be preset by the user. The third threshold is smaller than the second threshold.

[0084] For example, based on the hard disk specification information and the hard disk fault database, the risk level of each area on the hard disk to be scanned is determined, and the specific process of adopting different scanning strategies for each area based on the risk level of each area can be referred to. Figure 5 See also Figure 5 The method includes: step 501-step 509.

[0085] Step 501: Acquire fault information of multiple hard disk samples from a hard disk fault database.

[0086] In this embodiment, the processor in the server can scan the hard disk built into the server, and can also scan the hard disk not built into the server. Before the processor scans the hard disk to be scanned, it needs to establish a hard disk fault database, which is used to record the specification information and fault information of various hard disks. For example, hard disk model, hard disk capacity, hard disk manufacturer, quantity, bad block / bad track address and other information.

[0087] The processor obtains the fault information of multiple hard disk samples from the hard disk fault database, wherein the hard disk fault database can be built-in in the current server, or can be set on other devices, such as a cloud server. When the processor obtains the fault information of multiple hard disk samples, it can obtain the multiple hard disk sample information from the hard disk fault database according to the specification information of the target hard disk. The specification information of the target hard disk includes: hard disk model, manufacturer, hard disk capacity and other information.

[0088] In a possible example, the fault information of the hard disk sample obtained by the processor from the hard disk fault database may include the fault area information of the hard disk sample, or the fault information on the hard disk sample. The fault area information at least includes: the address range of the fault area, the number of faults in the fault area; the fault information on the hard disk sample at least includes: the address information of the fault on the hard disk sample.

[0089] In a possible example, when the amount of fault information of hard disk samples stored in the hard disk fault database is sufficient, the processor may obtain fault information of hard disk samples having the same model as the target hard disk from the hard disk fault database according to the model of the target hard disk.

[0090] In the case where the number of hard disk failure information stored in the hard disk failure database is limited, the processor may also obtain the failure information of hard disk samples with the same capacity as the target hard disk from the hard disk failure database according to the hard disk capacity of the target hard disk. The processor may also obtain the failure information of hard disk samples with the same manufacturer as the target hard disk from the hard disk failure database according to the manufacturer of the target hard disk.

[0091] In a possible example, before the processor obtains the fault information of the hard disk sample from the hard disk fault database, the processor also needs to receive the specification information of the target hard disk sent by the detection server on the user side. The processor obtains the fault information of multiple hard disk samples from the hard disk fault database according to the received specification information of the target hard disk. Then, the processor generates a detection strategy for the target hard disk according to the obtained fault information of the hard disk sample.

[0092] Step 502 , determining whether the number of hard disk samples obtained from the hard disk failure database is greater than or equal to a first threshold, if so, executing step 504 , otherwise executing step 503 .

[0093] In this embodiment, the processor obtains the fault information of multiple hard disk samples from the hard disk fault database. If the number of hard disk samples that can be obtained from the hardware fault database is greater than or equal to a preset first threshold, it indicates that the sample size in the hard disk fault database is sufficient, and the target hard disk can be pre-judged based on the fault information of the hard disk samples stored in the hard disk fault database. If the number of hard disk samples that can be obtained from the hardware fault database is less than the preset first threshold, it indicates that the number of hard disk samples in the hard disk fault database is limited and cannot be used to pre-judgment the target hard disk.

[0094] Step 503: define the entire target hard disk as a high-risk area.

[0095] In this embodiment, if the number of hard disk samples that the processor can obtain from the hard disk fault database is less than or equal to the first threshold, it indicates that the number of samples in the hard disk fault database is insufficient. The pre-judgment of the possible defects on the target hard disk based on the fault information of the hard disk samples that have been obtained may not be accurate enough. Therefore, in this case, the entire target hard disk can be defined as a high-risk area.

[0096] Step 504: divide the target hard disk into N areas, and obtain the probability of failure in each of the N areas, where N is a natural number greater than or equal to 1.

[0097] In this embodiment, the probability of a fault occurring in each area can be referred to as a defect rate, and the defect rate refers to the probability of a defective sector occurring in the corresponding area. Among them, a defective sector refers to a bad block or bad track existing in the sector. The processor obtains the fault information of multiple hard disk samples from the hard disk fault database. Taking the fault information obtained as the information of the fault on the hard disk sample as an example, the fault information of the hard disk sample obtained includes information such as the model and quantity of the hard disk and the address of the bad block or bad track on the hard disk. After the server obtains the bad block or bad track information in the fault information of the hard disk sample, it determines which area of ​​the N areas of the target hard disk and which sector in the area the address of the bad block or bad track information corresponds to according to the address of the bad block or bad track information obtained. The processor corresponds all the bad blocks or bad tracks in the fault information of the hard disk sample obtained to the target hard disk, and can obtain the number of sectors that may have defects in each area of ​​the target hard disk. Then, the processor can obtain the probability of a fault occurring in the area (i.e., the defect rate) according to the number of sectors that may have defects in a certain area on the target hard disk and the number of hard disk samples obtained from the hard disk fault database. For example, defect rate = number of defects in the area of ​​the target hard disk / total number of hard disk samples obtained from the hard disk failure database.

[0098] In a possible example, if the acquired hard disk sample fault information is the hard disk sample fault area information, the area divided on the target hard disk needs to correspond to the area divided on the hard disk sample in the hard disk fault database. After acquiring the fault area information in the hard disk sample fault information, the probability of a possible fault on the area on the target hard disk is determined based on the probability of a fault occurring on the fault area corresponding to the area on the target hard disk.

[0099] In a possible example, since a hard disk is composed of at least one disk, each disk includes two upper and lower disk surfaces. When dividing the target hard disk, the target hard disk can be divided by disk surface. For example, Figure 6 A schematic diagram of the structure of a hard disk is shown. Figure 6 The target hard disk shown includes three disks. If the target hard disk is divided into six areas (area 1 to area 6) based on the disk surface, each disk surface is one area.

[0100] In a possible example, each disk surface in a hard disk is divided into a number of identical concentric tracks, and the tracks are numbered from the periphery, starting from 0, and each track is divided into a number of sectors. When dividing the target hard disk, it can be divided by tracks. For example, Figure 7 A schematic diagram of a hard disk surface is shown. Figure 7The disk surface shown includes tracks 0 to 7. When partitioning the target hard disk, for each disk surface in the target hard disk, two tracks can be divided into one area. Figure 7 Taking the disk shown as an example, the disk can be divided into 4 areas (area 1-area 4).

[0101] Understandably, Figure 6 and Figure 7 Two target hard disk partitioning methods are merely provided as examples. In a specific implementation process, other methods may also be used to partition the target hard disk, and the embodiments of the present application do not limit this.

[0102] In a possible example, the bad blocks or bad sectors carried in the acquired fault information of multiple hard disk samples may be located on the target hard disk, and then the target hard disk may be divided into N areas, and the number of bad blocks or bad sectors corresponding to each area may be counted.

[0103] In another possible example, the hard disk samples in the hard disk failure database can be divided into N areas in advance, and then the number of bad blocks or bad tracks in each area can be counted by area. Then, the target hard disk is divided into N areas in the same non-partitioning manner as the hard disk samples. Among them, the N areas on the target hard disk correspond one-to-one to the N areas on the hard disk samples. The number of bad blocks or bad tracks in each area on the hard disk sample obtained is the number of bad blocks or bad tracks in the corresponding area on the target hard disk.

[0104] In the embodiment of the present application, there is no execution order between step 504 and step 501 and step 502. In the specific execution process, step 501 and step 502 may be executed first, and then step 504. Step 504 may also be executed first, and then step 501 and step 502. Step 501 and step 504 may also be executed first, and then step 502. Under this execution order, if it is determined in step 502 that the number of hard disk samples obtained from the hard disk failure database is greater than the first threshold, step 505 is executed.

[0105] Step 505 , for each of the N areas, determine whether the probability of a fault occurring in the area is greater than or equal to a second threshold, if so, execute step 508 , otherwise execute step 506 .

[0106] In this embodiment, the high and low risk area standards of the hard disk can be pre-set. For example, a second threshold is pre-set, and the probability of failure in each of the N areas is compared with the second threshold, and the risk level of each area in the N areas is determined according to the comparison result.

[0107] Step 506: define the area as a low-risk area.

[0108] In this embodiment, the failure risk level of the hard disk area includes: a high risk level and a low risk level. When the probability of failure in any area is less than a second threshold, the area can be determined as a low risk area.

[0109] Step 507: perform interval scanning on the low-risk area, and store the scanning results in the hard disk failure database.

[0110] In this embodiment, for the low-risk area in the target hard disk, since the probability of bad blocks or bad sectors occurring in the low-risk area is small, it is possible to select to perform a partial scan on the sectors in the low-risk area.

[0111] In one possible example, Figure 8 As shown in b in FIG. 1 , each small square is a sector. The sectors that need to be scanned are marked with "Y", and the sectors that do not need to be scanned are marked with "N". When performing interval scanning on sectors in the low-risk area, the scanning can be performed at intervals of one sector. Figure 8 Scanning in the manner shown in b can achieve scanning of 50% of the sectors in the low-risk area.

[0112] In a possible example, when scanning sectors in a low-risk area, the scanning may be performed at intervals of a plurality of sectors. Figure 8 As shown in c in the figure, each small square is a sector. The sectors to be scanned are marked with "Y", and the sectors not to be scanned are marked with "N". When scanning sectors in the low-risk area, the columns or rows to be scanned can be selected at intervals of one column or one row. For the sectors in the selected columns or rows, the scanning can be performed at intervals of one sector. Figure 8 Scanning in the manner shown in c can achieve scanning of 25% of the sectors in the low-risk area.

[0113] Understandably, Figure 8 The sector scanning method of the low-risk area shown in b and c is only an exemplary description. In the embodiment of the present application, when a sector in the low-risk area is partially scanned, the scanning ratio of the sector in the low-risk area can be adjusted, such as: 75%, 50%, 45%, 30%, etc., and the embodiment of the present application does not limit this.

[0114] When scanning the sectors in the target low-risk area, the processor may adjust the scanning ratio of the sectors in the low-risk area in real time according to the scanning result of the low-risk area. Specifically, the process includes steps 5071 to 5073.

[0115] Step 5071, determine whether there are defects in the scanned sector, if so, execute step 5072, otherwise execute step 5073.

[0116] The low-risk area is scanned at intervals, and the scanning results include two types. In the first case, the scanned sectors have no defects. In this case, all sectors in the low-risk area can be considered normal. In the second case, there are sectors with defects in the scanned sectors. For sectors with defects, the adjacent sectors also have a high probability of defects.

[0117] Step 5072, scan the sectors adjacent to the defective sector.

[0118] If a sector is found to be defective during the scanning process, the sectors adjacent to the defective sector also need to be scanned. Figure 8 In d, if an abnormality occurs in a sector in the low-risk area, the eight sectors adjacent to the sector need to be scanned.

[0119] Step 5073, save the scan results to the hard disk failure database.

[0120] In this embodiment, after the processor completes scanning the low-risk area, it is also necessary to save the scanning results of the low-risk area into the hard disk fault database. In the case where there are bad blocks or bad sectors in the low-risk area, it is necessary to save information such as the hard disk model, quantity, and address of the bad blocks or bad sectors to which the bad blocks or bad sectors belong in the hard disk fault database to increase the number of hard disk samples in the hard disk fault database.

[0121] In one possible example, when there are defects in the low-risk area, the probability of a fault occurring in the low-risk area is determined according to the number of sectors with defects in the low-risk area. When the probability of a fault occurring in the low-risk area is greater than or equal to a second threshold, the low-risk area is marked as a high-risk area.

[0122] Step 508: define the area as a high-risk area.

[0123] In this embodiment, the risk level of the hard disk area includes: a high risk level and a low risk level. When the probability of a failure occurring in any area is greater than or equal to a second threshold, the area can be determined to be a high risk area.

[0124] Step 509: perform a full area scan on the high-risk area and store the scan result in the hard disk failure database.

[0125] In this embodiment, for the high-risk area in the target hard disk, since the probability of bad blocks or bad sectors occurring in the high-risk area is higher, it is necessary to scan all sectors in the high-risk area. Figure 8 As shown in a in .

[0126] After scanning the target hard disk by region and saving the scanning results of the high-risk region and the low-risk region in the target hard disk to the hard disk fault database, the processor can also periodically obtain the hard disk fault information stored in the hard disk fault database and update the risk level of each region in the target hard disk according to the newly obtained hard disk fault information. Specifically, steps 1 to 3 are included.

[0127] Step 1: According to the specification information of the target hard disk, the failure information of at least one hard disk sample having the same specification as the target hard disk is obtained from a hard disk failure database.

[0128] Step 2: recalculate the probability of failure in each high-risk area of ​​the target hard disk according to the acquired at least one hard disk failure information.

[0129] Step 3: Recalculate the probability of failure in each area on the target hard disk and update the failure risk level of each area.

[0130] According to the fault risk level of each area, for a low-risk area, if the probability of a fault occurring in the area after recalculation is greater than or equal to the second threshold, the risk level of the area is updated to a high-risk area. For a high-risk area, if the probability of a fault occurring in the area after recalculation is less than or equal to the third threshold, the risk level of the area is updated to a low-risk area. The third threshold is less than the second threshold.

[0131] The scanning result of the target hard disk is stored in the hard disk fault database, and the risk level of the high-risk area on the target hard disk is adjusted according to the hard disk scanning information in the updated hard disk fault database, so as to realize dynamic adjustment of the scanning area on the target hard disk.

[0132] In a possible example, if the target hard disk is a hard disk on the server on the user side, the processor on the server will not directly send the scan result to the server on the manufacturer side after scanning the target hard disk. The server on the user side will pop up a corresponding prompt message to prompt the user whether he is willing to send the scan result of the target hard disk to the server on the manufacturer side for storage. If the user is willing, the server on the user side will send the specification information and fault information of the target hard disk to the server on the manufacturer side. The server on the manufacturer side saves the received specification information and fault information of the target hard disk into the hard disk fault database.

[0133] In the embodiment of the present application, the target hard disk is divided into multiple areas, and the risk level of each area on the target hard disk is determined according to the hard disk failure information stored in the hard disk failure database. Different scanning methods are selected for risk areas of different levels on the target hard disk, thereby realizing intelligent scanning of the hard disk, and compared with performing a full disk scan on the target hard disk, the scanning time of the target hard disk is reduced, and the detection efficiency of the target hard disk is improved.

[0134] Next, a hard disk with a capacity of 16T (target hard disk) is taken as an example to introduce the method in the above embodiment.

[0135] First, set the first threshold (the number of hard disk samples required) to 50W pcs (pcs is a unit of quantity indicating "pieces" or "items"), the second threshold (the threshold for dividing high-risk and low-risk areas) to 4ppm (ppm means one part per million), and the third threshold (the threshold for adjusting high-risk areas to low-risk areas) to 3ppm. Then, obtain hard disk failure information from the hard disk failure database. When the number of hard disk failure information obtained is <50w pcs, directly perform a full scan on the target hard disk. When the number of hard disk failure information obtained is ≥50w pcs, it is necessary to perform a regional scan on the target hard disk. In the embodiment of the present application, the number of hard disk failure information obtained is 50w pcs as an example.

[0136] After obtaining the hard disk failure information from the hard disk failure database, the target hard disk is divided into 100 areas, each of which is 0.16T in size. Then, the server counts the number of defects in each of the 100 areas based on the obtained hard disk failure information. In a possible example, the number of defects in each of the 100 areas on the target hard disk is as follows: Fig. 9 As shown. Among them, Fig. 9 The horizontal axis is the area ID, and the vertical axis is the number of defects.

[0137] use Fig. 9 The number of defects in each area in the database is divided by the total number of hard disks obtained from the database to obtain the probability of failure in each area. For example, for area 0, the number of defects in area 0 is 4, and the probability of failure in area 0 = 4 / 50W = 0.08W = 8ppm. For area 32, the number of defects in area 32 is 1, and the probability of failure in area 32 = 2 / 50W = 0.04W = 4ppm. For area 33, the number of defects in area 33 is 1, and the probability of failure in area 33 = 1 / 50W = 0.02W = 2ppm.

[0138] Through calculation, it can be obtained that the probability of failure in areas 0-32 and 85-99 is greater than the first threshold, and the probability threshold of failure in area 33-84 is less than the first threshold, that is, areas 0-32 and 85-99 are high-risk areas, and area 33-84 is a low-risk area.

[0139] When the server scans the target hard disk, the scanning rate is about 1.7H / T. A full scan is performed on the high-risk areas, which are 52 in number, and the full scan time for each high-risk area is (0.16*1.7).

[0140] In a possible example, a partial scan is performed on low-risk areas, the scan ratio is 50%, there are 48 low-risk areas, and the full scan time of each low-risk area is (0.16*1.7*0.5). The scan time of the target hard disk can be obtained as 20.7T ((52*0.16*1.7+48*0.16*1.7*0.5) / 1000). Compared with the time spent on the full scan of the target hard disk, which is 27.2H (16*1.7), the time is saved by about 6.5H, and the efficiency is improved by 24%.

[0141] In a possible example, a partial scan is performed on low-risk areas, the scan ratio is 25%, there are 48 low-risk areas, and the full scan time of each low-risk area is (0.16*1.7*0.25). The scan time of the target hard disk can be obtained as 16.6T ((52*0.16*1.7+48*0.16*1.7*0.25) / 1000). Compared with the time spent on the full scan of the target hard disk, which is 27.2H (16*1.7), the time is saved by about 10.6H, and the efficiency is improved by 39%.

[0142] Based on the method in the above embodiment, the embodiment of the present application also provides a structural diagram of a server, which can be used to execute the method in the above embodiment.

[0143] For example, Fig.10 FIG. 1 shows a schematic diagram of the structure of a server. Fig.10 As shown, the server includes: a communication module 1001 , a processing module 1002 , and a storage module 1003 .

[0144] The storage module 1003 includes at least one hard disk.

[0145] The communication module 1001 is used to obtain fault information of at least one hard disk sample, and the detection information includes: hard disk model, number of hard disks, number of defects on the hard disks, and addresses of defects on the hard disks.

[0146] In a possible example, the communication module 1001 may obtain the fault information of at least one hard disk sample from the hard disk fault database stored in the storage module 1003 .

[0147] The processing module 1002 is used to divide the target hard disk into N areas, where N is a natural number greater than or equal to 1. The target hard disk can be a hard disk in the storage module 1003 or a hard disk on other devices.

[0148] The processing module 1002 is also used to determine the probability of failure in each of the N areas based on the failure information of at least one hard disk sample obtained when the number of hard disks carried in at least one hard disk failure information is greater than a first threshold; for any area in the N areas, when the probability of failure in the area is greater than a second threshold, mark the area as a high-risk area and scan all sectors in the high-risk area; when the probability of failure in the area is less than or equal to the second threshold, mark the area as a low-risk area and perform interval scanning on the sectors in the low-risk area.

[0149] When the number of hard disks carried in at least one hard disk failure information is less than or equal to the first threshold, the processing module 1002 is used to mark all areas of the target hard disk as high-risk areas and scan all sectors on the target hard disk.

[0150] In a possible example, when there is a defect in the low-risk area, the processing module 1002 also needs to scan sectors adjacent to the sector where the defect is located.

[0151] After scanning the high-risk area and the low-risk area on the target hard disk, the processing module 1002 needs to save the scanning results to the hard disk fault database. After saving the scanning results of the target hard disk to the hard disk fault database, the processing module 1002 can also adjust the risk level of the high-risk area on the target hard disk according to the hard disk fault information in the updated hard disk fault database. For example, the processing module 1002 updates the probability of failure in the high-risk area of ​​the target hard disk according to the failure information of at least one hard disk sample stored in the hard disk fault database. When the probability of failure in any high-risk area is less than the third threshold, the high-risk area is marked as a low-risk area, where the third threshold is less than the second threshold.

[0152] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.

[0153] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product, characterized in that when the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0154] Based on the method in the above embodiment, the embodiment of the present application provides a computing device, which includes a motherboard and a chip. Among them, the chip is integrated on the motherboard, and the chip includes at least one memory for storing programs; at least one processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method in the above embodiment. In the embodiment of the present application, the computing device can be a network device such as a server and a host.

[0155] Based on the method in the above embodiment, the embodiment of the present application further provides a server cluster, which includes at least one server. The server includes at least one memory for storing programs; at least one processor for executing the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method in the above embodiment.

[0156] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0157] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0158] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A hard disk scanning method, characterized in that: include: Get the specification information of the hard disk to be scanned; Based on the specification information of the hard disk and a hard disk failure database, determining a first area on the hard disk to be scanned that has a first level of failure risk; wherein the hard disk failure database records specification information of multiple hard disk samples and failure information of each hard disk sample; Based on the first level of failure risk, the first area is scanned according to a first strategy.

2. The method according to claim 1, characterized in that The determining, based on the specification information of the hard disk and the hard disk failure database, a first area having a first level failure risk on the hard disk to be scanned includes: According to the specification information of the hard disk, acquiring the fault information of the hard disk sample having the same specification information as the hard disk to be scanned from the hard disk fault database; When the number of hard disk samples obtained is greater than or equal to a first threshold, determining a probability of a fault occurring in a first area on the hard disk to be scanned according to the fault information of the hard disk samples; When the probability of a failure occurring in the first area is greater than or equal to a second threshold, it is determined that the failure risk level of the first area is at a first level.

3. The method according to claim 2, characterized in that The determining, according to the fault information of the hard disk sample, the probability of a fault occurring in the first area of ​​the hard disk to be scanned comprises: Determine the probability of a fault occurring in the first area of ​​the hard disk to be scanned according to the fault area information carried in the fault information of the hard disk sample, wherein the fault area information at least includes: an address range of the fault area and the number of faults in the fault area; or The probability of a fault occurring in the first area of ​​the hard disk to be scanned is determined according to the fault address information carried in the fault information of the hard disk sample.

4. The method according to claim 2, characterized in that: The method further comprises: When the probability of a failure occurring in the first area is less than a second threshold, determining the failure risk level of the first area to be a second level; wherein the risk level of the second level failure risk is less than the first level failure risk; Based on the second level of failure risk, the first area is scanned according to a second strategy.

5. The method according to claim 1, characterized in that: The method further comprises: When the number of hard disk samples obtained is less than the first threshold, it is determined that the failure risk level of the first area on the hard disk to be scanned is the first level.

6. The method according to claim 4, characterized in that Based on the second level of failure risk, scanning the first area according to a second strategy includes: Performing interval scanning on sectors in the first area; If a sector in the first area has a defect, sectors adjacent to the sector are scanned.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The specification information of the hard disk to be scanned and the scanning result of the first area are saved in the hard disk fault database.

8. The method according to claim 7, characterized in that After the scanning result of the first area is saved in the hard disk fault database, the method further includes: According to the specification information of the hard disk, acquiring the fault information of the hard disk sample having the same specification information as the hard disk to be scanned from the hard disk fault database; The failure risk level of the first area is re-determined according to the failure information of the hard disk sample.

9. The method according to claim 8, characterized in that The re-determining the failure risk level of the first area according to the failure information of the hard disk sample includes: Re-determining the probability of a fault occurring in the first area of ​​the hard disk to be scanned according to the fault information of the hard disk sample; If the failure risk level of the first area is the first level, and the probability of a failure occurring in the re-determined first area is less than or equal to a third threshold, adjusting the failure risk level of the first area to the second level, and the third threshold is less than the second threshold; If the failure risk level of the first area is the second level, and the probability of a failure occurring in the re-determined first area is greater than or equal to a second threshold, the failure risk level of the first area is adjusted to the first level.

10. A server, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in any one of claims 1 to 9.

Citation Information

Cited By

  • Solid state disk data inspection method and device and electronic equipment

    CN120371223A

  • Solid state disk data inspection method, device and electronic equipment

    CN120371223B