CN106708665A - Metadata restoration method and device - Google Patents
Metadata restoration method and device Download PDFInfo
- Publication number
- CN106708665A CN106708665A CN201611186668.5A CN201611186668A CN106708665A CN 106708665 A CN106708665 A CN 106708665A CN 201611186668 A CN201611186668 A CN 201611186668A CN 106708665 A CN106708665 A CN 106708665A
- Authority
- CN
- China
- Prior art keywords
- metadata
- trees
- layout information
- node
- hard disk
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
Abstract
The invention discloses a metadata restoration method. The metadata restoration method is applied in storage equipment which comprises a processor and a hard disk, wherein the hard disk comprises logic unit which is provided with metadata; layout information of the metadata is stored in the hard disk; an address of the layout information stored in the hard disk is a source address; when a part of the metadata of the logic unit is damaged, the processor backs up the layout information of the metadata to a target address so as to generate a copy of the layout information, restores the metadata and then verifies whether the restored metadata is correct or not; if the restored metadata is incorrect, the processor writes the copy of the layout information into the source address; and if the restoration of the metadata is unsuccessful, the metadata can be returned to the state before the restoration.
Description
Technical field
The present embodiments relate to technical field of memory, particularly a kind of metadata restorative procedure and device.
Background technology
At present, the common problem that storage device faces be metadata species is more, quantity is big.Metadata is once damaged, meeting
Causing mass data cannot access, and cause user data loss.Generally, can be to damaging when metadata is damaged
Metadata carries out former address reparation, and it is a kind of destructive modification mode that former address is repaired, once there is any exception in repair process
(such as array control unit reset, resource bid less than), whole repair process is irreversible, it is impossible to return to reparation before state.
The content of the invention
The application provide a kind of metadata restorative procedure and device, can metadata repair it is unsuccessful in the case of,
Metadata is return back to preprosthetic state.
The application first aspect is applied in storage device there is provided a kind of metadata restorative procedure the method, and the storage sets
It is standby to include processor and hard disk.Hard disk includes logic unit, and logic unit has metadata.The metadata is preserved in the hard disk
Layout information, it is source address that layout information is stored in address in the hard disk.Part in the metadata of the logic unit
When metadata is damaged, the layout information of the metadata is backed up to destination address to generate the pair of the layout information by processor
This.Then, processor is repaired to the metadata, and verifies whether the metadata after repairing is correct.If the result is
Incorrect, the copy of layout information is write the source address by processor again.
The layout information of the metadata first was backed up to destination address to generate by the application before metadata is repaired
The copy of the layout information.Then, then to the metadata repair, even if the metadata repaired out is incorrect, also may be used
The source address is re-write with by the copy of the layout information, the metadata is return back to preprosthetic state.
With reference in a first aspect, in the first realization of first aspect, the storage device also includes memory.The memory
Middle to preserve active B+ trees, each node of source B+ trees is assigned a meta data block in the hard disk.Protected in the meta data block
There are the subset of the metadata or the index of the metadata.The layout information of the metadata includes the root node of the source B+ trees
Mark.
With reference to the first realization of first aspect, in being realized at second of first aspect, the reparation to the metadata can
To include:Layout information to being preserved in the source address is modified;Repair the metadata being damaged;According to amended
Layout information, the metadata not being damaged and the metadata repaired out create target B+ trees.
With reference to second realization of first aspect, in the third realization of first aspect, the method also includes being the mesh
Each node for marking B+ trees distributes meta data block in the hard disk, and the meta data block of target B+ trees is damaged for preserving this
Bad metadata, the metadata repaired out, the index of the metadata not being damaged and the metadata repaired out
Index, meta data block and the meta data block of each node of source B+ trees of each node of target B+ trees are differed.This is
In order to avoid the metadata of target B+ trees covers the meta data block of source B+ trees.
With reference to the third realization of first aspect, in being realized at the 4th kind of first aspect, its verification mode can be connect
Receive read data request.Read data request includes the logical address of data to be read.Then, interpretation whether according to the logical address with
And the metadata repaired out recorded in the meta data block of target B+ trees reads data to be read.
With reference to any one realization in second to the 4th kind of first aspect, in the 5th kind of realization of first aspect
In, processor can also delete target B+ trees, and discharge the target after the copy of layout information is write into the source address
The meta data block of each node of B+ trees.Because after the copy of layout information writes the source ground, target B+ trees are without presence
It is necessary, the meta data block for being deleted and discharging each of which node can save memory space.
The application second aspect provides a kind of metadata prosthetic device, and the metadata for performing first method offer is repaiied
Compound method.
The various implementations of the application second aspect, the implementation with first aspect is similar.
The application third aspect provides a kind of storage device, and the storage device includes processor and hard disk, the place
Reason device is used to perform the metadata restorative procedure of first aspect offer.
The application fourth aspect provides a kind of storage device, and the storage device includes processor, memory and hard disk,
The processor calls the program in the memory to perform the metadata restorative procedure that first aspect is provided.
Present invention also provides a kind of computer program product, including the computer-readable storage medium for storing program code
Matter, the instruction that described program code includes can be performed by the storage device of the above-mentioned third aspect or fourth aspect, and for holding
At least one method of the above-mentioned first aspect of row.
The one of the above computer program product that the present patent application is provided, before the metadata being return back into reparation
State.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be attached to what is used needed for embodiment
Figure is briefly described.
Fig. 1 is the composition figure of storage device provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of B+ trees provided in an embodiment of the present invention;
Fig. 3 is storage location schematic diagram of the B+ trees provided in an embodiment of the present invention in Logical Disk;
Fig. 4 is the schematic flow sheet of metadata restorative procedure provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of backup B+ trees provided in an embodiment of the present invention;
Fig. 6 is the structural representation of metadata prosthetic device provided in an embodiment of the present invention.
Specific embodiment
A kind of metadata restorative procedure and device are the embodiment of the invention provides, can be retracted in metadata repairing failure
To preprosthetic state.
Fig. 1 depicts the composition figure of storage device provided in an embodiment of the present invention.Storage device 10 can include current skill
Any computing device known to art, such as server, desktop computer, storage array.Storage device 10 mainly includes treatment
Device (English:Processor) 118, memory (English:Memory) 122, communication bus 126 and communication interface (English:
communication interface)128.Processor 118, memory 122 and communication interface 128 pass through communication bus 126
Complete mutual communication.
Communication interface 128, for being communicated with hard disk 31.
Memory 122, for storage program 124, memory 122 may include high-speed RAM memory, it is also possible to also include
Nonvolatile memory (English:Non-volatile memory), for example, at least one harddisk memory.It is understood that
Memory 122 can be random access memory (English:Random access memory, RAM), magnetic disc, hard disk, solid state hard disc
(English:Solid state disk, SSD).
Program 124 can include program code, and described program code includes file system and other program codes.
Processor 118 is probably a central processor CPU.In embodiments of the present invention, processor 118 can be used for connecing
Receive the various requests from main frame, such as read data request, write data requests etc..
Metadata be describe data data, including data attribute information, the address of such as data, the length of data
Deng.In actual applications, the amount of physical memory of hard disk 31 is virtualized into several Logical Disks.Each Logical Disk has unique
Mark, for example number.Metadata and data are generally stored inside the different zones of Logical Disk.For convenience, by Logical Disk
The region of middle storage metadata is referred to as meta-data region, and the region of data storage in Logical Disk is referred to as into data field.In addition, metadata
The least unit (for example, block) that the least unit (for example, block) of area's storage metadata preserves data with data field may be consistent,
May be inconsistent, for example metadata writes meta-data region in units of 4KB, that is to say, that the size of the block of meta-data region is 4KB.
Data write data field in units of 8KB, and the size of the block of data field is 8KB.In the present embodiment, the block of Preservation Metadata is claimed
It is meta data block, the block for preserving data is referred to as data block.
When storage device 10 receives write data requests, the data to be written that write data requests are carried write data field,
And metadata is generated, metadata is write into meta-data region.For example, storage device 10 receives a write data requests, it is described to write
Request of data include data d1 to be written (referred to as data d1), and the data d1 logical address.The logical address
Including LUN (English:Logic unit number, LUN) 0, LBA (English:logic block
Address, LBA) a1 and length (English:length)8KB.Wherein, LUN represents that storage device 10 is presented to user
Logic unit numbering, logic unit 0 represent numbering be 0 logic unit.LBA represents the data to be written
Positioned at the original position of the logic unit.Length represents the size of the data to be written.Storage device 10 receives described writing
After request of data by the data d1 write Logical Disk 1 in, and d1 be located at Logical Disk 1 position be b1.Storage device 10
Re-record the metadata of data d1.Mark (1) and the data d1 of the metadata including the Logical Disk where data d1
The corresponding relation between logical address positioned at the position (b1) of Logical Disk with the data d1.
The present embodiment uses B+ tree Preservation Metadatas, and metadata is generally also comprising some Back ground Informations, and (referred to as layout is believed
Breath), mark and institutional framework of such as metadata etc..Institutional framework is B+ trees.Layout information includes the root node of B+ trees
The node total number that mark and B+ trees include.Fig. 2 is the schematic diagram of B+ trees, as shown in Fig. 2 each node has unique node
Mark, the mark of such as node 0 is " 0 ", and the mark of node 1 is " 1 ".Node 0 is the root node of the B+ trees.Root node is described
The entrance of B+ trees, have recorded the information such as each node (node 1, node 2, the address of node 3) indicated by node 0.Node 1,
Node 2, node 3 are the intermediate nodes of the B+ trees, and intermediate node is used to preserve the index for pointing to leaf node.For example, node 1 is used
In the address for preserving each node (node 4 and node 5) pointed by node 1.Node 4, node 5, node 6, node 7 and node
8 is the leaf node of the B+ trees, for Preservation Metadata.Exemplary, it is assumed that node 7 preserves the metadata of data d1.
In order to ensure the reliability of metadata, it is generally the case that the information of each nodes records can be stored in B+ trees
In hard disk 31.Fig. 3 shows storage location of the corresponding B+ trees of LUN 0 in Logical Disk.As shown in figure 3, the letter of the record of node 0
Breath is stored in the 0th meta data block of Logical Disk 0,2nd meta data block of the information Store that node 3 is recorded in Logical Disk 0
In, the information Store of the record of node 4 is in the 3rd meta data block of Logical Disk 0.The information Store of the record of node 1 is in Logical Disk 1
The 0th meta data block in, node 7 record information Store in the 1st meta data block of Logical Disk 1.The letter of the record of node 8
Breath is stored in the 0th meta data block of Logical Disk 2,2nd meta data block of the information Store that node 2 is recorded in Logical Disk 2
In.The information Store of the record of node 5 is in the 1st meta data block of Logical Disk 3.The information Store of the record of node 6 is in Logical Disk 4
The 0th meta data block in.
When storage device 10 receives read data request, the read data request includes the logical address of data to be read.
In order to make it easy to understand, assuming that data to be read here are previously described data d1.The logical address of so data d1 includes
LUN LUN 0, LBA a1 and length 8KB.Storage device 10 inquires about the layout information of LUN 0 first, so that
The root node for knowing the B+ trees of LUN 0 is node 0, and storage device 10 finds node 3 along node 0, then finds node by node 3
7, the final metadata for obtaining data d1.According to the metadata, the data of 8KB are read out from the position b1 of Logical Disk 1.
For layout information, it is generally the case that can be stored in memory 122, in order to rapidly be believed using layout
Breath query metadata.In addition, in order to prevent layout information from losing, can also preserve a as backup in hard disk 31.Layout letter
Breath would generally write relatively fixed position in hard disk 31, and storage device 10 also can directly from described when read data request is received
Fixed position acquisition layout information, so as to obtain the metadata of data to be read.In the present embodiment, layout information is located at hard disk
Position in 31 is referred to as the source address of layout information.Exemplary, layout information is written into the of the meta-data region of Logical Disk 0
0 block.
When metadata is damaged, it is necessary to be repaired to metadata.By taking data d1 described above as an example, it is assumed that section
Point 7 is damaged, then the information of the record of node 7 will be non-readable, so as to cause data d1 to lose.If changed using covering
Mode repair metadata, storage device 10 recalculates the information recorded in egress 7, and the information is write into logic
In 1st block of the meta-data region of disk 1, it is used to cover the original information for preserving in described piece.Due to the information for recalculating
It is the original information for preserving in direct overlay node 7, therefore, once there are abnormal conditions in repair process, protected originally in node 7
The information deposited also lost.If likewise, the information errors for recalculating, the original information for preserving is also wrong in node 7
Information can be caused to cover by mistake.
A kind of metadata restorative procedure is the embodiment of the invention provides, even if occurring during reparation abnormal, it is also possible to
It return back to preprosthetic state.The method be can apply in the scene shown in Fig. 1, and processor 118 as shown in Figure 1 is performed.
As shown in figure 4, the method is comprised the following steps:
Step 101, the layout information of backup metadata.
The present embodiment illustrates the recovery process of metadata so that the metadata of LUN 0 is damaged as an example.The B+ trees of LUN 0
It is stored in memory 122.The layout information of the metadata includes the mark of the root node of the B+ trees.Therefore, as long as obtaining
The layout information of the metadata of LUN 0 was obtained, it is possible to find the entrance of the B+ trees of LUN 0, so as to obtain first number of LUN 0
According to.
Storage device 10 is read from the source address (the 0th block of the meta-data region of Logical Disk 0) of previously described hard disk 31
The layout information is taken, the layout information is replicated to obtain the copy of the layout information, by the copy of the layout information
In one meta data block of free time of write-in.The idle meta data block is located at the meta-data region of any one Logical Disk.It is described
The address of the meta data block in space is referred to as destination address.Under normal circumstances, each Logical Disk has a bitmap, bitmap
" position " is used to represent the distribution condition of each block that the Logical Disk is included.For example, " 1 " represents that the block is allocated
Block, " 0 " represents that the block is the block being not previously allocated, that is, idle block.Storage device 10 can be according to the bitmap of Logical Disk
A meta data block being not previously allocated is searched, during the copy of the layout information write into the meta data block.
Step 102, repairs to metadata.
In order to not influence the B+ trees of LUN 0, and keep the mark of each node of the B+ trees and the metadata of distribution
Corresponding relation between block.The present embodiment creates the backup B+ trees of the B+ trees, and metadata is carried out using the backup B+ trees
Repair.
First, the layout information for being preserved in 118 pairs of source addresses of processor is modified, in amended layout information
The mark of the root node for including is different from the mark of the root node included described in the layout information before modification.For example, repairing
The root node included described in layout information after changing is designated " 10 ", then node 10 is exactly the root node for backing up B+ trees.
Secondly, processor 118 is scanned to the meta-data region of each Logical Disk, identifies the leaf of the B+ trees of LUN 0
Node, and the leaf node that will identify that inserts the backup B+ trees.When first number of all leaf nodes of the B+ trees of LUN 0
According to after being read out and being written into the backup B+ trees, the backup B+ trees just are created out.It should be noted that described
The mark of each node of backup B+ trees is reallocated, the mark of each node with the mark of the node of B+ trees not
Together.As shown in figure 5, node 10 is the root node of backup B+ trees.In addition to root node, the mark of remaining each node is also and B+
The mark of each node of tree is different.In addition, during the backup B+ trees are created, processor 118 is also needed in logic
The meta-data region of disk is that each node of the backup B+ trees redistributes meta data block, and will scan the information write-in for obtaining
In the meta data block of distribution.Specifically, processor 118 can be according to each that the bitmap of each Logical Disk is the backup B+ trees
One unassigned meta data block of node checks.
Then, processor 118 repairs the information of the leaf node record being damaged in backup B+ trees, the letter that will be repaired out
Breath is written as in the meta data block of the distribution of the leaf node being damaged.Entered by the meta-data region to each Logical Disk
Row scanning, processor 118 can identify that the node 7 of B+ trees is damaged.So for backup B+ trees, node 17 is recorded
Information be not scanned.Therefore, processor 118 utilizes the back mapping information of the data described by the metadata
Or data integrity field (the English of the data:Data integrity field, DIF) recover leaf node 17
Information, the information for recovering is written as in the meta data block that leaf node 17 is distributed, and leaf node 17 is inserted into institute
State backup B+ trees.The information for recovering includes the metadata of data d1.
Step 103, the metadata to repairing out is verified.
Its verification mode is that main frame sends read data request to storage device 10, and the read data request includes data
The logical address of d1, the logical address includes LUN LUN 0, LBA a1 and length 8KB.Processor 118
Receive after the read data request, the layout information of the metadata of LUN 0 is inquired about first from the source address, so as to know
The root node of the B+ trees of LUN 0 is node 10.Processor 118 finds node 13 along node 10, then finds node by node 13
17.If the metadata that storage device 10 can not be recorded according to node 17 obtains data d1, authentication failed performs step
104.The reason for authentication failed be the metadata and B+ trees for recovering leaf node 7 be damaged before record metadata not
It is identical.If the result of step 103 is successfully, step 105 is performed.
Step 104, the source address is write by the copy of the layout information.
After the copy of the layout information is write the source address by processor 118, read data request is received next time
When, the B+ trees of the LUN 0 that processor 118 finds are still the B+ trees that root node is node 0.Due to each section of the B+ trees
Corresponding relation between the mark of point and the meta data block of distribution is still present, so processor 118 can be looked into by root node 0
Find the metadata of LUN 0.
In addition, processor 118 can delete the backup B+ trees, and it is released to each node point of the backup B+ trees
The meta data block matched somebody with somebody.
Step 105, deletes the B+ trees, and be released to the meta data block of each node distribution of the B+ trees.
The layout information of the metadata was first backed up to destination address with life by the present embodiment before being repaired to metadata
Into the copy of the layout information.Then, then to the metadata repair, even if the metadata repaired out is incorrect,
The copy of the layout information can be re-write the source address, the metadata is return back to preprosthetic state.
The embodiment of the present invention additionally provides a kind of metadata prosthetic device, and described device is located in storage device, described to deposit
Storage equipment also includes hard disk, and the hard disk includes logic unit, and the logic unit has metadata, preserved in the hard disk
The layout information of the metadata, the address that the layout information is stored in the hard disk is source address.Fig. 6 is that metadata is repaiied
The structural representation of apparatus for coating, described device includes:
Backup module 701, for when the part metadata in the metadata of the logic unit is damaged, by described in
The layout information of metadata backs up to destination address to generate the copy of the layout information;
Repair module 702, for being repaired to the metadata;
Authentication module 703, it is whether correct for verifying the metadata after the reparation;
Writing module 704, for when the metadata after the reparation is incorrect, the copy of the layout information being write
The source address.
The concrete function of above-mentioned modules may be referred to the description of the step 101- steps 103 shown in Fig. 4, here no longer
Repeat.
Optionally, the storage device also includes memory, and active B+ trees are preserved in the memory, the source B+ trees
Each node is assigned a meta data block in the hard disk, preserved in the meta data block metadata subset or
The index of metadata described in person, the layout information of the metadata includes the mark of the root node of the source B+ trees.
Optionally, repair module 702 to the layout information preserved in the source address specifically for modifying;Repair institute
State the metadata being damaged;According to the amended layout information, the metadata not being damaged and described repair out
Metadata create target B+ trees.
Optionally, described device also includes distribute module 705.Distribute module 705, for each for the target B+ trees
Node distributes meta data block in the hard disk, and the meta data block of the target B+ trees is used to preserve the unit not being damaged
Data, the metadata repaired out, the index of the metadata not being damaged and the metadata repaired out
Index, the meta data block of each node of the target B+ trees is differed with the meta data block of each node of the source B+ trees.
Optionally, authentication module 703 includes data to be read specifically for receiving read data request, the read data request
Logical address;Judging whether can be according to record in the meta data block of the logical address and the target B+ trees
The metadata repaired out reads data to be read.
Optionally, writing module 704, are additionally operable to after the copy by the layout information writes the source address
The target B+ trees are deleted, and discharges the meta data block of each node of the target B+ trees.
It will be recognized by those of ordinary skill in the art that the possibility implementation of various aspects of the invention or various aspects
System, method or computer program product can be embodied as.Therefore, each aspect of the present invention or various aspects
Possible implementation can using complete hardware embodiment, complete software embodiment (including firmware, resident software etc.), or
The form of the embodiment of integration software and hardware aspect, collectively referred to herein as " circuit ", " module " or " system ".Additionally,
The possibility implementation of each aspect of the present invention or various aspects can be in the form of computer program product, computer journey
Sequence product refers to computer readable program code of the storage in computer-readable medium.
Computer-readable medium including but not limited to electronics, magnetic, optics, electromagnetism, infrared or semiconductor system, equipment or
Person's device, or foregoing any appropriately combined, such as random access storage device (RAM), read-only storage (ROM), it is erasable can
Program read-only memory (EPROM), CD.
Processor in computer reads computer readable program code of the storage in computer-readable medium so that place
Reason device is able to carry out function action specified in the combination of each step or each step in flow charts.
Computer readable program code can perform completely on the computer of user, partly hold on the computer of user
Row, as single software kit, partly on the computer of user and part on the remote computer, or completely long-range
Performed on computer or server.It is also noted that in some alternate embodiments, each step or frame in flow charts
Each piece of function of indicating may not be occurred by the order indicated in figure in figure.For example, depending on involved function, show in succession
Two steps or two blocks for going out may actually be executed substantially concurrently, or these blocks sometimes may be by with opposite suitable
Sequence is performed.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Unit and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.The common skill in this area
Art personnel can realize described function to each specific application using distinct methods, but this realization should not be recognized
For beyond the scope of this invention.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, ability
Domain those of ordinary skill the invention discloses technical scope in, change or replacement can be readily occurred in, should all cover in the present invention
Protection domain within.Therefore, protection scope of the present invention described should be defined by scope of the claims.
Claims (12)
1. a kind of metadata restorative procedure, it is characterised in that methods described is applied in storage device, and the storage device includes
Processor and hard disk, the hard disk include logic unit, and the logic unit has metadata, preserve described in the hard disk
The layout information of metadata, the address that the layout information is stored in the hard disk is source address, and methods described is by processor
Perform, including:
When the part metadata in the metadata of the logic unit is damaged, the layout information of the metadata is backed up
To destination address generating the copy of the layout information;
The metadata is repaired;
Verify whether the metadata after the reparation is correct;
When the metadata after the reparation is incorrect, the copy of the layout information is write into the source address.
2. method according to claim 1, it is characterised in that the storage device also includes memory, the memory
Middle to preserve active B+ trees, each node of the source B+ trees is assigned a meta data block, the metadata in the hard disk
The subset of the metadata or the index of the metadata are preserved in block, the layout information of the metadata includes the source
The mark of the root node of B+ trees.
3. method according to claim 2, it is characterised in that described reparation is carried out to the metadata to include:
Layout information to being preserved in the source address is modified;
The metadata being damaged described in repairing;
Target is created according to the amended layout information, the metadata not being damaged and the metadata repaired out
B+ trees.
4. method according to claim 3, it is characterised in that also include:
For each node of the target B+ trees distributes meta data block in the hard disk, the meta data block of the target B+ trees is used
In the metadata, the metadata repaired out, the index of the metadata not being damaged that are not damaged described in preservation
And the index of the metadata repaired out, the meta data block of each node of the target B+ trees is every with the source B+ trees
The meta data block of individual node is differed.
5. method according to claim 4, it is characterised in that whether the metadata after the checking reparation correctly wraps
Include:
Read data request is received, the read data request includes the logical address of data to be read;
Judge whether to be repaired out according to the described of record in the meta data block of the logical address and the target B+ trees
Metadata read data to be read.
6. according to any described methods of claim 3-5, it is characterised in that write in the copy by the layout information
Also include after the source address:
Delete the target B+ trees;
Discharge the meta data block of each node of the target B+ trees.
7. a kind of metadata prosthetic device, it is characterised in that described device is located in storage device, and the storage device also includes
Hard disk, the hard disk includes logic unit, and the logic unit has metadata, the metadata is preserved in the hard disk
Layout information, the address that the layout information is stored in the hard disk is source address, and described device includes:
Backup module, for when the part metadata in the metadata of the logic unit is damaged, by the metadata
Layout information destination address is backed up to generate the copy of the layout information;
Repair module, for being repaired to the metadata;
Authentication module, it is whether correct for verifying the metadata after the reparation;
Writing module, for when the metadata after the reparation is incorrect, the copy of the layout information being write into the source
Address.
8. device according to claim 7, it is characterised in that the storage device also includes memory, the memory
Middle to preserve active B+ trees, each node of the source B+ trees is assigned a meta data block, the metadata in the hard disk
The subset of the metadata or the index of the metadata are preserved in block, the layout information of the metadata includes the source
The mark of the root node of B+ trees.
9. device according to claim 8, it is characterised in that
The repair module, specifically for being modified to the layout information preserved in the source address;Repair described damage
Bad metadata;According to the amended layout information, the metadata not being damaged and the metadata repaired out
Create target B+ trees.
10. device according to claim 9, it is characterised in that described device also includes distribute module;
The distribute module, meta data block, the mesh are distributed for each node for the target B+ trees in the hard disk
Mark the meta data block of B+ trees be used to preserving described in be not damaged metadata, the metadata repaired out, described do not occur
The index of the index of the metadata of damage and the metadata repaired out, the metadata of each node of the target B+ trees
Block is differed with the meta data block of each node of the source B+ trees.
11. devices according to claim 10, it is characterised in that
The authentication module, specifically for receiving read data request, the read data request includes data to be read logically
Location;Judge whether described to be repaired out according to what is recorded in the meta data block of the logical address and the target B+ trees
Metadata reads data to be read.
12. according to any described devices of claim 9-11, it is characterised in that
Said write module, is additionally operable to delete the mesh after the copy by the layout information writes the source address
Mark B+ trees, and discharge the meta data block of each node of the target B+ trees.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611186668.5A CN106708665A (en) | 2016-12-20 | 2016-12-20 | Metadata restoration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611186668.5A CN106708665A (en) | 2016-12-20 | 2016-12-20 | Metadata restoration method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106708665A true CN106708665A (en) | 2017-05-24 |
Family
ID=58938154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611186668.5A Pending CN106708665A (en) | 2016-12-20 | 2016-12-20 | Metadata restoration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106708665A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107315659A (en) * | 2017-06-27 | 2017-11-03 | 郑州云海信息技术有限公司 | The redundancy backup method and device of a kind of metadata |
CN107480010A (en) * | 2017-08-21 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of method and device for recovering metadata |
CN107704208A (en) * | 2017-10-13 | 2018-02-16 | 郑州云海信息技术有限公司 | A kind of restorative procedure of metadata, device and medium |
CN109426586A (en) * | 2017-08-25 | 2019-03-05 | 中兴通讯股份有限公司 | A kind of data file restorative procedure, equipment and computer readable storage medium |
CN109558457A (en) * | 2018-12-11 | 2019-04-02 | 浪潮(北京)电子信息产业有限公司 | A kind of method for writing data, device, equipment and storage medium |
CN109582499A (en) * | 2018-11-27 | 2019-04-05 | 杭州宏杉科技股份有限公司 | Manage metadata restorative procedure and device |
CN109697136A (en) * | 2017-10-20 | 2019-04-30 | 华为技术有限公司 | A kind of data reconstruction method, apparatus and system |
CN110968446A (en) * | 2019-11-24 | 2020-04-07 | 苏州浪潮智能科技有限公司 | Metadata repairing method, device and system and computer readable storage medium |
CN111143130A (en) * | 2019-12-25 | 2020-05-12 | 腾讯科技(深圳)有限公司 | Data recovery method and device, computer readable storage medium and computer equipment |
CN111581204A (en) * | 2019-03-15 | 2020-08-25 | 北京忆芯科技有限公司 | Multi-B + tree operation device and method thereof |
WO2021056798A1 (en) * | 2019-09-29 | 2021-04-01 | 苏州浪潮智能科技有限公司 | Metadata repairing method, apparatus and device, and storage medium |
CN113076056A (en) * | 2020-01-06 | 2021-07-06 | 华为技术有限公司 | Data access method, hard disk and storage device |
CN113254273A (en) * | 2021-06-10 | 2021-08-13 | 苏州浪潮智能科技有限公司 | Method, system, device and medium for real-time recovery of principal metadata |
CN113608687A (en) * | 2021-06-30 | 2021-11-05 | 苏州浪潮智能科技有限公司 | Space recovery method, device and equipment and readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609335A (en) * | 2012-01-12 | 2012-07-25 | 浪潮(北京)电子信息产业有限公司 | Device and method for protecting metadata by copy-on-write |
US9043280B1 (en) * | 2011-08-15 | 2015-05-26 | Symantec Corporation | System and method to repair file system metadata |
CN105808378A (en) * | 2016-02-26 | 2016-07-27 | 华为技术有限公司 | Metadata restoration method and device |
-
2016
- 2016-12-20 CN CN201611186668.5A patent/CN106708665A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9043280B1 (en) * | 2011-08-15 | 2015-05-26 | Symantec Corporation | System and method to repair file system metadata |
CN102609335A (en) * | 2012-01-12 | 2012-07-25 | 浪潮(北京)电子信息产业有限公司 | Device and method for protecting metadata by copy-on-write |
CN105808378A (en) * | 2016-02-26 | 2016-07-27 | 华为技术有限公司 | Metadata restoration method and device |
Non-Patent Citations (1)
Title |
---|
张冬洁: "基于MapReduce的关系数据联机分析处理技术研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107315659B (en) * | 2017-06-27 | 2020-09-18 | 苏州浪潮智能科技有限公司 | Metadata redundancy backup method and device |
CN107315659A (en) * | 2017-06-27 | 2017-11-03 | 郑州云海信息技术有限公司 | The redundancy backup method and device of a kind of metadata |
CN107480010A (en) * | 2017-08-21 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of method and device for recovering metadata |
CN109426586A (en) * | 2017-08-25 | 2019-03-05 | 中兴通讯股份有限公司 | A kind of data file restorative procedure, equipment and computer readable storage medium |
CN109426586B (en) * | 2017-08-25 | 2023-05-12 | 中兴通讯股份有限公司 | Data file repairing method, device and computer readable storage medium |
CN107704208A (en) * | 2017-10-13 | 2018-02-16 | 郑州云海信息技术有限公司 | A kind of restorative procedure of metadata, device and medium |
CN109697136A (en) * | 2017-10-20 | 2019-04-30 | 华为技术有限公司 | A kind of data reconstruction method, apparatus and system |
CN109697136B (en) * | 2017-10-20 | 2023-04-04 | 华为技术有限公司 | Data recovery method, device and system |
CN109582499A (en) * | 2018-11-27 | 2019-04-05 | 杭州宏杉科技股份有限公司 | Manage metadata restorative procedure and device |
CN109558457B (en) * | 2018-12-11 | 2022-04-22 | 浪潮(北京)电子信息产业有限公司 | Data writing method, device, equipment and storage medium |
CN109558457A (en) * | 2018-12-11 | 2019-04-02 | 浪潮(北京)电子信息产业有限公司 | A kind of method for writing data, device, equipment and storage medium |
CN111581204A (en) * | 2019-03-15 | 2020-08-25 | 北京忆芯科技有限公司 | Multi-B + tree operation device and method thereof |
WO2021056798A1 (en) * | 2019-09-29 | 2021-04-01 | 苏州浪潮智能科技有限公司 | Metadata repairing method, apparatus and device, and storage medium |
CN110968446B (en) * | 2019-11-24 | 2022-08-12 | 苏州浪潮智能科技有限公司 | Metadata repairing method, device and system and computer readable storage medium |
CN110968446A (en) * | 2019-11-24 | 2020-04-07 | 苏州浪潮智能科技有限公司 | Metadata repairing method, device and system and computer readable storage medium |
CN111143130A (en) * | 2019-12-25 | 2020-05-12 | 腾讯科技(深圳)有限公司 | Data recovery method and device, computer readable storage medium and computer equipment |
CN111143130B (en) * | 2019-12-25 | 2021-05-25 | 腾讯科技(深圳)有限公司 | Data recovery method and device, computer readable storage medium and computer equipment |
CN113076056A (en) * | 2020-01-06 | 2021-07-06 | 华为技术有限公司 | Data access method, hard disk and storage device |
CN113254273A (en) * | 2021-06-10 | 2021-08-13 | 苏州浪潮智能科技有限公司 | Method, system, device and medium for real-time recovery of principal metadata |
CN113608687A (en) * | 2021-06-30 | 2021-11-05 | 苏州浪潮智能科技有限公司 | Space recovery method, device and equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106708665A (en) | Metadata restoration method and device | |
TWI613652B (en) | Data storage device and operating method therefor | |
US9430329B2 (en) | Data integrity management in a data storage device | |
US8224781B2 (en) | Data protection in a data storage system | |
TWI645404B (en) | Data storage device and control method for non-volatile memory | |
CN101916173B (en) | RAID (Redundant Array of Independent Disks) based data reading and writing method and system thereof | |
US7793166B2 (en) | Methods and systems for recovering meta-data in a cache memory after a corruption event | |
US20090265403A1 (en) | File system | |
US20150309886A1 (en) | Flash memory controller and data storage device and flash memory control method | |
CN101430703A (en) | Systems and methods for automatic maintenance and repair of entites in data model | |
CN108399134A (en) | The operating method of storage device and storage device | |
JP2008251034A (en) | Storage subsystem and operating method thereof | |
CN104461391A (en) | Method and system for managing and processing metadata of storage equipment | |
TW200538925A (en) | Memory control circuit, nonvolatile storage apparatus, and memory control method | |
US8365043B2 (en) | Efficient redundant memory unit array | |
US10769018B2 (en) | System and method for handling uncorrectable data errors in high-capacity storage | |
CN106527992A (en) | Method and device for destroying data in storage equipment | |
US11093317B1 (en) | Managing uncorrectable user data | |
CN101840360A (en) | Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system | |
WO2017143843A1 (en) | Metadata recovery method and device | |
CN108958961A (en) | Data memory device and error in data management method | |
US20210034272A1 (en) | Rolling XOR Protection in Efficient Pipeline | |
US7788550B2 (en) | Redundant bit patterns for column defects coding | |
CN107402843A (en) | Restoration methods, device and the equipment of database corruption | |
CN104978241A (en) | Data recovery method and apparatus for COW type file system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170524 |
|
RJ01 | Rejection of invention patent application after publication |