CN102495777B - Hard disc failure processing method and processing device - Google Patents

Hard disc failure processing method and processing device Download PDF

Info

Publication number
CN102495777B
CN102495777B CN201110415641.XA CN201110415641A CN102495777B CN 102495777 B CN102495777 B CN 102495777B CN 201110415641 A CN201110415641 A CN 201110415641A CN 102495777 B CN102495777 B CN 102495777B
Authority
CN
China
Prior art keywords
sector number
file system
fault sector
fault
sevtor address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110415641.XA
Other languages
Chinese (zh)
Other versions
CN102495777A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201110415641.XA priority Critical patent/CN102495777B/en
Publication of CN102495777A publication Critical patent/CN102495777A/en
Application granted granted Critical
Publication of CN102495777B publication Critical patent/CN102495777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a hard disc failure processing method. The hard disc failure processing method includes steps of acquiring a failure sector number of a hard disc with failure; acquiring a file system of the failure sector number according to the failure sector number and partition information of various file systems, and acquiring a sector address corresponding to the failure sector number according to the failure sector number and the file system of the failure sector number; determining a file corresponding to the failure sector number according to the sector address; and realizing failure processing for a failure sector according to the file. The invention further discloses a hard disc failure processing device. By the aid of the hard disc failure processing method and the hard disc failure processing device, the hardware sector of the hard disc can be directly mapped to the file system and the file, the hard disc failure processing method and the hard disc failure processing device bring convenience for processing the failure sector and restoring data, and accordingly failure processing and data restoration efficiency can be improved.

Description

Hard disc failure processing method and treating apparatus
Technical field
The present invention relates to network equipment maintenance technical field, particularly a kind of hard disc failure processing method and fault treating apparatus.
Background technology
Along with scientific and technical development, the capacity of single hard disk becomes increasing.In server field, the sector in single hard disk reaches 10 especially 9individual.Because hard disk comprises a large amount of sectors, make hard disk in use, the overall probability breaking down in sector increases.For hard disk, if break down in single sector, assert that primary fault has occurred hard disk.Traditional processing mode to sector fault is to replace DISK to Image.But adopt in this way, need the total data in synchronous hard disk, need artificial replacing and transportation hard disk simultaneously, thereby brought a large amount of manpower and materials wastes.
Summary of the invention
The present invention is intended at least solve one of technical matters existing in prior art.
For this reason, first object of the present invention is to propose a kind of hard disc failure processing method, the method can be directly from hard disk hardware sector map to file system and file, for fault sectors process and data are recovered to provide convenience, thereby can improve the efficiency that fault handling and data are recovered.Second object of the present invention is to propose a kind of hard disk failure treating apparatus.
For achieving the above object, the embodiment of first aspect present invention provides a kind of hard disc failure processing method, comprise the steps: to obtain the fault sector number that hard disk breaks down, wherein, in the partition table district of described hard disk, store partition table, in described partition table, store the partition information of each file system in described file system storage section; According to the partition information of described fault sector number and described each file system, obtain the file system under described fault sector number, and obtain sevtor address corresponding to described fault sector number according to the file system under described fault sector number and described fault sector number; According to described sevtor address, determine file corresponding to described fault sector number; And according to described file, fault handling is carried out in the sector of breaking down.
According to the hard disc failure processing method of the embodiment of the present invention, file system and file under can finding by the sector number of hard disk, when break down in the sector of hard disk, can realize the timely location to sector respective file, thereby can improve the efficiency that fault is got rid of and data are recovered.
The embodiment of second aspect present invention provides a kind of hard disk failure treating apparatus, comprise: sector fault detection module, for detection of the fault sector number breaking down, wherein, in the partition table district of described hard disk, store partition table, in described partition table, store the partition information of each file system in described file system storage section; Sevtor address acquisition module, for obtain the file system under described fault sector number according to the partition information of described fault sector number and described each file system, and obtain sevtor address corresponding to described fault sector number according to the file system under described fault sector number and described fault sector number; File system locating module, for determining file corresponding to described fault sector number according to described sevtor address; And fault processing module, for to fault handling being carried out in the sector of breaking down according to described file.
According to the hard disk failure treating apparatus of the embodiment of the present invention, file system and file under can finding by the sector number of hard disk, when break down in the sector of hard disk, can realize the timely location to sector respective file, thereby can improve the efficiency that fault is got rid of and data are recovered.
Additional aspect of the present invention and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or additional aspect of the present invention and advantage accompanying drawing below combination obviously and is easily understood becoming the description of embodiment, wherein:
Fig. 1 is the process flow diagram of hard disc failure processing method according to an embodiment of the invention;
Fig. 2 is the hard disk logical partitioning schematic diagram according to the embodiment of the present invention;
Fig. 3 is the fdisk schematic diagram according to the embodiment of the present invention;
Fig. 4 is the process flow diagram of hard disc failure processing method in accordance with another embodiment of the present invention;
Fig. 5 is according to the schematic diagram of the hard disk failure treating apparatus of the embodiment of the present invention;
Fig. 6 is according to the schematic diagram of the sevtor address acquisition module of the embodiment of the present invention; And
Fig. 7 is according to the schematic diagram of the file system locating module of the embodiment of the present invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.
With reference to description and accompanying drawing below, these and other aspects of embodiments of the invention will be known.These describe and accompanying drawing in, specifically disclose some specific implementations in embodiments of the invention, represent to implement some modes of the principle of embodiments of the invention, still should be appreciated that the scope of embodiments of the invention is not limited.On the contrary, embodiments of the invention comprise spirit and all changes within the scope of intension, modification and the equivalent that falls into additional claims.
Below with reference to Fig. 1 to Fig. 4, describe according to the hard disc failure processing method of the embodiment of the present invention.
As shown in Figure 1, the hard disc failure processing method that the embodiment of the present invention provides, comprises the steps:
Step S101, obtains the fault sector number breaking down.
As shown in Figure 2, hard disk logic can be divided into boot section, partition table district and file system storage section.Wherein, file system storage section can comprise a plurality of file system, for example: file system 1, file system 2, file system 3....... file system N.Wherein, the size of each file system is not fixed, and can be 1T~8T.
The length of boot section is fixed, and stores guidance information in boot section.The partition information of each file system store file system memory in partition table district in.In one embodiment of the invention, the number of subregion that records He Wei file system storage section in boot section in hard disk in partition table is, the reference position of each subregion and end position.
When hard disk is carried out to subregion, first skip boot section, in partition table district, search the partition table of hard disk.Then, this partition table is read in internal memory, according to partition table, subregion is carried out in the boot section of hard disk and file system storage section.According to the partition table reading, hard disk is increased to sector auxiliary information.Fig. 3 is the schematic diagram of fdisk.Boot section is divided into 4 sectors, is respectively 1~sector, sector 4.Partition table zoning is divided into 4 sectors, is respectively 5~sector, sector 8.File system 1 is divided into 12 sectors, is respectively 9~sector, sector 20.File system 2 is divided into 12 sectors, is respectively 21~sector, sector 32.File system 3 is divided into 12 sectors, is respectively 33~sector, sector 44.File system N is divided into 20 sectors, is respectively 45~sector, sector 64.In example of the present invention, each sector can comprise 512 bytes.
It should be noted that, above-mentioned is only for exemplary purposes to the dividing mode of the boot section of hard disk, partition table district and file system storage section, rather than in order to limit the present invention.Be understandable that, according to the big or small difference of hard disk and file system, boot section, partition table district and file system storage section can also be the sector of other quantity.
The hard disk that the volume of take is 3TB as 3.5 cun, capacity is example, and this hard disk comprises 3*1024*1024*1024*1024 byte altogether.Wherein, each sector comprises 512 bytes, thereby this hard disk comprises 3*1024*1024*1024*2 sector altogether, is about 6*10 9individual sector.From Fig. 3, can find out, each sector all belongs to a file system, and sector number and the file system of sector have corresponding relation.
When a sector being detected and break down, detect while there is bad sector in hard disk, obtain the fault sector number of the sector of breaking down.
Step S102, according to the file system under the partition information acquisition fault sector number of fault sector number and each file system, and obtains sevtor address corresponding to fault sector number according to the file system under fault sector number and fault sector number.
The partition information of each file system obtaining according to step S101 obtains the partition information of each file system.Then according to the fault sector number obtaining in step S102 and the partition information of each file system, the file system under looking up the fault sector number.For example: when fault sector number is 13, according to the partition information of each file system, can know that fault sector number belongs to file system 1.Then, obtain the filesystem information table of the affiliated file system of this fault sector number.Corresponding piece and the block message of file system under obtaining according to this document system message list.Wherein, block message comprises the capacity (blocksize) of piece.For example, blocksize can be 1K or 4K.
Table 2 is the data partition signal of EXT paper series system.
Wherein, each file system forms by one to a plurality of, and each piece group is relatively independent, all possesses piece group descriptor separately.The first row Super Block in table 2 is superblock, and wherein, superblock information is unique to whole file system, and in file system, has a plurality of backups.The second row and the third line Group Descriptor (GDT) are piece group descriptor.Fourth line is bitmap block, and for each piece group, by bitmap block, whether bitmap block is used for description block (block).Fifth line is inode bitmap.The 6th behavior index node inode, wherein, index node inode stores the sevtor address of the sector of fileinfo and directory information and file system.The bad data block of the 7th behavior.
Particularly, according to fault sector number, determine in affiliated file system corresponding piece, and according to the calculation of capacity sevtor address of fault sector number and corresponding piece.
Sevtor address=int (capacity of sector number * 100* sector-size/piece),
Wherein, int is bracket function.
Take sector number as 44, and sector-size is that 512 bytes, blocksize are that 1K is example,
Sevtor address=int (12300*512/1*1024)
Step S104, determines according to sevtor address the file that fault sector number is corresponding.
According to sevtor address corresponding to fault sector number, travel through the index node inode in the filesystem information table of each file system.Wherein, index node inode has independently structure and bitmap.In index node inode, store the sevtor address of all sectors under fileinfo, directory information and affiliated file system.Therefore, by the sevtor address having calculated, travel through all index node inode, can find the index node inode corresponding to sevtor address of fault sector number.
Owing to storing fileinfo and directory information in index node, after the index node inode finding under fault sector number, and then can recursive lookup to file corresponding to index node inode.Particularly, obtain the fullpath of index node inode, according to this fullpath, search the file under inode, and then find the catalogue under this document.
For example: index node inode fullpath is /tmp/s0/t.txt, wherein, t.txt is index node inode, and s0 is filename, and tmp is catalogue.According to the fullpath of index node inode, by recursive lookup mode, can find index node inode affiliated file and catalogue, thereby can obtain the file under fault sector number.
Step S105, carries out fault handling according to file to the sector of breaking down.
After the file finding under index node inode, can reach the object of the sector of fault being carried out to fault handling by this document is processed, the failure problems that is about to sector is converted to the failure problems of file.
Below with reference to Fig. 4, the hard disc failure processing method of the embodiment of the present invention is described in detail.As shown in Figure 4,
Step S401, obtains the sector number of fault sector.
When being broken down by sector, obtain the fault sector number breaking down.
Step S402, reads partition information.
Read partition table to obtain partition information, wherein in partition table, record the number of subregion of He Wei file system storage section in boot section in hard disk, the reference position of each subregion and end position.
Step S403, judges whether subregion of file system, if so, performs step S404, otherwise execution step S409.
According to partition information, judge whether subregion completes file system.
Step S404, file reading system message list.
According to the partition information of fault sector number and each file system, the file system under looking up the fault sector number.Obtain the filesystem information table of the affiliated file system of this fault sector number.
Step S405, obtains the capacity of corresponding of fault sector number.
Corresponding piece and the block message of file system under obtaining according to this document system message list.Wherein, block message comprises the capacity (blocksize) of piece.
Step S406, calculates the sevtor address of fault sector.
According to fault sector number, determine in affiliated file system corresponding piece, and according to the calculation of capacity sevtor address of fault sector number and corresponding piece.
Sevtor address=int (capacity of sector number * 100* sector-size/piece),
Wherein, int is bracket function.
Step S407, travels through the index node inode of each file system.
According to sevtor address corresponding to fault sector number, travel through the index node inode in the filesystem information table of each file system.In index node inode, store the sevtor address of all sectors under fileinfo, directory information and affiliated file system.By the sevtor address having calculated, travel through all index node inode, can find the index node inode corresponding to sevtor address of fault sector number.
Step S408, recalls access until root directory.
After the index node inode finding under fault sector number, obtain the fullpath of index node inode, according to this fullpath, search the file under inode, and then find the catalogue under this document.
Step S409, output information.
In output step S408, obtain affiliated fileinfo and the directory information of fault sector number.Thereby, can, by this document is processed, reach the object of the sector of fault being carried out to fault handling.
According to the hard disc failure processing method of the embodiment of the present invention, can arrive affiliated file system and file by the sector number reverse find of hard disk, a kind of directly mapping mode from hard disk hardware sector to operating system logical device and blocks of files is provided.When break down in the sector of hard disk, can realize the timely location to sector respective file, thereby the problem of DISK to Image can be converted into the problem of Single document, improve the efficiency that fault is got rid of and data are recovered.
Below with reference to Fig. 5 to Fig. 8, describe according to the hard disk failure treating apparatus 500 of the embodiment of the present invention.
As shown in Figure 5, the hard disk failure treating apparatus 500 that the embodiment of the present invention provides comprises: sector fault detection module 510, sevtor address acquisition module 520, file system locating module 530 and fault processing module 540.Wherein, sector fault detection module 510 is for detection of the fault sector number breaking down.Wherein, the partition table of the partition table district of hard disk storage stores the partition information of each file system in file system storage section.Sevtor address acquisition module 520 is for obtaining file system and sevtor address corresponding to fault sector number under fault sector number according to the partition information of fault sector number and each file system.File system locating module 530 is for determining the file that fault sector number is corresponding according to sevtor address.Fault processing module 540 is for carrying out fault handling according to file to the sector of breaking down.
Particularly, hard disk logic can be divided into boot section, partition table district and file system storage section.Wherein, file system storage section can comprise a plurality of file system, for example: file system 1, file system 2, file system 3....... file system N.Wherein, the size of each file system is not fixed, and can be 1T~8T.
The length of boot section is fixed, and stores guidance information in boot section.The partition information of each file system store file system memory in partition table district in.In one embodiment of the invention, the number of subregion that records He Wei file system storage section in boot section in hard disk in partition table is, the reference position of each subregion and end position.
When hard disk is carried out to subregion, first skip boot section, in partition table district, search the partition table of hard disk.Then, this partition table is read in internal memory, according to partition table, subregion is carried out in the boot section of hard disk and file system storage section.According to the partition table reading, hard disk is increased to sector auxiliary information.In example of the present invention, each sector can comprise 512 bytes.Each sector all belongs to a file system, and sector number and the file system of sector have corresponding relation.
It should be noted that, above-mentioned is only for exemplary purposes to the dividing mode of the boot section of hard disk, partition table district and file system storage section, rather than in order to limit the present invention.Be understandable that, according to the big or small difference of hard disk and file system, boot section, partition table district and file system storage section can also be the sector of other quantity.
When sector fault detection module 510 detects a sector and breaks down, detect while there is bad sector in hard disk, obtain the fault sector number of the sector of breaking down.
As shown in Figure 6, sevtor address acquisition module 520 further comprises information acquisition unit 521 and sevtor address computing unit 522.Wherein, information acquisition unit 521 is for search the file system under described fault sector number according to the partition information of described fault sector number and described each file system, and obtains the filesystem information table of the file system under described fault sector number.Information acquisition unit 521 obtains the partition information of each file system according to the partition information of each file system, then according to the partition information of fault sector number and each file system, and the file system under looking up the fault sector number.For example: when fault sector number is 13, information acquisition unit 521, according to the partition information of each file system, can know that fault sector number belongs to file system 1.Then, information acquisition unit 521 is obtained the filesystem information table of the file system under this fault sector number, corresponding piece and the block message of file system under obtaining according to this document system message list.Wherein, block message comprises the capacity (blocksize) of piece.For example, blocksize can be 1K or 4K.
Sevtor address computing unit 522 is for obtaining sevtor address corresponding to fault sector number according to fault sector number and corresponding piece and the block message of file system.Wherein, sevtor address computing unit 522 is determined corresponding of fault sector number and corresponding data capacity according to fault sector number, and according to the sevtor address corresponding to calculation of capacity fault sector number of fault sector number and corresponding piece.
Sevtor address=int (capacity of sector number * 100* sector-size/piece),
Wherein, int is bracket function.
As shown in Figure 7, file system locating module 530 comprises traversal unit 531, searches unit 532 and positioning unit 533.Wherein, traversal unit 531 is for traveling through the index node inode of the filesystem information table of each file system according to sevtor address corresponding to fault sector number.Index node inode has independently structure and bitmap.In index node inode, store the sevtor address of all sectors under fileinfo, directory information and affiliated file system.
Owing to storing fileinfo and directory information in index node, search unit 532 and travel through all index node inode by the sevtor address having calculated, can find the index node inode corresponding to sevtor address of fault sector number.
After the index node inode finding under fault sector number, positioning unit 533 and then can be according to the index node inode recursive lookup under fault sector number to file corresponding to index node inode.Particularly, obtain the fullpath of index node inode, according to this fullpath, search the file under inode, and then find the catalogue under this document.
For example: index node inode fullpath is /tmp/s0/t.txt, wherein, t.txt is index node inode, and s0 is filename, and tmp is catalogue.According to the fullpath of index node inode, by recursive lookup mode, can find index node inode affiliated file and catalogue, thereby can obtain the file under fault sector number.
Fault processing module 540, after the file finding under index node inode, can reach the object of the sector of fault being carried out to fault handling by this document is processed, and the failure problems that is about to sector is converted to the failure problems of file.
According to the hard disk failure treating apparatus of the embodiment of the present invention, can arrive affiliated file system and file by the sector number reverse find of hard disk, a kind of directly mapping mode from hard disk hardware sector to operating system logical device and blocks of files is provided.When break down in the sector of hard disk, can realize the timely location to sector respective file, thereby the problem of DISK to Image can be converted into the problem of Single document, improve the efficiency that fault is got rid of and data are recovered.
In process flow diagram or any process of otherwise describing at this or method describe and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of the step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
The logic and/or the step that in process flow diagram, represent or otherwise describe at this, for example, can be considered to for realizing the sequencing list of the executable instruction of logic function, may be embodied in any computer-readable medium, for instruction execution system, device or equipment (as computer based system, comprise that the system of processor or other can and carry out the system of instruction from instruction execution system, device or equipment instruction fetch), use, or use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can comprise, storage, communication, propagation or transmission procedure be for instruction execution system, device or equipment or the device that uses in conjunction with these instruction execution systems, device or equipment.The example more specifically of computer-readable medium (non-exhaustive list) comprises following: the electrical connection section (electronic installation) with one or more wirings, portable computer diskette box (magnetic device), random access memory (RAM), ROM (read-only memory) (ROM), the erasable ROM (read-only memory) (EPROM or flash memory) of editing, fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other the suitable medium that can print described program thereon, because can be for example by paper or other media be carried out to optical scanning, then edit, decipher or process in electronics mode and obtain described program with other suitable methods if desired, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, a plurality of steps or method can realize with being stored in storer and by software or the firmware of suitable instruction execution system execution.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: have for data-signal being realized to the discrete logic of the logic gates of logic function, the special IC with suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is to come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, this program, when carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, can be also that the independent physics of unit exists, and also can be integrated in a module two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.If described integrated module usings that the form of software function module realizes and during as production marketing independently or use, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And the specific features of description, structure, material or feature can be with suitable mode combinations in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is by claims and be equal to and limit.

Claims (8)

1. a hard disc failure processing method, is characterized in that, comprises the following steps:
Obtain the fault sector number that hard disk breaks down, wherein, in the partition table district of described hard disk, store partition table, in described partition table, store the partition information of each file system in file system storage section;
According to the partition information of described fault sector number and described each file system, obtain the file system under described fault sector number, wherein, according to the partition information of described fault sector number and described each file system, search the file system under described fault sector number, and obtain the filesystem information table of the file system under described fault sector number, and obtain sevtor address corresponding to described fault sector number according to the file system under described fault sector number and described fault sector number, wherein, according to described filesystem information table, obtain piece corresponding to described file system and block message, and obtain sevtor address corresponding to described fault sector number according to described fault sector number and corresponding piece and the block message of described file system,
According to described sevtor address, determine file corresponding to described fault sector number; And
According to described file, fault handling is carried out in the sector of breaking down.
2. hard disc failure processing method as claimed in claim 1, is characterized in that, describedly according to fault sector number and piece corresponding to each file system and block message, obtains sevtor address corresponding to fault sector number and further comprises:
According to fault sector number, determine corresponding of described fault sector number;
According to sevtor address corresponding to fault sector number described in the calculation of capacity of corresponding of described fault sector number and described fault sector number.
3. hard disc failure processing method as claimed in claim 1, is characterized in that, describedly according to described sevtor address, determines file corresponding to described fault sector number, further comprises:
According to the index node inode in the filesystem information table of described each file system of sevtor address traversal corresponding to described fault sector number, wherein, the sevtor address of all sectors of file system under storing in described index node inode;
Search the affiliated index node inode of described sevtor address;
According to the index node inode under described sevtor address, search file corresponding to described index node inode.
4. hard disc failure processing method as claimed in claim 1, is characterized in that, by described hard disk partition, is boot section, partition table district and file system storage section, further comprises:
Described partition table is read in to internal memory, and according to described partition table, described boot section and described file system storage section are divided.
5. a hard disk failure treating apparatus, is characterized in that, comprising:
Sector fault detection module, the fault sector number breaking down for obtaining hard disk, wherein, stores partition table in the partition table district of described hard disk, stores the partition information of each file system in file system storage section in described partition table;
Sevtor address acquisition module, for obtain the file system under described fault sector number according to the partition information of described fault sector number and described each file system, and obtain sevtor address corresponding to described fault sector number according to the file system under described fault sector number and described fault sector number, wherein, described sevtor address acquisition module further comprises: information acquisition unit, for search the file system under described fault sector number according to the partition information of described fault sector number and described each file system, and obtain the filesystem information table of the file system under described fault sector number, sevtor address computing unit, for obtaining piece corresponding to described file system and block message according to described filesystem information table, and obtain sevtor address corresponding to described fault sector number according to described fault sector number and corresponding piece and the block message of described file system,
File system locating module, for determining file corresponding to described fault sector number according to described sevtor address; And
Fault processing module, for to carrying out fault handling according to described file to the sector of breaking down.
6. hard disk failure treating apparatus as claimed in claim 5, is characterized in that, described partition table comprises the number of partitions of described hard disk, the reference position of each subregion and end position.
7. hard disk failure treating apparatus as claimed in claim 5, it is characterized in that, described sevtor address computing unit is determined corresponding of described fault sector number and described corresponding data capacity according to described fault sector number, and according to sevtor address corresponding to fault sector number described in the calculation of capacity of the piece of described fault sector number and described correspondence.
8. hard disk failure treating apparatus as claimed in claim 5, is characterized in that, described file system locating module further comprises:
Traversal unit, for travel through the index node inode of the filesystem information table of described each file system according to sevtor address corresponding to described fault sector number, wherein, in described index node inode, store the sevtor address of all sectors of affiliated file system;
Search unit, for searching the index node inode under described sevtor address;
Positioning unit, for according to the index node inode under described sevtor address, searches file corresponding to described index node inode.
CN201110415641.XA 2011-12-13 2011-12-13 Hard disc failure processing method and processing device Active CN102495777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110415641.XA CN102495777B (en) 2011-12-13 2011-12-13 Hard disc failure processing method and processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110415641.XA CN102495777B (en) 2011-12-13 2011-12-13 Hard disc failure processing method and processing device

Publications (2)

Publication Number Publication Date
CN102495777A CN102495777A (en) 2012-06-13
CN102495777B true CN102495777B (en) 2014-10-22

Family

ID=46187603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110415641.XA Active CN102495777B (en) 2011-12-13 2011-12-13 Hard disc failure processing method and processing device

Country Status (1)

Country Link
CN (1) CN102495777B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318960B (en) * 2014-09-15 2018-06-05 华为数字技术(成都)有限公司 The restorative procedure and device of a kind of bad track of hard disk
CN104794027B (en) * 2015-04-30 2017-12-08 四川效率源信息安全技术股份有限公司 A kind of restorative procedure of parameter identification mistake
CN105242985B (en) * 2015-09-09 2018-05-25 华为技术有限公司 Data recovery method and device
CN108182126B (en) * 2018-01-02 2020-11-20 联想(北京)有限公司 Hard disk processing method and electronic equipment
CN109298979B (en) * 2018-08-17 2022-08-12 新华三技术有限公司成都分公司 Hard disk fault processing method and device
CN111274070B (en) * 2019-11-04 2021-10-15 华为技术有限公司 Hard disk detection method and device and electronic equipment
CN112115002B (en) * 2020-09-21 2024-04-02 武汉轻工大学 Method and device for recovering file from damaged or untrusted mechanical hard disk
CN112800005B (en) * 2021-01-22 2023-01-03 中孚安全技术有限公司 Deep inspection method, system, terminal and storage medium for file system
CN112817975A (en) * 2021-01-25 2021-05-18 惠州Tcl移动通信有限公司 Method and system for setting physical memory and mobile terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173291B1 (en) * 1997-09-26 2001-01-09 Powerquest Corporation Method and apparatus for recovering data from damaged or corrupted file storage media
CN1661568A (en) * 2004-02-24 2005-08-31 中国科学院声学研究所 File system in device of recording and playing back sounds and images under embedded type environment
CN101772757A (en) * 2007-08-21 2010-07-07 汤姆逊许可公司 Method and system for repairing damaged hard disk file systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173291B1 (en) * 1997-09-26 2001-01-09 Powerquest Corporation Method and apparatus for recovering data from damaged or corrupted file storage media
CN1661568A (en) * 2004-02-24 2005-08-31 中国科学院声学研究所 File system in device of recording and playing back sounds and images under embedded type environment
CN101772757A (en) * 2007-08-21 2010-07-07 汤姆逊许可公司 Method and system for repairing damaged hard disk file systems

