CN110825569B - Hard disk stability test method and test system - Google Patents

Hard disk stability test method and test system Download PDF

Info

Publication number
CN110825569B
CN110825569B CN201910970359.4A CN201910970359A CN110825569B CN 110825569 B CN110825569 B CN 110825569B CN 201910970359 A CN201910970359 A CN 201910970359A CN 110825569 B CN110825569 B CN 110825569B
Authority
CN
China
Prior art keywords
hard disk
test
partition
read
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910970359.4A
Other languages
Chinese (zh)
Other versions
CN110825569A (en
Inventor
王成
曹加峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910970359.4A priority Critical patent/CN110825569B/en
Publication of CN110825569A publication Critical patent/CN110825569A/en
Application granted granted Critical
Publication of CN110825569B publication Critical patent/CN110825569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and a system for testing the stability of a hard disk, which both comprise: creating a first partition and a second partition on a hard disk to be tested; creating a file system of EXT4 on the first partition and mounting the file system under a specified first directory; writing a first file under the first directory; calculating and saving the MD5 code of the first file; performing random mixed IO read-write test on the data block for the second partition, and performing rebot test on the tester in the process of the random mixed IO read-write test on the data block; and after the reboot test is passed, re-mounting the first partition to the first directory, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested. The method is used for improving the reliability of the hard disk stability test result.

Description

Hard disk stability test method and test system
Technical Field
The invention relates to the field of server hard disk testing, in particular to a hard disk stability testing method and a hard disk stability testing system.
Background
With the continuous development of IT technology, the storage requirements of traditional informatization services and increasingly strong cloud computing services on servers are higher and higher. The performance stability of the hard disk is regarded as an important index of the server, and more attention is paid to the performance stability of the hard disk. Therefore, in the server testing stage, the stability test of the hard disk is particularly important.
In order to meet the test requirements, many methods for testing the stability of the hard disk appear in the prior art, and basically, after the IO read-write test is completed, the stability of the hard disk is tested through the detection and comparison results of the performance index parameters of the related hard disk, the practical application scene of the hard disk is not merged in the test, and the reliability of the test result is relatively low.
Therefore, the invention provides a hard disk stability test method and a hard disk stability test system, which are used for solving the technical problems.
Disclosure of Invention
In view of the above disadvantages of the prior art, the present invention provides a method and a system for testing stability of a hard disk, which are used to improve reliability of a test result of the stability of the hard disk.
In a first aspect, the present invention provides a method for testing stability of a hard disk, including the steps of:
creating a first partition and a second partition on a hard disk to be tested;
creating a file system of EXT4 on the first partition and mounting the file system under a specified first directory;
writing a first file under the first directory;
calculating and saving the MD5 code of the first file;
performing random mixed IO read-write test on the data block of the second partition, and performing reboot test on the tester in the process of the random mixed IO read-write test on the data block; the hard disk to be tested is installed in the tester;
and after the reboot test is passed, re-mounting the first partition to a first directory, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
Further, when the hard disk to be tested is an OS disk, the first partition and the second partition are both logical partitions;
when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the proportion of the space size of the hard disk to be tested occupied by the first partition and the second partition is 50%.
Further, performing a random mixed IO read-write test on the data block in the second partition, and performing a reboot test on the tester during the random mixed IO read-write test on the data block, specifically including:
performing random mixed IO read-write test on the small data blocks for the second partition, and performing a first rebot test on the tester in the process of the random mixed IO read-write test on the small data blocks;
and after the first rebot test is passed, performing random mixed IO read-write test on the large data block on the second partition, and performing second rebot test on the tester in the random mixed IO read-write test process of the large data block.
Further, performing a random mixed IO read-write test of the small data block on the second partition, and performing a first reboot test on the tester during the random mixed IO read-write test of the small data block, including:
performing random mixed IO read-write test on the small data blocks of the second partition by adopting an FIO tool;
in the process of random mixed IO read-write test of the small data blocks, repeatedly executing a reboot command to restart the tester until the restart times of the tester reach a preset first time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
Further, performing a random mixed IO read-write test on the large data block for the second partition, and performing a second reboot test on the tester during the random mixed IO read-write test on the large data block, including:
performing random mixed IO read-write test on the large data block of the second partition by adopting an FIO tool;
repeatedly executing a reboot command to restart the tester in the process of random mixed IO read-write test of the large data block until the restart times of the tester reach a preset second time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether error counts in smart information of the hard disk to be tested are increased or not are checked respectively.
In a second aspect, the present invention provides a hard disk stability testing system, including:
the hard disk partitioning unit is used for creating a first partition and a second partition on the hard disk to be tested;
the mounting unit is used for creating a file system of EXT4 on the first partition and mounting the file system under a specified first directory;
a file writing unit that writes a first file in the first directory;
the calculating unit is used for calculating and storing the MD5 code of the first file;
the reboot test unit is used for performing random mixed IO read-write test on the data block in the second partition and performing reboot test on the tester in the process of the random mixed IO read-write test of the data block; the hard disk to be tested is installed in the tester;
and the verification unit is used for re-mounting the first partition to the first directory after the reboot test is passed, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
Further, when the hard disk to be tested is an OS disk, the first partition and the second partition are both logical partitions;
when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the proportion of the space size of the hard disk to be tested occupied by the first partition and the second partition is 50%.
Further, the reboot test unit includes:
the first reboot testing module is used for performing random mixed IO read-write testing on the small data blocks for the second partition and performing first reboot testing on the testing machine in the random mixed IO read-write testing process of the small data blocks;
and the second rebot testing module performs random mixed IO read-write testing on the large data block for the second partition after the first rebot testing is passed, and performs second rebot testing on the testing machine in the random mixed IO read-write testing process of the large data block.
Further, the first reboot test module includes:
the first random mixed IO read-write test unit performs random mixed IO read-write test on the small data block for the second partition by adopting an FIO tool;
the first tester restarting unit repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the small data blocks until the restarting frequency of the tester reaches a preset first time threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether error counts in smart information of the hard disk to be tested are increased or not are checked respectively.
Further, the second reboot testing module includes:
the second random mixed IO read-write testing unit adopts an FIO tool to carry out random mixed IO read-write testing on the large data block for the second partition;
the second tester restarting unit repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the large data block until the restarting frequency of the tester reaches a preset second frequency threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
The invention has the beneficial effects that:
(1) the invention provides a hard disk stability test method and a test system, which respectively create a first partition and a second partition on a hard disk to be tested, create a file system of EXT4 on the first partition and mount the file system to a specified first directory, write a first file in the first directory, calculate and store MD5 code of the first file, perform random mixed IO read-write test on the second partition, perform reboot test on a test machine in the process of random mixed IO read-write test of data blocks, after the reboot test is passed, re-mount the first partition to the first directory and verify the previously stored MD5 code, if the verification is passed, the stability test of the hard disk to be tested is passed, on one hand, the invention can execute warm restart verification of a server system under the condition of IO to verify the stability of the hard disk to be tested, namely, a scene in the actual use process of the hard disk is merged into the test, the hard disk test scene is closer to the actual use scene of the hard disk, so that the reliability of the test result is improved to a certain extent; on the other hand, the invention can also verify whether the hard disk to be tested has the problem of data loss in the hot restart test process with IO by adopting the MD5 code, so that the reliability of the test result is further improved.
(2) The method and the system for testing the stability of the hard disk provided by the invention are used for performing random mixed IO read-write test on a data block in a second partition, and comprise the steps of performing random mixed IO read-write test on a small data block in the second partition and performing random mixed IO read-write test on the small data block in the second partition, performing first rebot test on a testing machine in the random mixed IO read-write test process of the small data block, and performing second rebot test on the testing machine in the random mixed IO read-write test process of a large data block.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, 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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
As shown in fig. 1, the method 100 includes:
step 110, creating a first partition and a second partition on a hard disk to be tested;
step 120, creating a file system of EXT4 on the first partition, and mounting the file system to a specified first directory;
step 130, writing a first file in the first directory;
step 140, calculating and storing the MD5 code of the first file;
step 150, performing random mixed IO read-write test on the data block of the second partition, and performing rebot test on the tester in the process of the random mixed IO read-write test on the data block; the hard disk to be tested is installed in the tester;
and step 160, after the reboot test is passed, re-mounting the first partition to the first directory, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
When the method 100 is used, a first partition and a second partition are firstly created on a hard disk to be tested; then, creating a file system of EXT4 on the first partition, and mounting the file system under a specified first directory; then writing a first file in the first directory; then calculating and saving the MD5 code of the first file; then, performing random mixed IO read-write test on the data block for the second partition, and performing rebot test on the tester in the process of the random mixed IO read-write test of the data block; and after the reboot test is passed, re-mounting the first partition to a first directory, verifying the previously stored MD5 code, if the verification is passed, passing the stability test of the hard disk to be tested, and ending the test. On one hand, the method and the device can execute the hot restart verification of the server system under the condition of IO to verify the stability of the hard disk to be tested, namely, a read-write scene in the actual use process of the hard disk is merged into the test, so that the test scene of the hard disk is closer to the actual use scene of the hard disk, and the reliability of the test result is improved to a certain extent. On the other hand, the invention can also adopt MD5 code to verify whether the hard disk to be tested has data loss in the hot restart test process with IO, thus the invention further improves the reliability of the test result.
Optionally, as an embodiment of the present invention, when the hard disk to be tested is an OS disk, both the first partition and the second partition are logical partitions; when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the sum of the proportion of the first partition and the proportion of the second partition occupying the space of the hard disk to be tested is 1.
Optionally, as an embodiment of the present invention, performing a random mixed IO read-write test on a data block in a second partition, and performing a reboot test on a tester in the process of the random mixed IO read-write test on the data block specifically includes:
performing random mixed IO read-write test on the small data blocks for the second partition, and performing a first rebot test on the tester in the process of the random mixed IO read-write test on the small data blocks;
and after the first reboot test is passed, performing random mixed IO read-write test on the large data block on the second partition, and performing second reboot test on the tester in the process of the random mixed IO read-write test on the large data block.
Optionally, as an embodiment of the present invention, performing a random mixed IO read-write test on a small data block in a second partition, and performing a first rebot test on a tester in the process of the random mixed IO read-write test on the small data block includes:
performing random mixed IO read-write test on the small data blocks by adopting an FIO tool;
in the process of random mixed IO read-write test of the small data blocks, repeatedly executing a reboot command to restart the tester until the restart times of the tester reach a preset first time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether error counts in smart information of the hard disk to be tested are increased or not are checked respectively.
Optionally, as an embodiment of the present invention, performing a random mixed IO read-write test on a large data block for a second partition, and performing a second reboot test on a tester during the random mixed IO read-write test on the large data block includes:
performing random mixed IO read-write test on the large data block by adopting an FIO tool;
repeatedly executing a reboot command to restart the tester in the process of random mixed IO read-write test of the large data block until the restart times of the tester reach a preset second time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
In order to facilitate understanding of the present invention, the hard disk stability testing method provided in the present invention is further described below with reference to the principle of the hard disk stability testing method of the present invention and the process of testing the stability of the hard disk in the embodiments.
Carrying out test preparation:
and installing a main stream Linu multiplied system on a testing machine, taking Redhat7.2 as an example, obtaining root authority, and installing an FIO tool.
The Redhat7.2 system root needs to be directly logged into the operating system OS of the tester, and the reference codes are as follows:
systemctl set-default multi-user.target
sed-i′s/--noclear/-a root/g′
/etc/systemd/system/getty.target.wants/[email protected]
cp/etc/systemd/system/getty.target.wants/[email protected]
/etc/systemd/system
agetty-a root 3
agetty-n 3
detecting the in-place condition of all hard disks of the tester, and ensuring that all hard disks to be tested on the tester are identified and FW (FirmWare) is correct.
(II) the hard disk stability test method comprises the following steps:
step s 1: and creating a first partition and a second partition on the hard disk to be tested.
The hard disk to be tested adopts an NVME hard disk.
Taking a hard disk to be tested as a non-system disk as an example, the first partition and the second partition are both physical partitions, each partition occupies 50% of the space size of the hard disk to be tested (when the hard disk to be tested is a system disk, the first partition and the second partition are logical partitions, and the size of each logical partition can generally not be less than 10G according to actual situations), and partition creation of the hard disk to be tested can be realized by using a parked:
part-s/dev/$ { i } mklabel gpt mkpart 1st 0% 50%// creating the first partition
part-s/dev/$ { i } mkpart 2nd 50% 100%// creating a second partition
Step s 2: the file system of EXT4 is created on the first partition and mounted under the specified first directory.
For all hard disks to be tested, a file system of EXT4 is created on the first partition created in step s1 and mounted under a specified directory "/dev/$ { i } p1./$ { i }":
extfs, ext4/dev/$ { i } p1// p1 is the first partition
mkdir./${i}
mount/dev/${i}p1./${i}
Step s 3: and writing a first file under the first directory.
For all hard disks to be tested, under the directory "/dev/$ { i } p1./$ { i }" created in the previous step s2, a file of 100G is written respectively using the FIO tool (most of existing server hard disks are above 240G, and the capacity of the hard disk to be tested in this embodiment is also above 240G) (when the hard disk to be tested is a system disk, a file of 1G can be written).
Step s 4: and calculating and saving the MD5 code of the first file.
The MD5 code of the above 100G file is calculated by the MD5sum instruction, and the calculated MD5 code is output to a file (for example, nvme0n1.md5) and stored separately, and the following related scripts can be referred to:
md5sum./${i}/test.io>./${i}.md5
umount./${i}
step s 5: performing random mixed IO read-write test on the data block for the second partition, and performing rebot test on the tester in the process of the random mixed IO read-write test on the data block; the hard disk to be tested is installed in the tester.
The step s5 specifically includes:
step s51, sending a random mixed read-write IO (BS: 4K; QD: 128, jobi: 1, libaio, rwmi × read: 50) of the small data block to the second partition by using the FIO tool;
step s52, in the process of reading and writing in step s51, a first rebot test is performed on the tester, that is, the rebot command is repeatedly executed to restart the tester 500 times (that is, the first time threshold value is 500 times).
After restarting the tester system each time, the step s52 checks whether all the hard disks to be tested in all the slots of the tester are normally identified, checks whether the interface transmission rate and bit width of the hard disks to be tested are normal, checks whether the smart information of the hard disks to be tested has an error (i.e. checks whether the error counts in the smart information of the hard disks to be tested are increased), and records the lspci information and the smart information of all the slots of the tester, which can be implemented by referring to the following scripts:
nvme list>>${Cur_dir}/nvmelist.log
NVME_LIST=`parted-l |grep″^Disk″|grep nvme`
NVME_NUM=`parted-l|grep″^Disk″|grep nvme|wc-l`
echo″$NVME_NUM″>>${Cur_dir}/list.log
echo″$NVME_LIST″>>${Cur_dir}/list.log
lspci-s$i-vvvv|grep-E″UESta|CESta″>>${Cur_dir}/Ispci.log
Ispci-s$i-vvvv| grep-w″LnkSta″|head-n1>>${Cur_dir}/Ispci.log
nvme smart-log/dev/$i>>${Cur_dir}/smart.log
step s53, after the first rebot test is passed, using the FIO tool to locate the second partition
Sending large data block random mixed read-write IO (BS is 1MB, QD is 128, job1, libio, rwmi × read is 50);
step s54, in the process of reading and writing in step s53, the tester is subjected to a second reboot test, that is, the tester is restarted 500 times by repeatedly executing the reboot command (that is, the value of the second time threshold is also 500 times).
Correspondingly, in step s54, after restarting the test machine system each time, it is also checked whether all the hard disks to be tested in all the slots of the test machine are normally identified, whether the interface transmission rate and bit width of the hard disks to be tested are normal, whether the smart information of the hard disks to be tested has an error (i.e. whether each error count in the smart information of the hard disks to be tested has an increase) is checked, and the pclsi information and the smart information of all the slots of the test machine are recorded. The specific implementation script can be implemented by referring to the script in step s 52.
It should be noted that, if the test check item has no abnormality or error count increase after the step s54 is executed, that is, in the execution process of the step s5, the hard disk to be tested identifies that the hard disk to be tested is normal, the interface transmission rate and bit width of the hard disk to be tested are normal, and there is no error count increase in the smart information of the hard disk to be tested, it indicates that the reboot test is passed.
It should be noted that, if the test check item has no exception or error count is increased after step s52 is executed, that is, in the process of step s52, the hard disk to be tested identifies that the hard disk to be tested is normal, the interface transmission rate and bit width of the hard disk to be tested are normal, and no error count is increased in the smart information of the hard disk to be tested, it indicates that the first reboot test is passed.
Step s 6: and after the reboot test is passed, re-mounting the first partition to a first directory, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
After the reboot test is passed, the first partition of the hard disk to be tested is mounted to the corresponding directory "/dev/$ { i } p1./$ { i }", an md5sum-c instruction is used, the previously stored md5 file is verified through the directory "/dev/$ { i } p1./$ { i }", and a verification result is stored, and the following scripts can be referred to in the specific implementation:
md5sum-c.md5>checksum.log//md5 is said nvme0n1.md5
Log, if the test is successful, indicating that the test is successful.
As shown in fig. 2, the system 200 includes:
a hard disk partitioning unit 201 that creates a first partition and a second partition on a hard disk to be tested;
a mount unit 202, which creates a file system of EXT4 on the first partition and mounts the file system to a specified first directory;
a file writing unit 203 that writes a first file under the first directory;
a calculating unit 204, which calculates and saves the MD5 code of the first file;
a reboot test unit 205, performing a random mixed IO read-write test on the data block for the second partition, and performing a reboot test on the tester during the random mixed IO read-write test of the data block; the hard disk to be tested is installed in the tester;
and the checking unit 206, after the reboot test is passed, re-mounts the first partition to the first directory, and checks the MD5 code stored before, and if the check is passed, the stability test of the hard disk to be tested is passed.
Optionally, as an embodiment of the present invention, when the hard disk to be tested is an OS disk, both the first partition and the second partition are logical partitions; when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the proportion of the space size of the hard disk to be tested in the first partition and the proportion of the space size of the hard disk to be tested in the second partition are both 50%.
Optionally, as an embodiment of the present invention, the rebot testing unit 205 includes:
the first reboot testing module 2051 is configured to perform a random hybrid IO read-write test on the small data block for the second partition, and perform a first reboot test on the tester during the random hybrid IO read-write test on the small data block;
the second reboot testing module 2052 performs the random mixed IO read-write test on the large data block for the second partition after the first reboot test is passed, and performs the second reboot test on the tester during the random mixed IO read-write test on the large data block.
Optionally, as an embodiment of the present invention, the first rebot test module 2051 includes:
the first random mixed IO read-write test unit performs random mixed IO read-write test on the small data block for the second partition by adopting an FIO tool;
the first tester restarting unit repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the small data blocks until the restarting frequency of the tester reaches a preset first time threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
Optionally, as an embodiment of the present invention, the second reboot test module 2052 includes:
the second random mixed IO read-write test unit adopts an FIO tool to carry out random mixed IO read-write test on the second partition;
the second tester restarting unit repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the large data block until the restarting frequency of the tester reaches a preset second frequency threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
The technical effects achieved by the embodiment of the present system can be referred to the above description, and are not described herein again.
The same and similar parts in the various embodiments in this specification may be referred to each other.
Although the present invention has been described in detail in connection with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A hard disk stability test method is characterized by comprising the following steps:
creating a first partition and a second partition on a hard disk to be tested;
creating a file system of EXT4 on the first partition and mounting to a specified first directory;
writing a first file under the first directory;
calculating and saving the MD5 code of the first file;
performing random mixed IO read-write test on the data block for the second partition, and performing rebot test on the tester in the process of the random mixed IO read-write test on the data block; the hard disk to be tested is installed in the tester;
and after the reboot test is passed, re-mounting the first partition to a first directory, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
2. The hard disk stability test method according to claim 1, wherein when the hard disk to be tested is an OS disk, both the first partition and the second partition are logical partitions;
when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the proportion of the space size of the hard disk to be tested in the first partition and the proportion of the space size of the hard disk to be tested in the second partition are both 50%.
3. The method for testing the stability of the hard disk according to claim 1, wherein the random mixed IO read-write test of the data block is performed on the second partition, and in the process of the random mixed IO read-write test of the data block, a reboot test is performed on a tester, specifically comprising:
performing random mixed IO read-write test on the small data blocks for the second partition, and performing a first rebot test on the tester in the process of the random mixed IO read-write test on the small data blocks;
and after the first rebot test is passed, performing random mixed IO read-write test on the large data block on the second partition, and performing second rebot test on the tester in the random mixed IO read-write test process of the large data block.
4. The hard disk stability testing method of claim 3, wherein performing the random mixed IO read-write test on the small data block for the second partition, and performing the first reboot test on the tester during the random mixed IO read-write test on the small data block comprises:
performing random mixed IO read-write test on the small data blocks by adopting an FIO tool;
in the process of random mixed IO read-write test of the small data blocks, a reboot command is repeatedly executed to restart the tester until the restart times of the tester reach a preset first time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether error counts in smart information of the hard disk to be tested are increased or not are checked respectively.
5. The hard disk stability testing method of claim 3, wherein performing the random mixed IO read-write test on the large data block for the second partition, and performing the second reboot test on the tester during the random mixed IO read-write test on the large data block comprises:
performing random mixed IO read-write test on the large data block of the second partition by adopting an FIO tool;
repeatedly executing a reboot command to restart the tester in the process of random mixed IO read-write test of the large data block until the restart times of the tester reach a preset second time threshold;
after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
6. A hard disk stability test system is characterized by comprising the following steps:
the hard disk partitioning unit is used for creating a first partition and a second partition on the hard disk to be tested;
the mounting unit is used for creating a file system of EXT4 on the first partition and mounting the file system under a specified first directory;
a file writing unit that writes a first file in the first directory;
the calculating unit is used for calculating and storing the MD5 code of the first file;
the reboot testing unit is used for performing random mixed IO read-write testing on the data block in the second partition and performing reboot testing on the testing machine in the process of the random mixed IO read-write testing of the data block; the hard disk to be tested is installed in the tester;
and the verification unit is used for re-mounting the first partition to the first directory after the reboot test is passed, verifying the previously stored MD5 code, and if the verification is passed, passing the stability test of the hard disk to be tested.
7. The hard disk stability testing system of claim 6, wherein when the hard disk to be tested is an OS disk, both the first partition and the second partition are logical partitions;
when the hard disk to be tested is a non-OS disk, the first partition and the second partition are both physical partitions, and the proportion of the space size of the hard disk to be tested occupied by the first partition and the second partition is 50%.
8. The hard disk stability test system of claim 6, wherein the reboot test unit comprises:
the first reboot testing module is used for performing random mixed IO read-write testing on the small data blocks for the second partition and performing first reboot testing on the testing machine in the random mixed IO read-write testing process of the small data blocks;
and the second rebot testing module performs random mixed IO read-write testing on the large data block for the second partition after the first rebot testing is passed, and performs second rebot testing on the testing machine in the random mixed IO read-write testing process of the large data block.
9. The system of claim 8, wherein the first reboot testing module comprises:
the first random mixed IO read-write test unit performs random mixed IO read-write test on the small data block for the second partition by adopting an FIO tool;
a first tester restarting unit, which repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the small data block until the restarting frequency of the tester reaches a preset first time threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether the error counts in smart information of the hard disk to be tested are increased or not are respectively checked.
10. The hard disk stability test system of claim 8, wherein the second reboot test module comprises:
the second random mixed IO read-write test unit adopts an FIO tool to carry out random mixed IO read-write test on the second partition;
the second tester restarting unit repeatedly executes a reboot command to restart the tester in the random mixed IO read-write test process of the large data block until the restarting frequency of the tester reaches a preset second frequency threshold; after the test machine is restarted each time, whether the hard disk to be tested is normally identified or not, whether the interface transmission rate and bit width of the hard disk to be tested are normal or not and whether error counts in smart information of the hard disk to be tested are increased or not are checked respectively.
CN201910970359.4A 2019-10-13 2019-10-13 Hard disk stability test method and test system Active CN110825569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910970359.4A CN110825569B (en) 2019-10-13 2019-10-13 Hard disk stability test method and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910970359.4A CN110825569B (en) 2019-10-13 2019-10-13 Hard disk stability test method and test system

Publications (2)

Publication Number Publication Date
CN110825569A CN110825569A (en) 2020-02-21
CN110825569B true CN110825569B (en) 2022-07-19

Family

ID=69549182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910970359.4A Active CN110825569B (en) 2019-10-13 2019-10-13 Hard disk stability test method and test system

Country Status (1)

Country Link
CN (1) CN110825569B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966583B (en) * 2020-07-29 2022-07-08 苏州浪潮智能科技有限公司 IO read-write test method, device, equipment and product
CN112463495B (en) * 2020-12-07 2022-07-19 苏州浪潮智能科技有限公司 Open channel ssd and driver reliability testing method and device thereof
CN114116333B (en) * 2021-10-29 2024-05-28 苏州浪潮智能科技有限公司 CPU binding check-based M.2 system disk performance test method and device
CN116665758B (en) * 2023-05-06 2024-05-07 深圳市晶存科技有限公司 Hard disk data testing method, device, system and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793305A (en) * 2014-02-24 2014-05-14 浪潮电子信息产业股份有限公司 Method for testing parallel pressure of server subsystems
CN104809042A (en) * 2015-04-27 2015-07-29 浪潮电子信息产业股份有限公司 Iozone-based hard disk performance test method
CN107704347A (en) * 2017-09-19 2018-02-16 郑州云海信息技术有限公司 A kind of automatic method for carrying out hard disc data uniformity test
CN108614754A (en) * 2018-08-17 2018-10-02 北京航星中云科技有限公司 A kind of server power failure test method and device based on platform of soaring
CN109426605A (en) * 2017-08-23 2019-03-05 龙芯中科技术有限公司 The stability test method and apparatus of computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793305A (en) * 2014-02-24 2014-05-14 浪潮电子信息产业股份有限公司 Method for testing parallel pressure of server subsystems
CN104809042A (en) * 2015-04-27 2015-07-29 浪潮电子信息产业股份有限公司 Iozone-based hard disk performance test method
CN109426605A (en) * 2017-08-23 2019-03-05 龙芯中科技术有限公司 The stability test method and apparatus of computer
CN107704347A (en) * 2017-09-19 2018-02-16 郑州云海信息技术有限公司 A kind of automatic method for carrying out hard disc data uniformity test
CN108614754A (en) * 2018-08-17 2018-10-02 北京航星中云科技有限公司 A kind of server power failure test method and device based on platform of soaring

Also Published As

Publication number Publication date
CN110825569A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
CN110825569B (en) Hard disk stability test method and test system
US20080086515A1 (en) Method and System for a Soft Error Collection of Trace Files
CN103198122B (en) Restart the method and apparatus of memory database
CN107479823B (en) Data verification method and device in random read-write file test
US7228458B1 (en) Storage device pre-qualification for clustered systems
US10552403B2 (en) Using checksums to reduce the write latency of logging
CN110502281A (en) A kind of method of embedded device starting linux kernel and file system
CN102207897A (en) Incremental backup method
CN110704287B (en) RAID card abnormal log collection method and system under Linux system and storage medium
CN111767226A (en) Method, system and equipment for testing cloud computing platform resources
US20140317443A1 (en) Method and apparatus for testing a storage system
CN105573676A (en) Method for verifying data consistency in storage system
CN115966247A (en) ZNS solid state disk performance test method
US8566689B2 (en) Data integrity units in nonvolatile memory
CN113377569B (en) Method, apparatus and computer program product for recovering data
CN110083378B (en) Automatic software upgrading method and device based on file system
US20160170842A1 (en) Writing to files and file meta-data
CN107273251A (en) A kind of method of testing of the racks of Rack in a production environment JBOD storages
CN111625407B (en) SSD performance test method and related components
CN116185311B (en) Upgrading migration method, degrading migration method and device for redundant array of independent disk
CN111696618A (en) Method and system for testing power-on and power-off stability of SSD (solid State disk)
US9934094B2 (en) Process for verification of randomly generated I/O requests
CN110134572B (en) Validating data in a storage system
CN108769246B (en) NFS sharing maximization test method and system
CN111694727A (en) Network card firmware upgrading and downgrading test method, system, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant