CN114048075A - Disk testing method and device, electronic equipment and computer readable storage medium - Google Patents

Disk testing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114048075A
CN114048075A CN202111357764.2A CN202111357764A CN114048075A CN 114048075 A CN114048075 A CN 114048075A CN 202111357764 A CN202111357764 A CN 202111357764A CN 114048075 A CN114048075 A CN 114048075A
Authority
CN
China
Prior art keywords
read
virtual disk
write
write data
disk
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
CN202111357764.2A
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.)
SmartX Inc
Original Assignee
SmartX Inc
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 SmartX Inc filed Critical SmartX Inc
Priority to CN202111357764.2A priority Critical patent/CN114048075A/en
Publication of CN114048075A publication Critical patent/CN114048075A/en
Pending legal-status Critical Current

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/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The invention discloses a disk testing method, a disk testing device, electronic equipment and a computer readable storage medium. Wherein, the method comprises the following steps: starting a virtual disk to read and write data; recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk; obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth; and obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates. The invention solves the technical problem that the stability is difficult to verify from the application layer when the stability of the service is verified in the double-active technical scene in the related technology.

Description

Disk testing method and device, electronic equipment and computer readable storage medium
Technical Field
The invention relates to the field of computers, in particular to a disk testing method, a disk testing device, electronic equipment and a computer readable storage medium.
Background
Currently, when the services of one data center are completely unavailable, service recovery can be performed from a data center that is located remotely. However, when the data center suffers from a failure or disaster, such as a power failure of the whole building and a short time difficult recovery, etc., the enterprise will have immeasurable loss due to the risk of service interruption and even data loss. In order to solve the above problems, a disaster recovery solution for a dual-active data center is proposed in the related art, and the disaster recovery solution for the dual-active data center provides data protection across data centers, that is, when a data center in a certain area fails, a data center in another area can quickly recover services such as calculation and storage. In general, in a double-activity scenario, two data centers exist in different areas of the same city, which belong to different available domains in a double-activity cluster, and when one available domain fails completely, the other available domain can still provide services, so that disaster tolerance capability at the level of the available domain is obtained. Meanwhile, in the dual-active cluster, in order to ensure that the main selection class service normally operates and the service is automatically switched in the primary and secondary available domains, an additional arbitration site needs to be deployed, the site only participates in the main selection algorithm and does not store any data, and the arbitration node is stored in a third-party data center so as to ensure that the environment of the available domain is not influenced.
In a double-active scenario, the current stability test is mainly based on two verification aspects, namely network layer verification for detecting the link state between available domains and verifying the link stability, and functional layer verification for performing health check on each node service. But in the related test technology, only the stability of the link and the service operation state of the node are ensured.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a disk testing method, a disk testing device, electronic equipment and a computer readable storage medium, which are used for at least solving the technical problem that the stability is difficult to verify from an application layer when the stability of a service is verified in a double-active technical scene in the related art.
According to an aspect of an embodiment of the present invention, there is provided a disk test method, including: starting a virtual disk to read and write data; recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk; obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth; and obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
Optionally, before starting the virtual disk to read and write data, the method further includes: determining an operating system of the virtual disk; and mounting a storage device with a preset capacity in the virtual disk under the condition that the operating system is a Linux operating system.
Optionally, the recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk includes: and recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk in a preset period to obtain a plurality of read-write rates of the read-write data of the virtual disk in a plurality of periods and a plurality of bandwidths of the read-write data of the virtual disk.
Optionally, the obtaining a plurality of fluctuation rates of the virtual disk read-write data according to the read-write rate and the bandwidth includes: acquiring a first difference between each read-write rate and other read-write rates in the plurality of read-write rates and a second difference between each bandwidth and other bandwidths in the plurality of bandwidths; and obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the first difference and the second difference.
Optionally, the obtaining a test result of the virtual disk operating state according to the plurality of fluctuation rates includes: obtaining a test result of the stable operation of the virtual disk under the condition that the fluctuation rates are all smaller than or equal to a first preset threshold value; and/or obtaining a test result of the virtual disk unstable in operation under the condition that the fluctuation rates are larger than the first preset threshold value.
Optionally, after obtaining the test result of the virtual disk running instability if the fluctuation rate is greater than the first predetermined threshold, the method further includes: and obtaining a test result of the virtual disk operation fault under the condition that the fluctuation rates are larger than a second preset threshold value.
According to another aspect of the embodiments of the present invention, there is provided a disk test apparatus including: the execution module is used for starting the virtual disk to read and write data; the recording module is used for recording the read-write speed of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk; the first obtaining module is used for obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the read-write rate and the bandwidth; and the second acquisition module is used for acquiring a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
According to another aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the above disk test methods.
According to another aspect of embodiments of the present invention, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform any one of the above-mentioned disk test methods.
According to another aspect of an embodiment of the present invention, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the disk testing method of any one of the above.
In the embodiment of the invention, by recording the read-write rate of the virtual disk when reading and writing data and the bandwidth of the virtual disk when reading and writing data, and comparing the recorded read-write rate and the bandwidth, a plurality of fluctuation rates of the virtual disk read-write data can be obtained, and the running state of the virtual disk can be reflected through the fluctuation rates, so that the purpose of verifying the running stability of the virtual disk is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a disk testing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a live technology scenario in the related art;
FIG. 3 is a schematic diagram of portions of a disk testing method provided in an alternative embodiment of the invention;
FIG. 4 is a block diagram of a disk test apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:
FIO: figure it out, a tool that can spawn many threads or processes and perform certain types of I/O operations performed by a user, i.e. can be understood as a multi-threaded IO generation tool, to test the performance of a disk device.
IOPS: Input/Output Operations Per Second, or the number of times of reading and writing, refers to the number of I/O requests that the system can process in a unit time.
ZK Leader: the cluster Leader is also called Meta Leader, Meta Leader. Refers to the leader node selected from the Zookeeper cluster.
I/O interruption: the method is characterized in that when abnormal conditions or special requests occur in the process of executing the program, the computer stops the running of the current program, the abnormal conditions or the special requests are processed, and the current program is returned to be interrupted after the processing is finished and is continuously executed.
HA: high Availability, with as few service interruptions as possible, an automatic failover mechanism, where when one host fails, the server or VM automatically reboots onto another available host.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a disk testing method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
FIG. 1 is a flow chart of a disk testing method according to an embodiment of the present invention, as shown in FIG. 1, the method includes the following steps:
step S102, starting a virtual disk to read and write data;
step S104, recording the read-write speed of the virtual disk read-write data and the bandwidth of the virtual disk read-write data;
step S106, obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth;
and S108, obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
Through the steps, the read-write rate of the virtual disk when reading and writing data and the bandwidth of the virtual disk when reading and writing data are recorded, the recorded read-write rate and the bandwidth are compared, a plurality of fluctuation rates of the virtual disk when reading and writing data can be obtained, the running state of the virtual disk can be reflected through the fluctuation rates, and the purpose of verifying the running stability of the virtual disk is achieved.
As an optional embodiment, the virtual disk is started to read and write data, where the virtual disk may be a virtual machine, and when the virtual disk is started to read and write data, the read and write data operation of the virtual disk may be executed using a performance test FIO tool, so as to test the performance of the disk device. It should be noted that, before starting the virtual disk to read and write data, the operating system of the virtual disk may be determined, and in the case that the operating system is a Linux operating system, a storage device with a predetermined capacity is mounted in the virtual disk, so as to ensure that the operation of reading and writing data of the virtual disk can be started smoothly.
As an optional embodiment, the read-write rate of the virtual disk for reading and writing data and the bandwidth of the virtual disk for reading and writing data are recorded, and the operating state of the virtual disk can be reflected by the read-write rate and the bandwidth of the virtual disk for reading and writing data. The read-write speed and the bandwidth of the virtual disk read-write data can be represented by IOPS data and BW (bandwidth) data, and the read-write speed and the bandwidth can obviously show the running performance of the virtual disk and the running state of the virtual disk. When the running state of the virtual disk is reflected according to the read-write speed and the bandwidth, a plurality of fluctuation rates of the read-write data of the virtual disk are obtained according to the read-write speed and the bandwidth, and the test result of the running state of the virtual disk is obtained according to the difference of the fluctuation rates. The running condition of the virtual disk can be reflected more accurately by judging through a plurality of fluctuation rates, and further the stability of the application layer is reflected.
As an alternative embodiment, when recording the read-write rate of the virtual disk for reading and writing data and the bandwidth of the virtual disk for reading and writing data, the recording may be performed in a predetermined periodic manner, for example: and recording the read-write rate of the virtual disk read-write data and the bandwidth of the virtual disk read-write data in a preset period to obtain a plurality of read-write rates of the virtual disk read-write data in a plurality of periods and a plurality of bandwidths of the virtual disk read-write data. The predetermined period may be a periodic period, for example, after the virtual disk starts to read and write data, recording is performed at intervals of 2 minutes, 10 minutes, 1 hour, and the like. In the recording process, comparing all recorded read-write rates and bandwidths so as to obtain the read-write rates and the fluctuation conditions of the bandwidths recorded at different times, namely obtaining a first difference between each read-write rate and other read-write rates in a plurality of recorded read-write rates and a second difference between each bandwidth and other bandwidths in a plurality of recorded bandwidths, and obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the first difference and the second difference, wherein the fluctuation rates can reflect the fluctuation conditions of the read-write rates and the bandwidths, and the differences can be embodied in the form of differences. For example, in the above illustrated cycle, the read/write rate and the bandwidth recorded at the 2 nd minute are calculated respectively, and the difference between the read/write rate and the bandwidth recorded at the 10 th minute and the 1 st hour is calculated, and the fluctuation rate of the read/write rate and the bandwidth is further calculated by the difference, so as to reflect the fluctuation conditions of the read/write rate and the bandwidth. The running state of the virtual disk can be reflected more intuitively and accurately.
As an alternative embodiment, obtaining the test result of the virtual disk operating state according to the plurality of fluctuation rates may include the following cases: and obtaining a test result of the stable operation of the virtual disk under the condition that the fluctuation rates are less than or equal to the first preset threshold, namely, the operation of the virtual disk is considered to be stable under the condition that the fluctuation conditions of the read-write speed and the bandwidth are relatively gentle. And obtaining a test result of the virtual disk running instability under the condition that the fluctuation rates are larger than a first preset threshold value, namely, the test result shows that the virtual disk running instability is considered under the condition that the fluctuation conditions of the read-write speed and the bandwidth are large. In the case that the fluctuation rates are larger than a first preset threshold value, namely in the case that the operation of the virtual disk is considered to be unstable, after the test result that the operation of the virtual disk is unstable is obtained, the method also comprises the case that the fluctuation rates are larger than a second preset threshold value, in the case, the test result that the operation of the virtual disk fails is obtained, namely, the fact that the virtual disk is considered to have a failure in the operation process is shown in the case that the fluctuation conditions of the read-write rate and the bandwidth are large. The first predetermined threshold and the second predetermined threshold may be specifically set according to actual experience and a scene. The second predetermined threshold is greater than the first predetermined threshold. By comparing the threshold values, the running state of the virtual disk can be reflected clearly, so that the stability of the application layer can be reflected.
Based on the above embodiments and alternative embodiments, an alternative implementation is provided, which is described in detail below.
Fig. 2 is a schematic diagram of a dual-active technology scenario in the related art, and as shown in fig. 2, in the related art based on the dual-active technology scenario, functional layer verification and network layer verification are mainly relied on, only stability of a link and a node service running state are ensured, and stability of the dual-active scenario is not verified from a user-side application layer.
In view of this, an optional embodiment of the present invention provides a method for testing dual-active stability, which detects the running state of a virtual disk service on each node, and solves the problem that in a related testing method, only depending on functional layer verification and network layer verification, if both verification passes, a dual-active scenario may have unstable service running, and can verify dual-active stability more safely, more timely, and more comprehensively, and discover problems of related application layers such as unstable service. And verifying the double-activity stability from the whole double-activity technical system solution level. The optional embodiment of the invention judges the stability of the application layer by continuously writing FIO into each node virtual disk and recording the IOPS rate and BW data in different time periods.
Fig. 3 is a schematic diagram of a plurality of parts in a disk testing method according to an alternative embodiment of the present invention, as shown in fig. 3, in a general case, there are 2 available domains in a dual-active technology scenario, that is, a priority available domain and a secondary available domain, and different clients are connected, each available domain generally has 3 nodes, for example, there are 3 nodes in the priority available domain and 3 nodes in the secondary available domain, and during application layer testing, a Virtual Machine (VM) is respectively created at each node, and in this scenario, there are 6 virtual machines in total, and each virtual machine is given the same configuration, for example, 2vCPU, 4G memory, 16G system disk, 100G data disk, 1 network interface, and so on. Based on the above scenario, the following describes in detail alternative embodiments of the present invention:
1) and installing a virtual machine at each node, wherein the operating system of the virtual machine can be a Linux operating system or a windows operating system, and in the case that the operating system is the Linux operating system, mounting a data disk with the capacity of 100G for the virtual machine.
2) FIO is executed on each virtual machine, and continuous writing operation is carried out on a data disk with the capacity of 100G.
3) In the case where all FIOs of 6 virtual machines have been running, 2 minutes of observation, IOPS rate data and BW data for each virtual machine are respectively recorded in a table.
4) The IOPS rate data and BW data of each virtual machine are recorded in a predetermined period, wherein the predetermined period may be a periodic period, for example, the data is recorded after 10 minutes, the data is recorded after 1 hour, the data is recorded after 1 day, and the data is recorded after 1 week, table 1 is a table in which the IOPS rate data and BW data of each virtual machine are recorded in the predetermined period, and the data is recorded as shown in table 1.
5) Under the condition that the running environment of the virtual machine is not changed, IOPS and BW data of each sampling point can be observed for a long time by comparing all data, whether the running of the virtual machine is stable or not is judged from an application level, and specifically, the running of the virtual machine is judged to be stable if the data floating range is less than 2%. And judging that the operation of the virtual machine is unstable when the data floating range is more than or equal to 2%.
TABLE 1
Figure BDA0003357993080000071
It should be noted that, under the condition that the virtual machine is not stable in operation, the virtual machine is divided into a plurality of cases according to the difference of the virtual machines, the virtual machine is established based on the node, and under the condition that the fault node is ZK Leader/Meta Leader, all the virtual machines executing FIO operation will trigger I/O interrupt of <40s, and the virtual machine on the fault host will automatically trigger HA. If the fault node does not belong to the ZK Leader/Meta Leader, other virtual machine IO is not influenced, the virtual machine on the fault host automatically triggers the HA, and after the virtual machine automatically triggers the HA, the virtual machine automatically restores data on other available nodes.
In addition, the optional embodiment of the present invention provides other alternatives, that is, 1) Ping each virtual machine at the client by configuring the IP network and the routing information, Ping the management IP of each node VM, respectively, for more than 10 minutes, and verifying the stability of the live-live scenario according to the Ping result, wherein the Ping operation can find out whether the connection between the local machine and the outside is normal. Under the conditions that packet loss cannot occur in continuous ping and the continuous ping TTL is less than 1ms, the virtual machine is considered to be stable in operation, the double-live scene can be judged to be in the application layer test, no message is lost, and the stability of the double-live scene in the application layer can be reflected. 2) The method includes that a huge File is copied to a VM through protocols such as FTP (File Transfer Protocol, application layer Protocol for transmitting files in a network layer) and SCP (Secure Copy Protocol) to replace FIO to be written in, and service stability is proved through recording transmission rate comparison. 3) And replacing FIO with the use effect of actual business application, for example, installing database software on each node, continuously writing data into the database, and observing the database writing speed and the stability of database links. 4) Each node installs other applications, such as SAP (System Application and Products, enterprise management solutions), saas (software as a service) System, which continuously write data. The SAP continuously writes data, the SAP client can be normally connected with the server, and can perform data query, search and continuously write SAP data, so that the SAP application is continuously available in a live-live scene, the service is not influenced, and the live-live application has continuous stability when aiming at the SAP application.
Through the above alternative embodiment, at least the following advantages can be achieved:
1) monitoring the service continuity and stability of each node in a double-activity technical scene by monitoring the VM service application on each node in real time;
2) and statistical data analysis and comparison are carried out by using different time sampling points, and the generated data verification result is counted, so that the service continuity and stability of each key time period and the comprehensive probability statistical time period can be well reflected.
3) And monitoring VM service application in real time in each scene with possible faults, and adopting statistics to ensure the stability of a service system in the scene with the faults.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is further provided an apparatus for implementing the disk test method, and fig. 4 is a block diagram of a structure of a disk test apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: an execution module 402, a recording module 404, a first obtaining module 406, and a second obtaining module 408, which are described in detail below.
An execution module 402, configured to start a virtual disk to read and write data; a recording module 404, connected to the executing module 402, for recording the read-write rate of the virtual disk read-write data and the bandwidth of the virtual disk read-write data; a first obtaining module 406, connected to the recording module 404, configured to obtain multiple fluctuation rates of the virtual disk for performing read-write data operations according to the read-write rate and the bandwidth; the second obtaining module 408 is connected to the first obtaining module 406, and configured to obtain a test result of the virtual disk running state according to the multiple fluctuation rates.
It should be noted here that the executing module 402, the recording module 404, the first obtaining module 406 and the second obtaining module 408 correspond to steps S102 to S108 in the method for implementing a disk test, and a plurality of modules are the same as the corresponding steps in the implementation example and application scenario, but are not limited to the disclosure in embodiment 1.
Example 3
The embodiment of the disclosure can provide an electronic device, which can be a terminal or a server. In this embodiment, the electronic device may be any one of computer terminal devices in a computer terminal group as a terminal. Optionally, in this embodiment, the terminal may also be a terminal device such as a mobile terminal.
Optionally, in this embodiment, the terminal may be located in at least one network device of a plurality of network devices of a computer network.
Alternatively, fig. 5 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment. As shown in fig. 5, the terminal may include: one or more processors 51 (only one shown in the figure), a memory 52 for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the disk testing method of any one of the above.
The memory may be configured to store software programs and modules, such as program instructions/modules corresponding to the disk testing method and apparatus in the embodiments of the present disclosure, and the processor executes various functional applications and data processing through the software programs and modules stored in the memory, that is, implements the disk testing method. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor can call the information and application program stored in the memory through the transmission device to execute the following steps: starting a virtual disk to read and write data; recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk; obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth; and obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
Optionally, the processor may further execute the program code of the following steps: before starting the virtual disk to read and write data, the method further comprises: determining an operating system of the virtual disk; in the case where the operating system is a Linux operating system, a storage device of a predetermined capacity is mounted in the virtual disk.
Optionally, the processor may further execute the program code of the following steps: recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk, comprising: and recording the read-write rate of the virtual disk read-write data and the bandwidth of the virtual disk read-write data in a preset period to obtain a plurality of read-write rates of the virtual disk read-write data in a plurality of periods and a plurality of bandwidths of the virtual disk read-write data.
Optionally, the processor may further execute the program code of the following steps: obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth, wherein the fluctuation rates comprise: acquiring a first difference between each read-write rate and other read-write rates in a plurality of read-write rates and a second difference between each bandwidth and other bandwidths in a plurality of bandwidths; and obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the first difference and the second difference.
Optionally, the processor may further execute the program code of the following steps: obtaining a test result of the virtual disk running state according to the plurality of fluctuation rates, wherein the test result comprises the following steps: under the condition that the fluctuation rates are all smaller than or equal to a first preset threshold value, obtaining a test result of the stable operation of the virtual disk; and/or obtaining a test result of the virtual disk running instability under the condition that the fluctuation rates are larger than a first preset threshold value.
Optionally, the processor may further execute the program code of the following steps: when the plurality of fluctuation rates are larger than a first preset threshold value, after obtaining the test result that the virtual disk runs unstably, the method further comprises: and obtaining a test result of the virtual disk operation fault under the condition that the fluctuation rates are larger than a second preset threshold value.
It will be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, for example, the terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, it may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
In an exemplary embodiment, there is also provided a computer-readable storage medium including instructions that, when executed by a processor of a terminal, enable the terminal to perform the disk testing method of any one of the above. Alternatively, the computer readable storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Optionally, in this embodiment, the computer-readable storage medium may be configured to store program codes executed by the disk testing method provided in the foregoing embodiment.
Optionally, in this embodiment, the computer-readable storage medium may be located in any one of a group of computer terminals in a computer network, or in any one of a group of mobile terminals.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: starting a virtual disk to read and write data; recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk; obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth; and obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: before starting the virtual disk to read and write data, the method further comprises: determining an operating system of the virtual disk; in the case where the operating system is a Linux operating system, a storage device of a predetermined capacity is mounted in the virtual disk.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk, comprising: and recording the read-write rate of the virtual disk read-write data and the bandwidth of the virtual disk read-write data in a preset period to obtain a plurality of read-write rates of the virtual disk read-write data in a plurality of periods and a plurality of bandwidths of the virtual disk read-write data.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth, wherein the fluctuation rates comprise: acquiring a first difference between each read-write rate and other read-write rates in a plurality of read-write rates and a second difference between each bandwidth and other bandwidths in a plurality of bandwidths; and obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the first difference and the second difference.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: obtaining a test result of the virtual disk running state according to the plurality of fluctuation rates, wherein the test result comprises the following steps: under the condition that the fluctuation rates are all smaller than or equal to a first preset threshold value, obtaining a test result of the stable operation of the virtual disk; and/or obtaining a test result of the virtual disk running instability under the condition that the fluctuation rates are larger than a first preset threshold value.
Optionally, in this embodiment, the computer readable storage medium is configured to store program code for performing the following steps: when the plurality of fluctuation rates are larger than a first preset threshold value, after obtaining the test result that the virtual disk runs unstably, the method further comprises: and obtaining a test result of the virtual disk operation fault under the condition that the fluctuation rates are larger than a second preset threshold value.
In an exemplary embodiment, a computer program product is also provided, in which the computer program, when executed by a processor of an electronic device, enables the electronic device to perform the disk testing method of any one of the above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for testing a disk, comprising:
starting a virtual disk to read and write data;
recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk;
obtaining a plurality of fluctuation rates of the read-write data of the virtual disk according to the read-write rate and the bandwidth;
and obtaining a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
2. The method of claim 1, wherein before starting the virtual disk to read and write data, further comprising:
determining an operating system of the virtual disk;
and mounting a storage device with a preset capacity in the virtual disk under the condition that the operating system is a Linux operating system.
3. The method of claim 1, wherein the recording the read-write rate of the virtual disk read-write data and the bandwidth of the virtual disk read-write data comprises:
and recording the read-write rate of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk in a preset period to obtain a plurality of read-write rates of the read-write data of the virtual disk in a plurality of periods and a plurality of bandwidths of the read-write data of the virtual disk.
4. The method of claim 3, wherein obtaining a plurality of fluctuation rates of the virtual disk for reading and writing data according to the read-write rate and the bandwidth comprises:
acquiring a first difference between each read-write rate and other read-write rates in the plurality of read-write rates and a second difference between each bandwidth and other bandwidths in the plurality of bandwidths;
and obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the first difference and the second difference.
5. The method according to claim 1, wherein obtaining the test result of the virtual disk operating state according to the plurality of fluctuation rates comprises:
obtaining a test result of the stable operation of the virtual disk under the condition that the fluctuation rates are all smaller than or equal to a first preset threshold value; and/or the presence of a gas in the gas,
and obtaining a test result of the unstable operation of the virtual disk under the condition that the fluctuation rates are larger than the first preset threshold value.
6. The method of claim 5, wherein after obtaining the test result of the virtual disk operational instability if the plurality of fluctuation rates is greater than the first predetermined threshold, further comprising:
and obtaining a test result of the virtual disk operation fault under the condition that the fluctuation rates are larger than a second preset threshold value.
7. A disk testing apparatus, comprising:
the execution module is used for starting the virtual disk to read and write data;
the recording module is used for recording the read-write speed of the read-write data of the virtual disk and the bandwidth of the read-write data of the virtual disk;
the first obtaining module is used for obtaining a plurality of fluctuation rates of the virtual disk for executing read-write data operation according to the read-write rate and the bandwidth;
and the second acquisition module is used for acquiring a test result of the running state of the virtual disk according to the plurality of fluctuation rates.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the disk testing method of any of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the disk testing method of any of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the disk testing method of any of claims 1 to 6.
CN202111357764.2A 2021-11-16 2021-11-16 Disk testing method and device, electronic equipment and computer readable storage medium Pending CN114048075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111357764.2A CN114048075A (en) 2021-11-16 2021-11-16 Disk testing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111357764.2A CN114048075A (en) 2021-11-16 2021-11-16 Disk testing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114048075A true CN114048075A (en) 2022-02-15

Family

ID=80209587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111357764.2A Pending CN114048075A (en) 2021-11-16 2021-11-16 Disk testing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114048075A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150242283A1 (en) * 2014-02-27 2015-08-27 Red Hat Israel, Ltd. Backing up virtual machines
CN109697155A (en) * 2018-08-20 2019-04-30 平安普惠企业管理有限公司 IT system performance estimating method, device, equipment and readable storage medium storing program for executing
CN112395145A (en) * 2020-11-16 2021-02-23 杭州安恒信息技术股份有限公司 Method and device for testing system stability

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150242283A1 (en) * 2014-02-27 2015-08-27 Red Hat Israel, Ltd. Backing up virtual machines
CN109697155A (en) * 2018-08-20 2019-04-30 平安普惠企业管理有限公司 IT system performance estimating method, device, equipment and readable storage medium storing program for executing
CN112395145A (en) * 2020-11-16 2021-02-23 杭州安恒信息技术股份有限公司 Method and device for testing system stability

Similar Documents

Publication Publication Date Title
EP3518110B1 (en) Designation of a standby node
CN106997314B (en) Exception handling method, device and system for distributed system
JP2022171958A (en) System, method, apparatus, and non-temporary computer readable storage medium for providing mobile device support services
US7961594B2 (en) Methods and systems for history analysis for access paths in networks
US9170888B2 (en) Methods and apparatus for virtual machine recovery
CN110535692B (en) Fault processing method and device, computer equipment, storage medium and storage system
US9348706B2 (en) Maintaining a cluster of virtual machines
CN110830283B (en) Fault detection method, device, equipment and system
GB2505644A (en) Managing network configurations
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN112422320B (en) Master-slave switching method and device of server and server
CN111796959B (en) Self-healing method, device and system for host container
CN106452836B (en) main node setting method and device
CN108512753B (en) Method and device for transmitting messages in cluster file system
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN109474470A (en) One kind is from monitoring method and device
CN110968456B (en) Method and device for processing fault disk in distributed storage system
CN110502238A (en) A kind of method and device of front and back end joint debugging
CN114048075A (en) Disk testing method and device, electronic equipment and computer readable storage medium
CN111309515A (en) Disaster recovery control method, device and system
CN115098294A (en) Abnormal event processing method, electronic equipment and management terminal
CN116668269A (en) Arbitration method, device and system for dual-activity data center
CN115686951A (en) Fault processing method and device for database server
CN110955556B (en) Database recovery method and device, storage medium and database system

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

Application publication date: 20220215

RJ01 Rejection of invention patent application after publication