Also Published As

Publication number Publication date
CN102495777A (en) 2012-06-13

Similar Documents

Publication Publication Date Title
CN102495777B (en) Hard disc failure processing method and processing device
CN103229173B (en) Metadata management method and system
US9043540B2 (en) Systems and methods for tracking block ownership
CN106951375B (en) Method and device for deleting snapshot volume in storage system
CN111506251B (en) Data processing method and device, SMR storage system and storage medium
KR100856245B1 (en) File system device and method for saving and seeking file thereof
CN105677826A (en) Resource management method for massive unstructured data
KR20140026821A (en) Method and apparatus for recovering partition using backup boot record
JP2016535380A (en) Data storage management paged for forward only
AU2005304759A2 (en) Dynamically expandable and contractible fault-tolerant storage system permitting variously sized storage devices and method
CN104484427B (en) A kind of video file storage device and method
CN108399050B (en) Data processing method and device
CN106326292A (en) Data structure and file aggregation and reading methods and apparatuses
CN109614054B (en) data reading method and system
CN105830041A (en) Metadata recovery method and apparatus
CN110147203B (en) File management method and device, electronic equipment and storage medium
CN103745007A (en) File managing method and device
CN110765076A (en) Data storage method and device, electronic equipment and storage medium
US11409720B2 (en) Metadata reduction in a distributed storage system
CN109189724B (en) Method and device for improving audio and video data storage efficiency of video monitoring system
CN104318960B (en) The restorative procedure and device of a kind of bad track of hard disk
CN108984102B (en) Method, system and computer program product for managing a storage system
CN103473157A (en) Processing method and processing device for hard disk failure
CN101303667A (en) Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster
CN104391735A (en) Method and system for scheduling virtual machines in virtualized all-in-one machine cluster

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant