CN101201778A - Method for testing hard disk with expandable firmware interface - Google Patents

Method for testing hard disk with expandable firmware interface Download PDF

Info

Publication number
CN101201778A
CN101201778A CNA2006101688033A CN200610168803A CN101201778A CN 101201778 A CN101201778 A CN 101201778A CN A2006101688033 A CNA2006101688033 A CN A2006101688033A CN 200610168803 A CN200610168803 A CN 200610168803A CN 101201778 A CN101201778 A CN 101201778A
Authority
CN
China
Prior art keywords
file
hard disk
nonsystematic
firmware interface
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2006101688033A
Other languages
Chinese (zh)
Inventor
王志
陈玄同
刘文涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CNA2006101688033A priority Critical patent/CN101201778A/en
Publication of CN101201778A publication Critical patent/CN101201778A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A hard disk test method under an extensible firmware interface (EFI) includes the following steps: the system files of the EFI of the hard disk are backuped to the storage area in a memory; the backup area of the system files is imaged to be a real hard disk; the storage area of a non-system file is set up in the memory, which is used for storing the non-system file in file area of hard disk test; the information of the system files and the non-system file of hard disk test are obtained, and a system file list and a non-system file list are generated sequentially; the tested non-system files of hard disk test are backuped to the storage area of the non-system file when the hard disk test is executed; the system file list and/or the non-system file list are/is accessed to load the system files and/or the non-system files of hard disk test directly from the storage area in the memory. The invention can not only accelerate the seed of the test, but also can protect the system from destruction, which can realize the comprehensive test on hard disk.

Description

Method for testing hard disk with expandable firmware interface
Technical field
The present invention relates to a kind of method for testing hard disk, the method for testing hard disk under particularly a kind of Extensible Firmware Interface (EFI) system running environment.
Background technology
Hard disk unit is the critical piece of computing machine, is of paramount importance device in the computer memory system, the effect that not only has recording data information, and its performance also has direct influence to whole performance of computer systems.Hard disk is as storage facilities, and whether it exists failure area is exactly the important indicator that shows its performance.Can storage area that therefore, the full test whole magnetic disk then be a problem demanding prompt solution of present technology.
At Extensible Firmware Interface (EFI; Extensible Firmware Interface) under the test environment of shell; when the storage area of hard disk is read and write; when reading the sector that some Extensible Firmware Interface system occupies; if being installed, the processing mode of ordinary file carries out direct read; then because Extensible Firmware Interface is not protected these system files, so the result can cause the collapse of total system.Therefore need protect the system file zone; like this then need because system itself is former thereby the system file of store being correlated with on hard disk; the system file that stores can occupy certain hard drive space; therefore when the storage area that these system files of test and other file occupy, be difficult to realize the full test of storage area.
Summary of the invention
In order to solve problem and the defective in the above-mentioned known technology, the object of the present invention is to provide a kind of method for testing hard disk with expandable firmware interface, can both protect the safety of computer system, can realize the full test of DISK to Image again.
For this reason, method for testing hard disk with expandable firmware interface provided by the present invention, it is applied in the extensible firmware interface environment, and comprises following steps: back up in system file to a storer of Extensible Firmware Interface (EFI) of a hard disk in the storage area; The backup zone of image system file is a concrete hard disk; In this storer, set up the storage area of a nonsystematic file, be used for depositing the nonsystematic file of the file area of hard disk test; Obtain the information of the nonsystematic file of system file and hard disk test, generate a system file chained list and a nonsystematic file chained list respectively; When carrying out hard disk test, the nonsystematic file of backup hard disk test is to nonsystematic document storage zone; And access system file chained list and/or nonsystematic file chained list, directly in the storage area of storer, to load the nonsystematic file of this system file and/or hard disk test.
In the described method for testing hard disk with expandable firmware interface, the step of this Extensible Firmware Interface system file of described backup also comprises following steps: obtain the size of this system file and store the path; Calculate the size that takes up space of this system file, to distribute the corresponding memory storage area; And deposit this system file to the storage area of this storer.
In the described method for testing hard disk with expandable firmware interface, when the nonsystematic file that reloads new hard disk test is to the nonsystematic document storage zone of this storer, comprise step according to this nonsystematic file chained list of information updating of this new nonsystematic file.
In the described method for testing hard disk with expandable firmware interface, also comprise step according to this nonsystematic document storage zone of file area size expansion of this hard disk test.
In the described method for testing hard disk with expandable firmware interface, also be included in this hard disk test back that finishes and recover this standby system file in this storer and/or this backup nonsystematic file step to this hard disk.
In the described method for testing hard disk with expandable firmware interface, also be included in the step that sets in advance a reservation storer in this nonsystematic document storage zone.
The nonsystematic file of the present invention required CONFIG.SYS and testing hard disk block correspondence during by the operation of backup Extensible Firmware Interface system is to memory area, and the chained list of setting up system file and nonsystematic file, then can directly from storer, load corresponding test file during test, avoid read-write operation hard disk.Therefore, the speed that the present invention not only can accelerate to test, also protection system is not damaged, and can realize the full test of hard disk simultaneously again.
Description of drawings
Fig. 1 is that hard disk stores synoptic diagram in the method for testing hard disk with expandable firmware interface of the present invention; And
Fig. 2, Fig. 3 and Fig. 4 are the method flow diagram of method for testing hard disk with expandable firmware interface of the present invention.
Wherein, description of reference numerals is as follows:
10 storeies
12 system file storage areas
14 nonsystematic document storage zones
16 nonsystematic files
18 reserve storer
20 hard disks
22 system files
24 nonsystematic files
Step 102 is obtained system file information, generation system file chained list
The space that step 104 computing system file occupies distribute the respective memory space, and the storage system file is to storer
The memory area of step 106 reflection storage system file is a system disk
Step 108 is set up nonsystematic document storage zone
Is step 110 judged whether hard disk has been tested and is finished?
Step 112 is obtained the nonsystematic fileinfo, generates nonsystematic file chained list
Step 114 is read in part nonsystematic file to nonsystematic document storage zone
The zone of having backed up on step 116 testing hard disk
Is there journal file in step 118 nonsystematic document storage zone?
Step 120 is set the storing memory zone of daily record part for writing
Step 122 operation test procedure
Does step 124 need to read the file in the hard disk?
File in step 126 hard disk backs up in storer
Step 128 loads required file in storer
Step 130 loads required file in hard disk
Does step 132 need journal file in the read-write memory?
Whether is this zone the writable area territory to step 134?
Whether has this zone reached the regional border of backup to step 136?
Whether has the zone reached system's permission maximal value to step 138?
Step 140 enlarges the backup zone
Step 142 writes log file contents and preserves
Whether has step 144 tested the hard disk areas of backup?
Step 146 continues the operation test procedure
Embodiment
About feature of the present invention and example, be described in detail as follows as most preferred embodiment in this conjunction with figs..
Please refer to Fig. 1 and Fig. 2 to Fig. 4, wherein Fig. 1 is that hard disk stores synoptic diagram in the method for testing hard disk with expandable firmware interface of the present invention, and Fig. 2 to Fig. 4 is the method flow diagram of method for testing hard disk with expandable firmware interface of the present invention.
Please refer to Fig. 2, at first obtain the system file of Extensible Firmware Interface system, with generation system file chained list (step 102).System file is defined as, when the Extensible Firmware Interface system moves, need set up the environment that the Extensible Firmware Interface program can be moved, comprise the driver of visiting various device, configuration file when system moves, necessary when these files are system's operation, can not damage to some extent, otherwise total system will be collapsed.Mention as background technology, under the test environment of Extensible Firmware Interface,, then can cause the collapse of system as if system file in the direct read hard disk owing to there be not the protection of existence to system file.Therefore, the present invention here protects these system files, and system file is backed up in the storer.When the standby system file, take file backup and case of non-partitioned backup, reducing the waste of backup space, and the difficulty when reducing file and recovering.
Obtain the relevant information of hard disk by the scanning hard disk, and then know the system file type that has on the hard disk, and the occupied area.According to these capture files size and store the path, form a file chained list and store separately information, and calculate the required storage space of store files with this.Then, distribute the respective memory space, with the storage system file to wherein (step 104).Please refer to embodiment shown in Figure 1, has a system file storage area 12 in the storer 10, the content full backup of the system file 22 in hard disk 20 is after the system file storage area 12 of storer, and the storer storage area 12 of image system file is concrete hard disk (step 106).After treating that system testing finishes, this partial content can be returned in the hard disk again.
For the nonsystematic file of hard disk test, then in storer, set up a nonsystematic document storage zone 14 (steps 108), in order to deposit the test nonsystematic file 16 that backs up in the storer.Nonsystematic file 24 is protected some system journals, aid and diagnostic routine etc. for the remaining paper outside the system file of removing the operation of Extensible Firmware Interface system.The nonsystematic file disperses to deposit in other subregion of hard disk, and it occupies than large space, if storage system file 22 is very difficult with nonsystematic file 24 to storer 10 simultaneously.Therefore mark off a part of storage space, promptly nonsystematic document storage zone 14 only just backs up to wherein when these files of needs test as the storage area of nonsystematic file 24.In addition,, can also in nonsystematic document storage zone 14, set in advance a part and reserve storer 18, the problem of insufficient space occur to prevent later visit for the storage of information after guaranteeing.
After the backup-step of finishing said system file and nonsystematic file, then can carry out the test of hard disk.Judge during test whether hard disk has tested finish (step 110), if then finish, otherwise, obtain the nonsystematic fileinfo of hard disk test block, and generate nonsystematic file chained list (step 112).This part nonsystematic file is read in to the nonsystematic document storage zone (step 114), and backed up to zone (step 116) in the storer on the testing hard disk.When test, can judge further in the nonsystematic document storage zone whether journal file (step 118) is arranged.If exist, the storing memory zone of then setting the daily record part is for can write (step 120); Otherwise, directly move test procedure (step 122).
Then, judge whether to read the file (step 124) in the hard disk, if need then further to judge whether to need in the hard disk file of test to back up in storer (step 126); Otherwise, advance to step 132.If file has backed up in storer, then in storer, load required file (step 128); Otherwise, in hard disk, load required file (step 130).When the file of pseudostatic ram,, can write down current storage situation by to being stored in the dynamic link table that forms when system file in the storer and non-file system conduct interviews.When certain file of visit, at first visit this system file chained list or nonsystematic file chained list, if file logging in above-mentioned chained list, shows that then this file is stored in the storer.Therefore, do not need during visit from hard disk, to read, but directly in storer, load this file, and then accelerated the speed of test.
In addition, in order to prevent that vital document has been carried out faulty operation, need protect, and then the backup zone of file is set at read only attribute these files.When carrying out the operation of backup content to storer,, at first judge and set whether write-protect of attribute in order to protect content measurement.If there is not respective limits just can carry out write operation to this zone.Simultaneously, cross the border, cause the recovery that hard disk can not be complete when test is finished, the decision operation zone whether to cross the border, and the storage space that breaks bounds is expanded in order to prevent operating area.For example, when journal file is stored, need to judge whether the journal file (step 132) in the read-write memory,, then advance to step 144 if do not need; Otherwise, judge then whether the storing memory zone of journal file is writable area territory (step 134).If can not write, then system reports an error and withdraws from and finish; If can write, journal file can increase along with the increase that writes content, needs when content increases therefore further to judge whether the daily record storage area has reached the border (step 136) in backup zone.If, judge then then whether the backup zone of nonsystematic file exceeds the maximal value (step 138) that system storage allows, if do not exceed the maximal value of storer, then (step 140) expanded in the backup zone of nonsystematic file.Storage expansion can adopt progressive mode, for example, in order to consider neither to waste system memory resources, can expand backup zone again well, and can set the storer that each expansion occupies is the 1M byte.In other words, in this case, after the backup field capacity of nonsystematic file increases the 1M byte, judge again whether the backup zone surpasses the maximal value of system storage.If exceed, reporting errors then; Otherwise, the 1M byte is expanded in nonsystematic file backup zone.
After expanding the backup zone, write log file contents and preserve (step 142).Whether the hard disk areas that needs in the test process to judge backup tests finish (step 144), if hard disk test finishes, then finishes.If test does not finish, then continue operation test procedure (step 146), and repeating step 122 is to step 144.Simultaneously, after the test of finishing the hard disk block areas, need reload new test file to the nonsystematic file backup zone of storer, and the file that backs up in the storer is reduced in the hard disk.And when loading new file, upgrade nonsystematic file chained list according to new fileinfo and write down these fileinfos.It is pointed out that journal file only is the embodiment of nonsystematic file in the above-mentioned steps, the present invention is not limited to the foregoing description, and the various nonsystematic files that comprise journal file are all carried out above-mentioned corresponding steps, carry out file protection and storage expansion.
Though the present invention discloses as above with aforesaid better embodiment, so it is not in order to limit the present invention.Those skilled in the art should recognize that change of being done and modification all belong within protection scope of the present invention under the situation of the scope and spirit of the present invention that do not break away from appending claims of the present invention and disclosed.Please refer to appending claims about the protection domain that the present invention defined.

Claims (6)

1. method for testing hard disk with expandable firmware interface, it is applied in the extensible firmware interface environment, and the method includes the steps of:
Back up in the storage area in system file to a storer of Extensible Firmware Interface of a hard disk;
The video backup zone of this system file is a concrete hard disk;
In this storer, set up the storage area of a nonsystematic file, be used for depositing the nonsystematic file of the file area of this hard disk test;
Obtain the information of the nonsystematic file of this system file and this hard disk test, generate a system file chained list and a nonsystematic file chained list respectively;
When carrying out this hard disk test, the nonsystematic file that backs up this hard disk test is to the storage area of this nonsystematic file; And
Visit this system file chained list and/or this nonsystematic file chained list, directly in the storage area of this storer, to load the nonsystematic file of this system file and/or this hard disk test.
2. method for testing hard disk with expandable firmware interface as claimed in claim 1, the step of this Extensible Firmware Interface system file of wherein said backup also comprises following steps:
Obtain the size of this system file and store the path;
Calculate the size that takes up space of this system file, to distribute the corresponding memory storage area; And
Deposit this system file to the storage area of this storer.
3. method for testing hard disk with expandable firmware interface as claimed in claim 1, wherein when the nonsystematic file that reloads new hard disk test is to the nonsystematic document storage zone of this storer, comprise step according to this nonsystematic file chained list of information updating of this new nonsystematic file.
4. method for testing hard disk with expandable firmware interface as claimed in claim 1 wherein also comprises according to the big or small step that expands the storage area of this nonsystematic file of the file area of this hard disk test.
5. method for testing hard disk with expandable firmware interface as claimed in claim 1 wherein also is included in this hard disk test back that finishes and recovers this standby system file in this storer and/or this backup nonsystematic file step to this hard disk.
6. method for testing hard disk with expandable firmware interface as claimed in claim 1 wherein also is included in and sets in advance a step of reserving storer in the storage area of this nonsystematic file.
CNA2006101688033A 2006-12-14 2006-12-14 Method for testing hard disk with expandable firmware interface Pending CN101201778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101688033A CN101201778A (en) 2006-12-14 2006-12-14 Method for testing hard disk with expandable firmware interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101688033A CN101201778A (en) 2006-12-14 2006-12-14 Method for testing hard disk with expandable firmware interface

