CN105159790B - A kind of data rescue method and file server - Google Patents
A kind of data rescue method and file server Download PDFInfo
- Publication number
- CN105159790B CN105159790B CN201510641030.5A CN201510641030A CN105159790B CN 105159790 B CN105159790 B CN 105159790B CN 201510641030 A CN201510641030 A CN 201510641030A CN 105159790 B CN105159790 B CN 105159790B
- Authority
- CN
- China
- Prior art keywords
- disk
- data
- faulty
- new
- rescue
- 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
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/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present invention provides a kind of data rescue method and file server, it is related to technical field of memory, it can solve the problem that in the prior art when by the data copy in faulty disk to new disk, make it that copying speed is slow due to needing to carry out document analysis, the problem of so as to cause faulty disk rescue speed slow.Concrete scheme is:When needing to rescue the data in faulty disk, file server creative management metadata in new disk, manage the management information that metadata is new disk, by the node data block copy in faulty disk to new disk, node data block includes directory data block or file data blocks, and the node data block that new disk is copied to from faulty disk is mounted in the management metadata of new disk.The embodiment of the present invention is used to rescue data.
Description
Technical field
The present embodiments relate to technical field of memory, more particularly to a kind of data rescue method and file server.
Background technology
In information age today, the data exponentially for being stored and being managed by file system increases again, in order to effectively deposit
Storage and management data, distributed file system will be fixed on the file system of a physical location, expand to multiple physical locations,
So as to form a Filesystem Network, and the communication between different physical locations and data transfer are carried out by network.Referring to figure
1, the file server of each physical location can manage one or more disk, and disk therein includes data disks and verification
Disk.
System data in distributed file system is typically preserved jointly by data disk and verification disk.When beyond verification
When the disk of quantity breaks down, the system data in distributed file system can be lost.At this time, it may be necessary to failure is rescued in time
Disk, and the data in the data and distributed file system in the faulty disk rescued in remaining non-faulting disk, are robbed
Rescue the system data in distributed file system.
Three management metadata, catalogue and file levels can be divided on mathematical logic in disk, referring to Fig. 2, its
In management metadata refer to the management information of disk, for providing a kind of data of structuring on resource or data, be
Description to data structured, such as root directory information, disk space management information etc. can be included.When disk breaks down
When, it usually needs another new disk will be copied after the data scanning in faulty disk to, to rescue the data in faulty disk.Scanning
Process needs the management metadata parsing catalogue and the corresponding relation of faulty disk position ceaselessly in faulty disk, and according to mesh
The corresponding relation of resolution file and faulty disk position is recorded, so as to by file copy to new disk.
Above-mentioned complicated document analysis process make it that data copy speed is slow, so as to cause faulty disk rescue speed slow, and
And the rescue speed for also further causing the system data in distributed file system is slow.
The content of the invention
The embodiment of the present invention provides a kind of data rescue method and file server, can solve the problem that in the prior art will therefore
When hindering the data copy in disk to new disk, due to needing progress document analysis make it that copying speed is slow, so as to cause faulty disk
The problem of rescue speed is slow.
To reach above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
First aspect, there is provided a kind of data rescue method, including:
When need rescue faulty disk in data when, the creative management metadata in new disk, it is described management metadata be
The management information of the new disk;
By the node data block copy in the faulty disk to the new disk, the node data block includes catalogue data
Block or file data blocks;
The node data block that the new disk is copied to from the faulty disk is mounted to the management member number of the new disk
According to upper.
With reference in a first aspect, in the first possible implementation of first aspect, the management metadata includes root
Directory information and disk management information.
With reference to the possible implementation of the first of first aspect or first aspect, second in first aspect is possible
In implementation, the node data block includes descriptor and data content, and the memory space that the descriptor takes is default
Byte number, the descriptor include origin identification and the first byte number, and the origin identification is located at the head of the descriptor, use
In the original position for indicating the node data block, first byte number is used for the byte number for indicating that the data content takes
Amount.
With reference to second of possible implementation of first aspect, in the third possible implementation of first aspect
In, the node data block copy by the faulty disk to the new disk includes:
The origin identification is searched in the faulty disk;
Since the head of the descriptor, by the data of the descriptor of the predetermined word joint number and first byte number
Copy content is to the new disk.
With reference to the second of first aspect or the third possible implementation, in the 4th kind of possible realization of first aspect
In mode, the descriptor is index node inode.
With reference to the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect
In, the origin identification is evil spirit numeral.
With reference to first aspect to first aspect the 5th kind of possible implementation in any one, in first aspect
In 6th kind of possible implementation, methods described also includes:
The new disk is added into rescue disk pool;
By the business disk in the data copy in the new disk to the business disk pool.
With reference to first aspect to first aspect the 5th kind of possible implementation in any one, in first aspect
In 7th kind of possible implementation, methods described also includes:
Data in the new disk are sent to other file servers.
With reference to first aspect to first aspect the 7th kind of possible implementation in any one, in first aspect
In 8th kind of possible implementation, methods described also includes:
Receive the data that other file servers are sent;
The data are preserved to the business disk in the business disk pool.
Second aspect, there is provided a kind of file server, including:
Creating unit, for when needing to rescue the data in faulty disk, creative management metadata, described in new disk
Manage the management information that metadata is the new disk;
Copy cell, for by the node data block copy in the faulty disk to the new disk, the node data
Block includes directory data block or file data blocks;
Carry unit, for the node data block that the new disk is copied to from the faulty disk to be mounted into the new magnetic
In the management metadata of disk.
With reference to second aspect, in the first possible implementation of second aspect, the management metadata includes root
Directory information and disk management information.
With reference to the possible implementation of the first of second aspect or second aspect, second in second aspect is possible
In implementation, the node data block includes descriptor and data content, and the memory space that the descriptor takes is default
Byte number, the descriptor include origin identification and the first byte number, and the origin identification is located at the head of the descriptor, use
In the original position for indicating the node data block, first byte number is used for the byte number for indicating that the data content takes
Amount.
With reference to second of possible implementation of second aspect, in the third possible implementation of second aspect
In, the copy cell is specifically used for:
The origin identification is searched in the faulty disk;
Since the head of the descriptor, by the data of the descriptor of the predetermined word joint number and first byte number
Copy content is to the new disk.
With reference to the second of second aspect or the third possible implementation, in the 4th kind of possible realization of second aspect
In mode, the descriptor is index node inode.
In the 4th kind of possible implementation with reference to second aspect, in the 5th kind of possible implementation of second aspect
In, the origin identification is evil spirit numeral.
With reference to second aspect to second aspect the 5th kind of possible implementation in any one, in second aspect
In 6th kind of possible implementation, in addition to:
First processing units, for the new disk to be added into rescue disk pool;
The copy cell is additionally operable to, by the business magnetic in the data copy in the new disk to the business disk pool
Disk.
With reference to second aspect to second aspect the 5th kind of possible implementation in any one, in second aspect
In 7th kind of possible implementation, in addition to:
Transmitting element, for the data in the new disk to be sent into other file servers.
With reference to second aspect to second aspect the 7th kind of possible implementation in any one, in second aspect
In 8th kind of possible implementation, in addition to:
Receiving unit, the data sent for receiving other file servers;
Second processing unit, the data for the receiving unit to be received are preserved into the business disk pool
Business disk.
The embodiment of the present invention provides a kind of data rescue method and file server, in the data for needing to rescue in faulty disk
When, then will be from by the creative management metadata in new disk, and by the node data block copy in faulty disk to new disk
The node data block that faulty disk is copied to new disk is mounted in the management metadata of new disk, so as to by the data in faulty disk
Recover to new disk, thus avoid document analysis process complicated in the prior art, improve the rescue speed of faulty disk.Cause
This, can solve the problem that in the prior art when by the data copy in faulty disk to new disk, due to needing progress document analysis to make
Copying speed is slow, the problem of so as to cause faulty disk rescue speed slow.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art
The required accompanying drawing used is briefly described, it should be apparent that, drawings in the following description are only some realities of the present invention
Example is applied, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to these accompanying drawings
Obtain other accompanying drawings.
Fig. 1 is a kind of distributed file system structural representation provided in an embodiment of the present invention;
Fig. 2 is a kind of disk logical construction schematic diagram provided in an embodiment of the present invention;
Fig. 3 rescues method flow schematic diagram for a kind of data provided in an embodiment of the present invention;
Fig. 4 is a kind of disk management structural representation provided in an embodiment of the present invention;
Fig. 5 is a kind of data in magnetic disk storage configuration schematic diagram provided in an embodiment of the present invention;
Fig. 6 is a kind of signal of the node data block copy by faulty disk provided in an embodiment of the present invention to new disk
Figure;
Fig. 7 is a kind of structural representation of node data block provided in an embodiment of the present invention;
Fig. 8 is a kind of logical construction schematic diagram of data in magnetic disk provided in an embodiment of the present invention;
Fig. 9 rescues method flow schematic diagram for another data provided in an embodiment of the present invention;
Figure 10 is a kind of business disk pool provided in an embodiment of the present invention and rescue disk pool distribution schematic diagram;
Figure 11 rescues method flow schematic diagram for another data provided in an embodiment of the present invention;
Figure 12 rescues method flow schematic diagram for another data provided in an embodiment of the present invention;
Figure 13 rescues method flow schematic diagram for another data provided in an embodiment of the present invention;
Figure 14 is a kind of file server structural representation provided in an embodiment of the present invention;
Figure 15 is another file server structural representation provided in an embodiment of the present invention;
Figure 16 is another file server structural representation provided in an embodiment of the present invention;
Figure 17 is another file server structural representation provided in an embodiment of the present invention;
Figure 18 is another file server structural representation provided in an embodiment of the present invention;
Figure 19 is another file server structural representation provided in an embodiment of the present invention;
Figure 20 is another file server structural representation provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
The data rescue method that following examples of the present invention provide, after the creative management metadata in new disk, no
Carry out document analysis process and the node in faulty disk is directly copied to new disk, and the node of copy is mounted to new disk
In management metadata on, so as to which the data recovery in faulty disk to new disk, thus be avoided complicated in the prior art
Document analysis process, so as to improve the rescue speed of faulty disk.
Embodiment 1
The embodiment of the present invention provides a kind of data rescue method, referring to Fig. 3, can include:
101st, when needing to rescue the data in faulty disk, file server creative management metadata in new disk, pipe
Manage the management information that metadata is new disk.
Wherein, file server is the server that disk management is carried out in distributed file system, can be used for rescuing it
Data in the faulty disk of management, carry out the data of faulty disk that distributed document is managed and rescue to new disk, can be with
Provide the user regular traffic processing.When a certain disk failures of file server management need to carry out data rescue,
File server can in other one piece new disk creative management metadata.Management metadata therein can include root
Information and disk space management information etc., for description information resource or data feature in itself and attribute, it is specified that digitlization letter
The tissue of breath, there is the functions such as positioning, discovery, proof, assessment, selection.
In fact, for local file system or object-based file system, the management structure of each disk is identical
, difference be to manage the data that are managed of structure it is different, thus can on a new disk creative management metadata so that
The management structure of new disk is established, and the directory data block in faulty disk and file data blocks are copied in new disk, is passed through
The management structure that management metadata creates is managed, so as to which the data recovery in faulty disk is rescued into faulty disk to new disk
In data, and without by the management copies of metadata in faulty disk to new disk and not having to management member number in faulty disk
According to carrying out document analysis, and directly the management metadata in faulty disk can be abandoned, so as to by the data recovery in faulty disk
To new disk.Wherein, management structural representation corresponding to metadata is managed in disk and may refer to Fig. 4.
It should be noted that recovering the data in faulty disk by creating metadata on new disk, can avoid existing
There is the management metadata in technology in faulty disk to carry out document analysis, thus even if the management metadata in faulty disk is damaged
The rescue of data in faulty disk is not interfered with yet.
In addition, in the prior art when carrying out faulty disk rescue, it is necessary to carry out complicated file solution according to management metadata
Analysis process, document analysis will be caused to fail when managing metadata damage, so as to the data that can not be rescued in faulty disk.Therefore,
Management metadata in faulty disk can typically back up in other disks in advance, so as to consume extra disk space, simultaneously
The read-write operation of other disks is also adds additional, have impact on its performance.In addition, management metadata backup is only capable of solving failure
Disk is due to managing metadata damage caused by physical fault, when faulty disk causes to manage metadata damage due to software corruption,
It is wrong data that source control metadata, which may then be caused, and back up to the management metadata of other disks.
Data provided in an embodiment of the present invention rescue method, by abandoning the management metadata in faulty disk, and in new magnetic
It creative management metadata on disk, can also avoid in the prior art to managing the backup of metadata in faulty disk, thus save
Disk space, and no matter the management metadata in faulty disk is hardware damage or software corruption, does not interfere with faulty disk
The rescue of middle data.
102nd, the node data block copy in faulty disk to new disk, node data block are included catalogue number by file server
According to block or file data blocks.
Because management metadata, directory data block and file data blocks random storage are in disk, referring to Fig. 5, thus
In addition to managing metadata, catalogue data that remaining data in disk is managed for the management structure that management metadata is established
Block and file data blocks, directory data block and file data blocks are referred to as node data block here.
In new disk after creative management metadata, it is not necessary to carry out file further according to the management metadata in faulty disk
Parsing, so as to be parsed by file fullpath in the way of the data copy in faulty disk to new disk suffered, and can be around
Management metadata and the document analysis crossed in faulty disk, directly by the node data block copy in faulty disk into new disk.Its
In, file server can by the schematic diagram of node data block copy to new disk in faulty disk by step 101 and step 102
With referring to Fig. 6.
It should be noted that in this step, due to file solution need not be carried out according to the management metadata in faulty disk
Analysis, thus by the data copy in faulty disk to new disk, thus document analysis process complicated in the prior art is avoided, carry
The high rescue speed of faulty disk.
Wherein, node data block can include descriptor and data content, and the memory space that descriptor takes can be pre-
If byte number, descriptor can include origin identification and the first byte number, and origin identification is located at the head of descriptor, can be used for
The original position of node data block is indicated, the first byte number can serve to indicate that the byte quantity that data content takes.Wherein, retouch
Stating the predetermined word joint number of character occupancy can specifically be set as needed.The structural representation of node data block may refer to
Fig. 7.
Specifically, file server can include the node data block copy in faulty disk to new disk:
File server searches origin identification in faulty disk;
File server is since the head of descriptor, by the data of the descriptor of predetermined word joint number and the first byte number
Appearance is copied to new disk.
Exemplary, descriptor can be index node inode, and origin identification can be evil spirit numeral.That is descriptor index
Node, can include origin identification and the first byte number, and origin identification can be evil spirit numeral.File server can be in faulty disk
The middle origin identification evil spirit numeral searched positioned at descriptor head, and by predetermined word joint number since the first character section of magic numeral
The data content of descriptor and the first byte number is copied in new disk, so as to by node data block copy to new disk.
Wherein, file server can often find an origin identification in faulty disk, just that the origin identification is corresponding
Node data block copy into new disk;Or file server can also scan origin identification all in faulty disk, and
Node data block list is established according to the origin identification, so as to according to the list of node data block by node data block copy to new magnetic
Disk, the embodiment of the present invention do not limit.
103rd, the node data block that new disk is copied to from faulty disk is mounted to the management member of new disk by file server
In data.
File server is after by the node data block copy in faulty disk to new disk, new disk shown in Figure 8
In data logical construction schematic diagram, the node data block in new building can be mounted in the management metadata of new disk,
Directory data block and file data blocks are transferred to manage structure management, so as to form complete disk storage system.Now, may be used
To carry out document analysis according to new disk management metadata so as to normally read the data in new disk.In fact, in new disk
Data be rescue faulty disk in data.
After in the management metadata being mounted to node data block in new disk, due to the mesh of the management in new disk
Record data block and file data blocks are directory data block and file data blocks in faulty disk, thus now completely by failure
Data recovery in disk completes the data rescue of faulty disk into new disk.
Further, above-mentioned faulty disk is usually a disk in distributed file system, is robbed in the data of faulty disk
After the completion of rescuing, the system data rescued in distributed file system can also be continued according to the data in the faulty disk rescued.
Thus, referring to Fig. 9, data provided in an embodiment of the present invention rescue method after step 103, can also include:
104th, new disk is added rescue disk pool by file server.
The creative management metadata in new disk, by the node data block copy in faulty disk to new disk and carry is new
In the management metadata of disk, after by the data recovery in faulty disk to new disk, completing the rescue of the data of faulty disk,
The new disk can also be added to rescue disk pool and the rescue disk list of data rescue module management, to carry out distributed text
The system data rescue of part system.Wherein, data rescue module is used to manage the disk in rescue disk pool, can not manage it
His disk.
It is noted that step 104 is by the data recovery in faulty disk to new disk and by newly with file server
Disk adds the rescue disk pool of this document server admin, and the system data to carry out distributed file system enters exemplified by rescuing
Row explanation, i.e., system data rescue is rescued and carried out to the data that faulty disk is carried out by identical file server.When file takes
Business device 1 and file server 2 be when being located at same physical location, by file server 1 by the data recovery in faulty disk to new
Disk, the new disk is inserted into file server 2, and add the rescue disk pool of file server 2 to carry out distributed document
The system data rescue of system, is the technical scheme being readily conceivable that, also within the scope of the present invention.
105th, file server is by the business disk in the data copy in new disk to business disk pool.
File server obtains the rescue disk list in rescue disk pool, and will recover faulty disk number according to the list
According to new disk in data, the business disk being copied in the business disk pool of business data module management, with rescue distribution
System data in formula file system.Wherein, the disk that business data module is used in management business disk pool, can not be managed
Other disks for example rescue the disk in disk pool.
It should be noted that in data rescue method provided in an embodiment of the present invention, data rescue module can only manage
The disk rescued in disk pool, and the disk being unable in management business disk pool, and business data module can only management business magnetic
Disk in disk pond, and the disk in rescue disk pool can not be managed, i.e., referring to Figure 10, disk is rescued in distributed file system
What pond and business disk pool were mutually isolated, thus distributed file system system data rescue and business be also it is parallel,
It does not interfere with each other.
And prior art is carrying out needing the business for suspending distributed file system during data rescue, failure otherwise will be caused
Disk formatting or business are inconsistent, and with the amplification of disk size, the rescue time of faulty disk is increasingly longer, so as to cause
The business interruption time of distributed file system is also increasingly longer, reduces the process performance of distributed file system.Thus, this
The data rescue method that inventive embodiments provide by by the rescue of the system data of distributed file system and business parallel processing,
The process performance of distributed file system can be improved.
Exemplary, if the business disk in file server business disk pool includes 32 pieces of disks, verify number of disks
For 4, and disk 1,2,3,4 has broken down, and when for example disk 5 breaks down the 5th piece of disk, distributed file system can lose
System data.Thus when disk 5 breaks down, file server can rescue the data in faulty disk disk 5 to new magnetic
In disk 33, and new disk 33 is added into rescue disk pool, file server is by the data copy in new disk 33 to business disk
In non-faulting disk in pond, so as to the data rescue distributed file system in the non-faulting disk in business disk pool
System data.
In addition, referring to Figure 11, when the file server for the data rescue for carrying out faulty disk is with carry out distributed system
The file server of data of uniting rescue is not easy to insert new disk not in same physical location not in same physical location
Other file servers are so as to carry out system data rescue, thus after step 103, method provided in an embodiment of the present invention is also
It can include:
106th, the data in new disk are sent to other file servers by file server.
Rescued by the data of faulty disk to new disk, file server can also pass through the data in new disk
Network is sent to other file servers, in order to carry out distributed document by other file servers of other physical locations
The system data rescue of system.
In addition, when the file server for the data rescue for carrying out faulty disk and the system data rescue of progress distributed system
File server not in same physical location, and by other file servers completed faulty disk data rescue when,
Data in the faulty disk rescued can also be sent to current file server by other file servers by network, with logical
The business disk crossed in current file server service disk pool receives the data, so as to rescue the system of distributed file system
Data.Thus, referring to Figure 12, data rescue method provided in an embodiment of the present invention can also include:
107th, file server receives the data that other file servers are sent.
108th, file server preserves data to the business disk in business disk pool.
It should be noted that file server receives the data of other file servers transmissions by step 107-108, and
The data received are preserved to the business disk in business disk pool, so as to rescue the system number in distributed file system
According to the data for carrying out faulty disk by step 101-106 with the identical file server are rescued, and are not closed successively clearly
System.
The embodiment of the present invention provides a kind of data rescue method, when needing to rescue the data in faulty disk, by new
Creative management metadata in disk, and by the node data block copy in faulty disk to new disk, will then be copied from faulty disk
Node data block to new disk is mounted in the management metadata of new disk, so as to recover the data in faulty disk, thus is kept away
Exempt from document analysis process complicated in the prior art, improve the rescue speed of faulty disk.Therefore, it is possible to solve prior art
In when by the data copy in faulty disk to new disk, due to need carry out document analysis make it that copying speed is slow, so as to lead
The problem of causing faulty disk rescue speed slow.
Embodiment 2
Referring to Figure 13, when the data rescue for carrying out faulty disk and the file server of the system data rescue of distributed system
It is not identical file server, and carries out the first file server of faulty disk data rescue and the system for carrying out distributed system
Second file server of data rescue is not in same physical location, a kind of data rescue side provided in an embodiment of the present invention
Method, it can include:
201st, when needing to rescue the data in faulty disk, the first file server creative management member number in new disk
According to management metadata is the management information of new disk.
202nd, the node data block copy in faulty disk to new disk, node data block are included mesh by the first file server
Record data block or file data blocks.
203rd, the node data block that new disk is copied to from faulty disk is mounted to the pipe of new disk by the first file server
Manage in metadata.
Wherein, step 201-203 specific descriptions may refer to the step 101-103 in embodiment 1, no longer superfluous here
State.
204th, the data in new disk are sent to the second file server by the first file server.
First file server rescues the data of faulty disk to new disk, can be by network by the number in new disk
According to being sent to not in the second file server of same physical location, distributed field system is carried out to pass through the second file server
The system data rescue of system.
205th, the second file server receives the data that the first file server is sent.
Second file server receives the data in the new disk for the first file server that the first file server is sent.
206th, the second file server preserves data to the business disk in business disk pool.
Wherein, the specific step 107 and step 108 that may refer in embodiment 1 of the description of step 205 and step 206, this
In repeat no more.
The embodiment of the present invention provides a kind of data rescue method, when needing to rescue the data in faulty disk, by new
Creative management metadata in disk, and by the node data block copy in faulty disk to new disk, will then be copied from faulty disk
Node data block to new disk is mounted in the management metadata of new disk, so as to recover the data in faulty disk, thus is kept away
Exempt from document analysis process complicated in the prior art, improve the rescue speed of faulty disk.Therefore, it is possible to solve prior art
In when by the data copy in faulty disk to new disk, due to need carry out document analysis make it that copying speed is slow, so as to lead
The problem of causing faulty disk rescue speed slow.
Embodiment 3
The embodiment of the present invention provides a kind of file server 300, and referring to Figure 14, this document server 300 can include:
Creating unit 301, for when need rescue faulty disk in data when, the creative management metadata in new disk,
Manage the management information that metadata is new disk.
Copy cell 302, for the node data block copy in faulty disk to new disk, node data block to be included into catalogue
Data block or file data blocks.
Carry unit 303, for the node data block that new disk is copied to from faulty disk to be mounted to the management of new disk
In metadata.
Wherein, file server 300 is the server that disk management is carried out in distributed file system, can be used for rescuing
Data in its faulty disk managed, the data for carrying out the faulty disk that distributed document is managed are rescued to new disk, may be used also
To provide the user regular traffic processing.
File server 300 provided in an embodiment of the present invention according to the management metadata in faulty disk due to need not carry out
Document analysis, so that by the data copy in faulty disk to new disk, thus avoid document analysis complicated in the prior art
Process, improve the rescue speed of faulty disk.
Wherein, management metadata can include root directory information and disk management information.
Node data block can include descriptor and data content, and the memory space that descriptor takes is predetermined word joint number,
Descriptor includes origin identification and the first byte number, and origin identification is located at the head of descriptor, for indicating node data block
Original position, the first byte number are used for the byte quantity for indicating that data content takes.
Copy cell 302 can be specifically used for:
Origin identification is searched in faulty disk;
Since the head of descriptor, the data content of the descriptor of predetermined word joint number and the first byte number is copied to newly
Disk.
Wherein, descriptor can be index node inode, and origin identification can be evil spirit numeral.
In addition, referring to Figure 15, file server 300 can also include:
First processing units 304, it can be used for new disk adding rescue disk pool;
Copy cell 302 can be also used for, by the business disk in the data copy in new disk to business disk pool.
In addition, referring to Figure 16, file server 300 can also include:
Transmitting element 305, it can be used for the data in new disk being sent to other file servers.
Further, can also include referring to Figure 17, file server 300:
Receiving unit 306, it can be used for receiving the data that other file servers are sent;
Second processing unit 307, it can be used for preserving the data that receiving unit 306 receives to the industry in business disk pool
Business disk.
In file server 300 provided in an embodiment of the present invention, data rescue module can only be managed in rescue disk pool
Disk, and the disk being unable in management business disk pool, and the disk that business data module can only be in management business disk pool,
And the disk in rescue disk pool can not be managed, i.e., rescue disk pool and business disk pool are mutually isolated, thus distributed
The system data rescue of file system and business are also parallel, are not interfere with each other.
The embodiment of the present invention provides a kind of file server, when needing to rescue the data in faulty disk, by new magnetic
Creative management metadata in disk, and by the node data block copy in faulty disk to new disk, will be then copied to from faulty disk
The node data block of new disk is mounted in the management metadata of new disk, so as to recover the data in faulty disk, thus is avoided
Complicated document analysis process in the prior art, improve the rescue speed of faulty disk.Therefore, it is possible to solve in the prior art
When by the data copy in faulty disk to new disk, due to needing progress document analysis make it that copying speed is slow, so as to cause
The problem of faulty disk rescue speed is slow.
Embodiment 4
The embodiment of the present invention provides a kind of file server 400, and referring to Figure 18, this document server 400 can include place
Device 401, memory 402 and bus 403 are managed, wherein, the bus 403 is used to connect processor 401 and memory 402, the storage
Device 402 is used for store instruction and data, and the processor 401 performs the instruction and is used for when needing to rescue the data in faulty disk,
The creative management metadata in new disk, management metadata is the management information of new disk, by the node data block in faulty disk
New disk is copied to, node data block includes directory data block or file data blocks, and will be copied to new disk from faulty disk
Node data block is mounted in the management metadata of new disk.
Here file server 400 is the server that disk management is carried out in distributed file system, can be used for robbing
The data in the faulty disk of its management are rescued, the data for carrying out the faulty disk that distributed document is managed are rescued to new disk, are gone back
Regular traffic processing can be provided the user.
File server 400 provided in an embodiment of the present invention according to the management metadata in faulty disk due to need not carry out
Document analysis, so that by the data copy in faulty disk to new disk, thus avoid document analysis complicated in the prior art
Process, improve the rescue speed of faulty disk.
Wherein, management metadata can include root directory information and disk management information, and node data block can include retouching
Symbol and data content are stated, the memory space that descriptor takes is predetermined word joint number, and descriptor includes origin identification and the first byte
Number, origin identification are located at the head of descriptor, and for indicating the original position of node data block, the first byte number is used for indicated number
The byte quantity taken according to content.
Optionally, processor 401 perform that the instruction is used for can be with by the node data block copy in faulty disk to new disk
Including:
Origin identification is searched in faulty disk;
Since the head of descriptor, the data content of the descriptor of predetermined word joint number and the first byte number is copied to newly
Disk.
Wherein, descriptor can be index node inode, and origin identification can be evil spirit numeral.
Further, processor 401 performs the instruction and can be also used for, and new disk is added into rescue disk pool;
By the business disk in the data copy in new disk to business disk pool.
In addition, referring to Figure 19, file server 400 can also include:
Transmitter 404, it can be used for the data in new disk being sent to other file servers.
In addition, referring to Figure 20, file server 400 can also include:
Receiver 405, it can be used for receiving the data that other file servers are sent.
Processor 401 be can be also used for, and the data that receiver 405 receives are preserved to the business magnetic in business disk pool
Disk.
In file server 400 provided in an embodiment of the present invention, data rescue module can only be managed in rescue disk pool
Disk, and the disk being unable in management business disk pool, and the disk that business data module can only be in management business disk pool,
And the disk in rescue disk pool can not be managed, i.e., rescue disk pool and business disk pool are mutually isolated, thus distributed
The system data rescue of file system and business are also parallel, are not interfere with each other.
The embodiment of the present invention provides a kind of file server, when needing to rescue the data in faulty disk, by new magnetic
Creative management metadata in disk, and by the node data block copy in faulty disk to new disk, will be then copied to from faulty disk
The node data block of new disk is mounted in the management metadata of new disk, so as to recover the data in faulty disk, thus is avoided
Complicated document analysis process in the prior art, improve the rescue speed of faulty disk.Therefore, it is possible to solve in the prior art
When by the data copy in faulty disk to new disk, due to needing progress document analysis make it that copying speed is slow, so as to cause
The problem of faulty disk rescue speed is slow.
In several embodiments provided herein, it should be understood that disclosed file server and method, can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That the independent physics of unit includes, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used to cause a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the portion of each embodiment methods described of the present invention
Step by step.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, abbreviation
ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic disc or CD etc. are various to store
The medium of program code.
Finally it should be noted that:Above example is merely to illustrate technical scheme, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.
Claims (18)
1. a kind of data rescue method, it is characterised in that including:
When needing to rescue the data in faulty disk, the creative management metadata in new disk, the management metadata is described
The management information of new disk;
By the node data block copy in the faulty disk to the new disk, the node data block include directory data block or
File data blocks;
The node data block that the new disk is copied to from the faulty disk is mounted in the management metadata of the new disk.
2. according to the method for claim 1, it is characterised in that the management metadata includes root directory information and disk pipe
Manage information.
3. according to the method for claim 1, it is characterised in that the node data block includes descriptor and data content,
The memory space that the descriptor takes is predetermined word joint number, and the descriptor includes origin identification and the first byte number, described
Origin identification is located at the head of the descriptor, for indicating the original position of the node data block, first byte number
The byte quantity taken for indicating the data content.
4. according to the method for claim 3, it is characterised in that the node data block copy by the faulty disk is extremely
The new disk includes:
The origin identification is searched in the faulty disk;
Since the head of the descriptor, by the descriptor of the predetermined word joint number and the data content of first byte number
It is copied to the new disk.
5. according to the method for claim 3, it is characterised in that the descriptor is index node inode.
6. according to the method for claim 5, it is characterised in that the origin identification is evil spirit numeral.
7. according to the method described in claim any one of 1-6, it is characterised in that methods described also includes:
The new disk is added into rescue disk pool;
By the business disk in the data copy in the new disk to business disk pool.
8. according to the method described in claim any one of 1-6, it is characterised in that methods described also includes:
Data in the new disk are sent to other file servers.
9. according to the method for claim 1, it is characterised in that methods described also includes:
Receive the data that other file servers are sent;
The data are preserved to the business disk in business disk pool.
A kind of 10. file server, it is characterised in that including:
Creating unit, for when need rescue faulty disk in data when, the creative management metadata in new disk, the management
Metadata is the management information of the new disk;
Copy cell, for by the node data block copy in the faulty disk to the new disk, the node data block bag
Include directory data block or file data blocks;
Carry unit, for the node data block that the new disk is copied to from the faulty disk to be mounted into the new disk
Manage in metadata.
11. file server according to claim 10, it is characterised in that the management metadata includes root directory information
With disk management information.
12. file server according to claim 10, it is characterised in that the node data block includes descriptor sum
According to content, the memory space that the descriptor takes is predetermined word joint number, and the descriptor includes origin identification and the first byte
Number, the origin identification is located at the head of the descriptor, for indicating the original position of the node data block, described first
Byte number is used for the byte quantity for indicating that the data content takes.
13. file server according to claim 12, it is characterised in that the copy cell is specifically used for:
The origin identification is searched in the faulty disk;
Since the head of the descriptor, by the descriptor of the predetermined word joint number and the data content of first byte number
It is copied to the new disk.
14. file server according to claim 12, it is characterised in that the descriptor is index node inode.
15. file server according to claim 14, it is characterised in that the origin identification is evil spirit numeral.
16. according to the file server described in claim any one of 10-15, it is characterised in that also include:
First processing units, for the new disk to be added into rescue disk pool;
The copy cell is additionally operable to, by the business disk in the data copy in the new disk to business disk pool.
17. according to the file server described in claim any one of 10-15, it is characterised in that also include:
Transmitting element, for the data in the new disk to be sent into other file servers.
18. file server according to claim 10, it is characterised in that also include:
Receiving unit, the data sent for receiving other file servers;
Second processing unit, the data for the receiving unit to be received are preserved to the business disk in business disk pool.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510641030.5A CN105159790B (en) | 2015-09-30 | 2015-09-30 | A kind of data rescue method and file server |
PCT/CN2016/098862 WO2017054643A1 (en) | 2015-09-30 | 2016-09-13 | Data recovery method and file server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510641030.5A CN105159790B (en) | 2015-09-30 | 2015-09-30 | A kind of data rescue method and file server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105159790A CN105159790A (en) | 2015-12-16 |
CN105159790B true CN105159790B (en) | 2018-03-16 |
Family
ID=54800652
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510641030.5A Active CN105159790B (en) | 2015-09-30 | 2015-09-30 | A kind of data rescue method and file server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105159790B (en) |
WO (1) | WO2017054643A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105159790B (en) * | 2015-09-30 | 2018-03-16 | 成都华为技术有限公司 | A kind of data rescue method and file server |
CN110389855B (en) * | 2018-04-19 | 2021-12-28 | 浙江宇视科技有限公司 | Magnetic tape library data verification method and device, electronic equipment and readable storage medium |
CN110989929A (en) * | 2019-11-22 | 2020-04-10 | 浪潮电子信息产业股份有限公司 | MON service migration method, device, equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1204806A (en) * | 1997-06-20 | 1999-01-13 | 索尼公司 | Data management apparatus, data management method, and recording medium |
CN102024016A (en) * | 2010-11-04 | 2011-04-20 | 天津曙光计算机产业有限公司 | Rapid data restoration method for distributed file system (DFS) |
CN102081559A (en) * | 2011-01-11 | 2011-06-01 | 成都市华为赛门铁克科技有限公司 | Data recovery method and device for redundant array of independent disks |
CN103534688A (en) * | 2013-05-29 | 2014-01-22 | 华为技术有限公司 | Data recovery method, storage equipment and storage system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101801147B1 (en) * | 2011-08-30 | 2017-11-27 | 삼성전자주식회사 | Data managing method with improved data reliability and therefor data storage device |
CN103942112B (en) * | 2013-01-22 | 2018-06-15 | 深圳市腾讯计算机系统有限公司 | Disk tolerance method, apparatus and system |
CN105159790B (en) * | 2015-09-30 | 2018-03-16 | 成都华为技术有限公司 | A kind of data rescue method and file server |
-
2015
- 2015-09-30 CN CN201510641030.5A patent/CN105159790B/en active Active
-
2016
- 2016-09-13 WO PCT/CN2016/098862 patent/WO2017054643A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1204806A (en) * | 1997-06-20 | 1999-01-13 | 索尼公司 | Data management apparatus, data management method, and recording medium |
CN102024016A (en) * | 2010-11-04 | 2011-04-20 | 天津曙光计算机产业有限公司 | Rapid data restoration method for distributed file system (DFS) |
CN102081559A (en) * | 2011-01-11 | 2011-06-01 | 成都市华为赛门铁克科技有限公司 | Data recovery method and device for redundant array of independent disks |
CN103534688A (en) * | 2013-05-29 | 2014-01-22 | 华为技术有限公司 | Data recovery method, storage equipment and storage system |
Also Published As
Publication number | Publication date |
---|---|
WO2017054643A1 (en) | 2017-04-06 |
CN105159790A (en) | 2015-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10996884B2 (en) | System and method for reference tracking garbage collector | |
US9600553B1 (en) | Distributed replication in cluster environments | |
US11907410B2 (en) | Method and device for managing storage system | |
US20160006461A1 (en) | Method and device for implementation data redundancy | |
US20030126388A1 (en) | Method and apparatus for managing storage based replication | |
US20190018738A1 (en) | Method for performing replication control in a storage system with aid of characteristic information of snapshot, and associated apparatus | |
WO2018098972A1 (en) | Log recovery method, storage device and storage node | |
US8600937B1 (en) | System and method for fast volume cloning | |
CN105159790B (en) | A kind of data rescue method and file server | |
CN102323930B (en) | Mirroring data changes in a database system | |
CN108228678B (en) | Multi-copy data recovery method and device | |
CN111858146B (en) | Method, apparatus and computer program product for recovering data | |
CN108369487A (en) | System and method for shooting snapshot in duplicate removal Virtual File System | |
CN113568566A (en) | Method, host device and storage server for seamless migration of simple storage service by using index object | |
CN104794119A (en) | Middleware message storage and transmission method and system | |
US8762662B1 (en) | Method and apparatus for application migration validation | |
US8843472B2 (en) | Recovery of inconsistent data in databases | |
US10007567B2 (en) | Method and device for recovering data replication between storage devices | |
CN108573049B (en) | Data processing method and distributed storage device | |
CN103729269A (en) | Cloud architecture-based network test data double-cache method | |
US7284105B2 (en) | Fast and economical establishment of remote copy | |
US10997040B1 (en) | System and method for weight based data protection | |
CN104023056B (en) | The method and relevant device updated the data | |
CN104991926A (en) | File system recovery method and system | |
JP6697101B2 (en) | Information processing 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 |