CN110704256B - Storage system testing method, device, equipment and computer readable storage medium - Google Patents

Storage system testing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110704256B
CN110704256B CN201910838464.2A CN201910838464A CN110704256B CN 110704256 B CN110704256 B CN 110704256B CN 201910838464 A CN201910838464 A CN 201910838464A CN 110704256 B CN110704256 B CN 110704256B
Authority
CN
China
Prior art keywords
hard disk
target
information
smart information
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910838464.2A
Other languages
Chinese (zh)
Other versions
CN110704256A (en
Inventor
梁鑫辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910838464.2A priority Critical patent/CN110704256B/en
Publication of CN110704256A publication Critical patent/CN110704256A/en
Application granted granted Critical
Publication of CN110704256B publication Critical patent/CN110704256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • 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/2247Verification or detection of system hardware configuration

Landscapes

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

Abstract

The invention discloses a test method of a storage system, which comprises the following steps: when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information; searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; and returning the SMART information of the target hard disk to the target virtual host so that the target virtual host performs corresponding storage system test operation by using the SMART information of the target hard disk. By applying the technical scheme provided by the embodiment of the invention, the hardware cost is greatly reduced, and the smooth progress of various storage system test tasks is promoted. The invention also discloses a testing device, equipment and a storage medium of the storage system, and the testing device, the equipment and the storage medium have corresponding technical effects.

Description

Storage system testing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for testing a storage system.
Background
With the development of big data and huge data information, an effective storage system needs to be developed to store the data. Most of the existing modes of research, development and test of the storage system are finished in a physical machine, the hardware cost is high, a plurality of test tasks cannot be carried out for avoiding damage to hardware equipment, and the test tasks are limited.
In summary, how to effectively solve the problems of high hardware cost, limited test task, and the like is a problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a test method of a storage system, which greatly reduces the hardware cost and promotes the smooth operation of various storage system test tasks; another object of the present invention is to provide a test apparatus, a device and a computer readable storage medium for a storage system.
In order to solve the technical problems, the invention provides the following technical scheme:
a method of testing a storage system, comprising:
when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information;
Searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; the hard disk SMART information base prestores corresponding relations between hard disks of the virtual machines and SMART information of the hard disks;
and returning the target hard disk SMART information to the target virtual host, so that the target virtual host performs corresponding storage system test operation by using the target hard disk SMART information.
In a specific embodiment of the present invention, analyzing the target hard disk SMART information acquisition request to obtain the target virtual machine hard disk path information includes:
analyzing the target hard disk SMART information acquisition request to obtain the target virtual machine hard disk path information, the target ID information and the target key information of the target smartclt program;
before searching for target hard disk SMART information corresponding to a target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base, the method further comprises the following steps:
performing authentication operation on the target ID information and the target key information;
and if the authentication is successful, searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base.
In a specific embodiment of the present invention, after receiving a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program, the method further includes:
setting a target timestamp for the target hard disk SMART information acquisition request;
searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base, wherein the target hard disk SMART information comprises the following steps:
and searching the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp from a hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
In one embodiment of the present invention, the method further comprises:
traversing the SMART information of the physical machine hard disks according to a preset time interval;
reading the time stamp of each physical machine hard disk SMART information generated in the current preset time interval, and respectively judging whether the time stamp of each physical machine hard disk SMART information is consistent with the corresponding latest information base recording time;
and if the physical machine hard disk SMART information with the timestamp inconsistent with the corresponding latest information base recording time exists, importing the physical machine hard disk SMART information with the timestamp inconsistent with the corresponding latest information base recording time into the hard disk SMART information base.
A test apparatus of a memory system, comprising:
the information acquisition module is used for analyzing a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program to obtain target virtual machine hard disk path information when receiving the target hard disk SMART information acquisition request;
the information searching module is used for searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information;
and the information returning module is used for returning the target hard disk SMART information to the target virtual host so as to enable the target virtual host to utilize the target hard disk SMART information to carry out corresponding storage system test operation.
In a specific embodiment of the present invention, the information obtaining module is specifically a module that analyzes the target hard disk SMART information obtaining request to obtain the target virtual machine hard disk path information, the target ID information of the target smartctl program, and the target key information;
The test apparatus of the storage system further includes:
the information authentication module is used for carrying out authentication operation on the target ID information and the target key information;
the information searching module is specifically a module for searching target hard disk SMART information corresponding to a target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base when the target ID information and the target key information are successfully authenticated.
In one embodiment of the present invention, the method further comprises:
the system comprises a timestamp setting module, a target virtual host and a target hard disk SMART information acquisition module, wherein the timestamp setting module is used for setting a target timestamp for a target hard disk SMART information acquisition request after receiving the target hard disk SMART information acquisition request sent by the target virtual host through a preset target smartclt program;
the information searching module is specifically a module for searching the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp from a hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
In one embodiment of the present invention, the method further comprises:
the information traversing module is used for traversing the SMART information of the physical machine hard disks according to a preset time interval;
The judging module is used for reading the time stamp of the SMART information of each physical machine hard disk generated in the current preset time interval and respectively judging whether the time stamp of the SMART information of each physical machine hard disk is consistent with the recording time of the corresponding latest information base;
and the information import module is used for importing the physical machine hard disk SMART information with the time stamp inconsistent with the corresponding latest information base recording time into the hard disk SMART information base if the physical machine hard disk SMART information with the time stamp inconsistent with the corresponding latest information base recording time exists.
A test apparatus for a memory system, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for testing a storage system as described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of testing a storage system as set forth above.
The invention provides a test method of a storage system, which comprises the following steps: when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information; searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information; and returning the SMART information of the target hard disk to the target virtual host so that the target virtual host performs corresponding storage system test operation by using the SMART information of the target hard disk.
According to the technical scheme, the hard disk SMART information of each physical machine is collected in advance, and the corresponding relation between the hard disk SMART information of each virtual machine and the hard disk SMART information of each virtual machine is stored in the hard disk SMART information base in advance. By configuring smartclt programs for inquiring hard disk SMART information in advance for each virtual machine, after the path information of the hard disk of the target virtual machine is analyzed from the acquisition request of the SMART information of the target hard disk, the successful response can be carried out on the acquisition request of the information, and the target hard disk SMART information corresponding to the hard disk of the target virtual machine under the path information of the hard disk of the target virtual machine is directly searched from a hard disk SMART information base, so that the target virtual machine utilizes the SMART information of the target hard disk to carry out corresponding storage system test operation. The acquisition process of the SMART information of the hard disk and the test process of the storage system are converted from physical hardware to virtual machine, so that the hardware cost is greatly reduced, and the smooth progress of various storage system test tasks is promoted.
Correspondingly, embodiments of the present invention further provide a testing apparatus, a device, and a computer-readable storage medium of a storage system corresponding to the testing method of the storage system, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an embodiment of a method for testing a memory system according to the present invention;
FIG. 2 is a flowchart illustrating another embodiment of a method for testing a memory system according to the present invention;
FIG. 3 is a block diagram of a testing apparatus of a memory system according to an embodiment of the present invention;
fig. 4 is a block diagram of a testing apparatus of a memory system according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart of an implementation of a method for testing a storage system according to an embodiment of the present invention, where the method may include the following steps:
s101: when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain the target virtual machine hard disk path information.
When a target virtual host needs to be used to test a certain index of the storage system, the SMART (Self-Monitoring Analysis and Reporting Technology) information of the target hard disk needs to be obtained, therefore, a target hard disk SMART information acquisition request can be generated by an upper layer application in the target virtual machine, the target hard disk SMART information acquisition request can be embedded with the hard disk path information (such as/dev/sda) of the target virtual machine, and can pre-configure a target smartcll program (which can be called smartcll _ mock) for the target virtual machine, utilize the target smartcll program to intercept a target hard disk SMART information acquisition request, and sends the target hard disk SMART information acquisition request to the virtual SMART management platform, the virtual SMART management platform receives the target hard disk SMART information acquisition request, and analyzing the target hard disk SMART information acquisition request to obtain the target virtual machine hard disk path information of the target virtual machine hard disk in which the target hard disk SMART information is stored.
The target virtual machine can be any virtual machine which is in communication connection with the virtual SMART management platform.
S102: and searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base.
The hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information.
The method can collect the hard disk SMART information of each physical machine in advance, store the hard disk SMART information in the hard disk SMART information base, establish the corresponding relation between the hard disk of each virtual machine and the hard disk SMART information, and store the corresponding relation in the hard disk SMART information base. After the path information of the hard disk of the target virtual machine is obtained, the target hard disk SMART information corresponding to the hard disk of the target virtual machine under the path information of the hard disk of the target virtual machine can be searched from the hard disk SMART information base.
S103: and returning the SMART information of the target hard disk to the target virtual host so that the target virtual host performs corresponding storage system test operation by using the SMART information of the target hard disk.
After the target hard disk SMART information is found, the target hard disk SMART information can be returned to the target virtual host. Therefore, the target virtual host can utilize the SMART information of the target hard disk to perform corresponding storage system test operation, and can also utilize the SMART information of the target hard disk to further deeply research and develop the storage system.
According to the technical scheme, the hard disk SMART information of each physical machine is collected in advance, the hard disk SMART information of each physical machine is stored in the hard disk of the virtual machine, and the corresponding relation between the hard disk of each virtual machine and the hard disk SMART information of each physical machine is stored in the hard disk SMART information base in advance. By configuring smartclt programs for inquiring hard disk SMART information in advance for each virtual machine, after the path information of the hard disk of the target virtual machine is analyzed from the acquisition request of the SMART information of the target hard disk, the successful response can be carried out on the acquisition request of the information, and the target hard disk SMART information corresponding to the hard disk of the target virtual machine under the path information of the hard disk of the target virtual machine is directly searched from a hard disk SMART information base, so that the target virtual machine utilizes the SMART information of the target hard disk to carry out corresponding storage system test operation. The acquisition process of the SMART information of the hard disk and the test process of the storage system are converted from physical hardware to virtual machine, so that the hardware cost is greatly reduced, and the smooth progress of various storage system test tasks is promoted.
It should be noted that, based on the first embodiment, the embodiment of the present invention further provides a corresponding improvement scheme. In the following embodiments, steps that are the same as or correspond to those in the first embodiment may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the following modified embodiments.
Referring to fig. 2, fig. 2 is a flowchart of another implementation of a method for testing a storage system according to an embodiment of the present invention, where the method may include the following steps:
s201: when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information, target ID information of the target smartclt program and target secret key information.
After the smarttctl program is configured for each virtual machine, the virtual SMART management platform can also configure ID information and key information for the smarttctl program in each virtual machine, and after receiving the target hard disk SMART information acquisition request, the target hard disk SMART information acquisition request is analyzed, so that the target ID information and the target key information of the target smarttctl program can be obtained.
S202: and performing authentication operation on the target ID information and the target key information, if the authentication is successful, executing the step S203, and if the authentication is failed, not performing the processing.
After the target ID information and the target key information of the target smartctl program preconfigured in the target virtual machine are obtained, the target ID information and the target key information may be authenticated, when the authentication is successful, it indicates that the received target hard disk SMART information acquisition request is a legal request, step S203 may be continuously performed, and if the authentication is failed, it indicates that the received target hard disk SMART information acquisition request is illegal, the request is not responded.
S203: and setting a target time stamp for the SMART information acquisition request of the target hard disk.
And setting a target time stamp for the target hard disk SMART information acquisition request so as to clarify the time when the virtual SMART management platform receives the target hard disk SMART information acquisition request.
S204: and searching a target virtual machine hard disk and target hard disk SMART information corresponding to the target timestamp from the hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
The corresponding relation between the request time and the information base recording time can be preset, for example, the difference between the request time of the virtual machine and the information base recording time can be set to be 20 days. For example: the virtual machine request time is 2019, 8, month and 21, and the disk SMART information time recorded in the inquired information base is 2019, 8, month and 1. Therefore, the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp can be searched from the hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
S205: and traversing the SMART information of the physical machine hard disks according to a preset time interval.
Because new physical machine hard disk SMART information is likely to be irregularly generated in the physical machine hard disk, a time interval for traversing the physical machine hard disk SMART information in each physical machine hard disk can be preset, and the physical machine hard disk SMART information of each physical machine hard disk can be traversed according to the preset time interval.
It should be noted that the time interval may be set and adjusted according to actual situations, which is not limited in the embodiment of the present invention. For example, when the technical scheme provided by the embodiment of the invention is executed for a plurality of times according to a certain set time interval, and the phenomenon that the time stamp of the SMART information of each physical machine hard disk is inconsistent with the recording time of the corresponding latest information base exists in a large number, the time interval can be properly shortened.
S206: and reading the time stamps of the SMART information of the physical machine hard disks generated in the current preset time interval, respectively judging whether the time stamps of the SMART information of the physical machine hard disks are consistent with the recording time of the corresponding latest information base, if so, not processing, and if not, executing the step S207.
After traversing the SMART information of the physical machine hard disks, the timestamp of the SMART information of the physical machine hard disks generated in the current preset time interval can be read, and whether the timestamp of the SMART information of the physical machine hard disks is consistent with the corresponding latest information base recording time or not is respectively judged, if so, it is indicated that no new SMART information of the physical machine hard disks is generated in the current time interval, no processing is needed, and if not, it is indicated that new SMART information of the physical machine hard disks is generated in the current time interval, and step S207 can be continuously executed.
S207: and importing the SMART information of the physical machine hard disk, which is inconsistent with the recording time of the corresponding latest information base, into a SMART information base of the hard disk.
When the physical machine hard disk SMART information inconsistent with the corresponding latest information base recording time exists in the next time interval, the physical machine hard disk SMART information inconsistent with the corresponding latest information base recording time can be imported into the hard disk SMART information base, so that the hard disk SMART information in the hard disk SMART information base can be kept consistent with the hard disk SMART information in the physical machine hard disk.
It should be noted that, in the embodiment of the present invention, the whole process of updating the hard disk SMART information in the hard disk SMART information library, which is configured by step S205 to step S207, may be performed during, before, or after the execution of any step of step S201 to step S204, and the execution sequence is not limited in the embodiment of the present invention.
Corresponding to the above method embodiments, embodiments of the present invention further provide a testing apparatus for a storage system, and the testing apparatus for a storage system described below and the testing method for a storage system described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a testing apparatus for a storage system according to an embodiment of the present invention, where the apparatus may include:
The information obtaining module 31 is configured to, when receiving a target hard disk SMART information obtaining request sent by a target virtual host through a preset target smartclt program, analyze the target hard disk SMART information obtaining request to obtain target virtual machine hard disk path information;
the information searching module 32 is used for searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information;
and an information returning module 33, configured to return the target hard disk SMART information to the target virtual host, so that the target virtual host performs a corresponding storage system test operation by using the target hard disk SMART information.
According to the technical scheme, the hard disk SMART information of each physical machine is collected in advance, the hard disk SMART information of each physical machine is stored in the hard disk of the virtual machine, and the corresponding relation between the hard disk of each virtual machine and the hard disk SMART information of each physical machine is stored in the hard disk SMART information base in advance. By configuring smartclt programs for inquiring hard disk SMART information in advance for each virtual machine, after the path information of the hard disk of the target virtual machine is analyzed from the acquisition request of the SMART information of the target hard disk, the successful response can be carried out on the acquisition request of the information, and the target hard disk SMART information corresponding to the hard disk of the target virtual machine under the path information of the hard disk of the target virtual machine is directly searched from a hard disk SMART information base, so that the target virtual machine utilizes the SMART information of the target hard disk to carry out corresponding storage system test operation. The acquisition process of the SMART information of the hard disk and the test process of the storage system are converted from physical hardware to virtual machine, so that the hardware cost is greatly reduced, and the smooth progress of various storage system test tasks is promoted.
In a specific embodiment of the present invention, the information obtaining module 31 is specifically a module that analyzes a target hard disk SMART information obtaining request to obtain target virtual machine hard disk path information, target ID information of a target smartctl program, and target key information;
the test apparatus of the storage system may further include:
the information authentication module is used for carrying out authentication operation on the target ID information and the target key information;
the information searching module 32 is specifically a module that searches, when the target ID information and the target key information are successfully authenticated, target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base.
In one embodiment of the present invention, the apparatus may further include:
the time stamp setting module is used for setting a target time stamp for the target hard disk SMART information acquisition request after receiving the target hard disk SMART information acquisition request sent by the target virtual host through a preset target smartclt program;
the information searching module 32 is specifically a module for searching the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp from the hard disk SMART information base according to the corresponding relationship between the preset request time and the information base recording time.
In one embodiment of the present invention, the apparatus may further include:
the information traversing module is used for traversing the SMART information of the physical machine hard disks according to a preset time interval;
the judging module is used for reading the time stamps of the SMART information of the physical machine hard disks generated in the current preset time interval and respectively judging whether the time stamps of the SMART information of the physical machine hard disks are consistent with the recording time of the corresponding latest information base;
and the information importing module is used for importing the physical machine hard disk SMART information with the recording time inconsistent with the corresponding latest information base into the hard disk SMART information base if the physical machine hard disk SMART information with the time stamp inconsistent with the recording time of the corresponding latest information base exists.
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a schematic diagram of a testing apparatus of a storage system provided by the present invention, where the testing apparatus may include:
a memory 41 for storing a computer program;
the processor 42, when executing the computer program stored in the memory 41, may implement the following steps:
when a target hard disk SMART information acquisition request is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information; searching target hard disk SMART information corresponding to a target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base by using a preset smartclt program; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information; and returning the SMART information of the target hard disk to the sending end of the SMART information acquisition request of the target hard disk so that the sending end carries out corresponding storage system test operation by utilizing the SMART information of the target hard disk.
For the introduction of the device provided by the present invention, please refer to the above method embodiment, which is not described herein again.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
when a target hard disk SMART information acquisition request is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information; searching target hard disk SMART information corresponding to a target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base by using a preset smartclt program; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information; and returning the SMART information of the target hard disk to the sending end of the SMART information acquisition request of the target hard disk so that the sending end carries out corresponding storage system test operation by utilizing the SMART information of the target hard disk.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for testing a memory system, comprising:
when a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program is received, analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information;
Searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information;
and returning the SMART information of the target hard disk to the target virtual host so that the target virtual host utilizes the SMART information of the target hard disk to perform corresponding storage system test operation.
2. The method for testing the storage system according to claim 1, wherein analyzing the target hard disk SMART information acquisition request to obtain target virtual machine hard disk path information comprises:
analyzing the target hard disk SMART information acquisition request to obtain the target virtual machine hard disk path information, the target ID information and the target key information of the target smartclt program;
before searching for target hard disk SMART information corresponding to a target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base, the method further comprises the following steps:
performing authentication operation on the target ID information and the target key information;
and if the authentication is successful, searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base.
3. The method for testing the storage system according to claim 1 or 2, after receiving a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program, further comprising:
setting a target timestamp for the target hard disk SMART information acquisition request;
searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base, wherein the target hard disk SMART information comprises the following steps:
and searching the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp from a hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
4. The method for testing a memory system according to claim 3, further comprising:
traversing the SMART information of the physical machine hard disks according to a preset time interval;
reading the time stamp of each physical machine hard disk SMART information generated in the current preset time interval, and respectively judging whether the time stamp of each physical machine hard disk SMART information is consistent with the corresponding latest information base recording time;
and if the physical machine hard disk SMART information with the timestamp inconsistent with the corresponding latest information base recording time exists, importing the physical machine hard disk SMART information with the timestamp inconsistent with the corresponding latest information base recording time into the hard disk SMART information base.
5. A test apparatus for a memory system, comprising:
the information acquisition module is used for analyzing a target hard disk SMART information acquisition request sent by a target virtual host through a preset target smartclt program to obtain target virtual machine hard disk path information when receiving the target hard disk SMART information acquisition request;
the information searching module is used for searching target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from a hard disk SMART information base; the hard disk SMART information base is pre-stored with the corresponding relation between each virtual machine hard disk and each hard disk SMART information;
and the information returning module is used for returning the target hard disk SMART information to the target virtual host so as to enable the target virtual host to utilize the target hard disk SMART information to carry out corresponding storage system test operation.
6. The device for testing the storage system according to claim 5, wherein the information obtaining module is specifically a module for analyzing the target hard disk SMART information obtaining request to obtain the target virtual machine hard disk path information, the target ID information of the target smartclt program and the target key information;
The test apparatus of the memory system further includes:
the information authentication module is used for carrying out authentication operation on the target ID information and the target key information;
the information searching module is specifically a module for searching the target hard disk SMART information corresponding to the target virtual machine hard disk under the target virtual machine hard disk path information from the hard disk SMART information base when the target ID information and the target key information are successfully authenticated.
7. The test apparatus for a storage system according to claim 5 or 6, further comprising:
the system comprises a timestamp setting module, a target virtual host and a target hard disk SMART information acquisition module, wherein the timestamp setting module is used for setting a target timestamp for a target hard disk SMART information acquisition request after receiving the target hard disk SMART information acquisition request sent by the target virtual host through a preset target smartclt program;
the information searching module is specifically a module for searching the target virtual machine hard disk and the target hard disk SMART information corresponding to the target timestamp from a hard disk SMART information base according to the corresponding relation between the preset request time and the information base recording time.
8. The test apparatus of a storage system according to claim 7, further comprising:
The information traversing module is used for traversing the SMART information of the physical machine hard disks according to a preset time interval;
the judging module is used for reading the time stamp of the SMART information of each physical machine hard disk generated in the current preset time interval and respectively judging whether the time stamp of the SMART information of each physical machine hard disk is consistent with the recording time of the corresponding latest information base;
and the information importing module is used for importing the physical machine hard disk SMART information with the recording time inconsistent with the corresponding latest information base into the hard disk SMART information base if the physical machine hard disk SMART information with the time stamp inconsistent with the recording time of the corresponding latest information base exists.
9. A test apparatus for a memory system, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of testing a storage system according to any one of claims 1 to 4 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of a method of testing a storage system according to any one of claims 1 to 4.
CN201910838464.2A 2019-09-05 2019-09-05 Storage system testing method, device, equipment and computer readable storage medium Active CN110704256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910838464.2A CN110704256B (en) 2019-09-05 2019-09-05 Storage system testing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910838464.2A CN110704256B (en) 2019-09-05 2019-09-05 Storage system testing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110704256A CN110704256A (en) 2020-01-17
CN110704256B true CN110704256B (en) 2022-07-29

Family

ID=69194386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910838464.2A Active CN110704256B (en) 2019-09-05 2019-09-05 Storage system testing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110704256B (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240883A (en) * 2018-08-30 2019-01-18 郑州云海信息技术有限公司 Positioning SMART reports an error method, system, equipment and the storage medium of hard disk

Also Published As

Publication number Publication date
CN110704256A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN108984389B (en) Application program testing method and terminal equipment
CN105426706A (en) Pirate application detection method, device and system
CN107678972B (en) Test case evaluation method and related device
CN102147736B (en) Method and device for installing software
CN104980421A (en) Method and system for processing batch requests
CN110083581A (en) A kind of method, apparatus, storage medium and the computer equipment of log retrospect
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN110704256B (en) Storage system testing method, device, equipment and computer readable storage medium
CN110287182B (en) Big data comparison method, device, equipment and terminal
CN107544894B (en) Log processing method and device and server
CN110691090B (en) Website detection method, device, equipment and storage medium
CN112380115A (en) Regression testing method and device, electronic equipment and storage medium
CN110019178A (en) The correlating method and device of data
CN112559313A (en) Test case setting method and device, storage medium and electronic equipment
CN105871982A (en) Content pushing method, device and system
CN115525703A (en) Data comparison method, data synchronization device and medium for heterogeneous database
CN113326046A (en) Method and device for acquiring compiling time length
CN105988917B (en) Abnormal information acquisition method and device
CN113992730A (en) Knowledge-based user behavior simulation method, simulation system, customization system, computer and storage medium
CN110221952B (en) Service data processing method and device and service data processing system
CN111143644B (en) Identification method and device of Internet of things equipment
CN103514180A (en) Data providing method and device
EP3543882A1 (en) Method and system for identifying original data by using data order
CN114861135B (en) EDA tool marketing strategy processing method and system in integrated circuit design industry
CN110851750B (en) Data acquisition method and device

Legal Events

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