Solid state drive SMART data write volume statistics test verification method and device

By reading SMART log information in a solid-state hard disk, sending write commands and recording the write quantity and write command number, calculating the difference value and determining whether the increment matches, the write quantity and write in the SMART log in the prior art are solved. The problem of inaccurate command counts enables fast and efficient verification of the number of writes and writes of SSD data.

CN114780320BActive Publication Date: 2025-02-11SUZHOU UNIONMEMORY INFORMATION SYST LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210487433.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2025-02-11
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

The prior art lacks effective testing and verification of the data writes and number of times written by the host to the hard disk in the solid-state hard disk SMART log, resulting in inaccurate writing volume of SMART log records, which harms the interests of suppliers and users.

Method used

Provide a test and verification method for the statistics of SMART data writes on solid state hard disk. By reading SMART log information, sending write commands and recording the write amount and write commands, calculating the difference value and determining whether the increment matches, to verify the SMART log The accuracy of the number of data written and the number of write commands in it.

Benefits of technology

It realizes the accuracy of the data write amount and number of write commands of the host to the SSD in the SMART log in the solid state drive, ensuring that the interests of suppliers and users are not damaged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780320B_ABST
    Figure CN114780320B_ABST
Patent Text Reader

Abstract

The present application relates to a test verification method, device, computer equipment and storage medium for statistics of SMART data write amount of a solid-state hard disk, wherein the method includes: reading SMARTlog information in a solid-state hard disk when the machine is powered on, recording the current host write amount and the current host write command number in the SMART log information; sending a certain number of write commands to be written into LBA0; recording the latest data write amount in the SMART log information and the latest host write command number in the SMART log information; calculating the difference between the latest data write amount in the SMART log information and the last recorded write amount, and judging whether the numerical increment of the corresponding position of the SMART log byte matches; calculating the difference between the latest host write command number in the SMART log information and the last recorded write command number, and judging whether the numerical increment of the corresponding position of the SMART log byte matches. The present invention realizes efficient verification of the SMART data write amount of a solid-state hard disk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a test and verification method, device, computer equipment and storage medium for statistics of SMART data writing amount of a solid state hard disk. Background Art

[0002] SMART (Self-Monitoring Analysis and Reporting Technology, hereinafter referred to as SMART) records the health information of the solid-state drive, which is retained after the system power is turned on and off and can span the entire service life cycle of the solid-state drive; in the process of using the solid-state drive and analyzing its life or failure, SMART health information will provide very useful numbers. For example, the critical alarm (SMART Log byte position 00) will indicate whether there is an abnormal event such as the temperature is too high and exceeds the threshold or the available backup space is lower than the threshold; another example is the current operating temperature of the solid-state drive and the remaining life percentage recorded in the SMART log. Obviously, the information in the SMART log is very important, and its reliability directly affects the quality of the product and customer experience, so it is necessary to test and verify the information therein.

[0003] At present, the testing and verification in the prior art mainly checks whether the operating temperature of the solid-state hard disk in the SMART log will exceed the temperature in a continuous reading and writing environment, whether the available remaining space is reasonably reduced after long-term use, whether the number of power on and off times increases accordingly with the number of power on and off times of the system, and whether the number of abnormal shutdowns increases accordingly with the abnormal removal of the AC power supply. However, the amount of data written by the host to the hard disk and the number of write commands in the SMART log have not been tested and verified. When the host write amount recorded in the SMART log does not meet expectations and is much smaller than the actual host write amount, it will damage the interests of the solid-state hard disk supplier, and when the host write amount recorded in the SMART log is much larger than the actual host write amount, it will damage the interests of the customer. Therefore, the solid-state hard disk must be tested and verified in the SMART log when it leaves the factory. The amount of data written by the host to the solid-state hard disk. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium that can quickly and efficiently test and verify the SMART data write volume statistics in a solid-state drive in response to the above technical problems.

[0005] A method for testing and verifying the SMART data writing amount statistics of a solid state drive, the method comprising:

[0006] Read the SMART log information in the solid-state drive when the computer is powered on, and record the current host write amount and the current host write command number in the SMART log information;

[0007] Send a certain number of write commands to write to LBA0; record the latest data write amount in the SMART log information and the latest host write command number in the SMART log information; calculate the difference between the latest data write amount in the SMART log information and the last recorded write amount, and determine whether the numerical increments at the corresponding positions of the SMART log bytes match; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the numerical increments at the corresponding positions of the SMART log bytes match;

[0008] Send a certain number of write commands and write them into LBA0 and LBA1 respectively, and repeat the above steps of recording, calculating and judging;

[0009] A certain number of write commands are sent and written into LBA0, LBA1, LBA2 and LBA3 respectively, and the above-mentioned recording, calculating and judging steps are repeated.

[0010] In one embodiment, the step of sending a certain number of write commands to write to LBA0 further includes:

[0011] Send 1050 write commands to LBA0;

[0012] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0013] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 2. If the count increases by 2, it matches; otherwise, it does not match.

[0014] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it matches; otherwise, it does not match.

[0015] In one embodiment, sending a certain number of write commands and writing them into LBA0 and LBA1 respectively, and repeatedly performing the above steps of recording, calculating and judging further include:

[0016] Send 1050 write commands, writing to LBA0 and LBA1 respectively;

[0017] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0018] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3. If the count increases by 3, it is a match, otherwise it is a mismatch;

[0019] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it matches; otherwise, it does not match.

[0020] In one embodiment, sending a certain number of write commands and writing them into LBA0, LBA1, LBA2 and LBA3 respectively, and repeatedly performing the above steps of recording, calculating and judging further include:

[0021] Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively;

[0022] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0023] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 5. If the count increases by 5, it is a match, otherwise it is a mismatch;

[0024] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it matches; otherwise, it does not match.

[0025] A test and verification device for SMART data writing amount statistics of a solid state hard disk, the device comprising:

[0026] A power-on reading module, which is used to read the SMART log information in the solid-state hard disk when the computer is powered on, and record the current host write amount and the current host write command number in the SMART log information;

[0027] A first test module, wherein the first test module is used to send a certain number of write commands to be written into LBA0; record the latest data write amount in the SMART log information and the latest host write command number in the SMART log information; calculate the difference between the latest data write amount in the SMART log information and the last recorded write amount, and determine whether the numerical increment of the corresponding position of the SMART log byte matches; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the numerical increment of the corresponding position of the SMART log byte matches;

[0028] A second test module, the second test module is used to send a certain number of write commands and write them into LBA0 and LBA1 respectively, and repeatedly perform the above-mentioned recording, calculation and judgment steps;

[0029] The third test module is used to send a certain number of write commands and write them into LBA0, LBA1, LBA2 and LBA3 respectively, and repeat the above-mentioned steps of recording, calculating and judging.

[0030] In one embodiment, the first test module is further used for:

[0031] Send 1050 write commands to LBA0;

[0032] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0033] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 2. If the count increases by 2, it is normal, otherwise it is mismatched;

[0034] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0035] In one embodiment, the second test module is further used for:

[0036] Send 1050 write commands, writing to LBA0 and LBA1 respectively;

[0037] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0038] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3. If the count increases by 3, it is normal, otherwise it is mismatched;

[0039] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0040] In one embodiment, the third test module is further used for:

[0041] Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively;

[0042] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0043] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 5. If the count increases by 5, it is normal, otherwise it is mismatched;

[0044] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0045] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.

[0046] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any one of the above methods when executed by a processor.

[0047] The above-mentioned test verification method, device, computer equipment and storage medium for the SMART data write volume statistics of the solid-state drive can quickly and efficiently verify whether the data write volume of the host to the solid-state drive in the SMART log of the solid-state drive is the actual write volume of the host to the solid-state drive and whether the number of write commands from the host to the solid-state drive is completely equal to the number of write commands issued by the host to the solid-state drive by introducing this solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A flowchart of a method for testing and verifying the statistics of SMART data writing amount of a solid state drive in one embodiment;

[0049] Figure 2 A flowchart of a method for testing and verifying the statistics of SMART data writing amount of a solid state drive in another embodiment;

[0050] Figure 3 It is a structural block diagram of a test and verification device for statistics of SMART data writing amount of a solid state drive in one embodiment;

[0051] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0053] At present, the testing and verification in the prior art mainly checks whether the operating temperature of the solid-state hard disk in the SMART log will exceed the temperature in a continuous reading and writing environment, whether the available remaining space is reasonably reduced after long-term use, whether the number of power on and off times increases accordingly with the number of power on and off times of the system, and whether the number of abnormal shutdowns increases accordingly with the abnormal removal of the AC power supply. However, the amount of data written by the host to the hard disk and the number of write commands in the SMART log have not been tested and verified. When the host write amount recorded in the SMART log does not meet expectations and is much smaller than the actual host write amount, it will damage the interests of the solid-state hard disk supplier, and when the host write amount recorded in the SMART log is much larger than the actual host write amount, it will damage the interests of the customer. Therefore, the solid-state hard disk must be tested and verified in the SMART log when it leaves the factory. The amount of data written by the host to the solid-state hard disk.

[0054] Based on the above shortcomings of SMART log test, the present invention proposes a test verification method for the statistics of SMART data writing amount of solid-state hard disk. The method uses ULINK's Driver Master software and the matching PSPA (PCIe solid-state hard disk Power Adaptor, PCIe solid-state hard disk power adapter, hereinafter referred to as PSPA) hardware to write scripts, thereby realizing the test verification of the host's writing amount of the solid-state hard disk in the SMART log.

[0055] In one embodiment, Figure 1 As shown, a test verification method for SMART data writing statistics of a solid state drive is provided, the method comprising:

[0056] Step 102, power on and read the SMART log information in the solid state drive, and record the current host write amount and the current host write command number in the SMART log information;

[0057] Step 104, sending a certain number of write commands to be written into LBA0; recording the latest data write amount in the SMART log information and the latest host write command number in the SMART log information; calculating the difference between the latest data write amount in the SMART log information and the last recorded write amount, and determining whether the numerical increments at the corresponding positions of the SMART log bytes match; calculating the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determining whether the numerical increments at the corresponding positions of the SMART log bytes match;

[0058] Step 106, sending a certain number of write commands and writing them into LBA0 and LBA1 respectively, and repeating the above steps of recording, calculating and judging;

[0059] Step 108, send a certain number of write commands and write them into LBA0, LBA1, LBA2 and LBA3 respectively, and repeat the above steps of recording, calculating and judging.

[0060] In this embodiment, a test verification method for the statistics of the SMART data written amount of a solid-state drive is provided. The method uses the Driver Master software of ULINK and the matching PSPA (PCIe solid-state drive Power Adaptor, PCIe solid-state drive power adapter, hereinafter referred to as PSPA) hardware to write a script, thereby realizing the test verification of the host's write amount to the solid-state drive in the SMART log. The specific steps of the script execution include:

[0061] First, power on and read the SMART log information in the SSD, and record the current host write amount and the current host write command number in the SMART log information. Specifically, read the 512 bytes of SMART health information in the SSD Log page 02. Record the current host write amount in the SMART log information, byte positions 48-63. Record the current host write command number in the SMART log information, byte positions 80-95.

[0062] Next, a certain number of write commands are sent to write into LBA0; for example, 1050 write commands are sent to write into LBA0 (Logical Block Address, hereinafter referred to as LBA), and the LBA size is 512 bytes.

[0063] Then, record the latest data written amount in the SMART log information and the latest host write command number in the SMART log information. Calculate the difference between the latest data written amount in the SMART log information and the last recorded written amount, and determine whether the numerical increments at the corresponding positions of the SMART log bytes match. Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the numerical increments at the corresponding positions of the SMART log bytes match. If they match, the test passes.

[0064] Similarly, a certain number of write commands are sent and written into LBA0 and LBA1 respectively; for example, 1050 write commands are sent and written into LBA0 and LBA1 respectively, and then the above-mentioned recording, calculating and judging steps are repeated.

[0065] Similarly, a certain number of write commands are sent and written into LBA0, LBA1, LBA2 and LBA3 respectively; for example, 1050 write commands are sent and written into LBA0, LBA1, LBA2 and LBA3 respectively, and then the above-mentioned recording, calculating and judging steps are repeated.

[0066] In this embodiment, by introducing this solution, it is possible to quickly and efficiently verify whether the amount of data written by the host to the solid-state drive in the SMART log of the solid-state drive is the actual amount written by the host to the solid-state drive and whether the number of write commands from the host to the solid-state drive is completely equal to the number of write commands issued by the host to the solid-state drive.

[0067] In one embodiment, a method for testing and verifying the SMART data write amount statistics of a solid state drive is provided, the method further comprising:

[0068] Send 1050 write commands to LBA0;

[0069] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0070] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 2. If the count increases by 2, it matches; otherwise, it does not match.

[0071] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it is a match, otherwise it is a mismatch;

[0072] Send 1050 write commands, writing to LBA0 and LBA1 respectively;

[0073] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0074] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3. If the count increases by 3, it is a match, otherwise it is a mismatch;

[0075] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it is a match, otherwise it is a mismatch;

[0076] Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively;

[0077] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0078] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 5. If the count increases by 5, it is a match, otherwise it is a mismatch;

[0079] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If the count increases by 1051, it matches; otherwise, it does not match.

[0080] In this embodiment, a test verification method for SSD SMART data write statistics is provided, and the specific test environment is as follows:

[0081] Hardware requirements: The computer to be tested is an ASUS Strix Z590 desktop computer. For the computer to be tested, the method described in this embodiment requires the use of a desktop computer, and the specific model is not mandatory. In this embodiment, an ASUS Strix Z590 desktop computer is preferably used as the computer to be tested. The solid-state drive to be tested is a solid-state drive that supports the PCIe NVMe protocol.

[0082] Software requirements: The operating system is Windows 10; the test software is ULINK DriveMaster2019NVMe; the test script is a self-written DriveMaster test script.

[0083] Specifically, please refer to Figure 2 The test flow chart shown in the figure includes the following implementation steps:

[0084] Step 1. Turn on the computer and read the 512 bytes of SMART health information in Log page 02 of the SSD.

[0085] Step 2: If the reading is normal, record the amount of data written by the current host to the SSD in the SMART log information, byte position 48-63.

[0086] Step 3: Record the number of write commands from the current host to the SSD in the SMART log information, byte positions 80-95.

[0087] Step 4: Send 1050 write commands and write to LBA0 (Logical Block Address, LBA for short). The LBA size is 512 bytes.

[0088] Step 5: Read the latest 512 bytes in the SSD Log page 02 and record the latest host data write amount to the SSD in the SMART log information, byte positions 48-63, and record the latest host write command number to the SSD in the SMART log information, byte positions 80-95.

[0089] Step 6: Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of SMART log byte position 48-63 increases by 2 (the host has written about 540MB). An increase of 2 is normal.

[0090] Step 7: Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the SMART log byte position 80-95 increases by 1051. An increase of 1051 is normal.

[0091] Step 8: Send 1050 write commands, writing LBA0 and LBA1 respectively.

[0092] Step 9. Read the latest 512 bytes in the SSD Log page 02 and record the latest host write amount in the SMART log information, byte positions 48-63, and record the latest host write command number in the SMART log information, byte positions 80-95.

[0093] Step 10: Calculate the difference between the latest host write amount and the last recorded write amount in the SMART log information, and determine whether the value of the SMART log byte position 48-63 increases by 3 (the host has written approximately 1.07GB). An increase of 3 is normal.

[0094] Step 11: Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the SMART log byte position 80-95 increases by 1051. If the count increases by 1051, it is normal.

[0095] Step 12: Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively.

[0096] Step 13: Read the latest 512 bytes in the SSD Log page 02 and record the latest host write amount in the SMART log information, byte positions 48-63, and record the latest host write command number in the SMART log information, byte positions 80-95.

[0097] Step 14: Calculate the difference between the latest host write amount and the last recorded write amount in the SMART log information, and determine whether the value of the SMART log byte position 48-63 increases by 5 (the host has written about 2.2GB). An increase of 5 is normal.

[0098] Step 15: Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the SMART log byte position 80-95 increases by 1051. If the count increases by 1051, it is normal.

[0099] In this embodiment, the amount of writes and the number of write commands from the host to the SSD in the SMART log are verified by Driver Master, thereby effectively ensuring the interests of both the SSD supplier and the user.

[0100] It should be understood that although Figure 1-2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0101] In one embodiment, Figure 3 As shown, a test verification device 300 for statistics of SMART data writing amount of a solid state drive is provided, and the device includes:

[0102] A power-on reading module 301 is used to read the SMART log information in the solid-state drive when the computer is powered on, and record the current host write amount and the current host write command number in the SMART log information;

[0103] The first test module 302 is used to send a certain number of write commands to write into LBA0; record the latest data write amount in the SMART log information and the latest host write command number in the SMART log information; calculate the difference between the latest data write amount in the SMART log information and the last recorded write amount, and determine whether the numerical increment of the corresponding position of the SMART log byte matches; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the numerical increment of the corresponding position of the SMART log byte matches;

[0104] A second test module 303, which is used to send a certain number of write commands and write them into LBA0 and LBA1 respectively, and repeatedly perform the above-mentioned recording, calculation and judgment steps;

[0105] The third test module 304 is used to send a certain number of write commands and write them into LBA0, LBA1, LBA2 and LBA3 respectively, and repeat the above-mentioned steps of recording, calculating and judging.

[0106] In one embodiment, the first test module 302 is further configured to:

[0107] Send 1050 write commands to LBA0;

[0108] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0109] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 2. If the count increases by 2, it is normal, otherwise it is mismatched;

[0110] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0111] In one embodiment, the second testing module 303 is further used to:

[0112] Send 1050 write commands, writing to LBA0 and LBA1 respectively;

[0113] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0114] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3. If the count increases by 3, it is normal, otherwise it is mismatched;

[0115] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0116] In one embodiment, the third test module 304 is further configured to:

[0117] Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively;

[0118] Read the latest 512 bytes of Log page 02 in the SSD and record the latest amount of data written by the host to the SSD in the SMART log information and the latest number of write commands from the host to the SSD in the SMART log information;

[0119] Calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 5. If the count increases by 5, it is normal, otherwise it is mismatched;

[0120] Calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the position corresponding to the SMART log byte increases by 1051. If it increases by 1051, it is normal, otherwise it is mismatched.

[0121] For the specific limitations on the test and verification device for the SMART data write volume statistics of the solid-state hard disk, please refer to the limitations on the test and verification method for the SMART data write volume statistics of the solid-state hard disk above, which will not be repeated here.

[0122] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 4 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, 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 network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a test verification method for statistics of SMART data write volume of a solid-state hard disk is implemented.

[0123] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above method embodiments when executing the computer program.

[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0126] 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 memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

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

[0128] The above-mentioned 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 invention patent. 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 patent of the present application shall be subject to the attached claims.

Claims

1. A test verification method for SSD SMART data write statistics, the method comprising: Read the SMART log information in the solid-state drive when the computer is powered on, and record the current host write amount and the current host write command number in the SMART log information; Send 1050 write commands to write to LBA0; read the latest 512 bytes of Log page 02 in the SSD and record the latest host data write amount to the SSD in the SMART log information and the latest host write command number to the SSD in the SMART log information; calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value at the corresponding position of the SMART log byte increases by 2, if the count increases by 2, it is a match, otherwise it is a mismatch; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the corresponding position of the SMART log byte increases by 1051, if the count increases by 1051, it is a match, otherwise it is a mismatch; Send 1050 write commands, write to LBA0 and LBA1 respectively; read the latest 512 bytes of Log page02 in the SSD and record the latest host data write amount to the SSD in the SMART log information and the latest host write command number to the SSD in the SMART log information; calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3, if the count increases by 3, it is a match, otherwise it is a mismatch; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the corresponding position of the SMART log byte increases by 1051, if the count increases by 1051, it is a match, otherwise it is a mismatch; Send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively; read the latest 512 bytes of Log page 02 in the SSD and record the latest host data write amount to the SSD in the SMART log information and the latest host write command number to the SSD in the SMART log information; calculate the difference between the latest host data write amount to the SSD in the SMART log information and the last recorded write amount, and determine whether the value at the corresponding position of the SMART log byte increases by 5, if the count increases by 5, it matches; otherwise, it does not match; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value at the corresponding position of the SMART log byte increases by 1051, if the count increases by 1051, it matches; otherwise, it does not match.

2. A test and verification device for SMART data writing statistics of a solid state drive, characterized in that: The device comprises: A power-on reading module, which is used to read the SMART log information in the solid-state hard disk when the computer is powered on, and record the current host write amount and the current host write command number in the SMART log information; The first test module is used to send 1050 write commands to write into LBA0; read the latest 512 bytes of Log page 02 in the solid-state hard disk and record the latest host data write amount to the solid-state hard disk in the SMART log information and the latest host write command number to the solid-state hard disk in the SMART log information; calculate the difference between the latest host data write amount to the solid-state hard disk in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 2, and the count increases by 2 if it is normal, otherwise it is mismatched; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the corresponding position of the SMART log byte increases by 1051, and the increase of 1051 is normal, otherwise it is mismatched; The second test module is used to send 1050 write commands, which are written to LBA0 and LBA1 respectively; read the latest 512 bytes of Log page 02 in the solid-state hard disk and record the latest host data write amount to the solid-state hard disk in the SMART log information and the latest host write command number to the solid-state hard disk in the SMART log information; calculate the difference between the latest host data write amount to the solid-state hard disk in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 3, and the count increases by 3 for a match, otherwise it is a mismatch; calculate the difference between the latest host write command number in the SMART log information and the last recorded write command number, and determine whether the value of the corresponding position of the SMART log byte increases by 1051, and the count increases by 1051 for a match, otherwise it is a mismatch; The third test module is used to send 1050 write commands, writing LBA0, LBA1, LBA2 and LBA3 respectively; read the latest 512 bytes of Log page 02 in the solid-state hard disk and record the latest host data write amount to the solid-state hard disk in the SMART log information and the latest host write command number to the solid-state hard disk in the SMART log information; calculate the difference between the latest host data write amount to the solid-state hard disk in the SMART log information and the last recorded write amount, and determine whether the value of the corresponding position of the SMART log byte increases by 5, and the count increases by 5 if it is normal, otherwise it is a mismatch; calculate the difference between the latest host write command number in the SMARTlog information and the last recorded write command number, and determine whether the value of the corresponding position of the SMART log byte increases by 1051, and an increase of 1051 is normal, otherwise it is a mismatch.

3. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to claim 1 are implemented.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.

Citation Information

Patent Citations

  • A method and apparatus for storing and retrieving file data

    CN102263818A

  • Method and device for monitoring hard disk, and server

    CN108763027A