CN105988891A - Magnetic disk data repairing method and device - Google Patents

Magnetic disk data repairing method and device Download PDF

Info

Publication number
CN105988891A
CN105988891A CN201510060560.0A CN201510060560A CN105988891A CN 105988891 A CN105988891 A CN 105988891A CN 201510060560 A CN201510060560 A CN 201510060560A CN 105988891 A CN105988891 A CN 105988891A
Authority
CN
China
Prior art keywords
disk
block
data
information
metadata information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510060560.0A
Other languages
Chinese (zh)
Other versions
CN105988891B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201510060560.0A priority Critical patent/CN105988891B/en
Publication of CN105988891A publication Critical patent/CN105988891A/en
Application granted granted Critical
Publication of CN105988891B publication Critical patent/CN105988891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a magnetic disk data repairing method and a magnetic disk data repairing device, and aims at repairing magnetic disc data if magnetic disc faults happen in a CQFS system. The magnetic disk data repairing method comprises the following steps: in the embodiment of the invention, when confirming that the CQFS system has a magnetic disc with faults, implementing quick format operation on the magnetic disc with faults, and confirming corresponding new meta data information on the basis of in-block description information of a data zone retained after quick format in the magnetic disc with faults, wherein the meta data information is used for describing basic information of a data block and corresponds to the in-block description information of the data block one to one; resetting a recycling time stamp in the new meta data information, and storing the new meta data information on the magnetic disc after quick format. Therefore, the invention provides a universal magnetic disc data repairing method for the CQFS system with magnetic disc faults, and after the magnetic disc is repaired, data in all undamaged data zones can be normally read, and can be further normally stored.

Description

A kind of data in magnetic disk restorative procedure and device
Technical field
The present invention relates to computer realm, particularly to a kind of data in magnetic disk restorative procedure and device.
Background technology
File system, can be because some emergency situations (as the situations such as power-off occur) be led during running Cause file system data is lost, traditional file system meeting configuration inspection instrument, is used for repairing file system number According to, such as, under Windows operating system, there are new technology file system and CHKDSK checking tool, Ext3 file system and a fsck.ext3 checking tool is had under linux operating system, and traditional file system Checking tool can repair partial document system data in some cases, but, once critical data district quilt Destroying, these instruments will be unable to repair file system data, thus causes whole file system data all to be lost Lose.
As a example by ext3 file system under linux operating system, in the file system occurring that emergency situations causes During system loss of data, fsck.ext3 checking tool is used to carry out data in magnetic disk inspection and reparation, in some situation Under, file system can be repaired;And in some cases, it may appear that the mistakes such as file system superblock damage, Cause utilizing fsck.ext3 checking tool that whole file system data is recovered.It addition, work as user When the maloperation of such as disk partition or formatting occurs, also cannot utilize fsck.ext3 checking tool number According to recovery.
In sum, there is data single point failure point in traditional file systems, once the data on this trouble point are sent out Raw abnormal, whole file system arises that globality fault, and traditional file systems checking tool also cannot be right Whole file system data recovers.Further, for round-robin queue's file system (Circular File System, CQFS) prior art also do not generates a kind of effective data in magnetic disk restorative procedure.
Summary of the invention
The embodiment of the present invention provides a kind of data in magnetic disk restorative procedure and device, deposits in order to solving in prior art Disk failure time the problem that cannot recover of the data that are not destroyed.
The concrete technical scheme that the embodiment of the present invention provides is as follows:
A kind of data in magnetic disk restorative procedure, including:
Determine time round-robin queue's file system CQFS exists failed disk, described failed disk is performed fast Speed format manipulation;
Describing information in the block of data field based on the described failed disk retained after quick formatting, it is right to determine The new metadata information answered, described metadata information is for describing the essential information of data block, with data block Block in description information one_to_one corresponding;
Reset the recovery time stamp in described new metadata information, described new metadata information is saved in On disk after quick formatting.
So, it is possible to provide data in magnetic disk restorative procedure general during a kind of CQFS system disk fault, at magnetic After dish reparation completes, all not destroyed Data Area data all can normally read, and just can proceed with Often storage.
It is preferred that farther include:
Before described failed disk is performed quick formatting operation, obtain from CQFS running log The original disk information of described failed disk, described original disk information at least includes: the disk before fault Path, disk UUID and be ultimately written Block ID.
It is preferred that after performing quick formatting operation, before determining new metadata information, further Including:
Disk UUID in the CQFS head of the disk after quick formatting is defined as described failed disk Disk UUID.
In such manner, it is possible to ensure that the disk that user identifies after repair terminates is same.
It is preferred that describe letter in the block of data field based on the described failed disk retained after quick formatting Breath, determines the new metadata information of correspondence, specifically includes:
By in the block of each data block in the data field of the described failed disk retained after quick formatting Description information is compared with corresponding new metadata information;
When the field in description information in the block of any one data block with in corresponding new metadata information Corresponding field inconsistent time, in the block according to described data block, information is described, by the newest metadata Information is updated.
It is preferred that the recovery time stamp reset in described new metadata information, specifically include:
In original disk information according to described failed disk, record is ultimately written Block ID, at quick lattice Disk after formula positions corresponding data block;
Recovery time in new metadata information corresponding for corresponding data block is stabbed and is set to zero;This Sample, can be updated to again write by the current location of corresponding data block original position during data;
Be set to the data block of zero based on recovery time stamp, successively by corresponding for other all data blocks described newly Metadata information recovery time stamp reset in order.
So, recovery spatial order can be made to meet original order.
A kind of data in magnetic disk prosthetic device, including:
Quick formatting unit, in time there is failed disk in determining CQFS, to described failed disk Execution quick formatting operates;
Metadata recovery unit, for data field based on the described failed disk retained after quick formatting Description information in block, determines the new metadata information of correspondence, and described metadata information is used for describing data block Essential information, describe information one_to_one corresponding in the block of data block, and reset described new metadata letter Recovery time stamp in breath;
Storage unit, the disk after described new metadata information is saved in quick formatting.
So, it is possible to provide data in magnetic disk restorative procedure general during a kind of CQFS system disk fault, at magnetic After dish reparation completes, all not destroyed Data Area data all can normally read, and just can proceed with Often storage.
It is preferred that farther include:
Acquiring unit, for, before described failed disk is performed quick formatting operation, transporting from CQFS The original disk information of the described failed disk obtained in row daily record, described original disk information at least includes: Disk path, disk UUID before fault and be ultimately written Block ID.
It is preferred that perform quick formatting operation after, before determining new metadata information, described soon Speed formatting unit is further used for:
Disk UUID in the CQFS head of the disk after quick formatting is defined as described failed disk Disk UUID.
In such manner, it is possible to ensure that the disk that user identifies after repair terminates is same.
It is preferred that describe letter in the block of the data field of the described failed disk retained after based on quick formatting Breath, when determining the new metadata information of correspondence, described metadata recovery unit specifically for:
By in the block of each data block in the data field of the described failed disk retained after quick formatting Description information is compared with corresponding new metadata information;
When the field in description information in the block of any one data block with in corresponding new metadata information Corresponding field inconsistent time, in the block according to described data block, information is described, by the newest metadata Information is updated.
During it is preferred that the recovery time in resetting described new metadata information stabs, described metadata is recovered Unit specifically for:
In original disk information according to described failed disk, record is ultimately written Block ID, at quick lattice Disk after formula positions corresponding data block;
Recovery time in new metadata information corresponding for corresponding data block is stabbed and is set to zero;This Sample, can be updated to again write by the current location of corresponding data block original position during data;
Be set to the data block of zero based on recovery time stamp, successively by corresponding for other all data blocks described newly Metadata information recovery time stamp reset in order.
So, recovery spatial order can be made to meet original order.
Accompanying drawing explanation
Fig. 1 is that in the embodiment of the present invention, data in magnetic disk repairs flow chart;
Fig. 2 is system construction drawing in the embodiment of the present invention.
Detailed description of the invention
In the embodiment of the present invention, based on CQFS file system, when occurring that Data Area data is destroyed, defeated Enter the disk path that failed disk is original, the globally unique identification strings (Universally that disk is original Unique Identifier, UUID) and it is ultimately written block ID, by failed disk again quick formatting, I.e. metadata is all eliminated, and will not there is the metadata that failed disk is original and depend in follow-up repair process Relying, therefore the data in magnetic disk restorative procedure of the embodiment of the present invention has versatility.After quick formatting, Perform complete disk consistency check, recover metadata from data field, and reset the recovery time of metadata Stamp, after metadata being deposited, completes disk repair process.This provides one and can repair CQFS system The generic diskette data recovery method of system disk failure, can protect not destroyed Data Area data, and Can proceed with normal storage.
In order to be better understood from this programme, below the structure of CQFS file system is described in detail.
One physical disk CQFS is divided into following region:
Table 1
Below the region in table 1 is illustrated:
CQFS Header in table 1 is used for describing CQFS version, disk UUID, data block quantity and The configuration informations such as data block size information;
The Block i.e. database information of Info Table in table 1 describes list, is used for storing metadata information, Such as table 2:
Table 2
Block Info Block Info Block Info
Data Area in table 1 is data field, is split the data block into formed objects, such as table 3:
Table 3
Block Data Block Data Block Data
The structure of each Block Data such as table 4 in table 3:
Table 4
Frame Data Area Index Description
Frame Data Area in table 4 is frame data region, and Index is the index information of data block, Description is the description information of data block.
The corresponding metadata information (i.e. Block Info) of each data block (i.e. Block Data) in table 3, Metadata information is database description structure, recites the essential information of respective data blocks, such as table 5:
Table 5
Block ID Stream ID Recycle TS Begin TS End TS Lock Count
Backup Area in table 1 is backup area, is backed up in three regions of other in table 1, as Table 6:
Table 6
In CQFS file system, CQFS Header size is fixed as 4KB;Block Info size is 32 bytes;Block Info Table size is data block quantity (i.e. block Num) and Block Info The product of structure size;Block Allocation Table size is fixed as 4000KB;Block Size is several In formal applied environment, 16MB all it is fixed as according to block size.
Seen from the above description, computing formula such as formula [1] institute of data block data amount (i.e. block Num) Show:
Block Num=(disk Size-2*header Size-2*block Allocation Table Size)/(2 * Block Info+block Size) 1 formula [1]
Wherein, disk Size refers to disk size, it is seen then that only it is to be understood that disk size, can calculate file The data block quantity of system, and extrapolate the size of Block Info Table further.
On the premise of calculating the size obtaining Block Info Table, by formula [2] computable number according to district Side-play amount (i.e. Data Area Offset), formula [2] is as follows:
Data area Offset=block Info Table Offset+block Info Table Size+block Allocation Table Size formula [2]
From formula [1] and formula [2], only it is to be understood that disk size, the skew of data field can be extrapolated Amount, further, can calculate this according to the reckoning result of Block ID and the side-play amount of data field Block deviation post on an entire disc, shown in specific formula for calculation such as formula [3]:
Disk Offset=data Area Offset+block ID*block Size formula [3]
Wherein, disk Offset is the disk skew of corresponding Block, and data Area Offset is data field Side-play amount (can be calculated by formula [2]), and block Size is that data block size is (in formal applied environment All it is fixed as 16MB), depending on order that block ID writes according to data block and position.
Can be exited by above formula, the skew of CQFS system regional and disk size and data block Size is relevant, and data block size is substantially fixing, therefore, only it is to be understood that disk size, so that it may calculate Go out the side-play amount of regional.It is to say, under CQFS system, at disk size and data block size not In the case of change, the file system structure that twice formatting of same disk is generated is on all four.By Format in each time and all can generate different disk UUID, the unit therefore twice formatting inserted For data, only disk UUID is different, and other data are duplicate.
Above-mentioned characteristic based on CQFS system, the embodiment of the present invention is for CQFS system disk accident design The universal method that a kind of data in magnetic disk is repaired, refering to shown in Fig. 1, concrete process is as follows:
Step 100: determine when there is failed disk in CQFS system, performs quick format to failed disk Change operation.
In the embodiment of the present invention, disk failures refers to that data are destroyed, and non-physical is destroyed, as long as Being that disk size is not changed in, either CQFS Header is destroyed, or CQFS is Block Info Table Destroyed, all can carry out data reparation by the method for embodiment of the present invention design, not broken after having repaired Bad data all can be recovered normally to use, and specifically used actual application scenarios at least includes following several:
1) CQFS disk is changed by Windows disk management tool initialization, the most former partition table.
2) CQFS disk is turned to new technology file system by quick format.
3) CQFS disk is turned to CQFS file system by quick format, and now file system is for changing, But meta-data region resets, user cannot read data.
4) CQFS disk is destroyed more than 16TB, 32-bit operating system.
When CQFS system disk breaks down, for the following operation of this failed disk execution:
First, the original disk information of the described failed disk obtained from CQFS running log, described former Beginning disc information at least includes: the disk path before fault, disk globally unique identifier character string UUID And it is ultimately written block ID.
Then, failed disk is performed quick formatting operation.
Specifically, during quick formatting, CQFS metadata information is reinitialized by system, And the district's data that do not clear data, i.e. can improve the speed of formatting, it is ensured that be formatted in the shortest time Complete, also protect user data simultaneously and be not eliminated, in order to be continuing with after the complete disk of follow-up reparation.
After to disk formatting, a new UUID can be generated in CQFS Header, therefore exist After having performed failed disk quick formatting operation, by former in CQFS Header (i.e. CQFS head) The disk UUID come inserts, and so, can make the CQFS head after quick formatting is that this failed disk is with former The holding come is consistent, it is possible to ensure that the disk that user identifies after repair terminates is same.
So far, the file system structure that the disk of the disk after quick formatting and initial format is generated It is on all four, and through inserting original disk UUID so that the data in magnetic disk after twice formatting Completely the same, and now, the metadata information of failed disk is eliminated.
Step 110: the metadata information of data field based on the failed disk retained after quick formatting, really Fixed corresponding new metadata information, this metadata information is for describing the essential information of data block, with data Description information one_to_one corresponding in the block of block.
Failed disk after quick formatting is performed complete disk consistency check, it is thus achieved that new metadata Information.
Specifically, by the block of each data block in the data field of the failed disk retained after quick formatting Interior description information is compared with corresponding new metadata information;
When describing the word in (i.e. Description) information in the block of any one data block (i.e. Block) When section is inconsistent with the corresponding field in corresponding new metadata information, according to describing letter in the block of data block Breath, is updated the newest metadata information.
As shown in table 4, owing to after quick formatting, the data of data field yet suffer from, therefore, each Block Data structure has Description information, and, the corresponding number of each data block information According to block metadata information (metadata information now is the most initialized), will describe in the block of a data block Information is compared with corresponding data block metadata information, if inconsistent, then retouches according in the block of data block Information of stating correspondingly writes the fast metadata information of data, it is thus achieved that the new metadata letter that each data block is corresponding Breath, and new metadata information is preserved.
Step 120: reset recovery time stamp (i.e. Recycle TS) in new metadata information, by new Metadata information is saved on the disk after quick formatting.
During recovery time stamp in resetting new metadata information, particularly as follows:
In original disk information according to failed disk, record is ultimately written block ID, after quick formatting Disk positions corresponding data block;
Recovery time in new metadata information corresponding for this corresponding data block is stabbed and is set to zero, should The current location of corresponding data block is updated to again write original position during data;
The data block of zero it is set to, successively by new unit corresponding for other all data blocks based on recovery time stamp The recovery time stamp of data message resets in order.
Specifically, from CQFS running log obtain this failed disk original be ultimately written block ID, base It is ultimately written, in this, the data block that block ID location failed disk is corresponding, this data block is examined in disk concordance Recovery time stamp in the new metadata information determined after looking into resets, so so that it is reclaim spatial order symbol Close original order, say, that, it is ensured that after having repaired disk, will not be by when re-writing data The data cover that originally disk is not destroyed, all can normally read, and can proceed video recording storage meter Drawing, the Video data recovery order of whole disk reclaims also according to the principle of first in first out.
Such as, whole disk is divided into 100 data blocks, and each data block is allocated a block and uniquely marks Know (i.e. Block ID), Block ID is respectively 0,1,2 ..., 99, initially carrying out disc format During change, the metadata information of each data block arranges a recovery time and stabs (such as the Recycle in table 5 TS), now this recovery time stamp is consistent with corresponding Block ID, i.e. the 0th to the 99th in order Individual data block recovery time stamp be respectively 0,1,2,3 ..., 99, when carrying out the write of data, Data block recycles, and from the 0th data BOB(beginning of block) distribution, often one data block of distribution is used for recording data Time, the recovery time in this data block metadata information is stabbed and is set to current maximum recovery time stamp Numerical value adds 1, such as, when recording data, from the 0th data block (i.e. Block ID is the data block of 0) Start write, then Block ID be 0 data block metadata information in recovery time stamp be set to current maximum Recovery time stamp (i.e. 99) add 1, be i.e. set to 100, by Block during the 1st data block write data ID is that the recovery time stamp in the data block metadata information of 1 is set to current maximum recovery time stamp (i.e. 100) add 1, be i.e. recorded as being 101 ..., it is assumed that the 30th is had been written into when disk failures (Block ID is 30) data block, the recovery during i.e. this Block ID is the data block metadata information of 30 Timestamp has been set to 130.
So, during disk is repaired, after quick formatting and disk consistency check, former The metadata begun is cleared, then the stamp of the recovery time in the 0th to the 99th data block metadata information quilt Again be designated as 0,1,2,3 ..., 99, in this case, when re-writing data, also will From the 0th data BOB(beginning of block) write, but before disk failures, recorded the number that Block ID is 30 According to block, it should proceed by this position and re-write, in order to avoid this inconsistent situation occurs, Recovery spatial order is made to meet original order, by the recovery in the new metadata information of these 100 data blocks Timestamp resets.
The process of concrete replacement is: according to being ultimately written block ID, by the 30th (i.e. Block ID is 30) In data block, the stamp of the recovery time in metadata information resets to 0, by the 31st metadata that data block is new letter Recovery time stamp in breath resets to 1, by that analogy, by returning in metadata information new for all data blocks Receiving timestamp all to reset, the recovery time stamp in the 29th metadata information that data block is new will reset It is 99.
So, when re-writing data, according to the instruction order of timestamp, will be from the 30th data block (recovery time stamp is 0) starts write, and is stabbed by the recovery time in the 30th data block metadata information It is set to 100, when continuing to write to data, will write from the 31st data block, and by the 31st data block Recovery time stamp in metadata information is set to 101.In this, recovery spatial order can be made to meet original Sequentially, the most not destroyed Data Area data all can normally read, and continues video recording storage simultaneously, can be normal Write
Finally, new metadata information is saved on the disk after quick formatting.So, according to renewal After metadata information can read all not destroyed data of the data field before fault, so far, disk is repaiied Multiple process is complete.
Based on above-described embodiment, refering to shown in Fig. 2, in the embodiment of the present invention, CQFS system includes quickly Formatting unit 200, metadata recovery unit 210 and storage unit 220, wherein:
Quick formatting unit 200, in time there is failed disk in determining CQFS, to failed disk Execution quick formatting operates;
Metadata recovery unit 210, for data field based on the failed disk retained after quick formatting Description information in block, determines the new metadata information of correspondence, and metadata information is for describing the base of data block Describe information one_to_one corresponding in this information, with the block of data block, and reset returning in new metadata information Receive timestamp;
Storage unit 220, the disk after new metadata information is saved in quick formatting.
So, it is possible to provide data in magnetic disk restorative procedure general during a kind of CQFS system disk fault, at magnetic After dish reparation completes, all not destroyed Data Area data all can normally read, and just can proceed with Often storage.
It is preferred that farther include:
Acquiring unit 230, for, before failed disk is performed quick formatting operation, transporting from CQFS The original disk information of the failed disk obtained in row daily record, original disk information at least includes: before fault Disk path, disk UUID and be ultimately written Block ID.
It is preferred that after performing quick formatting operation, before determining new metadata information, quick lattice Formula unit 200 is further used for:
Disk UUID in the CQFS head of the disk after quick formatting is defined as the disk of failed disk UUID。
In such manner, it is possible to ensure that the disk that user identifies after repair terminates is same.
It is preferred that describe information in the block of the data field of the failed disk retained after based on quick formatting, When determining the new metadata information of correspondence, metadata recovery unit 210 specifically for:
To describe in the block of each data block in the data field of the failed disk retained after quick formatting Information is compared with corresponding new metadata information;
When the field in description information in the block of any one data block with in corresponding new metadata information Corresponding field inconsistent time, according to describing information in the block of data block, by the newest metadata information It is updated.
During it is preferred that the recovery time in resetting new metadata information stabs, metadata recovery unit 210 Specifically for:
In original disk information according to failed disk, record is ultimately written Block ID, in quick formatting After disk in position corresponding data block;
Recovery time in new metadata information corresponding for corresponding data block is stabbed and is set to zero, so may be used The current location of corresponding data block is updated to again write original position during data;
The data block of zero it is set to, successively by new unit corresponding for other all data blocks based on recovery time stamp The recovery time stamp of data message resets in order.
So, recovery spatial order can be made to meet original order.
In sum, in the embodiment of the present invention, determine time CQFS system exists failed disk, to this event Barrier disk performs quick formatting operation, the block of data field based on the failed disk retained after quick formatting Interior description information, determines the new metadata information of correspondence, and this metadata information is for describing the base of data block Information one_to_one corresponding is described, when resetting the recovery in new metadata information in this information, with the block of data block Between stab, new metadata information is saved on the disk after quick formatting.So, it is possible to provide a kind of Data in magnetic disk restorative procedure general during CQFS system disk fault, after disk reparation completes, all not Destroyed Data Area data all can normally read, and can proceed with normal storage.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter Calculation machine program product.Therefore, the present invention can use complete hardware embodiment, complete software implementation or knot The form of the embodiment in terms of conjunction software and hardware.And, the present invention can use and wherein wrap one or more Computer-usable storage medium containing computer usable program code (include but not limited to disk memory, CD-ROM, optical memory etc.) form of the upper computer program implemented.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and / or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/ Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know base This creativeness concept, then can make other change and amendment to these embodiments.So, appended right is wanted Ask and be intended to be construed to include preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not take off Spirit and scope from the embodiment of the present invention.So, if these amendments of the embodiment of the present invention and modification belong to Within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention be also intended to comprise these change and Including modification.

Claims (10)

1. a data in magnetic disk restorative procedure, it is characterised in that including:
Determine time round-robin queue's file system CQFS exists failed disk, described failed disk is performed fast Speed format manipulation;
Describing information in the block of data field based on the described failed disk retained after quick formatting, it is right to determine The new metadata information answered, described metadata information is for describing the essential information of data block, with data block Block in description information one_to_one corresponding;
Reset the recovery time stamp in described new metadata information, described new metadata information is saved in On disk after quick formatting.
2. the method for claim 1, it is characterised in that farther include:
Before described failed disk is performed quick formatting operation, obtain from CQFS running log The original disk information of described failed disk, described original disk information at least includes: the disk before fault Path, disk globally unique identifier character string UUID and be ultimately written block and uniquely identify Block ID.
3. method as claimed in claim 2, it is characterised in that after performing quick formatting operation, Before determining new metadata information, farther include:
Disk UUID in the CQFS head of the disk after quick formatting is defined as described failed disk Disk UUID.
4. method as claimed in claim 2, it is characterised in that based on the institute retained after quick formatting Description information in the block of the data field stating failed disk, determines the new metadata information of correspondence, specifically includes:
By in the block of each data block in the data field of the described failed disk retained after quick formatting Description information is compared with corresponding new metadata information;
When the field in description information in the block of any one data block with in corresponding new metadata information Corresponding field inconsistent time, in the block according to described data block, information is described, by the newest metadata Information is updated.
5. the method as described in claim 2,3 or 4, it is characterised in that reset described new metadata Recovery time stamp in information, specifically includes:
In original disk information according to described failed disk, record is ultimately written Block ID, at quick lattice Disk after formula positions corresponding data block;
Recovery time in new metadata information corresponding for corresponding data block is stabbed and is set to zero;
Be set to the data block of zero based on recovery time stamp, successively by corresponding for other all data blocks described newly Metadata information recovery time stamp reset in order.
6. a data in magnetic disk prosthetic device, it is characterised in that including:
Quick formatting unit, in time there is failed disk in determining CQFS, to described failed disk Execution quick formatting operates;
Metadata recovery unit, for data field based on the described failed disk retained after quick formatting Description information in block, determines the new metadata information of correspondence, and described metadata information is used for describing data block Essential information, describe information one_to_one corresponding in the block of data block, and reset described new metadata letter Recovery time stamp in breath;
Storage unit, the disk after described new metadata information is saved in quick formatting.
7. device as claimed in claim 6, it is characterised in that farther include:
Acquiring unit, for, before described failed disk is performed quick formatting operation, transporting from CQFS The original disk information of the described failed disk obtained in row daily record, described original disk information at least includes: Disk path, disk UUID before fault and be ultimately written Block ID.
8. device as claimed in claim 7, it is characterised in that after performing quick formatting operation, Before determining new metadata information, described quick formatting unit is further used for:
Disk UUID in the CQFS head of the disk after quick formatting is defined as described failed disk Disk UUID.
9. device as claimed in claim 7, it is characterised in that retain after based on quick formatting Description information in the block of the data field of described failed disk, when determining the new metadata information of correspondence, described Metadata recovery unit specifically for:
By in the block of each data block in the data field of the described failed disk retained after quick formatting Description information is compared with corresponding new metadata information;
When the field in description information in the block of any one data block with in corresponding new metadata information Corresponding field inconsistent time, in the block according to described data block, information is described, by the newest metadata Information is updated.
10. the device as described in claim 7,8 or 9, it is characterised in that resetting described new unit In data message recovery time stamp time, described metadata recovery unit specifically for:
In original disk information according to described failed disk, record is ultimately written Block ID, at quick lattice Disk after formula positions corresponding data block;
Recovery time in new metadata information corresponding for corresponding data block is stabbed and is set to zero;
Be set to the data block of zero based on recovery time stamp, successively by corresponding for other all data blocks described newly Metadata information recovery time stamp reset in order.
CN201510060560.0A 2015-02-05 2015-02-05 A kind of data in magnetic disk restorative procedure and device Active CN105988891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510060560.0A CN105988891B (en) 2015-02-05 2015-02-05 A kind of data in magnetic disk restorative procedure and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510060560.0A CN105988891B (en) 2015-02-05 2015-02-05 A kind of data in magnetic disk restorative procedure and device

Publications (2)

Publication Number Publication Date
CN105988891A true CN105988891A (en) 2016-10-05
CN105988891B CN105988891B (en) 2019-02-12

Family

ID=57037423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510060560.0A Active CN105988891B (en) 2015-02-05 2015-02-05 A kind of data in magnetic disk restorative procedure and device

Country Status (1)

Country Link
CN (1) CN105988891B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991021A (en) * 2017-03-31 2017-07-28 联想(北京)有限公司 The method and system of new data file are built from available data file
CN110109773A (en) * 2019-04-11 2019-08-09 苏州浪潮智能科技有限公司 A kind of detection method and system of magnetic disk of virtual machine consistency

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517906A (en) * 2003-01-14 2004-08-04 联想(北京)有限公司 Document system and document management method
US20070038915A1 (en) * 2005-07-28 2007-02-15 Prostor Systems, Inc. Adaptive archival format
US7254677B1 (en) * 2004-05-04 2007-08-07 Xilinx, Inc. First-in, first-out memory system with reduced cycle latency
CN104090829A (en) * 2014-08-06 2014-10-08 浪潮电子信息产业股份有限公司 Method for realizing logical volume metadata backup storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517906A (en) * 2003-01-14 2004-08-04 联想(北京)有限公司 Document system and document management method
US7254677B1 (en) * 2004-05-04 2007-08-07 Xilinx, Inc. First-in, first-out memory system with reduced cycle latency
US20070038915A1 (en) * 2005-07-28 2007-02-15 Prostor Systems, Inc. Adaptive archival format
CN104090829A (en) * 2014-08-06 2014-10-08 浪潮电子信息产业股份有限公司 Method for realizing logical volume metadata backup storage

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991021A (en) * 2017-03-31 2017-07-28 联想(北京)有限公司 The method and system of new data file are built from available data file
CN106991021B (en) * 2017-03-31 2021-02-19 联想(北京)有限公司 Method and system for constructing new data file from existing data file
CN110109773A (en) * 2019-04-11 2019-08-09 苏州浪潮智能科技有限公司 A kind of detection method and system of magnetic disk of virtual machine consistency

