Data verification method and device, computer equipment, storage medium and program product

By obtaining the number of data verification failures in the solid-state hard disk SSD, and performing data consistency verification if the threshold is exceeded, solving the problem of low data consistency verification efficiency in traditional technology, realizing the timely detection of inconsistent data, and improving the storage system read and write performance and service life.

CN119166053APending Publication Date: 2024-12-20SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411195930.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional data consistency verification methods are inefficient and cannot detect inconsistent data in the storage system in a timely manner, affecting read and write performance.

Method used

By obtaining the number of data verification failures of the solid-state drive SSD within the preset time period, if the number of failures is greater than the threshold, data consistency verification is performed to improve the verification efficiency.

Benefits of technology

Timely discover high-risk SSDs, improve data consistency verification efficiency, reduce inconsistent data expansion, and extend the service life of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166053A_ABST
    Figure CN119166053A_ABST
Patent Text Reader

Abstract

The invention relates to a data verification method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that the number of data verification failures of a solid state disk (SSD) in a storage system in a preset time period is obtained, wherein the number of data verification failures comprises the number of self-check errors and / or the number of input and output errors (EIO); and under the condition that the data verification failure times are greater than a first threshold value, performing data consistency verification on the SSD. By adopting the method, the data consistency verification efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data verification, and in particular to a data verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] In the process of data reading and writing, in order to maintain the integrity and consistency of data in the storage system, the consistency of data can be verified by a data consistency verification method. In traditional technology, data consistency verification mainly adopts a full scan method, that is, obtaining all data blocks and check blocks in the storage system, and then scanning and verifying them.

[0003] However, conventional technologies cannot verify inconsistent data in a timely manner, resulting in low efficiency in data consistency verification. Summary of the invention

[0004] Based on this, it is necessary to provide a data verification method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of data consistency verification in response to the above technical problems.

[0005] In a first aspect, the present application provides a data verification method. The method comprises:

[0006] Obtaining the number of data verification failures of a solid-state hard disk (SSD) in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors (EIO);

[0007] When the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD.

[0008] In one embodiment, the number of data verification failures includes the EIO number, and obtaining the number of data verification failures of the SSD in the storage system within a preset time period includes:

[0009] Within the preset time period, receiving an IO request for the SSD;

[0010] Performing input and output verification on the SSD according to the IO request to obtain a verification result;

[0011] The EIO times are determined according to the verification result.

[0012] In one embodiment, the IO request includes first verification information and a data identifier, and the input and output verification of the SSD is performed according to the IO request to obtain a verification result, including:

[0013] According to the data identifier, obtaining the data to be verified from the SSD;

[0014] Determine second verification information according to the data to be verified;

[0015] The first verification information and the second verification information are compared to obtain the verification result.

[0016] In one embodiment, the number of data verification failures includes the number of self-check errors, and obtaining the number of data verification failures of the SSD in the storage system within a preset time period includes:

[0017] Within the preset time period, performing a disk self-test on the SSD by the SSD to obtain a self-test result;

[0018] The number of self-test errors is determined according to the self-test result.

[0019] In one embodiment, the number of the SSDs is multiple, and the method further includes:

[0020] Obtaining the number of EIOs of each of the SSDs within the preset time period;

[0021] Determine the sum of the EIO times as the total EIO times corresponding to the SSDs;

[0022] According to the total EIO times, a data consistency check strategy corresponding to each of the SSDs is determined.

[0023] In one embodiment, determining the data consistency check strategy corresponding to each of the SSDs according to the total EIO times includes:

[0024] When the total EIO times is greater than the second threshold, the data consistency check strategy is determined to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

[0025] In a second aspect, the present application also provides a disease risk analysis device. The device comprises:

[0026] A first acquisition module is used to acquire the number of data verification failures of a solid state drive SSD in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors EIO;

[0027] The verification module is used to perform data consistency verification on the SSD when the number of data verification failures is greater than a first threshold.

[0028] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0029] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0030] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0031] The above-mentioned data verification method, device, computer equipment, computer-readable storage medium and computer program product obtain the number of data verification failures of the solid-state hard disk SSD in the storage system within a preset time period, and then, when the number of data verification failures is greater than a first threshold, perform data consistency verification on the SSD. Since in the data verification method, the number of data verification failures includes the number of self-test errors and / or the number of EIOs, the number of data verification failures is obtained from the dimensions of the SSD's self-data verification and the dimension of data verification in response to read and write requests, respectively, which can improve the accuracy and reliability of the obtained number of data verification failures, so that when the number of data verification failures is greater than the first threshold, the SSD can be accurately determined to be a high-risk hard disk, and then the data consistency verification is performed on the SSD, and the inconsistent data in the SSD can be verified in time, thereby improving the efficiency of data consistency verification. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0033] FIG1 is an application environment diagram of a data verification method in one embodiment;

[0034] FIG2 is a schematic diagram of a flow chart of a data verification method in one embodiment;

[0035] FIG3 is a schematic diagram of a flow chart of step 201 in another embodiment;

[0036] FIG4 is a schematic diagram of a flow chart of step 302 in another embodiment;

[0037] FIG5 is a schematic diagram of a flow chart of step 201 in another embodiment;

[0038] FIG6 is a schematic flow chart of a data verification method in another embodiment;

[0039] FIG7 is a schematic diagram of a flow chart of a data verification method in one embodiment;

[0040] FIG8 is a structural block diagram of a data verification device in one embodiment;

[0041] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] When performing data consistency verification based on the full scan of the data in the storage system, since it is necessary to obtain all the data blocks and check blocks in the storage system, and then perform sequential or parallel scan verification on each data block and check block, as the amount of data in the storage system increases, the time consumption of the full scan verification method also increases accordingly, and since the server resources will be consumed during the verification process, in order to avoid affecting the normal operation of the upper-layer business, the full scan second needs to wait until the server resources are idle before verification, resulting in the inability to timely discover inconsistent data, thereby causing the read and write performance of the storage system to decline, and even causing some inconsistent data to expand to exceed the redundant energy management, making the data invalid. Therefore, there is a problem of low data consistency verification efficiency in the traditional technology. In view of this, the data verification method provided by the present application, by obtaining the number of data verification failures of the solid-state hard disk SSD in the storage system within a preset time period, can perform data consistency verification on the SSD when the number of data verification failures is greater than the first threshold, so that the data consistency verification can be performed on the high-risk SSD in time, avoiding the problem that some inconsistent data cannot be verified in time, affecting the read and write performance of the storage system.

[0044] The data verification method provided in the embodiment of the present application can be applied in the implementation environment shown in Figure 1, wherein the storage system 102 communicates with the terminal 104 through the network. When the storage system 102 receives the input / output (I / O) request sent by the terminal 104, the storage system 102 can send the IO request to the solid state drive (SSD) in the storage system 102, and then obtain the number of data verification failures of the SSD within a preset time period, and then, the storage system performs data consistency verification on the SSD when the number of data verification failures is greater than the first threshold. Among them, the storage system 102 can be a distributed storage system, or the storage system 102 can also be a storage system deployed in a server. The terminal 104 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.

[0045] In an exemplary embodiment, as shown in FIG2 , a data verification method is provided, which is described by taking the method applied to the storage system in FIG1 as an example, and includes the following steps 201 and 202:

[0046] Step 201, obtaining the number of data verification failures of a solid state drive (SSD) in a storage system within a preset time period, where the number of data verification failures includes the number of self-check errors and / or the number of input / output errors (EIO).

[0047] Among them, the storage system can be a distributed storage system, or the storage system can also be a storage system in a server. It can be understood that if the storage system is a distributed storage system, the distributed storage system can receive read and write requests sent from computer devices such as terminals and servers outside the cluster. In the process of responding to the read and write requests, the storage system can verify the data to be written or the data to be read based on the read and write requests to ensure the correctness and reliability of the read and write requests. Alternatively, if the storage system is a storage system in a server, when the server receives a read and write request sent by other servers or computer devices such as terminals outside the server, the central processing unit (CPU) in the server can send the read and write request to the storage system, and the storage system can send the read and write request to the SSD, and the SSD can verify the data to be written or the data to be read based on the read and write request to ensure the correctness and reliability of the read and write request.

[0048] It is understandable that the verification result of the data verification performed in the SSD may be a verification pass or a verification failure. If the verification result is a verification failure a large number of times within a certain period of time, it can be determined that there is a data inconsistency problem in the data in the SSD. Therefore, the SSD can be subjected to a data consistency check. In this embodiment, by counting the number of data verification failures of the SSD, it is determined whether to perform a data consistency check on the SSD based on the counted number of data verification failures.

[0049] It should be noted that when the SSD receives a read or write request, it can perform data verification on the data according to the read or write request. If the verification result is a verification failure, the verification result can be determined as an input / output error (Error Input / Output, EIO), and the statistical result of the verification result being EIO is determined as the number of EIOs, and when the verification result is EIO, a media error response message is returned to the storage system so that the storage system can count the number of EIOs. When the SSD does not receive a read or write request, it can also periodically perform data verification on the stored data. If the verification result is a verification failure, the verification result can be determined as a self-test error, and the statistical result of the verification result being a self-test error is determined as the number of self-test errors. Among them, the SSD can record the number of self-test errors through media errors in the Self-Monitoring, Analysis and Reporting Technology (SMART) information.

[0050] The preset time period refers to a period of time before the current moment. Optionally, the preset time period may be 2 hours, or the preset time period may be 5 hours, which is not limited in this embodiment.

[0051] In this embodiment, the storage system can monitor the records of self-test errors in the SSD and the received media error response messages in real time or periodically, and filter out the self-test errors and media error response messages that meet the time range of a preset time period based on the recording time of the self-test errors and the receiving time of the media error response messages, so as to obtain the number of self-test errors and the number of EIOs based on the filtering results.

[0052] Optionally, within a preset time period, the number of self-test errors of the SSD may be 0, and only the EIO number corresponding to the SSD within the preset time period can be obtained; or, within the preset time period, the EIO number of the SSD may be 0, and only the self-test error number corresponding to the SSD within the preset time period can be obtained.

[0053] Step 202: When the number of data verification failures is greater than a first threshold, perform data consistency verification on the SSD.

[0054] It is understandable that when a data verification failure occurs on the SSD, it indicates that there is a data inconsistency problem in the SSD. However, when a data verification failure occurs, it is not enough to prove that the SSD is a faulty disk. If a data consistency check is performed directly on the SSD, verification resources may be wasted. Therefore, it is possible to further determine whether the SSD is a high-risk disk based on the number of data verification failures corresponding to the SSD, so that when the SSD is a high-risk disk, a data consistency check is performed on the SSD. Among them, the first threshold refers to the maximum value of the number of data verification failures that can be allowed within a preset time period in the process of determining whether to perform data consistency on the SSD. Optionally, within the preset time period, the first threshold can be 3 times, or the first threshold can also be 5 times, and this embodiment does not limit this.

[0055] In this embodiment, the difference between the number of data verification failures and the first threshold value may be calculated, and then when the difference is greater than 0, it is determined that the number of data verification failures is greater than the first threshold value, and then, a data consistency check is performed on the SSD.

[0056] In the above data verification method, the number of data verification failures of the solid-state hard disk SSD in the storage system within a preset time period is obtained, and then, when the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD. Since in the data verification method, the number of data verification failures includes the number of self-check errors and / or the number of EIOs, the number of data verification failures is obtained from the dimensions of the SSD's self-data verification and the dimension of data verification in response to read and write requests, respectively, which can improve the accuracy and reliability of the obtained number of data verification failures, so that when the number of data verification failures is greater than the first threshold, the SSD can be accurately determined to be a high-risk hard disk, and then the data consistency check is performed on the SSD, and the inconsistent data in the SSD can be checked in time, thereby improving the efficiency of the data consistency check.

[0057] In addition, since the SSD can be checked for data consistency, risks can be promptly checked, reducing the risk of read and write errors in the storage system, and preventing certain inconsistent data from continuing to expand and even exceeding the redundant capacity of the storage system, causing data to be unrecoverable. This can improve the IO performance of the storage system and extend the service life of the storage system.

[0058] In one embodiment, based on the embodiment shown in FIG2, the number of data verification failures includes the number of EIOs. Referring to FIG3, this embodiment relates to a process in which a storage system obtains the number of data verification failures of an SSD in the storage system within a preset time period. As shown in FIG3, in this embodiment, step 201 includes steps 301-303 shown in FIG3:

[0059] Step 301: receiving an input / output (IO) request for an SSD within a preset time period.

[0060] Among them, Input / Output (IO) request refers to the process in which, when a user or other computer system needs to interact with a computer system, data or instructions are provided to the system through an input device, and a response or result is received from the system. This process involves a two-way flow of information, including inputting data from an external device (such as a keyboard, mouse, printer, etc.) to a computer system, and outputting data or information from a computer system to an external device, wherein IO requests may include write requests and read requests. It is understandable that, as a solid-state drive for storing data, SSDs can write data to the SSDs according to IO requests, and can also read data from the SSDs according to IO requests.

[0061] In this embodiment, the process of data consistency verification can be described by taking the storage system as a distributed storage system as an example. The storage system may include multiple nodes, for example, a communication node for receiving read and write requests, a storage node for storing data, and a management node for monitoring the communication node and the storage node.

[0062] In this embodiment, the storage system can receive a read request sent by an external device for reading data from an SSD in a storage node, and receive a write request sent by an external device for writing data to an SSD in a storage node through a communication node in the storage system within a preset time period. For example, if an external device needs to read data from a certain SSD, it can send an IO request containing the SSD identifier to the storage system to instruct the storage system to obtain data from the SSD and return it to the external device.

[0063] Step 302: perform input and output verification on the SSD according to the IO request to obtain a verification result.

[0064] It should be noted that when the storage system receives an IO request, if the target data corresponding to the IO request is modified or deleted during the process of responding to the IO request, there may be a problem of being unable to read or write the target data, resulting in a failure to respond to the IO request. Therefore, when responding to an IO request, it is necessary to perform input and output verification on the data related to the IO request in the SSD.

[0065] The input / output verification refers to data verification performed on an IO request. For example, if the IO request carries verification information corresponding to the data, the corresponding data in the SSD can be verified according to the verification information to obtain a verification result.

[0066] In this embodiment, when a communication node in the storage system receives a read or write request, the management node can send the read or write request to the SSD in the corresponding storage node, and then control the SSD to perform input and output verification on the data stored in the SSD according to the IO request, and then obtain the verification result.

[0067] Step 303, determining the EIO times according to the verification result.

[0068] It can be understood that if the verification result of the input and output verification is passed, the SSD can respond to the IO request; if the verification result of the input and output verification is failed, the SSD cannot respond to the IO request, then the SSD can return a response message to the disk access module in the storage system to instruct the disk access module to count the number of EIO times.

[0069] In this embodiment, if the verification result is verification failure, the SSD can return a media error response message to the management node to indicate that the verification result of the input and output verification performed on the IO request is verification failure. The management node can update the statistical EIO times based on the received media error response message to determine the latest EIO times.

[0070] In this embodiment, the storage system receives an input / output IO request for the SSD within a preset time period, then performs an input / output check on the SSD according to the IO request to obtain a check result, and then can determine the EIO number according to the check result. Since the EIO number is determined according to the check result of the input / output check performed on the SSD, it can accurately indicate the number of input / output check failures, thereby improving the accuracy of the EIO number.

[0071] In one embodiment, based on the embodiment shown in FIG3, the IO request includes the first verification information and the data identifier. Referring to FIG4, this embodiment relates to a process in which the storage system performs input and output verification on the SSD according to the IO request to obtain the verification result. As shown in FIG4, in this embodiment, step 302 includes steps 401-403 shown in FIG4:

[0072] Step 401, obtaining the data to be verified from the SSD according to the data identifier.

[0073] The data to be verified refers to the data in the SSD that needs to be verified, and the data identifier refers to a unique identification code that can characterize the data corresponding to the IO request. For example, the data identifier can be a key code corresponding to the data. It can be understood that the data to be verified is the data determined from the SSD according to the data identifier.

[0074] In this embodiment, the storage system may first determine the corresponding SSD according to the IO request, then filter out the data with the same data identifier from the SSD, and determine the filtered data as the data to be verified. For example, if the data identifier in the IO request is 0011, the data with the data identifier of 0011 may be determined from the corresponding SSD, and the data may be determined as the data to be verified.

[0075] Step 402: determine second verification information according to the data to be verified.

[0076] The second verification information is verification information corresponding to the data to be verified. In this embodiment, the storage system can determine the corresponding data verification algorithm according to the first verification information, and then use the data verification algorithm to calculate the second verification information corresponding to the data to be verified. Optionally, the data verification algorithm can be a parity check method, a cyclic redundancy check method, a message authentication code, a hash algorithm, etc.

[0077] Exemplarily, if the first verification information is a cyclic redundancy check code, it can be determined that the data verification algorithm corresponding to the first verification information is a cyclic redundancy check method, and the corresponding cyclic redundancy check code can be calculated for the data to be verified, and the calculated cyclic redundancy check code can be determined as the second verification information.

[0078] Step 403: Compare the first verification information and the second verification information to obtain a verification result.

[0079] The verification result is the difference information between the first verification information and the second verification information. In this embodiment, when the first verification information and the second verification information are calculated by the same data verification algorithm, the first verification information and the second verification information can be compared, so as to determine the comparison result as the verification result.

[0080] Exemplarily, if the first verification information and the second verification information are cyclic redundancy codes, the first verification information is the first cyclic redundancy code, and the second verification information is the second cyclic redundancy code. The storage system can compare each bit of the first cyclic redundancy code and the second cyclic redundancy code in turn. If there is a different bit of redundant code, it can be determined that the first cyclic redundancy code and the second cyclic redundancy code are different, that is, the verification result is verification failure.

[0081] In this embodiment, the storage system can obtain the data to be verified from the SSD according to the data identifier, and then determine the second verification information according to the data to be verified. Thereafter, the first verification information is compared with the second verification information to obtain the verification result. Since the process of comparing the first verification information with the second verification information is relatively simple, the verification result can be obtained quickly, thereby improving the efficiency of determining the number of EIO times according to the verification result.

[0082] In one embodiment, based on the embodiment shown in FIG2 , the number of data verification failures includes the number of self-test errors. Referring to FIG5 , this embodiment relates to another acquisition process of a storage system acquiring the number of data verification failures of an SSD in the storage system within a preset time period. As shown in FIG5 , in this embodiment, step 201 includes steps 501 and 502 shown in FIG5 :

[0083] Step 501 , within a preset time period, a disk self-test is performed on the SSD through the SSD to obtain a self-test result.

[0084] It is understandable that in an SSD, data verification can be performed on the internally stored data, and whether there are problems such as data loss and data errors can be determined based on the results of the data verification, thereby ensuring the correctness and integrity of the data. Among them, the disk self-check of the SSD refers to the data verification performed by the SSD based on the internally stored data and the corresponding backup data.

[0085] In this embodiment, the storage system can periodically send a disk self-test instruction to the SSD within a preset time period to instruct the SSD to start the disk self-test function, use the backed-up data and the currently stored data to perform data verification, and after the disk self-test is completed, obtain the SSD self-test result from the recorded result of the disk self-test. Optionally, the self-test result can be a verification failure, or the self-test result can also be a verification pass.

[0086] Step 502, determining the number of self-test errors according to the self-test result.

[0087] It is understandable that if the result of the disk self-test is that the verification fails, it can be recorded through the mediaerror field in SMART, and the number of self-test errors can be determined based on the recorded information of the media errors field. In this embodiment, the storage system can obtain the mediaerrors field from the SMART information corresponding to the SSD after the disk self-test of the SSD is completed, and then determine the number of self-test errors from the information corresponding to the media errors field.

[0088] In this embodiment, within a preset time period, the storage system performs a disk self-test on the SSD, and can obtain a self-test result, and determine the number of self-test errors based on the self-test result. Since the process of obtaining the self-test result corresponding to the disk self-test is relatively simple, the efficiency of determining the number of self-test errors based on the self-test result can be improved.

[0089] In one embodiment, based on the above embodiment, referring to FIG6 , the number of the above SSDs is multiple, and this embodiment relates to a process of how the storage system determines a data consistency check strategy according to the EIO times corresponding to the multiple SSDs. As shown in FIG6 , the server can execute steps 601 to 603 to implement the process.

[0090] Step 601, obtaining the EIO times of each SSD within a preset time period.

[0091] It is understandable that a storage system may include multiple SSDs, and the storage system may receive an IO request for each SSD. Each SSD may perform input and output verification on the IO request. Therefore, the verification result of the input and output verification of each SSD may include EIO, and each SSD corresponds to an EIO number.

[0092] In this embodiment, if the input and output inspection result of each SSD within the preset time period is inspection failure, a medium error response message can be sent to the storage system, so that the storage system can determine the EIO number corresponding to each SSD based on the number of received medium error response messages.

[0093] Step 602: Determine the sum of the EIO times as the total EIO times corresponding to each SSD.

[0094] The total EIO times refers to the sum of the EIO times corresponding to all SSDs in the storage system. In this embodiment, the storage system may add up the EIO times corresponding to each SSD, and then determine the result of the addition as the total EIO times.

[0095] Step 603: Determine the data consistency check strategy corresponding to each SSD according to the total EIO times.

[0096] It is understandable that the total EIO times in the storage system are different, and the data consistency check strategy for each SSD is also different. For example, the data consistency check strategy may be to perform data consistency check on all SSDs, or the data consistency check strategy may be to perform data consistency check on the SSD with the most EIO times.

[0097] In a possible implementation of the above step 603, when the total EIO number is greater than the second threshold, the storage system determines that the data consistency check strategy is to perform data consistency check on each SSD separately, or to perform data consistency check on the target SSD corresponding to the maximum EIO number among the EIO numbers.

[0098] The second threshold refers to the maximum value of the number of EIOs allowed to occur for all SSDs in the storage system during the data verification process. It can be understood that if data consistency verification is performed on each SSD separately, the accuracy of the data consistency verification can be improved, and if data consistency verification is performed on the target SSD corresponding to the maximum EIO number among the EIO numbers, the efficiency of the data consistency verification can be improved.

[0099] In this embodiment, the storage system can calculate the difference between the total EIO times and the second threshold value. When the difference is greater than 0, it is determined that the total EIO times are greater than the second threshold value, and then a data consistency check can be performed on each SSD. Alternatively, based on the EIO times corresponding to each SSD, the SSD with the largest EIO times among the SSDs can be determined as the target SSD, and then a data consistency check can be performed on the target SSD.

[0100] In this embodiment, the storage system obtains the EIO times of each SSD within a preset time period, and determines the sum of the EIO times as the total EIO times corresponding to each SSD. Then, the data consistency verification strategy corresponding to each SSD can be determined based on the total EIO times, thereby improving the flexibility of the determined data consistency verification strategy, so that the determined data consistency verification strategy can be used to accurately perform data consistency verification on the SSD.

[0101] In a possible embodiment, referring to FIG. 7 , a data verification method is provided for a storage system, and the data verification method is described by taking the storage system deployed in a server as an example, wherein the storage system includes a disk access module, a monitoring module, a consistency verification module, and each SSD. The method includes:

[0102] Step 701: a disk access module in a storage system receives an IO request.

[0103] Step 702: The disk access module sends an IO request to the SSD in the storage system. The IO request includes first verification information and a data identifier.

[0104] Step 703: The SSD obtains the data to be verified from the SSD according to the data identifier.

[0105] Step 704: The SSD determines second verification information according to the data to be verified.

[0106] Step 705: The SSD compares the first verification information with the second verification information to obtain a verification result.

[0107] Step 706: If the verification result is that the verification fails, the SSD sends a medium error response message to the disk access module.

[0108] Step 707: The monitoring module in the storage system determines the number of EIOs within a preset time period according to the medium error response message.

[0109] Step 708: The SSD performs a disk self-test within a preset time period to obtain a self-test result.

[0110] Step 709: The monitoring module determines the number of self-test errors according to the self-test result.

[0111] Step 7010: When the number of EIOs or the number of self-check errors is greater than a first threshold, the monitoring module performs a data consistency check on the SSD.

[0112] Step 7011: The monitoring module obtains the number of EIOs of each SSD in the storage system within a preset time period.

[0113] Step 7012: The monitoring module determines the sum of the EIO times as the total EIO times corresponding to each SSD.

[0114] Step 7013: When the total EIO times are greater than the second threshold, the monitoring module determines that the data consistency check strategy is to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

[0115] Step 7014: The monitoring module sends a data consistency verification strategy to the consistency verification module.

[0116] Step 7015: The consistency check module performs data consistency check on each SSD or the target SSD according to the received data consistency check strategy.

[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0118] Based on the same inventive concept, the embodiment of the present application also provides a data verification device for implementing the data verification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data verification device embodiments provided below can refer to the limitations on the data verification method above, and will not be repeated here.

[0119] In an exemplary embodiment, as shown in FIG8 , a data verification device is provided, comprising:

[0120] The first acquisition module 801 is used to acquire the number of data verification failures of the solid state disk SSD in the storage system within a preset time period, where the number of data verification failures includes the number of self-check errors and / or the number of input and output errors EIO;

[0121] The verification module 802 is used to perform data consistency verification on the SSD when the number of data verification failures is greater than a first threshold.

[0122] In one embodiment, the number of data verification failures includes the EIO number, and the first acquisition module 801 includes:

[0123] A receiving unit, configured to receive an input / output (IO) request for the SSD within the preset time period;

[0124] A first acquisition unit, configured to perform input and output verification on the SSD according to the IO request to obtain a verification result;

[0125] The first determining unit is used to determine the EIO times according to the verification result.

[0126] In one embodiment, the IO request includes first verification information and a data identifier, and the first acquisition unit is specifically configured to:

[0127] According to the data identifier, obtaining the data to be verified from the SSD;

[0128] Determine second verification information according to the data to be verified;

[0129] The first verification information and the second verification information are compared to obtain the verification result.

[0130] In one embodiment, the number of data verification failures includes the number of self-check errors, and the first acquisition module 801 includes:

[0131] A second acquisition unit is used to perform a disk self-test on the SSD through the SSD within the preset time period to obtain a self-test result;

[0132] The second determining unit is used to determine the number of self-test errors according to the self-test result.

[0133] In one embodiment, there are multiple SSDs, and the device further includes:

[0134] A second acquisition module is used to acquire the number of EIOs of each SSD within the preset time period;

[0135] A first determining module, configured to determine the sum of the EIO times as the total EIO times corresponding to the SSDs;

[0136] The second determination module is used to determine the data consistency check strategy corresponding to each of the SSDs according to the total EIO times.

[0137] In one embodiment, the second determination module includes:

[0138] The third determination unit is used to determine, when the total EIO number is greater than the second threshold, that the data consistency check strategy is to perform data consistency check on each of the SSDs respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO number among the EIO numbers.

[0139] Each module in the above data verification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a server in the form of hardware, or can be stored in a memory in a server in the form of software, so that the processor can call and execute operations corresponding to each module.

[0140] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG9. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data on the number of data verification failures. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data verification method is implemented.

[0141] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0142] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0143] Obtaining the number of data verification failures of a solid-state hard disk (SSD) in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors (EIO);

[0144] When the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD.

[0145] In one embodiment, the processor implements the following steps when executing the computer program:

[0146] Within the preset time period, receiving an input / output (IO) request for the SSD;

[0147] Performing input and output verification on the SSD according to the IO request to obtain a verification result;

[0148] The EIO times are determined according to the verification result.

[0149] In one embodiment, the processor implements the following steps when executing the computer program:

[0150] According to the data identifier, obtaining the data to be verified from the SSD;

[0151] Determine second verification information according to the data to be verified;

[0152] The first verification information and the second verification information are compared to obtain the verification result.

[0153] In one embodiment, the processor implements the following steps when executing the computer program:

[0154] Within the preset time period, performing a disk self-test on the SSD by the SSD to obtain a self-test result;

[0155] The number of self-test errors is determined according to the self-test result.

[0156] In one embodiment, the processor implements the following steps when executing the computer program:

[0157] Obtaining the number of EIOs of each of the SSDs within the preset time period;

[0158] Determine the sum of the EIO times as the total EIO times corresponding to the SSDs;

[0159] According to the total EIO times, a data consistency check strategy corresponding to each of the SSDs is determined.

[0160] In one embodiment, the processor implements the following steps when executing the computer program:

[0161] When the total EIO times is greater than the second threshold, the data consistency check strategy is determined to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

[0162] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0163] Obtaining the number of data verification failures of a solid-state hard disk (SSD) in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors (EIO);

[0164] When the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD.

[0165] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0166] Within the preset time period, receiving an input / output (IO) request for the SSD;

[0167] Performing input and output verification on the SSD according to the IO request to obtain a verification result;

[0168] The EIO times are determined according to the verification result.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0170] According to the data identifier, obtaining the data to be verified from the SSD;

[0171] Determine second verification information according to the data to be verified;

[0172] The first verification information and the second verification information are compared to obtain the verification result.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0174] Within the preset time period, performing a disk self-test on the SSD by the SSD to obtain a self-test result;

[0175] The number of self-test errors is determined according to the self-test result.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0177] Obtaining the number of EIOs of each of the SSDs within the preset time period;

[0178] Determine the sum of the EIO times as the total EIO times corresponding to the SSDs;

[0179] According to the total EIO times, a data consistency check strategy corresponding to each of the SSDs is determined.

[0180] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0181] When the total EIO times is greater than the second threshold, the data consistency check strategy is determined to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

[0182] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0183] Obtaining the number of data verification failures of a solid-state hard disk (SSD) in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors (EIO);

[0184] When the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD.

[0185] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0186] Within the preset time period, receiving an input / output (IO) request for the SSD;

[0187] Performing input and output verification on the SSD according to the IO request to obtain a verification result;

[0188] The EIO times are determined according to the verification result.

[0189] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0190] According to the data identifier, obtaining the data to be verified from the SSD;

[0191] Determine second verification information according to the data to be verified;

[0192] The first verification information and the second verification information are compared to obtain the verification result.

[0193] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0194] Within the preset time period, performing a disk self-test on the SSD by the SSD to obtain a self-test result;

[0195] The number of self-test errors is determined according to the self-test result.

[0196] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0197] Obtaining the number of EIOs of each of the SSDs within the preset time period;

[0198] Determine the sum of the EIO times as the total EIO times corresponding to the SSDs;

[0199] According to the total EIO times, a data consistency check strategy corresponding to each of the SSDs is determined.

[0200] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0201] When the total EIO times is greater than the second threshold, the data consistency check strategy is determined to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

[0202] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data verification method, It is characterized in that The method comprises: Obtaining the number of data verification failures of a solid-state hard disk (SSD) in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors (EIO); When the number of data verification failures is greater than a first threshold, a data consistency check is performed on the SSD.

2. The method according to claim 1, It is characterized in that The number of data verification failures includes the EIO number, and obtaining the number of data verification failures of the SSD in the storage system within a preset time period includes: Within the preset time period, receiving an input / output (IO) request for the SSD; Performing input and output verification on the SSD according to the IO request to obtain a verification result; The EIO times are determined according to the verification result.

3. The method according to claim 2, It is characterized in that The IO request includes first verification information and a data identifier, and the input / output verification of the SSD is performed according to the IO request to obtain a verification result, including: According to the data identifier, obtaining the data to be verified from the SSD; Determine second verification information according to the data to be verified; The first verification information and the second verification information are compared to obtain the verification result.

4. The method according to claim 1, It is characterized in that The number of data verification failures includes the number of self-check errors, and obtaining the number of data verification failures of the SSD in the storage system within a preset time period includes: Within the preset time period, performing a disk self-test on the SSD by the SSD to obtain a self-test result; The number of self-test errors is determined according to the self-test result.

5. The method according to any one of claims 1 to 4, It is characterized in that The number of the SSDs is multiple, and the method further includes: Obtaining the number of EIOs of each of the SSDs within the preset time period; Determine the sum of the EIO times as the total EIO times corresponding to the SSDs; According to the total EIO times, a data consistency check strategy corresponding to each of the SSDs is determined.

6. The method according to claim 5, It is characterized in that The step of determining the data consistency check strategy corresponding to each of the SSDs according to the total EIO times includes: When the total EIO times is greater than the second threshold, the data consistency check strategy is determined to perform data consistency check on each SSD respectively, or to perform data consistency check on the target SSD corresponding to the maximum EIO times among the EIO times.

7. A data verification device, It is characterized in that The device comprises: A first acquisition module is used to acquire the number of data verification failures of a solid state drive SSD in a storage system within a preset time period, wherein the number of data verification failures includes the number of self-check errors and / or the number of input and output errors EIO; The verification module is used to perform data consistency verification on the SSD when the number of data verification failures is greater than a first threshold.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.