Publications (1)

Publication Number Publication Date
CN101201778A true CN101201778A (en) 2008-06-18

Family

ID=39516953

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101688033A Pending CN101201778A (en) 2006-12-14 2006-12-14 Method for testing hard disk with expandable firmware interface

Country Status (1)

Country Link
CN (1) CN101201778A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024502A (en) * 2010-12-09 2011-04-20 福建星网锐捷网络有限公司 Flash device testing method and device as well as board and network equipment
CN102521093A (en) * 2011-12-31 2012-06-27 曙光信息产业股份有限公司 Internal memory management method and device
CN102999504A (en) * 2011-09-13 2013-03-27 鸿富锦精密工业(深圳)有限公司 Hard disk testing data analyzing method
CN110175054A (en) * 2019-04-26 2019-08-27 武汉虹信通信技术有限责任公司 A kind of automatic-calling method and system of system file

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024502A (en) * 2010-12-09 2011-04-20 福建星网锐捷网络有限公司 Flash device testing method and device as well as board and network equipment
CN102024502B (en) * 2010-12-09 2013-06-05 福建星网锐捷网络有限公司 Flash device testing method and device as well as board and network equipment
CN102999504A (en) * 2011-09-13 2013-03-27 鸿富锦精密工业(深圳)有限公司 Hard disk testing data analyzing method
CN102521093A (en) * 2011-12-31 2012-06-27 曙光信息产业股份有限公司 Internal memory management method and device
CN102521093B (en) * 2011-12-31 2014-02-26 曙光信息产业股份有限公司 Internal memory management method and device
CN110175054A (en) * 2019-04-26 2019-08-27 武汉虹信通信技术有限责任公司 A kind of automatic-calling method and system of system file

Similar Documents

Publication Publication Date Title
US7107486B2 (en) Restore method for backup
CN100530125C (en) Safety storage method for data
US20060282471A1 (en) Error checking file system metadata while the file system remains available
US6523141B1 (en) Method and apparatus for post-mortem kernel memory leak detection
JPH09274541A (en) Storage device, control method for the same, storage system and control method for the same
US20120198287A1 (en) File system error detection and recovery framework
CN101201778A (en) Method for testing hard disk with expandable firmware interface
JP2006277078A (en) Log information management device, method and program
US7617374B2 (en) Hard disk testing method under extensible firmware interface
US7506224B2 (en) Failure recovering method and recording apparatus
US7600151B2 (en) RAID capacity expansion interruption recovery handling method and system
KR20090094594A (en) Information storage medium recording data according to journaling file system, method and apparatus of writing/recovering data using journaling file system
US20100169572A1 (en) Data storage method, apparatus and system for interrupted write recovery
JP2010250372A (en) Trace data recording method and computer system
JP2005149248A (en) Metadata restoration system, method thereof, storage device and program therefor
US6229743B1 (en) Method of a reassign block processing time determination test for storage device
JP2006018705A (en) Memory access trace system and memory access trace method
CN112882867B (en) Index information storage method and device and storage equipment
CN112562774B (en) Storage device mounting method and device, computer device and storage medium
CN112784101B (en) Video data storage method and device and data storage equipment
US7096157B2 (en) Method and structure for diagnostically testing files in a computer
KR20190003091A (en) Device and method on file system journaling using atomic operation
CN112256475B (en) Fault memory recovery method, device, computer equipment and storage medium
CN101697285B (en) Method and system for debugging hardware of memory device
JPH07152495A (en) Recovery system for disk array device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication