CN106909484A - A kind of system and method for the test of storage environment Imitating low-quality disk - Google Patents
A kind of system and method for the test of storage environment Imitating low-quality disk Download PDFInfo
- Publication number
- CN106909484A CN106909484A CN201710128628.3A CN201710128628A CN106909484A CN 106909484 A CN106909484 A CN 106909484A CN 201710128628 A CN201710128628 A CN 201710128628A CN 106909484 A CN106909484 A CN 106909484A
- Authority
- CN
- China
- Prior art keywords
- file
- write
- test
- bad block
- thread
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/261—Functional testing by simulating additional hardware, e.g. fault simulation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The present invention provides a kind of system and method for the test of storage environment Imitating low-quality disk, can need to simulate various hard disk failure situations in the middle of test by the scheme invented, so as to individually by pull out hard disk can not comprehensively reappear user it is actually used in the situation of various problems that runs into be addressed, this method of testing the environment of read-write error can occur with analog subscriber using central hard disk, can more fully test storage product.
Description
Technical field
The present invention relates to field of storage, and in particular to for the system and method for storage environment Imitating low-quality disk test.
Background technology
Information age calculating field has a very large change, and changes anyway, computer disposal and produce data
Importance do not change but, once losing, all of computing capability becomes valueless at all to data.We are it must be observed that data
Progressively turn into an own storage, entity that is being not belonging to any particular system, just as capital or intellectual property, data
As a kind of wealth that can be enjoyed jointly, it is necessary to be stored and protected.
The storage of information is the importance of information system, if without information storage, cannot make full use of collected,
Processing gained information, while also wanting cost, consumption people, consumption thing to come the collection again of organizational information, processing.There is information storage, just
Ready access upon use can be ensured, be the multi-functional using creating conditions of unit information, so as to greatly reduce expense.
The storage of information is final to be stored in hard disk the inside, after these hard disks have run thousands of hours, many things
Reason parameter can all change, and the damage of hard disk has very big probability to damage, and user is likely to occur largely using central very much
Disk read-write mistake, depending merely on plug hard disk can not reappear the problem run into during user's use, therefore mock disc is damaged
Phenomenon, so as to test the performance of disk, is not in mistake just into urgent need to resolve to ensure to store in such a case data
Problem.
The content of the invention
In order to solve the above technical problems, technical scheme is as follows:
The present invention provides a kind of method for the test of storage environment Imitating low-quality disk, and step includes:
SS1, set up disk array and logical volume initialization;
SS2, generation one Large Copacity file will not be by total caching in internal memory to ensure file;
SS3, injection bad block;
SS4, exception are reconstructed and outputed test result.
Further, step SS1 includes:
SS11, structure disk array environment;
SS12, injection bad block simultaneously add io pressure, and wherein io pressure using a dd reading thread and a dd by being write simultaneously
Thread is simulated;
SS13, check disk array and HotSpare disk state.
Further, the dd in step SS12 reads thread and dd writes the scope of the read-write region in the bad block for setting of thread
It is interior.
Further, step SS4 includes:
SS41, the data source that dd writes thread are changed to Large Copacity file;
SS42, calculated by disk array capacity and reconstruct progress, before disk array reconstruct Large Copacity space, afterwards
Three time points completed with Perfect Reconstruction read the test file of write-in by dd;
Whether the md5 values of SS43, contrast write-in and reading file change;
SS44, output test result.
Further, dd write operations are carried out by issue orders:Dd if=/mnt/bkos/bsfi/sde/
Test.fileof=/dev/vg- $ RAID_NAME/lv- $ RAID_NAME bs=64k count=100000&.
Further, dd read operations are carried out by issue orders:Ddif=/dev/vg- $ RAID_NAME/lv- $ RAID_
NAME of=/mnt/bkos/bsfi/sde/test.readbs=64k count=100000&.
Further, Large Copacity file is that size is the file of 7G in step SS2.
In addition the present invention provide it is a kind of for storage environment Imitating low-quality disk test system, including it is middle control module and with
Random file generation module, bad block injection module, read/write control module, test result output mould that middle control module is connected respectively
Block, middle control module is used to control the work of connected each functional module, while comparing the file of write-in and in disk battle array
Before row reconstruct Large Copacity file, pass through the test file that dd readings write with three time points of Perfect Reconstruction completion afterwards
Md5 values;Random file generation module will not be by total caching in internal memory to ensure file for Large Copacity file;Bad block injects
Module is used to inject bad block to member disk, and bad block scope is the 1M-20G scopes of member disk, and bad block and again is removed at interval for one second
Set, it is unstable with mock disc or react abnormal phenomenon;Read/write control module is used to set up disk array and logic
In volume initialization procedure, while bad block is injected using dd read thread and dd write thread simulated field io pressure with
And in abnormal reconstruction stage, the data source that dd writes thread is changed to fixed Large Copacity file, after the completion of this document write-in, lead to
Cross disk array capacity and reconstruct progress is calculated, completed before disk array reconstruct Large Copacity space, afterwards with Perfect Reconstruction
Three time points pass through dd read write-in test file;Test result output module is used to control what module was compared according in
Md5 values output test result.
Further, Large Copacity file is that size is the file of 7G.
Further, dd reading threads and dd write the read-write region of thread in the range of the bad block for setting.
The solution of the present invention can need to simulate various hard disk failure situations in the middle of test, so that individually by pulling out hard disk simultaneously
Can not comprehensively reappear user it is actually used in the situation of various problems that runs into be addressed, this method of testing can be simulated
There is the environment of read-write error using central hard disk in user, can more fully test storage product.
Brief description of the drawings
Fig. 1 shows the present invention for the method flow diagram of storage environment Imitating low-quality disk test.
Fig. 2 shows the present invention for the system architecture diagram of storage environment Imitating low-quality disk test.
Specific embodiment
Technical scheme is further illustrated below in conjunction with Figure of description and specific embodiment.It should be appreciated that this
The described specific embodiment in place is only used to explain the present invention, is not intended to limit the present invention.
Fig. 1 is the method flow diagram for the test of storage environment Imitating low-quality disk of one embodiment of the invention.
The present invention provides a kind of method for the test of storage environment Imitating low-quality disk, and step is as follows:
SS1, set up disk array and logical volume initialization;
SS2, generation one sufficiently large file of capacity will not be by total caching in internal memory to ensure file;
SS3, injection bad block;
SS4, exception are reconstructed and outputed test result.
Wherein step 1 specifically includes following steps:
SS11, structure disk array environment;
SS12, injection bad block simultaneously add io pressure, and wherein io pressure using a dd reading thread and a dd by being write simultaneously
Thread is simulated;
SS13, check disk array and HotSpare disk state.
The sufficiently large file of capacity is preferably the file that size is 7G wherein in step 2.
Wherein step 4 specifically includes following steps:
SS41, the data source that dd writes thread are changed to fixed mass data files;
SS42, calculated by raid capacity and reconstruct progress, before raid reconstruct 7G spaces, complete with Perfect Reconstruction afterwards
Into three time points pass through dd read write-in test file;
Whether the md5 values of SS43, contrast write-in and reading file change;
SS44, output test result.
It implements process:
Build raid environment:The raid (disk array) of 3 pieces of member disks plus 1 piece of HotSpare disk is set up, and is set up on raid
Logical volume, waits raid to synchronously complete.
Inject bad block and add io pressure:By bsfi modules, one piece of vdisk member disk injects bad block, bad block model thereto
Enclose the 1M-20G scopes for vdisk disks, interval is removed bad block for one second and resets that (mock disc is unstable or reacts abnormal
Phenomenon).Read thread using a dd simultaneously and a dd writes thread simulated field io pressure, and ensure that read-write region is being set
Bad block in the range of.
Code is as follows:
Check result:After waiting dd to perform about 5 seconds,
Check in daily record:Be not in wamning, the byte such as error, fail.
Raid states are reconstituted state, and former HotSpare disk is shown as replacement states.
On this basis, the data source that dd writes thread is changed to fixed data file, file size is 7G (using enough
Big file ensures that file will not be by total caching in internal memory).This document write-in is waited to complete.
Calculated by raid capacity and reconstruct progress, completed with Perfect Reconstruction before raid reconstructs 7G spaces, afterwards
Three time points read the test file of write-in by dd.
Contrast write-in and the md5 values of reading file, exception reconstruct does not cause file data to be lost if consistent.
Below with reference to the system that Figure of description 2 describes to be tested for storage environment Imitating low-quality disk according to the present invention.
Fig. 2 is the structured flowchart of the system for the test of storage environment Imitating low-quality disk of one embodiment of the invention.
As shown in Fig. 2 the system for the test of storage environment Imitating low-quality disk according to embodiments of the present invention, including middle control
Module and the random file generation module, bad block injection module, read/write control module, the test that are connected respectively with middle control module
As a result output module.
Specifically, middle control module is used to control the work of connected each functional module, while comparing the file of write-in
And three time points for being completed with Perfect Reconstruction before raid reconstructs 7G spaces, afterwards pass through the test text that dd reads write-in
The md5 values of part.
Random file generation module be used for the sufficiently large file of capacity with ensure file will not by total caching in internal memory,
The file size for preferably generating is 7G.
Bad block injection module is used to inject bad block to vdisk member disks, and bad block scope is the 1M-20G scopes of vdisk disks,
Interval is removed bad block and is reset for one second, so that mock disc is unstable or reacts abnormal phenomenon.
Read/write control module is used in disk array and logical volume initialization procedure is set up, while bad block is injected
Read thread using a dd and a dd writes thread simulated field io pressure, and ensure to read and write scope of the region in the bad block for setting
It is interior.
Read/write control module is additionally operable in abnormal reconstruction stage, and the data source that dd writes thread is changed into fixed data text
Part, file size is 7G, waits this document write-in to complete, and is calculated by raid capacity and reconstruct progress, empty in raid reconstruct 7G
Between before, afterwards with Perfect Reconstruction complete three time points by dd read write test file.
Test result output module is used to be controlled according in the file of the write-in that module is compared and in raid reconstruct 7G spaces
Before, the md5 values output test knot that three time points for being completed with Perfect Reconstruction afterwards pass through the test file of dd reading write-ins
Really, represent that exception reconstruct does not cause file data to be lost if consistent, test passes through.
In one embodiment of the invention, middle control module uses Intel's the 7th generation Kaby Lake processors, and treatment is fast
Victory, efficiency high.
Just can need to simulate various hard disk failure situations in the middle of test by above-mentioned scheme, so that individually hard by pulling out
Disk can not comprehensively reappear user it is actually used in the situation of various problems that runs into be addressed, this method of testing can be with
There is the environment of read-write error using central hard disk in analog subscriber, can more fully test storage product.
Although in terms of having been described for some in the context of device, it is apparent that these aspects also illustrate that corresponding method
Description, the feature of wherein block or apparatus and method for step or method and step is corresponding.Similarly, in the context of method and step
Described in each side also illustrate that corresponding piece or project or corresponding intrument feature description.Can be by (or use)
Hardware unit such as microprocessor, programmable calculator or electronic circuit etc is some or all of in method and step to perform.
Can be performed by such device in most important method and step some or it is multiple.
The realization can using hardware or using software or can using such as floppy disk, DVD, blue light, CD, ROM,
PROM, EPROM, EEPROM's or flash memory etc is situated between with the stored digital for being stored in electronically readable control signal thereon
Matter is performed, and the electronically readable control signal coordinates (or can coordinate with it) to cause to perform with programmable computer system
Corresponding method.The data medium with electronically readable control signal can be provided, the electronically readable control signal can be with
Programmable computer system coordinates to cause to perform approach described herein.
The realization can also work as computer program product in the form of the computer program product with program code
When running on computers, program code is operated to perform the method.Can in machine-readable carrier storage program generation
Code.
Described above be only it is illustrative, and it is to be understood that it is described herein arrangement and details modification and
Change will be apparent to those skilled in the art.It is therefore intended that only by scope of the following claims rather than by
The specific detail that is presented is limited above description and by way of explaining.
Claims (10)
1. it is a kind of for storage environment Imitating low-quality disk test method, it is characterised in that step includes:
SS1, set up disk array and logical volume initialization;
SS2, generation one Large Copacity file will not be by total caching in internal memory to ensure file;
SS3, injection bad block;
SS4, exception are reconstructed and outputed test result.
2. method according to claim 1, it is characterised in that step SS1 includes:
SS11, structure disk array environment;
SS12, injection bad block simultaneously add io pressure, and wherein io pressure using a dd reading thread and a dd by writing thread simultaneously
Simulation;
SS13, check disk array and HotSpare disk state.
3. method according to claim 2, it is characterised in that the dd in step SS12 reads thread and dd writes the read-write of thread
Region is in the range of the bad block for setting.
4. method according to claim 3, it is characterised in that step SS4 includes:
SS41, the data source that dd writes thread are changed to Large Copacity file;
SS42, calculated by disk array capacity and reconstruct progress, before disk array reconstruct Large Copacity space, afterwards with it is complete
Three time points that full weight structure is completed read the test file of write-in by dd;
Whether the md5 values of SS43, contrast write-in and reading file change;
SS44, output test result.
5. method according to claim 4, it is characterised in that carry out dd write operations by issue orders:Dd if=/
Mnt/bkos/bsfi/sde/test.file of=/dev/vg- $ RAID_NAME/lv- $ RAID_NAME bs=64k
Count=100000&.
6. method according to claim 4, it is characterised in that carry out dd read operations by issue orders:Dd if=/
Dev/vg- $ RAID_NAME/lv- $ RAID_NAME of=/mnt/bkos/bsfi/sde/test.read bs=64k
Count=100000&.
7. method according to claim 1, it is characterised in that Large Copacity file is that size is the file of 7G in step SS2.
8. it is a kind of for storage environment Imitating low-quality disk test system, it is characterised in that including it is middle control module and with middle control
Random file generation module, bad block injection module, read/write control module, test result output module that module is connected respectively, in
Control module is used to control the work of connected each functional module, while comparing the file of write-in and in disk array reconstruct
Three time points for being completed with Perfect Reconstruction before Large Copacity file, afterwards read the md5 values of the test file of write-in by dd;
Random file generation module will not be by total caching in internal memory to ensure file for Large Copacity file;Bad block injection module is used
In bad block is injected to member disk, bad block scope is the 1M-20G scopes of member disk, and interval is removed bad block and reset for one second, with
Mock disc is unstable or reacts abnormal phenomenon;Read/write control module is used to set up disk array and logical volume is initial
During change, thread simulated field io pressure is write and different using a dd reading thread and a dd while bad block is injected
Normal reconstruction stage, fixed Large Copacity file is changed to by the data source that dd writes thread, after the completion of this document write-in, by disk
Array capacity and reconstruct progress are calculated, three for being completed with Perfect Reconstruction before disk array reconstructs Large Copacity space, afterwards
Time point reads the test file of write-in by dd;The md5 values that test result output module is used to be controlled according in module comparison are defeated
Go out test result.
9. system according to claim 8, it is characterised in that Large Copacity file is that size is the file of 7G.
10. system according to claim 8, it is characterised in that dd reads thread and dd writes the read-write region of thread and setting
Bad block in the range of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710128628.3A CN106909484B (en) | 2017-03-06 | 2017-03-06 | System and method for simulating bad disk test in storage environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710128628.3A CN106909484B (en) | 2017-03-06 | 2017-03-06 | System and method for simulating bad disk test in storage environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106909484A true CN106909484A (en) | 2017-06-30 |
CN106909484B CN106909484B (en) | 2019-12-17 |
Family
ID=59186203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710128628.3A Active CN106909484B (en) | 2017-03-06 | 2017-03-06 | System and method for simulating bad disk test in storage environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106909484B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114356679A (en) * | 2022-03-18 | 2022-04-15 | 北京得瑞领新科技有限公司 | Method and device for setting bad block, storage medium and electronic equipment |
CN116701088A (en) * | 2023-06-28 | 2023-09-05 | 成都电科星拓科技有限公司 | Simulation method and system for EEPROM space content loss |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1595537A (en) * | 2004-07-13 | 2005-03-16 | 海信集团有限公司 | A system for simulating physical damage of NAND flash memory and method thereof |
CN101833493A (en) * | 2010-03-24 | 2010-09-15 | 浪潮电子信息产业股份有限公司 | Method for testing stability and reliability of server based on linux system |
CN102044278A (en) * | 2009-10-12 | 2011-05-04 | 英业达股份有限公司 | Method and device for simulating logic hard disk test by using bad sector log sheet |
CN104199748A (en) * | 2014-08-25 | 2014-12-10 | 浪潮电子信息产业股份有限公司 | Method for testing capacity of memory system in tolerating bad sector based on fault injection |
CN104360919A (en) * | 2014-10-24 | 2015-02-18 | 浪潮电子信息产业股份有限公司 | Method for automatically testing performance, function and stability of SSD |
-
2017
- 2017-03-06 CN CN201710128628.3A patent/CN106909484B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1595537A (en) * | 2004-07-13 | 2005-03-16 | 海信集团有限公司 | A system for simulating physical damage of NAND flash memory and method thereof |
CN102044278A (en) * | 2009-10-12 | 2011-05-04 | 英业达股份有限公司 | Method and device for simulating logic hard disk test by using bad sector log sheet |
CN101833493A (en) * | 2010-03-24 | 2010-09-15 | 浪潮电子信息产业股份有限公司 | Method for testing stability and reliability of server based on linux system |
CN104199748A (en) * | 2014-08-25 | 2014-12-10 | 浪潮电子信息产业股份有限公司 | Method for testing capacity of memory system in tolerating bad sector based on fault injection |
CN104360919A (en) * | 2014-10-24 | 2015-02-18 | 浪潮电子信息产业股份有限公司 | Method for automatically testing performance, function and stability of SSD |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114356679A (en) * | 2022-03-18 | 2022-04-15 | 北京得瑞领新科技有限公司 | Method and device for setting bad block, storage medium and electronic equipment |
CN116701088A (en) * | 2023-06-28 | 2023-09-05 | 成都电科星拓科技有限公司 | Simulation method and system for EEPROM space content loss |
CN116701088B (en) * | 2023-06-28 | 2024-02-27 | 成都电科星拓科技有限公司 | Simulation method and system for EEPROM space content loss |
Also Published As
Publication number | Publication date |
---|---|
CN106909484B (en) | 2019-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103473146B (en) | Memory control method, memory controller and electronic device | |
TWI488110B (en) | State machine engine and method for the same | |
US10120607B2 (en) | Method and apparatus for dense hyper IO digital retention | |
US20160320451A1 (en) | Simulation verification method for fpga function modules and system thereof | |
US10606482B2 (en) | Method and apparatus for dense hyper IO digital retention | |
TW201933110A (en) | Method and system for testing firmware of solid-state storage device, and electronic apparatus | |
CN112463074B (en) | Data classification storage method, system, terminal and storage medium | |
US8572436B2 (en) | Computing device and method for managing motherboard test | |
CN105892950A (en) | Disk array reconstruction method and disk array reconstruction system | |
CN108733326A (en) | A kind of disk processing method and processing device | |
CN106909484A (en) | A kind of system and method for the test of storage environment Imitating low-quality disk | |
CN114610542B (en) | Data recovery method and device, readable storage medium and electronic equipment | |
CN102789370B (en) | A kind of RAID array synchronous method and device | |
CN115587011A (en) | Method for managing debug log in storage device | |
CN107632779A (en) | Data processing method and device, server | |
CN109408301A (en) | Internal storage testing method based on 64 bit processor of Godson under a kind of PMON | |
CN110008175A (en) | A kind of distributed objects storage Snapshot Method, system, equipment and computer media | |
CN101833483A (en) | Embedded electronic device and data storage method | |
CN109584943B (en) | Method and device for evaluating storage medium | |
CN109460316A (en) | Data reconstruction method and system, storage medium based on temperature difference equilibrium | |
TWI401566B (en) | Raid information update method | |
CN101968754A (en) | Disk array reconstruction method | |
CN104915352A (en) | Method and device for verifying processed data accuracy under MapReduce environment | |
King et al. | Csi kernel: Finding a needle in a multiterabyte haystack | |
CN113868019B (en) | Data processing method and device and related equipment |
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 |
Effective date of registration: 20191113 Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: Suzhou Wave Intelligent Technology Co., Ltd. Address before: 450000 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. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |