Disclosure of Invention
The invention aims to provide a method, a system and a device for testing the data retention capacity of a disk and a computer readable storage medium, so as to solve the problem of how to accurately test the data retention capacity of the disk.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
a disk data retention capability test method comprises the following steps:
determining a first test sample in a disk to be tested, and carrying out uninterrupted load test on the first test sample within a first preset temperature range to enable the P/E value of the first test sample to reach 100%;
performing full-disk verification write operation on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first disk to be verified; the minimum value of the second preset temperature range is greater than the maximum value of the first preset temperature range, and the difference value is a first preset value;
performing write verification operation on the first disk to be verified which is placed at normal temperature for a first preset time, and determining the number of first failed disks with data loss;
and determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number and a preset disk failure rate.
Wherein the first preset range is less than or equal to 25 ℃; the second preset temperature range is 40 degrees celsius.
Wherein the first preset time is greater than or equal to 50 h.
Before determining whether the data storage capacity of the disk to be tested is qualified by using the first failure disk number and a preset disk failure rate, the method further includes:
determining a second test sample in the magnetic disk to be tested, and carrying out uninterrupted load test on the second test sample within a third preset temperature range to enable the P/E value of the second test sample to reach 100%; the minimum value of the third preset temperature range is greater than the maximum value of the first preset temperature range, the difference value is a second preset value, and the second preset value is greater than the first preset value;
performing full-disk verification write operation on the second test sample with the P/E value reaching 100% in the second preset temperature range to obtain a second magnetic disk to be verified;
performing write verification operation on the second disk to be verified which is placed in a fourth preset temperature range for a second preset time, and determining the number of second failed disks with data loss; wherein the minimum value of the fourth preset temperature range is greater than the minimum value of the third preset temperature range;
determining whether the disk to be tested is qualified or not by using the first failure disk number and a preset disk failure rate, including:
and determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number, the second failure disk number and the preset disk failure rate.
The third preset temperature range is between 60 ℃ and 74 ℃, and comprises 60 ℃ and 74 ℃; the fourth predetermined temperature range is greater than or equal to 66 degrees celsius.
Wherein the second preset time is a time greater than or equal to 4 days.
Wherein the uninterrupted load test comprises:
JESD219workload is run with load generation software.
In order to achieve the above object, the present application further provides a disk data retention capability test system, including:
the low-temperature load testing module is used for determining a first test sample in a disk to be tested, and carrying out uninterrupted load testing on the first test sample within a first preset temperature range to enable the P/E value of the first test sample to reach 100%;
the low-temperature verification writing module is used for performing full-disk verification writing operation on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first magnetic disk to be verified; the minimum value of the second preset temperature range is greater than the maximum value of the first preset temperature range, and the difference value is a first preset value;
the low-temperature write-check module is used for performing write-check operation on the first disk to be checked which is placed at normal temperature for a first preset time, and determining the number of first failed disks with data loss;
and the failure rate testing module is used for determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number and the preset disk failure rate.
In order to achieve the above object, the present application also provides a disk data retention capability test apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the disk data retention capacity testing method when executing the computer program.
To achieve the above object, the present application also provides a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the steps of the disk data retention capability test method as described above.
According to the scheme, the method for testing the data retention capacity of the disk, provided by the invention, comprises the following steps: determining a first test sample in a disk to be tested, and carrying out uninterrupted load test on the first test sample within a first preset temperature range to enable the P/E value of the first test sample to reach 100%; performing full-disk verification write operation on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first disk to be verified; the minimum value of the second preset temperature range is greater than the maximum value of the first preset temperature range, and the difference value is a first preset value; performing write verification operation on the first disk to be verified which is placed at normal temperature for a first preset time, and determining the number of first failed disks with data loss; and determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number and a preset disk failure rate.
Therefore, according to the disk data retention capacity testing method provided by the application, a first test sample in a first preset temperature range is subjected to uninterrupted testing, if the P/E reaches 100%, then the first test sample is subjected to full disk verification writing operation in a second preset temperature range to obtain a first disk to be verified, the number of first failed disks with data loss is determined by performing write verification on the first disk to be verified which is placed at normal temperature for a first preset time, and whether the data retention capacity of all disks to be tested corresponding to the first test sample is qualified is judged according to the number of the first failed disks with data loss. Therefore, in the scheme, different test operations need to be performed at different temperatures before the test sample is tested, so that the test sample is closer to the disk in the maximum consumption state in the real data retention period range, the data retention capability of the disk can be tested, and the test result is more accurate. The application also provides a system and a device for testing the disk data retention capacity and a computer readable storage medium, and the technical effects can be realized.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method, a system and a device for testing the data retention capacity of a disk and a computer readable storage medium, which aim to solve the problem of how to accurately test the data retention capacity of the disk.
Referring to fig. 1, a method for testing data retention capability of a disk according to an embodiment of the present invention specifically includes:
s101, determining a first test sample in a magnetic disk to be tested, and carrying out uninterrupted load test on the first test sample within a first preset temperature range to enable the P/E value of the first test sample to reach 100%.
Whether the data retention capability of the disks in the same batch is qualified or not needs to be tested, and whether a data loss problem occurs in a NAND (NAND flash memory) of the disks in a corresponding data retention period range or not needs to be detected. In order to shorten the test period, in the scheme, the test is not performed after the disk is naturally used to the time corresponding to the data retention period, but the disk is subjected to testability consumption under a specific environment, so that the disk is subjected to maximum consumption degree in the truest data retention period range in advance, and then the test of the data loss rate is performed.
Firstly, a first test sample is determined in a magnetic disk to be tested, and then the first test sample is placed in a first preset temperature range. It should be noted that the first test sample may be plural. And carrying out uninterrupted load test on the first test sample to enable the P/E value to reach 100%, wherein the P/E is the index of the solid state disk. Meaning how much data is written. It should be noted that the problem of data storage capacity generally occurs after the disk is used for multiple times, and the problem of data storage capacity does not occur in the new disk basically.
S102, performing full-disk verification write operation on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first disk to be verified; the minimum value of the second preset temperature range is larger than the maximum value of the first preset temperature range, and the difference value is a first preset value.
And after the P/E values of all the first test samples reach 100%, performing verification writing operation on all the first test samples. That is, data for verifying whether data is lost is written to the first test sample full disk.
It should be noted that, the verifying write operation is to write data into the disk first, then read the written data in the subsequent write operation verifying process, and determine whether the read data is consistent with the written data, if so, it indicates that no data is lost, otherwise, it indicates that data is lost. It should be noted that the verify write operation is referred to as a "write" operation, and the write verify operation is referred to as a "verify" operation.
Generally, when verifying writing, it is necessary to write data to the disk on one hand, and to record what the data written to the disk is on the other hand, so as to verify the data. In a specific operation example of checking write, MD5 values of data written to a disk may be recorded, and then, when a write-checking operation is performed at a later stage, MD5 values of the read data are calculated, and whether the two MD5 values are the same or not is determined, and if the two MD5 values are the same, it is determined that the data is not lost, otherwise, it is determined that the data is lost, thereby determining whether the data is lost or not. It is understood that, in addition to the MD5 value, other calculation results of the encryption algorithm may be selected as the basis for verification, and this scheme is not particularly limited.
S103, performing write verification operation on the first disk to be verified which is placed at normal temperature for a first preset time, and determining the number of first failed disks with data loss.
Specifically, after the first disk to be tested is placed at normal temperature for a first preset time, a write check operation is performed on the first disk to be tested, that is, whether data loss occurs or not is determined, and the number of disks with data loss in the first test sample is determined as the number of first failed disks.
And S104, determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number and a preset disk failure rate.
In the scheme, the failure rate of the disk is preset, if the proportion of the failed disk to the total number of samples in the test samples is within the range of the failure rate of the preset disk, the data storage capacity of the disk to be tested is considered to be qualified, and if not, the data storage capacity of the disk to be tested is not qualified.
The first preset temperature range, the second preset temperature range and the first preset time can be determined according to the data retention period of the disk and the optimal temperature of the NAND data storage capacity, so that the disk can reach the maximum consumption degree in the data retention period as soon as possible according to different temperatures.
The data retention period of the current magnetic disk is generally 3 months, the optimal temperature of the data storage capacity of the NAND is T < 25 ℃, and T is the temperature. In a particular embodiment, the first predetermined range is less than or equal to 25 degrees celsius; the second preset temperature range is 40 degrees celsius.
In another specific embodiment said first predetermined time is a time greater than or equal to 50 h.
Therefore, according to the method for testing the data retention capacity of the magnetic disk, a first test sample in a first preset temperature range is subjected to uninterrupted test, if the P/E reaches 100%, the first test sample is subjected to full disk verification writing operation in a second preset temperature range to obtain a first disk to be verified, the number of first failed disks with data loss is determined by performing write verification on the first disk to be verified which is placed at normal temperature for a first preset time, and whether the data retention capacity of all disks to be tested corresponding to the first test sample is qualified is judged. Therefore, in the scheme, different test operations need to be performed at different temperatures before the test sample is tested, so that the test sample is closer to the disk in the maximum consumption state in the real data retention period range, the data retention capability of the disk can be tested, and the test result is more accurate.
A specific method for testing the data retention capability of the magnetic disk provided in the embodiments of the present application is described below, and a method for testing the data retention capability of the magnetic disk described below and the embodiments described above may be referred to each other.
Referring to fig. 2, a specific method for testing data retention capability of a magnetic disk provided in the embodiment of the present application specifically includes:
s201, determining a first test sample in a magnetic disk to be tested, and carrying out uninterrupted load test on the first test sample within a first preset temperature range to enable the P/E value of the first test sample to reach 100%.
S202, performing full-disk verification write operation on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first disk to be verified; the minimum value of the second preset temperature range is greater than the maximum value of the first preset temperature range, and the difference value is a first preset value;
s203, performing write verification operation on the first disk to be verified which is placed at normal temperature for a first preset time, and determining the number of first failed disks with data loss.
S204, determining a second test sample in the magnetic disk to be tested, and carrying out uninterrupted load test on the second test sample within a third preset temperature range to enable the P/E value of the second test sample to reach 100%; the minimum value of the third preset temperature range is greater than the maximum value of the first preset temperature range, the difference value is a second preset value, and the second preset value is greater than the first preset value.
In the scheme, in order to enable the test result to be more comprehensive and real, on the basis of the first test sample, a part of samples are selected as second test samples to be tested at a higher temperature.
Specifically, a second test sample is determined in the disk to be tested, and the second test sample is subjected to the uninterrupted load test within a third preset temperature range, and the specific content of the uninterrupted load test is the same as that in the above embodiment, and is not repeated in this scheme.
In a specific embodiment, the uninterrupted load test comprises: JESD219workload is run with load generation software. The JESD organization is a global standard-making organization related to solid-state technology, has high authority in the industry, and therefore preferably selects JESD219workload to carry out load test.
It should be noted that the minimum value of the third preset temperature range is greater than the maximum value of the first preset temperature range, that is, the load testing environment temperature of the second test sample is higher than that of the first test sample. The difference is a second predetermined value, which is greater than the first predetermined value, that is, the minimum value of the third predetermined temperature range is greater than the minimum value of the second predetermined temperature range for the verify write operation in the above embodiment.
S205, performing full disk verification write operation on the second test sample with the P/E value reaching 100% in the second preset temperature range to obtain a second magnetic disk to be verified.
In the scheme, firstly, the second test sample with the P/E value reaching 100% is subjected to full-disk verification writing operation within a second preset temperature range, and a second magnetic disk to be verified is obtained.
S206, performing write verification operation on the second disk to be verified placed in a fourth preset temperature range for a second preset time, and determining the number of second failed disks with data loss; wherein the minimum value of the fourth preset temperature range is greater than the minimum value of the third preset temperature range.
Firstly, the second disk to be verified is placed in a fourth preset temperature range for a second preset time, and write verification operation is carried out on the second disk to be verified, so that the number of second failed disks sent by a second test sample is determined.
And S207, determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number, the second failure disk number and the preset disk failure rate.
In the scheme, whether the data storage capacity of the disk to be tested is qualified or not can be tested more comprehensively by utilizing the first number of failed disks and the second number of failed disks.
The data retention period of the current magnetic disk is generally 3 months, the optimal temperature of the data storage capacity of the NAND is T < 25 ℃, and T is the temperature. For such a magnetic disk, in a specific embodiment, the third predetermined temperature range is between 60 degrees celsius and 74 degrees celsius, including 60 degrees celsius and 74 degrees celsius; the fourth predetermined temperature range is greater than or equal to 66 degrees celsius.
In another specific embodiment said second predetermined period of time is a period greater than or equal to 4 days.
A specific method for testing data retention capability of a magnetic disk provided in an embodiment of the present application is described below, where the specific method for testing data retention capability of a magnetic disk described below specifically includes:
firstly, the test sample of the magnetic disk to be tested is 100 disks, 50% of the magnetic disks in the test sample are determined to be used as a first test sample, and 50% of the magnetic disks in the test sample are determined to be used as a second test sample.
And secondly, running JESD219workload through load generation software to continuously test the first test sample until the P/E value of the first test sample is written to 100%.
And thirdly, performing full-disk verification writing on the first test sample subjected to the second step at 40 ℃ by using a tool.
And fourthly, placing the first test sample subjected to the third step for more than or equal to 50h at the temperature of 10 ℃ and T & ltSUB & gt 30 ℃ for testing.
And fifthly, continuously testing the second test sample by running JESD219workload through load generation software under the condition that the temperature is 60 ℃ and T is 74 ℃ until the P/E value of the second test sample is written to 100%.
And sixthly, performing full-disk verification writing on the second test sample subjected to the fifth step by using a tool at 40 ℃.
And a seventh step of leaving the second test specimen subjected to the sixth step at a temperature T > -66 ℃ for 4 days or more.
Eighthly, determining the number of the disks with data loss in the first test sample after the fourth step; and determining the number of the magnetic disks with data loss in the second test sample after the seventh step.
And ninthly, determining whether the total number of the disks with data loss is greater than or preset to be 1, if so, determining that the data storage capacity of the disk to be tested corresponding to the test sample is unqualified, otherwise, determining that the data storage capacity of the disk to be tested is qualified.
In the following, a description is given of a disk data retention capability test system provided in an embodiment of the present application, and a disk data retention capability test system described below may be referred to any of the above embodiments.
Referring to fig. 3, a disk data retention capability test system provided in the embodiment of the present application specifically includes:
the low-temperature load testing module 301 is configured to determine a first test sample in a disk to be tested, and perform an uninterrupted load test on the first test sample within a first preset temperature range, so that the P/E values of the first test sample all reach 100%.
The low-temperature verification writing module 302 is configured to perform full-disk verification writing on the first test sample with the P/E value reaching 100% in a second preset temperature range to obtain a first to-be-verified magnetic disk; the minimum value of the second preset temperature range is larger than the maximum value of the first preset temperature range, and the difference value is a first preset value.
And the low-temperature write-check module 303 is configured to perform write-check operation on the first disk to be checked, which is placed at normal temperature for a first preset time, and determine the number of first failed disks with data loss.
And a failure rate testing module 304, configured to determine whether the data storage capacity of the disk to be tested is qualified by using the first number of failed disks and a preset disk failure rate.
In a particular embodiment, the first predetermined range is less than or equal to 25 degrees celsius; the second preset temperature range is 40 degrees celsius.
In a specific embodiment, the first preset time is a time greater than or equal to 50 hours.
In a specific embodiment, the system further includes:
the high-temperature load testing module is used for determining a second test sample in the disk to be tested, and carrying out uninterrupted load testing on the second test sample within a third preset temperature range to enable the P/E value of the second test sample to reach 100%; the minimum value of the third preset temperature range is greater than the maximum value of the first preset temperature range, the difference value is a second preset value, and the second preset value is greater than the first preset value;
the high-temperature verification writing module is used for performing full disk verification writing operation on the second test sample with the P/E value reaching 100% in the second preset temperature range to obtain a second magnetic disk to be verified;
the high-temperature write-check module is used for performing write-check operation on the second disk to be checked which is placed in a fourth preset temperature range for a second preset time, and determining the number of second failed disks with data loss; wherein the minimum value of the fourth preset temperature range is greater than the minimum value of the third preset temperature range;
the failure rate testing module 304 is specifically configured to:
and determining whether the data storage capacity of the disk to be tested is qualified or not by using the first failure disk number, the second failure disk number and the preset disk failure rate.
The disk data retention capability test system of this embodiment is used to implement the disk data retention capability test method, and therefore a specific implementation manner in the disk data retention capability test system may be found in the foregoing embodiment portions of the disk data retention capability test method, for example, the low-temperature load test module 301, the low-temperature verification write module 302, the low-temperature write verification module 303, and the failure rate test module 304 are respectively used to implement steps S101, S102, S103, and S104 in the disk data retention capability test method, so that the specific implementation manner thereof may refer to descriptions of corresponding partial embodiments, and details are not described here.
In the following, a description is given of a magnetic disk data retention capability testing apparatus provided in the embodiments of the present application, and a magnetic disk data retention capability testing apparatus described below and any of the embodiments described above may be referred to with each other.
The device for testing the data retention capability of the disk provided by the embodiment of the application specifically comprises:
a memory for storing a computer program;
a processor for implementing the steps of the method for testing data retention capability of a magnetic disk according to any one of the above embodiments when executing the computer program.
Specifically, the memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor provides calculation and control capabilities for the disk data retention capability testing device, and can realize the steps provided by any one of the disk data retention capability testing method embodiments.
The present application also provides another computer-readable storage medium having stored thereon a computer program which, when executed by a processor, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.