Also Published As

Publication number Publication date
CN105988891B (en) 2019-02-12

Similar Documents

Publication Publication Date Title
CN106201338B (en) Date storage method and device
CN104199750B (en) A kind of file access pattern method and device of Linux system
US9542431B2 (en) Cyclic commit transaction protocol
US9183268B2 (en) Partition level backup and restore of a massively parallel processing database
CN106557266B (en) Method and apparatus for redundant array of independent disks RAID
CN101308471B (en) Method and device for data restoration
CN105205053A (en) Method and system for analyzing database incremental logs
CN106528071B (en) The choosing method and device of object code
CN108512726B (en) Data monitoring method and equipment
CN106919477B (en) Virtual disk analysis method and system
CN105022678A (en) Data backup method and apparatus for virtual machine
US8799716B2 (en) Heap dump occurrence detection
US8352439B1 (en) Database verification following database write
CN108009049B (en) MYISAM storage engine deleted record offline recovery method and storage medium
CN111367926A (en) Data processing method and device for distributed system
CN111125298A (en) Method, equipment and storage medium for reconstructing NTFS file directory tree
CN112088366A (en) Host-aware update write
CN105988891A (en) Magnetic disk data repairing method and device
CN106155838A (en) A kind of database back-up data restoration methods and device
CN106156076B (en) The method and system of data processing
CN105892954A (en) Data storage method and device based on multiple copies
CN108427675B (en) Method and equipment for constructing index
CN109542860B (en) Service data management method based on HDFS and terminal equipment
US8924773B1 (en) Reducing file system data unavailability window by adapting hierarchical recovery framework
CN102004761B (en) Data storage method and system

Legal Events

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