[go: up one dir, main page]

CN107391326A - A kind of method for testing pressure of storage device, device and server - Google Patents

A kind of method for testing pressure of storage device, device and server Download PDF

Info

Publication number
CN107391326A
CN107391326A CN201710524194.9A CN201710524194A CN107391326A CN 107391326 A CN107391326 A CN 107391326A CN 201710524194 A CN201710524194 A CN 201710524194A CN 107391326 A CN107391326 A CN 107391326A
Authority
CN
China
Prior art keywords
partition
file
test
source
test file
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.)
Pending
Application number
CN201710524194.9A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710524194.9A priority Critical patent/CN107391326A/en
Publication of CN107391326A publication Critical patent/CN107391326A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供一种存储设备的压力测试方法、装置及服务器,通过从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;将测试文件从源分区操作到目标分区;经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。本发明实施例通过源分区和目标分区控制测试文件的操作,并根据标示文件的状态确定测试结果,有效地对存储设备进行压力测试,进而准确校验存储设备的可靠性。

Embodiments of the present invention provide a storage device stress testing method, device, and server. The source partition and the target partition are determined from the partition set of the storage device, wherein the source partition is the partition where the test file is located, and the target partition is The partition is the partition to be operated on by the test file; the mark file is established, and the mark file is used to describe the operation completion state of the test file, and the state of the mark file is the mark state during the operation of the test file; the test The file is operated from the source partition to the target partition; after a reference time, when the status of the marked file is marked, it is determined that the test is abnormal. The embodiment of the present invention controls the operation of the test file through the source partition and the target partition, and determines the test result according to the state of the marked file, effectively performs a stress test on the storage device, and then accurately verifies the reliability of the storage device.

Description

一种存储设备的压力测试方法、装置及服务器Stress testing method, device and server for storage device

技术领域technical field

本发明涉及存储设备测试技术领域,特别是涉及一种存储设备的压力测试方法、装置及服务器。The invention relates to the technical field of storage device testing, in particular to a storage device stress testing method, device and server.

背景技术Background technique

随着计算机技术的发展,承载数据信息的文件从几KB发展到目前的数十GB甚至上百GB,例如一个操作系统的镜像文件或者一个影音文件通常能够达到2至3GB。文件通常保存在存储设备中;存储设备可以包括硬盘或多个硬盘组成的磁盘阵列,且被配置为多个分区,这样可以方便用户根据文件的属性将文件分门别类的存放到不同分区中。With the development of computer technology, files carrying data information have grown from a few KB to tens of GB or even hundreds of GB at present. For example, an image file of an operating system or an audio-visual file can usually reach 2 to 3 GB. Files are usually stored in a storage device; the storage device can include a hard disk or a disk array composed of multiple hard disks, and is configured as multiple partitions, so that users can store files in different partitions according to the attributes of the files.

在进行文件整理的过程中,用户可能需要频繁地进行复制、剪切等文件操作,由于文件通常高达几个GB,这样,存储设备可能面临较大的读写压力;而如果存储设备的可靠性不高,在大文件操作导致的较大读写压力下,可能会产生文件的损坏或丢失,从而给用户造成数据安全风险,甚至安全事故。因此,如何对存储设备进行压力测试,校验存储设备的可靠性进而保证数据安全,是本领域技术人员亟需解决的技术问题。In the process of organizing files, users may need to frequently perform file operations such as copying and cutting. Since the files are usually up to several GB, the storage device may face greater read and write pressure; and if the reliability of the storage device Not high, under the high reading and writing pressure caused by large file operations, files may be damaged or lost, which may cause data security risks or even security accidents to users. Therefore, how to perform a stress test on a storage device, verify the reliability of the storage device, and ensure data security is a technical problem urgently needed to be solved by those skilled in the art.

发明内容Contents of the invention

鉴于以上所述现有技术的缺点,本发明的目的在于提供一种存储设备的压力测试方法、装置及服务器,用于对存储设备进行压力测试,校验其可靠性。In view of the above-mentioned shortcomings of the prior art, the object of the present invention is to provide a storage device stress test method, device and server, which are used to perform a stress test on the storage device and verify its reliability.

为实现上述目的及其他相关目的,根据本发明的第一方面,本发明实施例提供一种存储设备的压力测试方法,该方法包括以下步骤:In order to achieve the above object and other related objects, according to the first aspect of the present invention, an embodiment of the present invention provides a method for stress testing a storage device, the method including the following steps:

从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;From the partition set of the storage device, determine a source partition and a target partition, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated;

建立标示文件,所述标示文件用于描述测试文件测操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;Establishing a marking file, the marking file is used to describe the completion status of the test file test operation, and the state of the marking file is the marking state during the operation of the test file;

将测试文件从源分区操作到目标分区;Manipulate test files from source partition to target partition;

经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。After the reference time passes, when the status of the marked file is marked, it is determined that the test is abnormal.

可选地,所述确定源分区和目标分区,包括:Optionally, the determining the source partition and the target partition includes:

将测试文件所在的分区作为源分区;Use the partition where the test file is located as the source partition;

将源分区从分区集合中删除,得到候选分区;Delete the source partition from the partition set to obtain the candidate partition;

从所述候选分区集合中随机选择出目标分区。A target partition is randomly selected from the set of candidate partitions.

可选地,所述确定源分区和目标分区,包括:Optionally, the determining the source partition and the target partition includes:

将测试文件所在的分区作为源分区;Use the partition where the test file is located as the source partition;

按照分区集合盘符顺序,选择相邻且排在所述源分区之后的分区作为目标分区。According to the order of the drive letter of the partition set, select the adjacent partition and the partition after the source partition as the target partition.

可选地,所述建立标示文件,包括:Optionally, the establishment of the identification file includes:

在所述目标分区建立标示文件;Establishing a label file in the target partition;

或者,or,

在所述源分区建立标示文件;Create a label file in the source partition;

所述将测试文件从源分区操作到目标分区,包括,The operation of test files from the source partition to the target partition includes,

将标示文件绑定到测试文件;Bind the markup file to the test file;

将绑定后的测试文件从源分区操作到目标分区。Operate the bound test file from the source partition to the target partition.

可选地,该方法还包括:Optionally, the method also includes:

在测试文件从源分区操作到目标分区的过程中,读取所述测试文件的文件流,计算操作速度;During the process of the test file being operated from the source partition to the target partition, the file stream of the test file is read, and the operation speed is calculated;

其中,所述文件流中每个子文件的大小均相同。Wherein, the size of each sub-file in the file stream is the same.

可选地,将测试文件从源分区操作到目标分区之前,该方法还包括:Optionally, before operating the test file from the source partition to the target partition, the method further includes:

获取目标分区的容量;Get the capacity of the target partition;

根据所述目标分区的容量,确定所述测试文件的大小;Determine the size of the test file according to the capacity of the target partition;

所述将测试文件从源分区操作到目标分区包括,从测试文件库中选择相应大小的测试文件,将测试文件从源分区操作到目标分区。Said operating the test file from the source partition to the target partition includes selecting a test file of a corresponding size from the test file library, and operating the test file from the source partition to the target partition.

根据本发明的第二方面,本发明实施例还提供一种存储设备的压力测试装置,该装置包括:According to the second aspect of the present invention, an embodiment of the present invention further provides a pressure testing device for a storage device, the device comprising:

分区确定模块,用于从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;A partition determining module, configured to determine a source partition and a target partition from a partition set of the storage device, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated;

标示模块,用于建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;A marking module, used to create a marking file, the marking file is used to describe the operation completion status of the test file, and the state of the marking file is the marking state during the operation of the test file;

操作模块,用于将测试文件从源分区操作到目标分区;The operation module is used to operate the test file from the source partition to the target partition;

检测模块,用于经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。The detection module is configured to determine that the test is abnormal when the status of the marked file is the marked state after the reference time has elapsed.

可选地,所述分区确定模块用于,Optionally, the partition determination module is used to,

将测试文件所在的分区作为源分区;Use the partition where the test file is located as the source partition;

将源分区从分区集合中删除,得到候选分区集;Delete the source partition from the partition set to obtain the candidate partition set;

从所述候选分区集中随机选择出目标分区。A target partition is randomly selected from the set of candidate partitions.

可选地,所述标示模块用于,Optionally, the marking module is used for,

在所述目标分区建立标示文件;Establishing a label file in the target partition;

或者,or,

在所述源分区建立标示文件;Create a label file in the source partition;

所述操作模块还用于,The operation module is also used for,

将标示文件绑定到测试文件;Bind the markup file to the test file;

将绑定后的测试文件从源分区操作到目标分区。Operate the bound test file from the source partition to the target partition.

根据本发明的第三方面,本发明实施例还提供一种服务器,所述服务器包括至少一个处理器;以及,According to a third aspect of the present invention, an embodiment of the present invention further provides a server, where the server includes at least one processor; and,

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the one processor, the instructions being executed by the at least one processor, to enable the at least one processor to:

从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;From the partition set of the storage device, determine a source partition and a target partition, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated;

建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;Establishing a marking file, the marking file is used to describe the operation completion state of the test file, and the state of the marking file is the marking state during the operation of the test file;

将测试文件从源分区操作到目标分区;Manipulate test files from source partition to target partition;

经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。After the reference time passes, when the status of the marked file is marked, it is determined that the test is abnormal.

如上所述,本发明实施例提供的一种存储设备的压力测试方法、装置及服务器,具有以下有益效果:通过从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;将测试文件从源分区操作到目标分区;经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。本发明实施例通过源分区和目标分区控制测试文件的操作,并根据标示文件的状态确定测试结果,有效地对存储设备进行压力测试,进而准确校验存储设备的可靠性。As mentioned above, a storage device stress testing method, device and server provided by the embodiments of the present invention have the following beneficial effects: by determining the source partition and the target partition from the partition set of the storage device, wherein the source partition For the partition where the test file is located, the target partition is the partition to be operated on by the test file; set up a mark file, the mark file is used to describe the operation completion status of the test file, and described in the operation process of the test file The status of the marked file is the marked state; the test file is operated from the source partition to the target partition; after a reference time, when the state of the marked file is the marked state, it is determined that the test is abnormal. The embodiment of the present invention controls the operation of the test file through the source partition and the target partition, and determines the test result according to the state of the marked file, effectively performs a stress test on the storage device, and then accurately verifies the reliability of the storage device.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.

图1是本发明实施例提供的一种存储设备的网络架构图;FIG. 1 is a network architecture diagram of a storage device provided by an embodiment of the present invention;

图2是本发明实施例提供的一种存储设备的压力测试方法的流程示意图;FIG. 2 is a schematic flowchart of a method for stress testing a storage device provided by an embodiment of the present invention;

图3是本发明实施例提供的一种源分区和目标分区确定方法的流程示意图;FIG. 3 is a schematic flowchart of a method for determining a source partition and a target partition provided by an embodiment of the present invention;

图4是本发明实施例提供的另一种源分区和目标分区确定方法的流程示意图;FIG. 4 is a schematic flowchart of another method for determining a source partition and a target partition provided by an embodiment of the present invention;

图5是本发明实施例提供的一种测试文件操作方法的流程示意;FIG. 5 is a schematic flowchart of a test file operation method provided by an embodiment of the present invention;

图6是本发明实施例提供的另一种存储设备压力测试方法的流程示意图;FIG. 6 is a schematic flowchart of another storage device stress testing method provided by an embodiment of the present invention;

图7是本发明实施例提供的一种存储设备的压力测试装置的结构示意图;FIG. 7 is a schematic structural diagram of a pressure testing device for a storage device provided by an embodiment of the present invention;

图8是本发明实施例提供的执行存储设备的压力测试方法的服务器的硬件结构示意图。FIG. 8 is a schematic diagram of a hardware structure of a server implementing a method for stress testing a storage device according to an embodiment of the present invention.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

请参阅图1至图8。需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图示中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。See Figures 1 through 8. It should be noted that the diagrams provided in this embodiment are only schematically illustrating the basic idea of the present invention, so that only the components related to the present invention are shown in the diagrams rather than the number, shape and Dimensional drawing, the type, quantity and proportion of each component can be changed arbitrarily during actual implementation, and the component layout type may also be more complicated.

参见图1,是本发明实施例提供的一种存储设备的网络架构图。如图1所示,该存储设备包括磁盘阵列2和存储机3;所述磁盘阵列2通常设置在服务器1内部,服务器1通过RAID(英文:Redundant Arrays of Independent Disk,中文:磁盘阵列)卡连接多个硬盘构成的磁盘阵列2,在本发明实施例中组建的磁盘阵列2可以包括RAID0、RAID1、RAID5和RAID10等,服务器1还可以控制将磁盘阵列2分为多个分区。服务器1还可以通过HBA(英文:Host BusAdapter,中文:主机总线适配器)卡与存储机3相连接,存储机3内可以设置多个SAN(英文:Storage Area Network,中文:存储域网络)分区。这样服务器1可以访问磁盘阵列2内的分区,以及存储机3内的SAN分区。本发明实施例提供的存储设备的压力测试方法可以应用于上述存储设备的架构,当然,上述存储设备的架构仅是一示例性实施例,本发明实施例提供的存储设备的压力测试方法还可以应用于其他任意架构的存储设备,本发明实施例做不做限定。Referring to FIG. 1 , it is a network architecture diagram of a storage device provided by an embodiment of the present invention. As shown in Figure 1, the storage device includes a disk array 2 and a storage machine 3; the disk array 2 is usually set inside the server 1, and the server 1 is connected through a RAID (English: Redundant Arrays of Independent Disk, Chinese: disk array) card A disk array 2 composed of multiple hard disks. The disk array 2 formed in the embodiment of the present invention may include RAID0, RAID1, RAID5, and RAID10. The server 1 may also control the disk array 2 to be divided into multiple partitions. Server 1 can also be connected to storage machine 3 through HBA (English: Host Bus Adapter, Chinese: Host Bus Adapter) card, and multiple SAN (English: Storage Area Network, Chinese: storage area network) partitions can be set in storage machine 3. In this way, the server 1 can access the partitions in the disk array 2 and the SAN partitions in the storage machine 3 . The storage device stress test method provided by the embodiment of the present invention can be applied to the above-mentioned storage device architecture. Of course, the above-mentioned storage device architecture is only an exemplary embodiment, and the storage device stress test method provided by the embodiment of the present invention can also be The embodiment of the present invention does not limit the application to storage devices of other arbitrary architectures.

参见图2,是本发明实施例提供的一种存储设备的压力测试方法的流程示意图,如图2所示,本发明实施例示出了服务器执行存储设备的压力测试方法的过程:Referring to FIG. 2 , it is a schematic flowchart of a stress testing method for a storage device provided by an embodiment of the present invention. As shown in FIG. 2 , the embodiment of the present invention shows a process in which a server executes a stress testing method for a storage device:

步骤S101:从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区。Step S101: From the partition set of the storage device, determine a source partition and a target partition, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated.

在通常的存储设备中,存储空间通常被划分为多个分区,在一示例性实施例中,所述多个分区可以为“分区d”、“分区e”、“分区f”以及“分区g”等。在发明实施例中,通过确定源分区和目标分区,从而方便在后续测试步骤中执行测试文件的操作;其中,所述源分区可以理解为测试文件所保存的分区,所述目标分区可以理解为测试文件待操作到的分区。一示例性实施例将测试文件从“分区d”复制到“分区e”时,“分区d”可以为源分区,“分区e”可以为目标分区。In a common storage device, the storage space is usually divided into multiple partitions. In an exemplary embodiment, the multiple partitions may be "partition d", "partition e", "partition f" and "partition g "Wait. In the embodiment of the invention, by determining the source partition and the target partition, it is convenient to execute the operation of the test file in the subsequent test steps; wherein, the source partition can be understood as the partition saved by the test file, and the target partition can be understood as The partition to which the test file is to be operated. An exemplary embodiment When copying the test file from "partition d" to "partition e", "partition d" may be the source partition, and "partition e" may be the target partition.

为了确定源分区和目标分区,从而方便实现测试控制,在第一种实施情况下,参见图3,是本发明实施例提供的一种源分区和目标分区确定方法的流程示意图。如图3所示,该方法包括:In order to determine the source partition and the target partition so as to facilitate the implementation of test control, in the first implementation case, refer to FIG. 3 , which is a schematic flowchart of a method for determining the source partition and the target partition provided by the embodiment of the present invention. As shown in Figure 3, the method includes:

步骤S1011:将测试文件所在的分区作为源分区。Step S1011: Use the partition where the test file is located as the source partition.

测试文件在“分区d”,则可以将“分区d”作为源分区。If the test file is in "partition d", you can use "partition d" as the source partition.

步骤S1012:将源分区从分区集合中删除,得到候选分区集。Step S1012: Delete the source partition from the partition set to obtain a candidate partition set.

服务器可以获取存储设备的所有分区集合,具体获取分区集合的过程在本发明实施例中不再赘述。一示例性实施例中,所述分区集合可以为{“分区d”、“分区e”、“分区f”、“分区g”}。The server may obtain all the partition sets of the storage device, and the specific process of obtaining the partition sets will not be repeated in this embodiment of the present invention. In an exemplary embodiment, the partition set may be {"partition d", "partition e", "partition f", "partition g"}.

根据步骤S1011确定的源分区,将源分区从分区集合中删除,可以得到候选分区集。当确定源分区为“分区d”时,将源分区删除后,则可以得到候选分区集{“分区e”、“分区f”、“分区g”}。According to the source partition determined in step S1011, the source partition is deleted from the partition set to obtain the candidate partition set. When the source partition is determined to be "partition d", after the source partition is deleted, a candidate partition set {"partition e", "partition f", "partition g"} can be obtained.

步骤S1013:从所述候选分区集中随机选择出目标分区。Step S1013: Randomly select a target partition from the candidate partition set.

根据步骤S1012得到的候选分区集,从候选分区集中随机选择出目标分区。当候选分区集为{“分区e”、“分区f”、“分区g”},则从候选分区集中可以随机选择出一个分区作为目标分区,例如可以随机选择出“分区f”作为目标分区。According to the candidate partition set obtained in step S1012, a target partition is randomly selected from the candidate partition set. When the candidate partition set is {"partition e", "partition f", "partition g"}, a partition can be randomly selected from the candidate partition set as the target partition, for example, "partition f" can be randomly selected as the target partition.

这样,可以以源分区为“分区d”,目标分区为“分区f”,在后续步骤中执行测试文件的操作,所述测试文件的操作可以为复制或者剪切操作,也可以为复制和删除操作的结合,这样经过测试文件的操作,可以继续回到步骤S1011,并确定新的源分区为“分区f”,继续执行步骤S1012至步骤S1013从而完成目标分区的确定。In this way, the source partition can be "partition d" and the target partition can be "partition f", and the operation of the test file can be performed in subsequent steps. The operation of the test file can be a copy or cut operation, or copy and delete Combination of operations, so that after the operation of the test file, you can continue to return to step S1011, and determine the new source partition as "partition f", and continue to execute steps S1012 to S1013 to complete the determination of the target partition.

由上述实施例的描述可见,本发明实施例可以以随机遍历的方式,访问到所有的磁盘分区,从而完成对每个磁盘分区的压力测试操作,由于在存储系统的访问过程中,每个磁盘分区的访问顺序可能具有随机性,而并非顺序执行,因此本发明实施例中采用随机遍历的方式,能够有效吻合实际的存储设备的使用过程,从而提高存储设备压力测试的准确性。It can be seen from the description of the above embodiments that the embodiment of the present invention can access all disk partitions in a random traversal manner, thereby completing the stress test operation for each disk partition, because during the access process of the storage system, each disk The access sequence of the partitions may be random rather than executed sequentially. Therefore, the random traversal method adopted in the embodiment of the present invention can effectively match the actual use process of the storage device, thereby improving the accuracy of the stress test of the storage device.

在第二种实施情况下,参见图4,是本发明实施例提供的另一种源分区和目标分区确定方法的流程示意图。如图4所示,该方法包括:In the second implementation situation, refer to FIG. 4 , which is a schematic flowchart of another method for determining a source partition and a target partition provided by an embodiment of the present invention. As shown in Figure 4, the method includes:

步骤S1014:将测试文件所在的分区作为源分区。Step S1014: Use the partition where the test file is located as the source partition.

同样,在一示例性实施例中,测试文件在“分区d”,则可以将“分区d”作为源分区。Likewise, in an exemplary embodiment, if the test file is in "partition d", then "partition d" may be used as the source partition.

步骤S1015:按照分区集合盘符顺序,选择相邻且排在所述源分区之后的分区作为目标分区。Step S1015: According to the order of the drive letter of the partition set, select the adjacent partition and the partition after the source partition as the target partition.

在本发明实施例中,可以按照分区集合盘符顺序,确定目标分区。同样以分区集合为{“分区d”、“分区e”、“分区f”、“分区g”}为例,当根据步骤S1014确定源分区为“分区d”时,由于“分区e”按照盘符的字母排序排在“分区d”之后,且与“分区d”相邻,则可以确定目标分区为“分区d”,以源分区为“分区d”,目标分区为“分区e”,进行后续步骤的测试文件操作。进一步,在执行完测试文件操作后,再次回到步骤S1014,从而确定新的源分区为“分区e”。这样,本发明实施例可以按照固定顺序遍历每个磁盘分区,从而完成存储设备的压力测试,可以降低操作的复杂度,方便测试的快速执行。In the embodiment of the present invention, the target partition may be determined according to the order of the drive letter of the partition set. Also taking the partition set as {"partition d", "partition e", "partition f", "partition g"} as an example, when the source partition is determined to be "partition d" according to step S1014, since "partition e" is If the alphabetical order of characters is after "partition d" and adjacent to "partition d", then the target partition can be determined as "partition d", and the source partition is "partition d" and the target partition is "partition e". Test file operations for subsequent steps. Further, after executing the test file operation, return to step S1014 again, so as to determine that the new source partition is "partition e". In this way, the embodiment of the present invention can traverse each disk partition in a fixed order, thereby completing the stress test of the storage device, reducing the complexity of the operation, and facilitating the rapid execution of the test.

当然,需要说明的是,上述分区集合的盘符顺序仅是一示例性实施例,在具体实施时可以按照盘符的字母排序升序或降序,或者按照盘符名称中数字排序升序或降序,在本发明实施例中不做限定。Of course, it should be noted that the order of the drive letters of the above-mentioned partition set is only an exemplary embodiment, and may be sorted in ascending or descending order according to the letter of the drive letter, or in ascending or descending order according to the number in the name of the drive letter during specific implementation. There is no limitation in the embodiment of the present invention.

步骤S102:建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态。Step S102: Create a flag file, the flag file is used to describe the operation completion state of the test file, and the state of the flag file is the flag state during the operation of the test file.

在具体实施时,当开始对测试文件进行操作时,例如将测试文件从源分区复制到目标分区,建立标示文件,且将标示文件的状态设置为标示状态,用于标示测试文件正在进行操作。在一示例性实施例中,服务器在执行测试文件操作时,可以将标示文件设置为独占状态或者占用状态,由于标示文件被占用,这样在当服务器中的进程访问此标示文件时会提示无法打开;当服务器通过监测系统进程或者获得测试文件操作进程完成消息后,将标示文件设置为解除占用状态,此时服务器访问此标示文件可以正常打开,不会提示文件占用无法打开。During specific implementation, when the test file is started to be operated, for example, the test file is copied from the source partition to the target partition, the mark file is established, and the state of the mark file is set to mark state, which is used to mark that the test file is being operated. In an exemplary embodiment, when the server executes the test file operation, the marked file can be set to an exclusive state or an occupied state. Since the marked file is occupied, when the process in the server accesses the marked file, it will prompt that it cannot be opened. ; When the server monitors the system process or obtains the completion message of the test file operation process, it sets the marked file to the unoccupied state. At this time, the server can access the marked file and open it normally, without prompting that the file is occupied and cannot be opened.

在第一种实施情况下,可以在所述目标分区建立标示文件。一示例性实施例中,当测试文件从“分区d”复制到“分区e”时,则目标分区为“分区e”,可以在“分区e”建立标示文件。In the first implementation situation, an identification file may be created in the target partition. In an exemplary embodiment, when the test file is copied from "partition d" to "partition e", the target partition is "partition e", and a logo file can be created in "partition e".

在第二种实施情况下,可以在所述源分区建立标示文件。一示例性实施例中,当测试文件从“分区d”复制到“分区e”时,则源分区为“分区d”,则可以在“分区d”建立标示文件。In the second implementation situation, a label file may be created in the source partition. In an exemplary embodiment, when the test file is copied from "partition d" to "partition e", then the source partition is "partition d", and the logo file can be created in "partition d".

步骤S103:将测试文件从源分区操作到目标分区。Step S103: Operating the test file from the source partition to the target partition.

为了保证对存储设备的压力,在具体实施时,所述测试文件通常为大文件,例如所述测试文件可以使用500GB的文件;而且,在本发明实施例中,对所述测试文件的形式不做限定,所述测试文件可以为文本文件、视频文件、音频文件中的一种或多种的组合;另外,所述测试文件可以为1个具有较大容量的文件,或者多个小文件组成的文件集合。In order to ensure the pressure on the storage device, during specific implementation, the test file is usually a large file, for example, the test file can use a 500GB file; and, in the embodiment of the present invention, the form of the test file is not As a limitation, the test file can be a combination of one or more of text files, video files, and audio files; in addition, the test file can be a file with a larger capacity, or a plurality of small files collection of files.

在测试进行过程中,将测试文件从源分区操作到目标分区。对测试文件的操作可以为复制、剪切以及复制和剪切的组合,在本发明实施例中不做限定。While the test is in progress, the test files are manipulated from the source partition to the target partition. The operation on the test file may be copying, cutting, or a combination of copying and cutting, which is not limited in this embodiment of the present invention.

根据步骤S102中标示文件的建立方式,当在源分区建立标示文件时,参见图5,是本发明实施例提供的一种测试文件操作方法的流程示意图。如图5所示,该方法包括:According to the creation method of the label file in step S102, when creating the label file in the source partition, refer to FIG. 5 , which is a schematic flowchart of a test file operation method provided by the embodiment of the present invention. As shown in Figure 5, the method includes:

步骤S1031:将标示文件绑定到测试文件。Step S1031: Bind the markup file to the test file.

当标示文件建立在源分区时,可以将标示文件与测试文件绑定到一起,与测试文件一起进行操作。When the markup file is created in the source partition, the markup file and the test file can be bound together and operated together with the test file.

步骤S1032:将绑定后的测试文件从源分区操作到目标分区。Step S1032: Operate the bound test file from the source partition to the target partition.

在具体实施时,可以与测试文件一起将标示文件操作到目标分区,同时按照上述实施例的设置方式配置标示文件的标示状态;同样,也可以优先将标示文件操作到目标分区,在标示文件操作完成并配置完成标示状态后,将测试文件从源分区操作到目标分区。During specific implementation, the marked file can be operated to the target partition together with the test file, and the marked state of the marked file can be configured according to the setting method of the above-mentioned embodiment; After completing and configuring the completed flag state, operate the test file from the source partition to the target partition.

为了精确衡量存储设备在压力测试下的性能,在本发明实施例中,还可以在测试文件从源分区操作到目标分区的过程中,读取所述测试文件的文件流,计算操作速度;其中,所述文件流中每个子文件的大小均相同。在具体实施时,在执行测试文件的操作过程中,可以使用系统自带的测试工具读取测试文件的文件流,在本发明实施例中不再赘述;而文件流通常包括多个子文件,在本发明实施例中,为了保证测试的精度,设置每个子文件的大小均相同,这样可以保证测试得到的操作速度在同样配置环境下得到;一示例性实施例中,所述子文件的大小可以设定为1KB等。In order to accurately measure the performance of the storage device under the stress test, in the embodiment of the present invention, it is also possible to read the file stream of the test file and calculate the operation speed during the operation of the test file from the source partition to the target partition; wherein , each subfile in the file stream is the same size. During specific implementation, during the operation process of executing the test file, the test tool provided by the system can be used to read the file stream of the test file, which will not be repeated in the embodiment of the present invention; and the file stream usually includes a plurality of sub-files. In the embodiment of the present invention, in order to ensure the accuracy of the test, the size of each subfile is set to be the same, so that the operating speed obtained by the test can be guaranteed to be obtained under the same configuration environment; in an exemplary embodiment, the size of the subfile can be Set to 1KB etc.

步骤S104:经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。Step S104: When the reference time elapses, when the status of the marked file is marked, it is determined that the test is abnormal.

在本发明实施例中,可以根据测试文件的大小设置相应的参考时间,例如当所述测试文件为500GB时,可以根据历史测试的统计结果,操作速度为10MB/s,按照上述操作速度计算测试文件操作完成需要耗费51200秒的时间,可以设置所述参考时间为51200秒;或者可以确定一评估系数,将评估系数与上述需要耗费的时间的乘积作为参考时间,例如通过历史测试的统计结果,确定该评估系数为1.2,则可以确定参考时间为1.2×51200=61440秒。In the embodiment of the present invention, the corresponding reference time can be set according to the size of the test file. For example, when the test file is 500GB, the test can be calculated according to the above-mentioned operating speed according to the statistical results of historical tests and the operating speed is 10MB/s. It takes 51200 seconds to complete the file operation, and the reference time can be set to 51200 seconds; or an evaluation coefficient can be determined, and the product of the evaluation coefficient and the above-mentioned required time can be used as the reference time, for example, through the statistical results of historical tests, If the evaluation coefficient is determined to be 1.2, then the reference time can be determined to be 1.2×51200=61440 seconds.

以所述参考时间作为判断基础,从而判定测试是否异常。一示例性实施例中,当达到参考时间后,服务器可以访问标示文件,如果标示文件的状态依然是标示状态,例如被占用或被独占,则标示测试文件依然在操作过程中,可能由于文件丢包等造成测试文件的操作延时,则进一步确定测试异常;当达到参考时间后,服务器访问标示文件,如果该标示文件的状态不是标示状态,例如解除占用状态,服务器可以正常打开该标示文件,则表示测试文件的操作已经成功完成,可以确定测试通过。The reference time is used as a judgment basis to judge whether the test is abnormal. In an exemplary embodiment, when the reference time is reached, the server can access the marked file. If the state of the marked file is still marked, such as being occupied or monopolized, the marked test file is still in operation, and it may be due to file loss. If the operation delay of the test file is caused by the package, etc., the test abnormality is further determined; when the reference time is reached, the server accesses the marked file. If the state of the marked file is not marked, such as unoccupied, the server can open the marked file normally. It means that the operation of the test file has been successfully completed, and it can be determined that the test is passed.

当然,在确定测试通过后,还可以进一步对测试文件进行校验。具体的校验过程可以包括:获取源分区中测试文件的第一校验码,该第一校验码可以为MD5码或者哈希校验码等;在测试文件操作完成后,获取目标分区中操作完成后的测试文件的第二校验码;如果第一校验码与第二校验码一致,则可以确定测试文件校验通过,测试文件完整;如果第一校验码与第二校验码不相等,则可以确定测试文件校验失败,测试文件可能发生了损坏。Of course, after the test is determined to pass, the test file may be further verified. The specific verification process can include: obtaining the first verification code of the test file in the source partition, the first verification code can be MD5 code or hash verification code, etc.; The second check code of the test file after the operation is completed; if the first check code is consistent with the second check code, it can be determined that the test file has passed the check and the test file is complete; if the first check code is consistent with the second check code If the verification codes are not equal, it can be determined that the verification of the test file fails, and the test file may be damaged.

由上述实施例的描述可见,本发明实施例提供的一种存储设备的压力测试方法,通过从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;将测试文件从源分区操作到目标分区;经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。本发明实施例通过源分区和目标分区控制测试文件的操作,并根据标示文件的状态确定测试结果,有效地对存储设备进行压力测试,进而准确校验存储设备的可靠性。It can be seen from the description of the above embodiments that the embodiment of the present invention provides a stress testing method for a storage device, which determines the source partition and the target partition from the partition set of the storage device, wherein the source partition is the location where the test file is located. Partition, the target partition is the partition to be operated on by the test file; set up a mark file, the mark file is used to describe the operation completion status of the test file, and the state of the mark file during the operation of the test file is Marking the state; operating the test file from the source partition to the target partition; after a reference time, when the state of the marked file is marked, it is determined that the test is abnormal. The embodiment of the present invention controls the operation of the test file through the source partition and the target partition, and determines the test result according to the state of the marked file, effectively performs a stress test on the storage device, and then accurately verifies the reliability of the storage device.

为了提高存储设备压力测试的灵活性,参见图6,是本发明实施例提供的另一种存储设备压力测试方法的流程示意图。如图6所示,该方法包括以下步骤:In order to improve the flexibility of the storage device stress test, refer to FIG. 6 , which is a schematic flowchart of another storage device stress test method provided by an embodiment of the present invention. As shown in Figure 6, the method includes the following steps:

步骤S201:从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区。Step S201: From the partition set of the storage device, determine a source partition and a target partition, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated.

步骤S202:建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态。Step S202: Create a flag file, the flag file is used to describe the operation completion state of the test file, and the state of the flag file is the flag state during the operation of the test file.

步骤S203:获取目标分区的容量;Step S203: Obtain the capacity of the target partition;

根据步骤S201确定的目标分区,获取目标分区的容量。在具体实施时,服务器能够使用“fdisk”等工具获取存储设备的容量,在本发明实施例中不再赘述。在一示例性实施例中,所述目标分区为“分区e”,进一步获得“分区e”的容量为500GB。According to the target partition determined in step S201, the capacity of the target partition is acquired. During specific implementation, the server can use tools such as "fdisk" to obtain the capacity of the storage device, which will not be described in detail in the embodiments of the present invention. In an exemplary embodiment, the target partition is "partition e", and the capacity of "partition e" is further obtained to be 500GB.

步骤S204:根据所述目标分区的容量,确定所述测试文件的大小。Step S204: Determine the size of the test file according to the capacity of the target partition.

根据步骤S203获取的目标分区容量,当目标分区为“分区e”,该“分区e”的容量为500GB,则可以进一步确定测试文件的大小。在本发明实施例中,确定测试文件的大小小于目标分区的容量。一示例性实施例中,可以确定测试文件的大小为499GB等。According to the target partition capacity acquired in step S203, when the target partition is "partition e" and the capacity of "partition e" is 500GB, the size of the test file can be further determined. In the embodiment of the present invention, it is determined that the size of the test file is smaller than the capacity of the target partition. In an exemplary embodiment, it may be determined that the size of the test file is 499GB or the like.

步骤S205:从测试文件库中选择相应大小的测试文件,将测试文件从源分区操作到目标分区。Step S205: Select a test file of a corresponding size from the test file library, and operate the test file from the source partition to the target partition.

从步骤S204获得测试文件的大小之后,可以进一步从测试文件库中选择相应大小的测试文件。在一示例性实施例中,可以建立具有不同大小的文件的测试文件库,例如,测试文件库中可以包括100GB、200GB、400GB、500GB等不同大小的多个测试文件。当确定测试文件的大小为499GB时,可以从测试文件库中选择最接近的测试文件,例如选择400GB的测试文件进行后续操作。After the size of the test file is obtained from step S204, a test file of a corresponding size may be further selected from the test file library. In an exemplary embodiment, a test file library with files of different sizes may be established. For example, the test file library may include multiple test files of different sizes such as 100GB, 200GB, 400GB, and 500GB. When the size of the test file is determined to be 499GB, the closest test file can be selected from the test file library, for example, a test file of 400GB is selected for subsequent operations.

步骤S206:经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。Step S206: When the reference time elapses, when the status of the marked file is marked, it is determined that the test is abnormal.

本发明实施例与上述实施例相同之处,可参见上述实施例的描述,在此不再赘述。For the similarities between the embodiment of the present invention and the foregoing embodiment, reference may be made to the description of the foregoing embodiment, and details are not repeated here.

由上述实施例的描述可见,本发明实施例提供的另一种存储设备的压力测试方法,通过目标分区的大小动态调整选择使用的测试文件,能够适应具有不同分区大小的存储设备的压力测试,有效提供了测试的灵活性和适用性。It can be seen from the description of the above embodiments that another storage device stress test method provided by the embodiment of the present invention can adapt to the stress test of storage devices with different partition sizes by dynamically adjusting the size of the target partition to select the test file to be used. Effectively provides flexibility and applicability of testing.

通过以上的方法实施例的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Through the description of the above method embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to make a A computer device (which may be a personal computer, a server, or a network device, etc.) executes all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes various media capable of storing program codes such as read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk.

与本发明提供的存储设备的压力测试方法实施例相对应,本发明还提供了一种存储设备的压力测试装置。Corresponding to the embodiment of the stress testing method for the storage device provided by the present invention, the present invention also provides a stress testing device for the storage device.

参见图7,是本发明实施例提供的一种存储设备的压力测试装置的结构示意图。如图7所示,该装置包括:Referring to FIG. 7 , it is a schematic structural diagram of a pressure testing device for a storage device provided by an embodiment of the present invention. As shown in Figure 7, the device includes:

分区确定模块11,用于从存储设备的分区集合中,确定源分区和目标分区,其中,所述源分区为测试文件所在的分区,所述目标分区为测试文件待操作到的分区;The partition determination module 11 is configured to determine a source partition and a target partition from the partition set of the storage device, wherein the source partition is the partition where the test file is located, and the target partition is the partition to which the test file is to be operated;

标示模块12,用于建立标示文件,所述标示文件用于描述测试文件的操作完成状态,且在所述测试文件的操作过程中所述标示文件的状态为标示状态;The marking module 12 is used to create a marking file, the marking file is used to describe the operation completion state of the test file, and the state of the marking file is the marking state during the operation of the test file;

操作模块13,用于将测试文件从源分区操作到目标分区;An operating module 13, configured to operate the test file from the source partition to the target partition;

检测模块14,用于经过参考时间,当所述标示文件的状态为标示状态时,确定测试异常。The detection module 14 is configured to determine that the test is abnormal when the status of the marked file is marked when the reference time has passed.

在第一种实施情况下,所述分区确定模块11还可以用于,将测试文件所在的分区作为源分区;In the first implementation situation, the partition determination module 11 can also be used to use the partition where the test file is located as the source partition;

将源分区从分区集合中删除,得到候选分区集;Delete the source partition from the partition set to obtain the candidate partition set;

从所述候选分区集中随机选择出目标分区。A target partition is randomly selected from the set of candidate partitions.

在第二种实施情况下,所述分区确定模块11还可以用于,将测试文件所在的分区作为源分区;In the second implementation situation, the partition determination module 11 can also be used to use the partition where the test file is located as the source partition;

按照分区集合盘符顺序,选择相邻且排在所述源分区之后的分区作为目标分区。According to the order of the drive letter of the partition set, select the adjacent partition and the partition after the source partition as the target partition.

为了建立标示文件,在第一种实施情况下,所述标示模块12可以用于在所述目标分区建立标示文件。在第二种实施情况下,所述标示模块12可以用于在所述源分区建立标示文件。In order to create a marking file, in the first implementation situation, the marking module 12 may be used to create a marking file in the target partition. In the second implementation situation, the marking module 12 may be used to create a marking file in the source partition.

根据标示模块12建立标示文件的方式,当标示模块12将标示文件建立在源分区时,所述操作模块13还可以用于将标示文件绑定到测试文件;将绑定后的测试文件从源分区操作到目标分区。According to the way that the marking module 12 establishes the marking file, when the marking module 12 sets up the marking file in the source partition, the operation module 13 can also be used to bind the marking file to the test file; partition operation to the target partition.

为了精确评估存储设备在压力测试下的性能,在本发明实施例中,所述操作模块13还可以在测试文件从源分区操作到目标分区的过程中,读取所述测试文件的文件流,计算操作速度;其中,所述文件流中每个子文件的大小均相同。In order to accurately evaluate the performance of the storage device under the stress test, in the embodiment of the present invention, the operation module 13 can also read the file stream of the test file during the operation of the test file from the source partition to the target partition, computing the speed of the operation; wherein each sub-file in the file stream has the same size.

为了增加存储设备的压力测试的灵活性,在本发明实施例中,所述操作模块13在将测试文件从源分区操作到目标分区之前,还可以包括:In order to increase the flexibility of the stress test of the storage device, in the embodiment of the present invention, before the operation module 13 operates the test file from the source partition to the target partition, it may also include:

获取目标分区的容量;Get the capacity of the target partition;

根据所述目标分区的容量,确定所述测试文件的大小;Determine the size of the test file according to the capacity of the target partition;

从测试文件库中选择相应大小的测试文件,将选择出的测试文件从源分区操作到目标分区。Select a test file of the corresponding size from the test file library, and operate the selected test file from the source partition to the target partition.

参见图8,是本发明实施例提供的执行存储设备的压力测试方法的服务器的硬件结构示意图,如图8所示,该服务器包括:Referring to FIG. 8 , it is a schematic diagram of a hardware structure of a server performing a stress testing method for a storage device according to an embodiment of the present invention. As shown in FIG. 8 , the server includes:

一个或多个处理器810以及存储器820,图8中以一个处理器810为例。One or more processors 810 and memory 820, one processor 810 is taken as an example in FIG. 8 .

执行存储设备的压力测试方法的服务器还可以包括:输入装置830和输出装置840。The server executing the method for stress testing storage devices may further include: an input device 830 and an output device 840 .

处理器810、存储器820、输入装置830和输出装置840可以通过总线或者其他方式连接,图8中以通过总线连接为例。The processor 810, the memory 820, the input device 830, and the output device 840 may be connected through a bus or in other ways. In FIG. 8, connection through a bus is taken as an example.

存储器820作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的存储设备的压力测试方法对应的程序指令/模块(例如,附图7所示的分区确定模块11、标示模块12、操作模块13以及检测模块14)。处理器810通过运行存储在存储器820中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例存储设备的压力测试方法。The memory 820, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as the stress test method of the storage device in the embodiment of the present application. program instructions/modules (for example, the partition determination module 11, the labeling module 12, the operation module 13, and the detection module 14 shown in FIG. 7). The processor 810 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 820, that is, implements the stress testing method of the storage device in the above method embodiment.

存储器820可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据存储设备的压力测试装置的使用所创建的数据等。此外,存储器820可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器820可选包括相对于处理器810远程设置的存储器,这些远程存储器可以通过网络连接至存储设备的压力测试装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the stress testing device of the storage device, etc. . In addition, the memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the storage 820 may optionally include storages that are remotely located relative to the processor 810, and these remote storages may be connected to the stress testing device of the storage device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

输入装置830可接收输入的数字或字符信息,以及产生与存储设备的压力测试装置的用户设置以及功能控制有关的键信号输入。输出装置840可包括显示屏等显示设备。The input device 830 can receive input numbers or character information, and generate key signal input related to user settings and function control of the stress test device of the storage device. The output device 840 may include a display device such as a display screen.

所述一个或者多个模块存储在所述存储器820中,当被所述一个或者多个处理器810执行时,执行上述任意方法实施例中的存储设备的压力测试方法。The one or more modules are stored in the memory 820 , and when executed by the one or more processors 810 , execute the storage device stress testing method in any of the above method embodiments.

上述服务器可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。The above-mentioned server can execute the method provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not exhaustively described in this embodiment, refer to the method provided in the embodiment of the present invention.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置或系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置及系统实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiments. The device and system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, It can be located in one place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.

需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

以上所述仅是本发明的具体实施方式,使本领域技术人员能够理解或实现本发明。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of stress testing a storage device, comprising the steps of:
determining a source partition and a target partition from a partition set of a storage device, wherein the source partition is a partition where a test file is located, and the target partition is a partition to which the test file is to be operated;
establishing a marking file, wherein the marking file is used for describing the operation completion state of a test file, and the state of the marking file is a marking state in the operation process of the test file;
operating the test file from the source partition to the target partition;
and determining test exception when the state of the marking file is the marking state after the reference time.
2. The method of stress testing of a storage device of claim 1, wherein said determining a source partition and a target partition comprises:
taking the partition where the test file is located as a source partition;
deleting the source partition from the partition set to obtain a candidate partition set;
randomly selecting a target partition from the candidate partition set.
3. The method of stress testing of a storage device of claim 1, wherein said determining a source partition and a target partition comprises:
taking the partition where the test file is located as a source partition;
and selecting the partitions adjacent to and arranged after the source partition as the target partition according to the partition set drive order.
4. A method for stress testing of a storage device according to any of claims 1 to 3, wherein said creating an indication file comprises:
establishing a marking file in the target partition;
or,
establishing a marking file in the source partition;
the operating of the test file from the source partition to the target partition includes,
binding the markup file to the test file;
and operating the bound test file from the source partition to the target partition.
5. The method for stress testing of a storage device of claim 1, further comprising:
reading a file stream of a test file and calculating the operation speed in the process of operating the test file from a source partition to a target partition;
wherein the size of each subfile in the file stream is the same.
6. The method for stress testing of a storage device according to claim 1, wherein before operating the test file from the source partition to the target partition, further comprising:
acquiring the capacity of a target partition;
determining the size of the test file according to the capacity of the target partition;
the operating the test file from the source partition to the target partition includes selecting a test file of a corresponding size from a test file library, and operating the selected test file from the source partition to the target partition.
7. A pressure testing apparatus for a storage device, comprising:
the device comprises a partition determining module, a partition determining module and a partition determining module, wherein the partition determining module is used for determining a source partition and a target partition from a partition set of a storage device, the source partition is a partition where a test file is located, and the target partition is a partition to which the test file is to be operated;
the system comprises a marking module, a test module and a control module, wherein the marking module is used for establishing a marking file, the marking file is used for describing the operation completion state of a test file, and the state of the marking file is a marking state in the operation process of the test file;
the operation module is used for operating the test file from the source partition to the target partition;
and the detection module is used for determining test abnormity when the state of the marking file is the marking state after reference time.
8. The pressure testing apparatus of claim 7, wherein the partition determination module is configured to,
taking the partition where the test file is located as a source partition;
deleting the source partition from the partition set to obtain a candidate partition set;
randomly selecting a target partition from the candidate partition set.
9. Pressure testing device of a storage device according to claim 7 or 8, characterized in that the designation module is adapted to,
establishing a marking file in the target partition;
or,
establishing a marking file in the source partition;
the operation module is also used for operating the operation module,
binding the markup file to the test file;
and operating the bound test file from the source partition to the target partition.
10. A server, characterized in that the server comprises at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to:
determining a source partition and a target partition from a partition set of a storage device, wherein the source partition is a partition where a test file is located, and the target partition is a partition to which the test file is to be operated;
establishing a marking file, wherein the marking file is used for describing the operation completion state of a test file, and the state of the marking file is a marking state in the operation process of the test file;
operating the test file from the source partition to the target partition;
and determining test exception when the state of the marking file is the marking state after the reference time.
CN201710524194.9A 2017-06-30 2017-06-30 A kind of method for testing pressure of storage device, device and server Pending CN107391326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710524194.9A CN107391326A (en) 2017-06-30 2017-06-30 A kind of method for testing pressure of storage device, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710524194.9A CN107391326A (en) 2017-06-30 2017-06-30 A kind of method for testing pressure of storage device, device and server

Publications (1)

Publication Number Publication Date
CN107391326A true CN107391326A (en) 2017-11-24

Family

ID=60334722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710524194.9A Pending CN107391326A (en) 2017-06-30 2017-06-30 A kind of method for testing pressure of storage device, device and server

Country Status (1)

Country Link
CN (1) CN107391326A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911655A (en) * 2017-12-19 2022-08-16 超聚变数字技术有限公司 Self-checking method and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059858A1 (en) * 2006-08-31 2008-03-06 Fujitsu Limited Load generating apparatus and load testing method
US7480717B2 (en) * 2004-07-08 2009-01-20 International Business Machines Corporation System and method for path saturation for computer storage performance analysis
CN101373446A (en) * 2007-08-24 2009-02-25 英业达股份有限公司 Pressure testing method of file system
CN103631837A (en) * 2012-05-30 2014-03-12 日本冲信息株式会社 Information processing apparatus and method for processing information
CN106681896A (en) * 2017-01-09 2017-05-17 郑州云海信息技术有限公司 File copying pressure testing method based on linux system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7480717B2 (en) * 2004-07-08 2009-01-20 International Business Machines Corporation System and method for path saturation for computer storage performance analysis
US20080059858A1 (en) * 2006-08-31 2008-03-06 Fujitsu Limited Load generating apparatus and load testing method
CN101373446A (en) * 2007-08-24 2009-02-25 英业达股份有限公司 Pressure testing method of file system
CN103631837A (en) * 2012-05-30 2014-03-12 日本冲信息株式会社 Information processing apparatus and method for processing information
CN106681896A (en) * 2017-01-09 2017-05-17 郑州云海信息技术有限公司 File copying pressure testing method based on linux system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CANCANCAM: "《如何判断文件夹已经复制完成》", 《HTTPS://BBS.CSDN.NET/TOPICS/390285621?LIST=LZ》 *
CANCANCAM: "《如何判断文件夹已经复制完成》", 《HTTPS://BBS.CSDN.NET/TOPICS/390285621》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911655A (en) * 2017-12-19 2022-08-16 超聚变数字技术有限公司 Self-checking method and server

Similar Documents

Publication Publication Date Title
US9244627B2 (en) Secure data erasure system for erasing a plurality of data storage devices
US11119841B2 (en) Checking data integrity of data storage systems
KR101384438B1 (en) Capturing and naming dynamic storage tiering configurations to support data pre-staging
CN108089951A (en) Acceleration data in storage system are recovered
US20120284471A1 (en) Virtual machine disk migration
US9940331B1 (en) Proactive scavenging of file system snaps
CN111309535A (en) Method and system for testing hard disk in server, electronic equipment and storage medium
CN107391325A (en) A kind of method of testing of hard disk, device and terminal
CN106021048A (en) Out-of-order verification method and device of disk pack
US9720818B2 (en) Scalable, distributed, fault-tolerant test framework
EP2687974A1 (en) Storage device, control device and control method
CN113870938A (en) Method, device and medium for building redundant array of independent hard disks
CN109558066B (en) Method and device for recovering metadata in storage system
CN105608150A (en) Business data processing method and system
CN103164172B (en) Data flow storage method and device
CN101963931A (en) Hard disk testing method under extensible firmware interface
CN107391326A (en) A kind of method for testing pressure of storage device, device and server
CN107391327A (en) A kind of performance test methods of storage device, device and server
CN107423177A (en) The method of testing and device of a kind of SAS link
CN110767258A (en) Data erasure command test method and related device
CN115525477B (en) Verification method, device, electronic device and storage medium after controller reset
CN105279095B (en) Create the method and device of JBOD file system
CN115827323B (en) Method, apparatus and computer readable medium for restoring files
TWI447712B (en) System and method for testing hard disks under extensible firmware interface
CN109086005A (en) A kind of method and device of data processing

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171124