CN107391333A - A kind of OSD disk failures method of testing and system - Google Patents

A kind of OSD disk failures method of testing and system Download PDF

Info

Publication number
CN107391333A
CN107391333A CN201710692073.5A CN201710692073A CN107391333A CN 107391333 A CN107391333 A CN 107391333A CN 201710692073 A CN201710692073 A CN 201710692073A CN 107391333 A CN107391333 A CN 107391333A
Authority
CN
China
Prior art keywords
osd
node
disks
test
script
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.)
Granted
Application number
CN201710692073.5A
Other languages
Chinese (zh)
Other versions
CN107391333B (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
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710692073.5A priority Critical patent/CN107391333B/en
Publication of CN107391333A publication Critical patent/CN107391333A/en
Application granted granted Critical
Publication of CN107391333B publication Critical patent/CN107391333B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a kind of OSD disk failures method of testing, applied to distributed file system, including:After fault test instruction is received, test script type is determined according to the redundancy rule in Distributed File System Data pond;According to corresponding to test script type determines distributed file system each node test case and with the one-to-one failure script of test case;Wherein, failure script includes the order that insertion object storage OSD disks were extracted and simulated in simulation;Corresponding failure script test case corresponding to up to each node of completion is performed to the OSD disks on each node according to the ID of the title of each node and OSD disks, to realize fault test.It can be seen that the OSD disk failure method of testings that the application provides reduce manual labor's amount, testing efficiency is improved, while add Test coverage degree and test accuracy.Present invention also offers a kind of OSD disk failures test system, has identical beneficial effect with the above method.

Description

A kind of OSD disk failures method of testing and system
Technical field
The present invention relates to field of data storage systems, more particularly to a kind of OSD disk failures method of testing.The present invention is also It is related to a kind of OSD disk failures test system.
Background technology
In distributed file system, data disperse storage to the OSD of clustered node according to the redundancy rule of regulation On (Object-based Storage Device, object storage) disk.A node generally has 12~36 in actual applications Block disk, compared with other hardware, the probability of disk failures is considerably higher.Distributed file system is advised in defined redundancy In the range of then, it is allowed to one or more disk failure of clustered node, but must assure that collection group energy normal use and data do not lose Lose, therefore the test of progress OSD disk failures is most important during product development.
Certain block or some pieces of OSD disks are extracted usually using manual mode in the prior art, then judges to extract disk Cluster afterwards can normal use and data whether there is loss, so as to draw the disk failure test result of distributed file system. But the mode of manual driver chuck is applied to node and the few cluster of disk number, when the increase of the number of cluster interior joint and disk When, the mode manual labor amount of manual driver chuck is big and testing efficiency is relatively low.Used in addition, being tested when the number of node and disk is more Example can also accordingly increase, and manual operation is likely to occur the omission of test case or obscured, and have impact on test accuracy.
Therefore, how to provide a kind of scheme for solving above-mentioned technical problem is that those skilled in the art need to solve at present Problem.
The content of the invention
It is an object of the invention to provide a kind of OSD disk failures method of testing, testing efficiency are higher;Another mesh of the present invention Be to provide a kind of OSD disk failures test system, test accuracy is higher.
In order to solve the above technical problems, the invention provides a kind of OSD disk failures method of testing, applied to distributed text Part system, including:
After fault test instruction is received, test script is determined according to the redundancy rule in Distributed File System Data pond Type;
According to corresponding to the test script type determines the distributed file system each node test case and with The one-to-one failure script of test case;Wherein, the failure script includes simulation extraction and simulation insertion object is deposited Store up the order of OSD disks;
Corresponding failure pin is performed to the OSD disks on each node according to the ID of the title of each node and OSD disks This is until complete test case corresponding to each node, to realize the fault test.
Preferably, OSD disks are performed every time after completing the failure script, this method also includes:
The Message Digest 5 Md5 values of the distributed file system write-in file are recorded, and are used as current Md5 values;
Judge whether the current Md5 values and initial Md5 values are consistent, if it is, this execution of the failure script is logical Cross;If not, the failure script this perform failure;
Wherein, the initial Md5 values be after file is completed and is written into distributed file system configuration, to it is described respectively OSD disks on individual node carry out the Md5 values recorded before fault test.
Preferably, it is described judge the current Md5 values and initial Md5 values whether unanimously after, failure script this perform By the way that before, this method also includes:
The OSD states of cluster state and the distributed file system node are detected, judge the cluster state and described Whether the OSD states of node normal, if it is, into subsequent step, if not, the failure script this perform failure.
Preferably, before the OSD disks on each node perform corresponding failure script, this method also includes:
The OSD states of cluster state and the distributed file system node are detected, judge the cluster state and described Whether the OSD states of node are normal, if not, debugging, untill normal, the OSD states of the cluster state and the node are just Chang Hou, start to perform corresponding failure script to the OSD disks on each node.
Preferably, before the OSD disks on each node perform corresponding failure script, this method also includes:
Judge whether the OSD disks on each node have reading and writing data, if it is, determining there is the OSD of reading and writing data Disk;
It is specially to the process of the corresponding failure script of OSD disks execution on each node then:
Corresponding failure script is performed to the OSD disks for having reading and writing data on each node.
Preferably, the redundancy rule according to Distributed File System Data pond determines the process tool of test script type Body is:
Obtain the title in Distributed File System Data pond;
The redundancy rule in the Distributed File System Data pond is obtained according to the title;
Test script type is determined according to the redundancy rule.
Preferably, the order that the OSD disks are extracted in the simulation is echo 1>/sys/block/X/device/ Delete orders;Wherein, the X is the drive of the OSD disks;
The order that the OSD disks are inserted in the simulation is echo " --- ">File absolute path including host and scan Order;Wherein, the file absolute path including host and scan is to pass through find/sys/-name " scan " | grep The path that " host " order obtains.
In order to solve the above technical problems, present invention also offers a kind of OSD disk failures test system, applied to distribution File system, including:
Receiving module, for after fault test instruction is received, being advised according to the redundancy in Distributed File System Data pond Then determine test script type;
Determining module, the test according to corresponding to the test script type determines the distributed file system each node Use-case and with the one-to-one failure script of the test case;Wherein, the failure script includes simulation extraction and simulation is inserted Enter the order of the OSD disks;
Test module, the OSD disks on each node are performed for the ID of the title according to each node and OSD disks Corresponding failure script is until complete test case corresponding to each node, to realize the fault test.
Preferably, the order that the OSD disks are extracted in the simulation is echo 1>/sys/block/X/device/ Delete orders;Wherein, the X is the drive of the OSD disks;
The order that the OSD disks are inserted in the simulation is echo " --- ">File absolute path including host and scan Order;Wherein, the file absolute path including host and scan is to pass through find/sys/-name " scan " | grep The path that " host " order obtains.
Preferably, the receiving module is specifically used for after fault test instruction is received, and obtains distributed file system The title of data pool;
The redundancy rule in the Distributed File System Data pond is obtained according to the title;
Test script type is determined according to the redundancy rule.
The invention provides a kind of OSD disk failures method of testing, applied to distributed file system, including:Receiving After being instructed to fault test, test script type is determined according to the redundancy rule in Distributed File System Data pond;According to test Script type determine test case corresponding to each node of distributed file system and with the one-to-one failure pin of test case This;Wherein, failure script includes the order that insertion object storage OSD disks were extracted and simulated in simulation;According to the name of each node Claim and the ID of OSD disks performs corresponding failure script until completing corresponding to each node to the OSD disks on each node Test case, to realize fault test.
It can be seen that the OSD disk failures method of testing that the application provides is successively to the magnetic on each node in distributed system Disk carries out fault test, and the order of insertion OSD disks is extracted and simulated due to including simulation in failure script, eliminates craft The tedious steps of driver chuck, reduce manual labor's amount, shorten test period, improve testing efficiency.Simultaneously reduce due to There is the possibility that test case is omitted or obscured more in node, disk, so as to the different nodes of covering as much as possible, difference The scene of disk failure, add Test coverage degree and test accuracy.
Present invention also offers a kind of OSD disk failures test system, has identical beneficial effect with the above method.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to institute in prior art and embodiment The accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present invention Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also be obtained according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 is a kind of process flow diagram flow chart of OSD disk failures method of testing provided by the invention;
Fig. 2 is a kind of structural representation of OSD disk failures test system provided by the invention.
Embodiment
The core of the present invention is to provide a kind of OSD disk failures method of testing, and testing efficiency is higher;Another core of the present invention The heart is to provide a kind of OSD disk failures test system, and test accuracy is higher.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is refer to, Fig. 1 is a kind of process flow diagram flow chart of OSD disk failures method of testing provided by the invention, is applied to Distributed file system, this method include:
Step S11:After fault test instruction is received, determined according to the redundancy rule in Distributed File System Data pond Test script type;
Specifically, data are stored in each node according to the redundancy rule of regulation in distributed file system in practical application On OSD disks in, based on this, when carrying out the test of OSD disk failures, in order that test result more accurately shortens survey simultaneously The cycle is tried, test script type first can be selected according to the redundancy rule.Accordingly, test script type is according to different redundancies Rule can be divided into four kinds, be respectively:One OSD disk failure of single node, multiple OSD disk failures of single node, more piece Multiple OSD disk failures of each the OSD disk failure and multinode of point.Assuming that the redundancy rule of distributed file system is Two copies, then can select single node an OSD disk failure and single node multiple OSD disk failures both test It is one or two kinds of in script type, it can specifically be selected according to the actual conditions that data store in OSD disks.Can See, first selection test script type can make it that test process more orderliness is clear before carrying out fault test to OSD disks, also Workload can be reduced, shortens test period.
Step S12:According to corresponding to test script type determines distributed file system each node test case and with The one-to-one failure script of test case;Wherein, failure script includes simulation extraction and simulation insertion object storage OSD disks Order;
Specifically, it is contemplated that OSD disk failures test of the invention is needed to some or all of OSD on each node Disk is tested, and the test case on each node and the OSD disk failures script of this node correspond.It is assuming that distributed The cluster of file system includes 6 nodes, and 10 pieces of OSD disks for needing to carry out fault test are included on each node.According to The redundancy rule in the Distributed File System Data pond have selected the test script type of an OSD disk failure of single node, 6 test cases will be so generated accordingly, and each test case corresponds with corresponding node, corresponding to each node Test case and the OSD failures script of this node correspond.The 10 pieces of OSD disks tested are needed on one node successively Perform after completing failure script, test case corresponding to the node is completed, and then carries out the test case of next node again, directly To test case corresponding to each node is completed, the test of OSD disk failures terminates.In addition, OSD failures script can be node 1 In sdb disks failure, the so similar script such as the sdb disk failures in node 2 and the sdc disk failures in node 1, wherein Sdb, sdc are drive of the OSD disks on its affiliated node.
In addition, it is contemplated that when carrying out OSD fault tests in the prior art, in order to check the disk of extraction to file system Influence to extract certain block or some pieces of OSD disks usually using manual mode, manual labor measures larger, test accuracy and efficiency It is relatively low.Based on this, in order to improve testing efficiency, the application includes simulation in failure script and extracts and simulate insertion OSD disks Order, disk can be extracted with automatic imitation during OSD disk perform scripts, it is not necessary to carry out manual driver chuck operation, eliminate hand The tedious steps of work driver chuck, reduce manual labor's amount, shorten test period, improve testing efficiency.
Step S13:The OSD disks on each node are performed according to the ID of the title of each node and OSD disks corresponding Failure script until test case corresponding to each node is completed, to realize fault test.
Specifically, it is contemplated that under normal circumstances more than one node in distributed file system, more than one on each node Block OSD disks, therefore, it is possible that omitting or obscuring, base during test case corresponding to each node is performed In this, in order that the corresponding failure script of execution that the OSD disks for obtaining each node can be orderly, according to the title of place node The OSD disks in respective nodes and the node are determined with the ID of the OSD disks, then pair OSD disks determined perform corresponding Failure script.Wherein, the ID of OSD disks is mark of the disk in distributed file system, and the application passes through lsblk orders Node disk mount directory information is obtained, then OSD ID are obtained by disk mount directory.It can be seen that the present invention performs failure pin This process performs for sequencing, reduces the possibility for occurring test case more due to node, disk and omitting or obscuring, so as to Test coverage degree and test accuracy can be added with the different nodes of covering as much as possible, the scene of different disk failure.
The invention provides a kind of OSD disk failures method of testing, applied to distributed file system, including:Receiving After being instructed to fault test, test script type is determined according to the redundancy rule in Distributed File System Data pond;According to test Script type determine test case corresponding to each node of distributed file system and with the one-to-one failure pin of test case This;Wherein, failure script includes the order that insertion object storage OSD disks were extracted and simulated in simulation;According to the name of each node Claim and the ID of OSD disks performs corresponding failure script until completing corresponding to each node to the OSD disks on each node Test case, to realize fault test.
It can be seen that the OSD disk failures method of testing that the application provides is successively to the magnetic on each node in distributed system Disk carries out fault test, and the order of insertion OSD disks is extracted and simulated due to including simulation in failure script, eliminates craft The tedious steps of driver chuck, reduce manual labor's amount, shorten test period, improve testing efficiency.Simultaneously reduce due to There is the possibility that test case is omitted or obscured more in node, disk, so as to the different nodes of covering as much as possible, difference The scene of disk failure, add Test coverage degree and test accuracy.
On the basis of above-described embodiment:
As a kind of preferred embodiment, OSD disks are performed every time after completing failure script, this method also includes:
The Message Digest 5 Md5 values of distributed file system write-in file are recorded, and are used as current Md5 values;
Judge whether current Md5 values and initial Md5 values are consistent, if it is, this execution of failure script passes through;If It is no, failure script this perform failure;
Wherein, initial Md5 values are after distributed file system configuration is completed and is written into file, on each node OSD disks carry out the Md5 values recorded before fault test.
Specifically, the cluster after certain block or some pieces of OSD disks is extracted in practical application according to distributed file system Situation and event of data loss, to draw the OSD disk failure test results of distributed file system.Based on this, the present invention is every After the secondary execution completion failure script to OSD disks, compare the data of file system before and after failure script performs, according to comparative result It can show data whether there is loss, so as to obtain test result.Specifically, failure can be completed being performed every time to OSD disks Md5 (Message-Digest Algorithm 5, Message Digest 5) value of record write-in file, is then used after script Md5 values calibration tool carries out contrast verification to the Md5 values of original records after the Md5 values and write-in file of current record, if Md5 It is worth identical, then consistency verification of data is by being that data are not lost, and this execution of failure script passes through, if Md5 values Difference, then data have loss, then the OSD disk failures have an impact to the distributed file system where it.
In addition, the Md5 values of original records include each write-in one-to-one Md5 values of file after present invention write-in file, These Md5 values are stored in a text.The Md5 values of each write-in file of current record need to carry out contrast verification with it When, the Md5 values with each write-in one-to-one original records of file are called, are then compared, so as to according to comparing As a result OSD disk failure test results are clearly followed that, improve test accuracy.
As a kind of preferred embodiment, after judging whether current Md5 values and initial Md5 values are consistent, failure script sheet Before secondary execution passes through, this method also includes:
The OSD states of cluster state and distributed file system node are detected, judge the OSD states of cluster state and node It is whether normal, if it is, into subsequent step, if not, failure script this perform failure.
Specifically, it is contemplated that after the present invention performs completion failure script to OSD disks every time, even if not to the one of data Cause property impacts i.e. data and not lost, but if the state that have impact on file system prevents file system from normally making With, then this execution of the failure script is still failure.Therefore, the present invention is judging that current Md5 values are with initial Md5 values It is no it is consistent after, before this execution of failure script passes through, can also detect cluster state and each node OSD states whether just Often, only stateful normal, file system can be with normal use, then this execution of failure script can just pass through.
Certainly, the present invention can also first carry out state-detection and carry out the verification of Md5 values again, and the present invention does not do special limit herein It is fixed, determined according to actual conditions.
As a kind of preferred embodiment, before performing corresponding failure script to the OSD disks on each node, the party Method also includes:
The OSD states of cluster state and distributed file system node are detected, judge the OSD states of cluster state and node It is whether normal, if not, debugging is untill normally, after the OSD states of cluster state and node are normal, start on each node OSD disks perform corresponding failure script.
Specifically, distributed file system may have some problems due to itself and cannot normally make in practical application With based on this, in order to avoid influence of such a situation to test result, the OSD disks on to each node perform corresponding Before failure script, the present invention can also detect the cluster state of distributed file system and the OSD states of node, if state is just Often, supporting paper system can be with normal use, then into follow-up testing procedure, if state is abnormal, supporting paper system Problem itself be present, then elder generation debugs without test process but to file system, until after just entering after state is normal Continuous testing procedure, is impacted so as to avoid system from problem being present in itself to failure measure, improves test The degree of accuracy.
As a kind of preferred embodiment, before performing corresponding failure script to the OSD disks on each node, the party Method also includes:
Judge whether the OSD disks on each node have reading and writing data, if it is, determining there are the OSD disks of reading and writing data;
It is specially to the process of the corresponding failure script of OSD disks execution on each node then:
Corresponding failure script is performed to the OSD disks for having reading and writing data on each node.
Specifically, the OSD disks for usually having reading and writing data in usual practical application can just break down, and based on this, be Raising testing efficiency, the present invention pay close attention to the OSD disk failures of read-write.Phase is performed to the OSD disks on each node Before the failure script answered, the OSD disks of reading and writing data are first determined, it is only follow-up to there is the OSD disks of reading and writing data to carry out Test, no data read-write OSD disks no longer carry out follow-up test because the possibility of failure is smaller, so as to avoid not Necessary test process, shortens test period.
As a kind of preferred embodiment, test script class is determined according to the redundancy rule in Distributed File System Data pond The process of type is specially:
Obtain the title in Distributed File System Data pond;
The redundancy rule in Distributed File System Data pond is obtained according to title;
Test script type is determined according to redundancy rule.
Specifically, it is contemplated that test script type is corresponding with the redundancy rule of distributed file system, due to distribution The title of the data pool of file system corresponds with the redundancy rule of this document system, based on this, in order to be accurately obtained rule Fixed redundancy rule, the title in file system data pond can be first obtained, be advised further according to the corresponding redundancy of data pool name acquiring Then.By performing ceph osd dump in the present invention | the accurate simplicity of grep pool orders obtains file system data pond Title, the redundancy rule of this document system next can be got according to file system data Pool name, improves test Efficiency and the degree of accuracy.
As a kind of preferred embodiment, the order that OSD disks are extracted in simulation is echo 1>/sys/block/X/ Device/delete orders;Wherein, X is the drive of OSD disks;
The order of simulation insertion OSD disks is echo " --- ">The order of file absolute path including host and scan; Wherein, including host and scan file absolute path to pass through find/sys/-name " scan " | grep " host " orders obtain The path taken.
Specifically, it is contemplated that include simulation extraction and simulation insertion in testing efficiency failure script of the present invention to improve The order of disk, due to more than one piece of OSD disk on each node in distributed file system, based on this, simulation is extracted and inserted The order entered needs to correspond with every piece of OSD disk.Corresponded because the disk on each node has in the node Drive, the present invention extracts to order using the simulation including drive extracts corresponding disk.In addition, when inserting disk, Every piece of disk has one-to-one file absolute path, and therefore, the present invention uses the absolute road of file for including host and scan Insertion disk is simulated in the order in footpath, so that having a succession when the disk on to each node carries out fault test, no It can omit or obscure disk, improve the degree of accuracy of test.
As a kind of preferred embodiment, test case corresponding to each node has been performed, has completed the test of OSD disk failures Afterwards, the log information that every failure script performs can also be obtained and export OSD disk failure test report, facilitate user directly perceived Acquisition test result.
It refer to Fig. 2, Fig. 2 is a kind of structural representation of OSD disk failures test system provided by the invention, the system Including:
Receiving module 1, for after fault test instruction is received, being advised according to the redundancy in Distributed File System Data pond Then determine test script type;
Determining module 2, according to corresponding to test script type determines distributed file system each node test case and With the one-to-one failure script of test case;Wherein, failure script includes the life that simulation is extracted and simulates insertion OSD disks Order;
Test module 3, the OSD disks on each node are held for the ID of the title according to each node and OSD disks The corresponding failure script of row is until complete test case corresponding to each node, to realize fault test.
As a kind of preferred embodiment, the order that OSD disks are extracted in simulation is echo 1>/sys/block/X/ Device/delete orders;Wherein, X is the drive of OSD disks;
The order of simulation insertion OSD disks is echo " --- ">The order of file absolute path including host and scan; Wherein, including host and scan file absolute path to pass through find/sys/-name " scan " | grep " host " orders obtain The path taken.
As a kind of preferred embodiment, receiving module is specifically used for after fault test instruction is received, and obtains distribution The title in formula file system data pond;
The redundancy rule in Distributed File System Data pond is obtained according to title;
Test script type is determined according to redundancy rule.
Introduction for system provided by the invention refer to above method embodiment, and the present invention will not be repeated here.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.For system disclosed in embodiment For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part It is bright.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and The interchangeability of software, the composition and step of each example are generally described according to function in the above description.These Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specialty Technical staff can realize described function using distinct methods to each specific application, but this realization should not Think beyond the scope of this invention.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (10)

  1. A kind of 1. OSD disk failures method of testing, applied to distributed file system, it is characterised in that including:
    After fault test instruction is received, test script class is determined according to the redundancy rule in Distributed File System Data pond Type;
    According to corresponding to the test script type determines the distributed file system each node test case and with it is described The one-to-one failure script of test case;Wherein, the failure script includes simulation extraction and simulation insertion object storage OSD The order of disk;
    It is straight that corresponding failure script is performed to the OSD disks on each node according to the ID of the title of each node and OSD disks To test case corresponding to each node is completed, to realize the fault test.
  2. 2. the method as described in claim 1, it is characterised in that OSD disks are performed every time after completing the failure script, should Method also includes:
    The Message Digest 5 Md5 values of the distributed file system write-in file are recorded, and are used as current Md5 values;
    Judge whether the current Md5 values and initial Md5 values are consistent, if it is, this execution of the failure script passes through;Such as Fruit is no, the failure script this perform failure;
    Wherein, after the initial Md5 values are distributed file system configuration completion and are written into file, to each section OSD disks on point carry out the Md5 values recorded before fault test.
  3. 3. method as claimed in claim 2, it is characterised in that it is described judge the current Md5 values and initial Md5 values whether one After cause, before this execution of failure script passes through, this method also includes:
    The OSD states of cluster state and the distributed file system node are detected, judge the cluster state and the node OSD states it is whether normal, if it is, into subsequent step, if not, the failure script this perform failure.
  4. 4. the method as described in claim 1, it is characterised in that the OSD disks on each node perform corresponding event Before hindering script, this method also includes:
    The OSD states of cluster state and the distributed file system node are detected, judge the cluster state and the node OSD states it is whether normal, if not, debugging to normally untill, the OSD states of the cluster state and the node are normal Afterwards, start to perform corresponding failure script to the OSD disks on each node.
  5. 5. the method as described in claim 1, it is characterised in that the OSD disks on each node perform corresponding event Before hindering script, this method also includes:
    Judge whether the OSD disks on each node have reading and writing data, if it is, determining there are the OSD disks of reading and writing data;
    It is specially to the process of the corresponding failure script of OSD disks execution on each node then:
    Corresponding failure script is performed to the OSD disks for having reading and writing data on each node.
  6. 6. the method as described in claim 1, it is characterised in that the redundancy rule according to Distributed File System Data pond The process for determining test script type is specially:
    Obtain the title in Distributed File System Data pond;
    The redundancy rule in the Distributed File System Data pond is obtained according to the title;
    Test script type is determined according to the redundancy rule.
  7. 7. the method as described in claim any one of 1-6, it is characterised in that the order of the OSD disks is extracted in the simulation For echo 1>/ sys/block/X/device/delete orders;Wherein, the X is the drive of the OSD disks;
    The order that the OSD disks are inserted in the simulation is echo " --- ">The life of file absolute path including host and scan Order;Wherein, the file absolute path including host and scan is to pass through find/sys/-name " scan " | grep " host " Order the path obtained.
  8. A kind of 8. OSD disk failures test system, applied to distributed file system, it is characterised in that including:
    Receiving module, for receive fault test instruction after, it is true according to the redundancy rule in Distributed File System Data pond Determine test script type;
    Determining module, the test case according to corresponding to the test script type determines the distributed file system each node And with the one-to-one failure script of the test case;Wherein, the failure script includes simulation extraction and simulation insertion institute State the order of OSD disks;
    Test module, the OSD disks on each node are performed for the ID of the title according to each node and OSD disks corresponding Failure script until test case corresponding to each node is completed, to realize the fault test.
  9. 9. system as claimed in claim 8, it is characterised in that the order that the OSD disks are extracted in the simulation is echo 1 >/ sys/block/X/device/delete orders;Wherein, the X is the drive of the OSD disks;
    The order that the OSD disks are inserted in the simulation is echo " --- ">The life of file absolute path including host and scan Order;Wherein, the file absolute path including host and scan is to pass through find/sys/-name " scan " | grep " host " Order the path obtained.
  10. 10. system as claimed in claim 8, it is characterised in that the receiving module is specifically used for receiving fault test After instruction, the title in Distributed File System Data pond is obtained;
    The redundancy rule in the Distributed File System Data pond is obtained according to the title;
    Test script type is determined according to the redundancy rule.
CN201710692073.5A 2017-08-14 2017-08-14 OSD disk fault testing method and system Active CN107391333B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710692073.5A CN107391333B (en) 2017-08-14 2017-08-14 OSD disk fault testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710692073.5A CN107391333B (en) 2017-08-14 2017-08-14 OSD disk fault testing method and system

Publications (2)

Publication Number Publication Date
CN107391333A true CN107391333A (en) 2017-11-24
CN107391333B CN107391333B (en) 2020-10-16

Family

ID=60354744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710692073.5A Active CN107391333B (en) 2017-08-14 2017-08-14 OSD disk fault testing method and system

Country Status (1)

Country Link
CN (1) CN107391333B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669794A (en) * 2018-12-03 2019-04-23 郑州云海信息技术有限公司 A kind of data in magnetic disk conformance test method, device, terminal and storage medium
CN110018980A (en) * 2017-12-25 2019-07-16 北京金风科创风电设备有限公司 Method and device for searching fault data from simulation data of fan controller
CN110568346A (en) * 2019-10-08 2019-12-13 东信和平科技股份有限公司 Aging test method and system for smart card
CN111104274A (en) * 2019-12-19 2020-05-05 广东浪潮大数据研究有限公司 Automatic testing method, device and equipment for SSD (solid State disk) and readable storage medium
CN111124724A (en) * 2019-11-15 2020-05-08 苏州浪潮智能科技有限公司 Node fault testing method and device of distributed block storage system
CN111221672A (en) * 2019-12-26 2020-06-02 曙光信息产业股份有限公司 Data consistency checking method and device for distributed storage system
CN111400117A (en) * 2020-03-12 2020-07-10 山东汇贸电子口岸有限公司 Method for automatically testing Ceph cluster
CN112667453A (en) * 2020-12-25 2021-04-16 深圳创新科技术有限公司 Kicking disk testing method, terminal and computer storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635478A (en) * 2003-12-30 2005-07-06 英业达股份有限公司 Cross-platform computer testing system and method
US20080270841A1 (en) * 2007-04-11 2008-10-30 Quilter Patrick J Test case manager
CN101819547A (en) * 2010-03-25 2010-09-01 浪潮电子信息产业股份有限公司 Method for testing stability and reliability of storage subsystem
CN103000228A (en) * 2011-09-08 2013-03-27 上海宝信软件股份有限公司 Storage device test method and system
CN104899119A (en) * 2015-05-21 2015-09-09 浪潮电子信息产业股份有限公司 Method for automatically detecting hard disk abnormity
CN105760267A (en) * 2016-02-25 2016-07-13 上海斐讯数据通信技术有限公司 Comparative detection method for CPU consumption of storage device read-write
CN106844119A (en) * 2017-01-25 2017-06-13 郑州云海信息技术有限公司 A kind of detection method of equipment, device and system
CN106875980A (en) * 2017-02-17 2017-06-20 紫光华山信息技术有限公司 Method for testing hard disk and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635478A (en) * 2003-12-30 2005-07-06 英业达股份有限公司 Cross-platform computer testing system and method
US20080270841A1 (en) * 2007-04-11 2008-10-30 Quilter Patrick J Test case manager
CN101819547A (en) * 2010-03-25 2010-09-01 浪潮电子信息产业股份有限公司 Method for testing stability and reliability of storage subsystem
CN103000228A (en) * 2011-09-08 2013-03-27 上海宝信软件股份有限公司 Storage device test method and system
CN104899119A (en) * 2015-05-21 2015-09-09 浪潮电子信息产业股份有限公司 Method for automatically detecting hard disk abnormity
CN105760267A (en) * 2016-02-25 2016-07-13 上海斐讯数据通信技术有限公司 Comparative detection method for CPU consumption of storage device read-write
CN106844119A (en) * 2017-01-25 2017-06-13 郑州云海信息技术有限公司 A kind of detection method of equipment, device and system
CN106875980A (en) * 2017-02-17 2017-06-20 紫光华山信息技术有限公司 Method for testing hard disk and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018980A (en) * 2017-12-25 2019-07-16 北京金风科创风电设备有限公司 Method and device for searching fault data from simulation data of fan controller
CN109669794A (en) * 2018-12-03 2019-04-23 郑州云海信息技术有限公司 A kind of data in magnetic disk conformance test method, device, terminal and storage medium
CN110568346A (en) * 2019-10-08 2019-12-13 东信和平科技股份有限公司 Aging test method and system for smart card
CN111124724A (en) * 2019-11-15 2020-05-08 苏州浪潮智能科技有限公司 Node fault testing method and device of distributed block storage system
CN111124724B (en) * 2019-11-15 2023-01-10 苏州浪潮智能科技有限公司 Node fault testing method and device of distributed block storage system
CN111104274A (en) * 2019-12-19 2020-05-05 广东浪潮大数据研究有限公司 Automatic testing method, device and equipment for SSD (solid State disk) and readable storage medium
CN111104274B (en) * 2019-12-19 2023-07-14 广东浪潮大数据研究有限公司 SSD hard disk automatic test method, SSD hard disk automatic test device, SSD hard disk automatic test equipment and readable storage medium
CN111221672A (en) * 2019-12-26 2020-06-02 曙光信息产业股份有限公司 Data consistency checking method and device for distributed storage system
CN111400117A (en) * 2020-03-12 2020-07-10 山东汇贸电子口岸有限公司 Method for automatically testing Ceph cluster
CN111400117B (en) * 2020-03-12 2023-07-11 山东汇贸电子口岸有限公司 Method for automatically testing Ceph cluster
CN112667453A (en) * 2020-12-25 2021-04-16 深圳创新科技术有限公司 Kicking disk testing method, terminal and computer storage medium

Also Published As

Publication number Publication date
CN107391333B (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN107391333A (en) A kind of OSD disk failures method of testing and system
US7917895B2 (en) Automated software testing and validation system
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
CN103473158A (en) Disk pressure testing method for Linux server
CN109992274A (en) Recording device, the method for burning program and readable storage medium storing program for executing
CN107133244B (en) Method and device for testing database migration
CN107729238A (en) A kind of plug-in unit adjustment method, system, device and computer-readable recording medium
CN111767226A (en) Method, system and equipment for testing cloud computing platform resources
CN111124894B (en) Code coverage rate processing method and device and computer equipment
CN108572895A (en) Automatically the stability test method of software and hardware configuration is checked under a kind of Linux
US20060190234A1 (en) Property generating method, verification method and verification apparatus
US20070180369A1 (en) Method and apparatus for automatically formatting data based on a best match test result type
CN108959078A (en) A kind of end Windows automatic software test method and system
CN109582513A (en) A kind of JBOD test method and system based on generic server
CN107423185A (en) A kind of method of testing and device of disk array and compatible mainframe adaptation
CN109829083A (en) SPD data automatic verification method, device, computer equipment and storage medium
CN109344023B (en) System and method for testing stability of USB3.0 interface of server
JP2007328447A (en) Software test item selecting device, software test item selecting program, recording medium in which software test item selecting program is stored, and software test item selecting method
CN104090845B (en) Automatic game testing method and system and related device
US11874764B2 (en) Method and system for guaranteeing game quality by using artificial intelligence agent
CN109374038A (en) A kind of changed test method of the nuclear safe level instrument control product based on application model machine
CN110795297B (en) Electronic equipment testing method and device
CN110348244A (en) More checksum validation methods, system, device and storage medium based on arbitration
CN115571202B (en) Method and device for duplicating train control center system
CN100424754C (en) Method for testing position of magnetic head in hard disk

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200917

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant