CN107239505A - Cluster mirror image synchronization method and system - Google Patents
Cluster mirror image synchronization method and system Download PDFInfo
- Publication number
- CN107239505A CN107239505A CN201710328008.4A CN201710328008A CN107239505A CN 107239505 A CN107239505 A CN 107239505A CN 201710328008 A CN201710328008 A CN 201710328008A CN 107239505 A CN107239505 A CN 107239505A
- Authority
- CN
- China
- Prior art keywords
- file
- information
- node
- mirror image
- current original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
Abstract
The present invention relates to a kind of cluster mirror image synchronization method and system, wherein method comprises the following steps:Receive mirror is as synchronic command, the synchronic command includes group system and original file information, wherein group system includes each node and nodes folder, instructed according to mirror image synchronization in the file for specifying current original file information mirror image synchronization in each node into group system, obtain the image file of each node;Detect the image file information of current original file information and each node;When current original file information is identical with the image file information of each node, mirror image synchronization process is completed.Above-mentioned cluster mirror image synchronization method and system, when mirror image synchronization is completed, is verified to original file information and node image file information automatically, to ensure image file synchronously success, it is to avoid the influence to subsequent operation, reduces user's operation difficulty.
Description
Technical field
The present invention relates to cluster mirror image technology field, more particularly to a kind of cluster mirror image synchronization method and system.
Background technology
Group system, is a kind of computer system, and the computer software and/or hardware of many isomorphisms or isomery are connected
Carrying out height, closely cooperation completes evaluation work, and group system externally shows as single in a fictitious host computer, group system
Computer is commonly referred to as node, is generally connected by LAN, but also has other possible connected modes.Mirror image technology is by number
According to writing in two parts of independent disks simultaneously, such as RAID1 (Redundant Array of Independent Disks1, independence
Redundant arrays of inexpensive disks 1), or in volume resource of the write-in foundation on multiple physical resources.Wherein, a resource is referred to as original text
Part, another resource is as the copy of original document, and referred to as image file, can be by service switching when original document failure
To image file, to ensure that business is not interrupted.When setting up the mirror of original document and image file, by performing synchronization
All data of original document are all synchronized to image file by task, and when writing business datum, business datum is write simultaneously
Enter original document and image file, to ensure that the data of the two are consistent.Mirror image synchronization function is the basis of group system work, i.e.,
Need to carry out mirror image synchronization operation between cluster server when cluster starts.And cluster mirror image synchronization technology conventional at present is normal
Often because the reasons such as network interruption, read-write error cause mirror image synchronization operation failure, it is impossible to verified and repaired in time, after being
Continuous operation causes many inconvenience.
The content of the invention
It is that subsequent operation is caused not based on this, it is necessary to can not be verified and repair in time for mirror image synchronization operation failure
Just there is provided a kind of cluster mirror image synchronization method and system for problem.
A kind of cluster mirror image synchronization method, it is characterised in that comprise the following steps:
Receive mirror is as synchronic command, and the mirror image synchronization instruction includes group system information and original file information, wherein
The group system information includes the folder information that each nodal information and each node are specified;
Instructed according to mirror image synchronization by the current original document mirror image synchronization file that each node is specified into group system
In folder, the image file of each node is obtained;
Detect the image file information of the current original file information and each node;
When the current original file information is identical with the image file information of each node, mirror image synchronization is completed
Process.
A kind of cluster mirror image synchronization system, including:
Data obtaining module, for receive mirror as synchronic command, mirror image synchronization instruction include group system information with
Original file information, wherein the group system information includes the folder information that each nodal information and each node are specified;
Image file synchronization module, for being instructed according to mirror image synchronization by current original document mirror image synchronization to group system
In in the file specified of each node, obtain the image file of each node;
Image file detection module, the image file for detecting the current original file information and each node
Information;
Mirror image synchronization determining module, believes for the image file in the current original file information and each node
Manner of breathing simultaneously, completes mirror image synchronization process.
The cluster mirror image synchronization method and system of the present invention, after the completion of mirror image synchronization, automatically to original file information and
Node image file information is verified, and to ensure image file synchronously success, it is to avoid the influence to subsequent operation, reduces use
Family operation difficulty.
Brief description of the drawings
Schematic flow sheets of the Fig. 1 for cluster mirror image synchronization method of the invention in one embodiment;
Schematic flow sheets of the Fig. 2 for cluster mirror image synchronization method of the invention in another embodiment;
Schematic flow sheets of the Fig. 3 for cluster mirror image synchronization method of the invention in a wherein embodiment;
Schematic flow sheets of the Fig. 4 for cluster mirror image synchronization method of the invention in a wherein embodiment;
Schematic flow sheets of the Fig. 5 for cluster mirror image synchronization method of the invention in a wherein embodiment;
Structural representations of the Fig. 6 for cluster mirror image synchronization system of the invention in a wherein embodiment.
Embodiment
Present disclosure is described in further detail below in conjunction with preferred embodiment and accompanying drawing.Obviously, hereafter institute
The embodiment of description is only used for explaining the present invention, rather than limitation of the invention.Based on the embodiment in the present invention, this area is general
The every other embodiment that logical technical staff is obtained under the premise of creative work is not made, belongs to what the present invention was protected
Scope.It should be noted that for the ease of description, part related to the present invention rather than full content are illustrate only in accompanying drawing.
Schematic flow sheets of the Fig. 1 for cluster mirror image synchronization method of the invention in one embodiment, as shown in figure 1, this
Cluster mirror image synchronization method in inventive embodiments, comprises the following steps:
Step S110, receive mirror is as synchronic command, and receive mirror is as synchronic command, and the mirror image synchronization instruction includes cluster system
Information of uniting and original file information, wherein the group system information includes the file that each nodal information and each node are specified
Press from both sides information.
Group system refers to a kind of parallel or distributed system being made up of the computer interconnected, can be as single
Solely, unified computing resource is used.In the present embodiment, group system is by the system that at least a computer is constituted, its
In every computer is designated as a node.In addition, at least one file that is stored with each node.Original document refers to need
It is synchronized to the source material of each node in group system.
Mirror image synchronization instruction can be user's operation, and wherein mirror image synchronization instruction includes group system information and original
Fileinfo, in mirror image synchronization operating process, is instructed original document mirror image synchronization into group system according to mirror image synchronization
In the file that each node is specified.
Step S120, according to mirror image synchronization instruction by current original document mirror image synchronization into group system in each node
In the file specified, the image file of each node is obtained.
Step S130, detects the image file information of current original file information and each node.
Step S140, when current original file information is identical with the image file information of each node, completes mirror image same
Step process.
After the file for specifying current original document mirror image synchronization in each node into group system, each node
Corresponding image file will be obtained.Image file information to current original file information and each node carries out detection point
Analysis, in the image file information identical of current original file information and each node, completes mirror image synchronization process.
In one of which embodiment, as shown in Fig. 2 detecting the mirror image of current original file information and each node
Comprise the following steps in the step of fileinfo:
Step S131, it is random to extract that position is identical and quantity phase in the image file of current original document and each node
Deng file Slice Sequence, the file Slice Sequence of the image file of file Slice Sequence and each node to current original document
Functional operation is carried out, the file section of the file Slice Sequence information code of current original document and the image file of each node is obtained
Sequence information code.
Specifically, the functional operation can be hashed value functional operation and/or encryption function computing, wherein hash function
MD5 functions can be used, encryption function can use RC4 functions.MD5 (Message Digest Algorithm 5, pluck by information
Want algorithm 5) it is a kind of widely used hash function of computer safety field, it is commonly used on encryption and decryption technology, can be with
Say it is file " digital finger-print ".Any one file, either executable program, image file, temporary file or other
Any kind of file, let it be, and volume is much, has and the unique MD5 information codes of only one of which.MD5 will whole text
Part becomes scaling method by its irreversible character string, generates unique MD5 informative abstracts as one big text message, when
When file is changed, its MD5 will also change therewith.When two files are identical, the corresponding MD5 values of both of these documents
It is identical.
RC4 (Rivest Cipher 4) algorithm is the variable stream cipher algorithm cluster of key length, be one can be quickly soft
The new stream cipher algorithm that part is realized.RC4 algorithms are realized because its algorithm is succinct, safe, be easy to software, widely should
For in various commercial code products, a part for it or many important cryptographic protocols and standard.File sequence is carried out
RC4 algorithm computings, can produce corresponding file RC4 values.If two files are identical, the corresponding RC4 values of both of these documents
Also it is identical.
Calculated using MD5 functions and/or RC4 function pair file sequences, can obtain file sequence MD5 values and/
Or RC4 values, wherein file sequence MD5 values and/or RC4 values can be used as file sequence information code.In the present embodiment, complete
After mirror image synchronization operation, in the image file of current original document and each node, random extraction position is identical and quantity is equal
File Slice Sequence, the wherein quantity of extraction document Slice Sequence is not a definite value, can be according to the size of original document
Selective extraction suitable quantity file Slice Sequence, the bigger extraction document Slice Sequence quantity of original document is more under normal circumstances.
After the file Slice Sequence and the file Slice Sequence of the image file of each node for extracting current original document, to current former
The file Slice Sequence of the file Slice Sequence of beginning file and the image file of each node carries out MD5 values and/or RC4 values are calculated,
And compare the file Slice Sequence MD5 values of current original document and/or the file section sequence of the image file of RC4 values and each node
Arrange MD5 values and/or RC4 values.
Due to MD5 values and RC4 algorithms when calculating big file, it is necessary to the time is longer, and system operation can be produced
Raw certain influence, it is not smooth to may result in system operation, therefore in the present embodiment, using in current original document and Ge Jie
In the image file of point, the file Slice Sequence that position is identical and quantity is equal is extracted at random and carries out the calculating of MD5 and/or RC4 values
Compare, this alignments greatly improve comparison efficiency on the premise of ensureing to compare accuracy.Furthermore it is also possible to
With improving system operation stability.
Step S132, cuts in the file Slice Sequence information code of current original document and the file of image file of each node
Piece sequence information code-phase simultaneously, completes mirror image synchronization process.
File section and the file Slice Sequence MD5 values and/or RC4 of the image file of each node in current original document
When value is all identical, it is possible to it is determined that current original file information is identical with the image file information of each node, then complete mirror
As simultaneously operating.
It should be appreciated that the file Slice Sequence information code is not limited to file Slice Sequence MD5 values and/or RC4 values, root
According to the technical inspiration of the present invention, those skilled in the art can also be cut into slices using MD4 values, MD2 values and RC2 values etc. as file
Sequence information code.
In one of the embodiments, as shown in Fig. 2 the original file information includes file name information and file is big
Small information;The image file information also includes file name information and document size information;
In the image file of the current original document and each node, random extraction position is identical and quantity is equal
File Slice Sequence the step of before, it is further comprising the steps of:
Step S133, detect current original file information and the image file information of each node file name information and
Document size information;
Believe in the file name information and file size of current original file information and the image file information of each node
Simultaneously, the file Slice Sequence of random extraction same position and the current original document of equal amount and the mirror image of each node are literary for manner of breathing
The file Slice Sequence of part.
When carrying out mirror image synchronization, all data in original document are all synchronized to each node, so positive reason
The image file information of original file information and each node should complete identical under condition, i.e. original file information and each node
Image file information in data complete consistent.But in actual synchronization operating process, due to network interruption, read-write error etc.
Reason, causing the image file information of original file information and each node may differ.Therefore mirror image synchronization behaviour is completed
After work, the image file information of original file information and each node is detected.
First, the file name information and document size information to original document and the image file of each node are examined
Contrast is surveyed, when the title and document size information of original document and the image file of each node are different from, original document
Information and the image file information of each node are differed certainly, i.e., in the mirror image synchronization file of original document and each node
Data are not necessarily completely the same, improve detection efficiency.
It should be appreciated that the image file information of the current original file information and each node is not limited to Slice Sequence
Information code, technique according to the invention enlightenment, those skilled in the art can also be using other information as described current original
Fileinfo and image file information, realize the comparison of current original document and image file.
In one of the embodiments, as shown in figure 3, the present invention cluster mirror image synchronization method, in addition to:
Step S134, when the image file information of current original file information and each node is differed, is deleted
The image file of each node, again by current original document mirror image synchronization into group system each node.
Specifically, after by current original document mirror image synchronization to each node, current original file information and each are detected
The fileinfo of the image file of node, is differed in the image file information of current original file information and each node
When, show that the image file of current original document and each node is differed, mirror image synchronization operation failure.In this case,
All image files are deleted, mirror image synchronization operation is re-started.After simultaneously operating failure is found, repaired in time, side
Just use of user's later stage to file.
In wherein one specific embodiment, believe in the file name of current original document and the image file of each node
Breath and document size information are differed, and delete the image file of each node, again by current original document mirror image synchronization to collection
Each node in group's system.
Specifically, in current original document and file name information and the file size letter of the image file of each node
When breath is differed, i.e., the image file of current original document and each node is differed, and shows mirror image synchronization operation failure, at this
In the case of kind, all image files are deleted, mirror image synchronization operation is re-started.After simultaneously operating failure is found, enter in time
Row is repaired, and facilitates use of user's later stage to file.
Or current original document file Slice Sequence information code and each node image file file Slice Sequence
When information code is differed, in this case, all image files are deleted, re-start mirror image synchronization operation.Finding together
Walk after operation failure, repaired in time, facilitate use of user's later stage to file.
In wherein one specific embodiment, in the file Slice Sequence information code and the mirror of each node of current original document
When being differed as the file Slice Sequence information code of file, the image file of each node is deleted, again by current original document
Mirror image synchronization each node into group system.
Specifically, after the completion of mirror image synchronization operation, the image file of current original document and each node is detected first
File name information and document size information.In the file name information of current original document He the image file of each node
When identical with document size information, the file Slice Sequence information code of current original document and the image file of each node are detected
File Slice Sequence information code, in the file Slice Sequence information code and the text of the image file of each node in current original document
When part Slice Sequence information code is differed, show mirror image synchronization operation failure, in this case, delete all mirror image texts
Part, re-starts mirror image synchronization operation.After simultaneously operating failure is found, repaired in time, facilitate user's later stage to file
Use.
In a kind of optional embodiment, as shown in figure 3, deleting the image file of each node, described it will work as again
Preceding original document mirror image synchronization into group system after each node, in addition to:
Step S135, detects the image file information of current original file information and each node.
Step S136, until current original file information is identical with the image file information of each node and current original document
When mirror image synchronization number of operations is less than default number of times, mirror image synchronization operation is completed.
Mirror image synchronization in the present embodiment operate default number of times be alternatively, can be the numerical value of system default,
It can also be the number of operations of user's selection before mirror image synchronization operation is carried out.Mirror image synchronization operation is considered to system
Influence (for example:Run time and operational efficiency) etc. factor, mirror image synchronization number of operations should not too much also should not be too
It is few.The number of times for being typically chosen mirror image synchronization operation is 3 times.
In a kind of optional embodiment, as shown in figure 4, deleting the image file of each node, described it will work as again
Preceding original document mirror image synchronization into group system after each node, in addition to:
Step S135, detects the image file information of current original file information and each node.
Step S137, is differed and current original document in the image file information of current original file information and each node
When mirror image synchronization number of operations is more than default number of times, the error message of record mirror image synchronization operation.
Specifically, the file name information and file size of current original document and the image file of each node are being detected
Information differ or current original document file Slice Sequence information code and each node image file file cut into slices sequence
When column information code is differed, the image file of each node is deleted, again by current original document mirror image synchronization to group system
In each node, and the image file information of current original file information and each node is detected, in current original document letter
The image file information of breath and each node is differed and current original document mirror image synchronization number of operations is more than default time
During number, the error message of record mirror image synchronization operation.
Repeatedly again after mirror image synchronization operation (i.e. when the number of times of mirror image synchronization operation is more than defined number of times), current original
When the image file information of beginning fileinfo and each node is still differed, the error message of record mirror image synchronization operation.It is optional
Ground, the error message that can operate mirror image synchronization is recorded in daily record, and returns to error message, and wherein mirror image synchronization is operated
The reason for error message can include current mirror image synchronization fileinfo, mirror image synchronization operating mistake etc., it is easy to system maintenance
Personnel's checks, adds the efficiency of maintenance.
In a kind of optional embodiment, before receive mirror is as synchronic command, in addition to:
Step S150, starts Wed systems, and Web system calls shutil modules to send mirror image synchronization instruction.
The startup of web system is, it is necessary to a global command, such as python manager.py.Web system starts script
Ordered dependent on certain running environment and startup, such as:Javac/python/php, or packaged tomcat scripts/
start.sh;After system starts, user carries out mirror image in web terminal and enables operation, and backstage receives after user's operation, used
Then the original document mirror image synchronization that shutil modules select user utilizes into each node specified folder of group system
Shutil modules are detected to original file information and each node image file information.
For the ease of understanding the present invention, there is provided a more detailed embodiment.As shown in figure 5, a kind of cluster mirror image is same
One step process, is comprised the following steps that:
Step 510, web system is started.
Step 511, after system starts, user selects original file information and group system in web terminal, sends mirror image synchronization
Operational order is to mirror image synchronization system;
Step 512, after mirror image synchronization system receive mirror is as synchronic command, the mirror image for being selected user using shutil modules
File synchronization is into cluster server specified folder;
Step 513, after the completion of mirror image synchronization operation, verification original file information and each node image file message file
Name;
Step 514, verification original file information and each node image file information;If so, carrying out step 515;If it is not, entering
Row step 518;
Step 515, the quantity such as randomly select and the file Slice Sequence of the original document of same position and each node mirror image
The subfile Slice Sequence of file, the wherein quantity of extracted file Slice Sequence are determined by image file size;If so, being walked
Rapid 516;If it is not, carrying out step 518;
Step 516, the subfile Slice Sequence of the file Slice Sequence of original document and each node image file carries out MD5
Value and RC4 values are calculated, and are compared;If so, carrying out step 518;If it is not, carrying out step 518;
Step 517, if comparison result is identical, operate successfully, complete mirror image synchronization mistake;Otherwise step 518 is carried out;
Step 518, verify inconsistent;
Step 519, each node image file information and repeat step 512-517 are deleted;And record mirror image synchronization operation time
Number;
Step 520, judge whether mirror image synchronization number of operations is less than three times;If so, carrying out step 521;If it is not, being walked
Rapid 512.
Step 521, misregistration information is to journal file and returns to synchronized result to web terminal user.
According to the cluster mirror image synchronization method of the invention described above, the present invention also provides a kind of cluster mirror image synchronization system, under
The cluster mirror image synchronization system of the present invention is described in detail with reference to accompanying drawing and preferred embodiment for face.
Structural representations of the Fig. 6 for cluster mirror image synchronization system of the invention in one embodiment.As shown in fig. 6, should
Cluster mirror image synchronization system in embodiment, including:
Data obtaining module 10, for receive mirror as synchronic command, mirror image synchronization instruction includes group system information and original
Beginning fileinfo, wherein group system information include the folder information that each nodal information and each node are specified.
Image file synchronization module 20, for being instructed according to mirror image synchronization by current original document mirror image synchronization to cluster system
In the file that the node of each in system is specified, the image file of each node is obtained.
Image file detection module 30, the image file information for detecting current original file information and each node.
Mirror image synchronization determining module 40, for identical with the image file information of each node in current original file information
When, complete mirror image synchronization process.
In one of the embodiments, shown in reference picture 6, image file detection module 30 also includes file slice information code
Computing module 31:
File slice information code computing module 31, in the image file of current original document and each node, at random
Extract the file Slice Sequence that position is identical and quantity is equal, the mirror of file Slice Sequence and each node to current original document
As the file Slice Sequence of file carries out functional operation, the file Slice Sequence information code and each node of current original document are obtained
Image file file Slice Sequence information code.
Mirror image determining module 40 is used for file Slice Sequence information code and each node in the current original document
Image file file Slice Sequence information code it is identical when, complete mirror image synchronization process.
In one of the embodiments, shown in reference picture 6, the original file information also includes file name information and text
Part size information;The image file information also includes file name information and document size information;
Image file detection module 30 also includes file attribute information detection module:
File attribute information detection module 32 is used to detect that the image file of current original file information and each node is believed
The file name information and document size information of breath;
File slice information code computing module 31 is used to believe in the image file of current original file information and each node
The file name information of breath is identical with document size information, the random text for extracting same position and the current original document of equal amount
The file Slice Sequence of part Slice Sequence and the image file of each node, to the file Slice Sequence and Ge Jie of current original document
The file Slice Sequence of the image file of point carries out functional operation, obtains the file Slice Sequence information of the current original document
The file Slice Sequence information code of the image file of code and each node.
In one of the embodiments, shown in reference picture 6, image file synchronization module 20 is additionally operable in current original document
When information and the image file information of each node are differed, the image file of each node is deleted, again will current original text
Part mirror image synchronization each node into group system.
In one of the embodiments, shown in reference picture 6, image file detection module 30 is additionally operable to the current original text of detection
Part information and the image file information of each node.
Mirror image synchronization determining module 40 is additionally operable to the image file information in current original file information and each node
When identical and current original document mirror image synchronization number of operations is less than default number of times, mirror image synchronization operation is completed.
In one of the embodiments, shown in reference picture 6, in addition to mirror image error message memory module 50:
Image file detection module 30 is used for the image file for detecting the current original file information and each node
Information
Mirror image error message memory module 50 is used for the mirror image text in the current original file information and each node
When part information is differed and current original document mirror image synchronization number of operations is more than default number of times, record mirror image synchronization operation
Error message.
In one of the embodiments, shown in reference picture 6, in addition to:
Web starting modules 60, for starting Wed systems, Web system calls shutil modules to send mirror image synchronization instruction.
Above-mentioned cluster mirror image synchronization system can perform the cluster mirror image synchronization method that the embodiment of the present invention is provided, and possesses and holds
The corresponding functional module of row method and beneficial effect.As for the processing method performed by wherein each functional module, such as information
Acquisition module 10, image file synchronization module 20, image file detection module 30, mirror image synchronization determining module 40, mirror image mistake
Information storage module 50, can refer to the description in above method embodiment, is no longer repeated herein.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, the scope of this specification record is all considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and it describes more specific and detailed, but simultaneously
Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that coming for one of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of cluster mirror image synchronization method, it is characterised in that comprise the following steps:
Receive mirror is as synchronic command, and the mirror image synchronization instruction includes group system information and original file information, wherein described
Group system information includes the folder information that each nodal information and each node are specified;
According to mirror image synchronization instruction by the current original document mirror image synchronization file that each node is specified into group system,
Obtain the image file of each node;
Detect the image file information of the current original file information and each node;
When the current original file information is identical with the image file information of each node, mirror image synchronization mistake is completed
Journey.
2. cluster mirror image synchronization method according to claim 1, it is characterised in that detecting the current original document letter
Comprise the following steps in the step of ceasing the image file information with each node:
In the image file of the current original document and each node, the text that position is identical and quantity is equal is extracted at random
Part Slice Sequence, the file Slice Sequence of the image file of file Slice Sequence and each node to current original document carries out letter
Number computing, the file for obtaining the file Slice Sequence information code of the current original document and the image file of each node is cut
Piece sequence information code;
The current original document file Slice Sequence information code and each node image file file cut into slices sequence
Column information code-phase simultaneously, completes mirror image synchronization process.
3. cluster mirror image synchronization method according to claim 2, it is characterised in that the original file information also includes text
Part name information and document size information;The image file information also includes file name information and document size information;
In the image file of the current original document and each node, the text that position is identical and quantity is equal is extracted at random
It is further comprising the steps of before the step of part Slice Sequence:
Detect the current original file information and the file name information and file size of the image file information of each node
Information;
Believe in the file name information and file size of the current original file information and the image file information of each node
Simultaneously, the file Slice Sequence of random extraction same position and the current original document of equal amount and the mirror image of each node are literary for manner of breathing
The file Slice Sequence of part.
4. the cluster mirror image synchronization method according to claim any one of 1-3, it is characterised in that also include:
When the image file information of the current original file information and each node is differed, each node is deleted
Image file, again by described current original document mirror image synchronization each node into group system.
5. cluster mirror image synchronization method according to claim 4, it is characterised in that delete the image file of each node,
Again by the current original document mirror image synchronization into group system after each node, in addition to:
Detect the image file information of the current original file information and each node;
Until the current original file information is identical with the image file information of each node and current original document mirror image
When simultaneously operating number of times is less than default number of times, mirror image synchronization operation is completed.
6. cluster mirror image synchronization method according to claim 4, it is characterised in that delete the image file of each node,
Again by the current original document mirror image synchronization into group system after each node, in addition to:
Detect the image file information of the current original file information and each node;
Differed and current original document mirror image in the image file information of the current original file information and each node
When simultaneously operating number of times is more than default number of times, the error message of record mirror image synchronization operation.
7. a kind of cluster mirror image synchronization system, it is characterised in that including:
Data obtaining module, for receive mirror as synchronic command, the mirror image synchronization instruction includes group system information and original
Fileinfo, wherein the group system information includes the folder information that each nodal information and each node are specified;
Image file synchronization module, for according to mirror image synchronization instruction by current original document mirror image synchronization into group system it is each
In the file that individual node is specified, the image file of each node is obtained;
Image file detection module, for detecting that the image file of the current original file information and each node is believed
Breath;
Mirror image synchronization determining module, for the image file information phase in the current original file information and each node
Meanwhile, complete mirror image synchronization process.
8. cluster mirror image synchronization system according to claim 7, it is characterised in that the image file detection module is also wrapped
Include:
File slice information code computing module, in the image file of the current original document and each node, with
Machine extracts the file Slice Sequence that position is identical and quantity is equal, the file Slice Sequence and each node to current original document
The file Slice Sequence of image file carries out functional operation, obtain the current original document file Slice Sequence information code and
The file Slice Sequence information code of the image file of each node;
The mirror image determining module is used for file Slice Sequence information code and each node in the current original document
When the file Slice Sequence information code of image file is identical, mirror image synchronization process is completed.
9. cluster mirror image synchronization system according to claim 8, it is characterised in that the original file information also includes text
Part name information and document size information;The image file information also includes file name information and document size information;
The image file detection module also includes:
File attribute information detection module, the image file information for detecting the current original file information and each node
File name information and document size information;
The file slice information code computing module is used for the image file in the current original file information and each node
The file name information of information is identical with document size information, random same position and the current original document of equal amount of extracting
The file Slice Sequence of the image file of file Slice Sequence and each node, file Slice Sequence to current original document and each
The file Slice Sequence of the image file of node carries out functional operation, obtains the file Slice Sequence letter of the current original document
Cease the file Slice Sequence information code of the image file of code and each node.
10. the cluster mirror image synchronization system according to claim any one of 7-9, it is characterised in that
The image file synchronization module is preferred for the mirror image text in the current original file information and each node
When part information is differed, the image file of each node is deleted, again by the current original document mirror image synchronization to cluster system
The node of each in system;
Or
The mirror image synchronization determining module is preferentially used for the image file in the current original file information and each node
When information is identical and current original document mirror image synchronization number of operations is less than default number of times, mirror image synchronization operation is completed;
Or the mirror image error message memory module is preferred for the mirror in the current original file information and each node
As fileinfo is differed and when current original document mirror image synchronization number of operations is more than default number of times, record mirror image synchronization behaviour
The error message of work.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710328008.4A CN107239505B (en) | 2017-05-10 | 2017-05-10 | Cluster mirror synchronization method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710328008.4A CN107239505B (en) | 2017-05-10 | 2017-05-10 | Cluster mirror synchronization method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107239505A true CN107239505A (en) | 2017-10-10 |
CN107239505B CN107239505B (en) | 2020-09-15 |
Family
ID=59985513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710328008.4A Active CN107239505B (en) | 2017-05-10 | 2017-05-10 | Cluster mirror synchronization method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107239505B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113315795A (en) * | 2020-02-26 | 2021-08-27 | 顺丰科技有限公司 | Synchronization method and device of cloud host mirror image and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1862504A (en) * | 2005-05-11 | 2006-11-15 | 华为技术有限公司 | Method of multi-computer back-up |
CN101309167A (en) * | 2008-06-27 | 2008-11-19 | 华中科技大学 | Disaster allowable system and method based on cluster backup |
CN102012846A (en) * | 2010-12-12 | 2011-04-13 | 成都东方盛行电子有限责任公司 | Integrity check method for large video file |
CN105872056A (en) * | 2016-04-01 | 2016-08-17 | 浪潮电子信息产业股份有限公司 | Method and system for rapidly synchronizing computer cluster data |
CN106250781A (en) * | 2016-07-31 | 2016-12-21 | 山东大学 | A kind of user profile guard method based on virtual machine increment mirror image |
-
2017
- 2017-05-10 CN CN201710328008.4A patent/CN107239505B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1862504A (en) * | 2005-05-11 | 2006-11-15 | 华为技术有限公司 | Method of multi-computer back-up |
CN101309167A (en) * | 2008-06-27 | 2008-11-19 | 华中科技大学 | Disaster allowable system and method based on cluster backup |
CN102012846A (en) * | 2010-12-12 | 2011-04-13 | 成都东方盛行电子有限责任公司 | Integrity check method for large video file |
CN105872056A (en) * | 2016-04-01 | 2016-08-17 | 浪潮电子信息产业股份有限公司 | Method and system for rapidly synchronizing computer cluster data |
CN106250781A (en) * | 2016-07-31 | 2016-12-21 | 山东大学 | A kind of user profile guard method based on virtual machine increment mirror image |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113315795A (en) * | 2020-02-26 | 2021-08-27 | 顺丰科技有限公司 | Synchronization method and device of cloud host mirror image and storage medium |
CN113315795B (en) * | 2020-02-26 | 2024-03-05 | 顺丰科技有限公司 | Cloud host mirror synchronization method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107239505B (en) | 2020-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10721256B2 (en) | Anomaly detection based on events composed through unsupervised clustering of log messages | |
CA2892019C (en) | Method and apparatus for recovering data | |
WO2014169738A1 (en) | Active and standby databases, consistency checking and recovering methods and apparatuses, and storage medium | |
CN109522160B (en) | Method and system for comparing and backing up file directory by saving file information abstract | |
JP5708107B2 (en) | Duplicate file detection device | |
CN103917960A (en) | Storage apparatus and duplicate data detection method | |
JP2001508894A (en) | System and method for backing up computer files in a wide area computer network | |
CN106844102B (en) | Data recovery method and device | |
CN105740103B (en) | A kind of NTFS deletion file access pattern method and apparatus based on daily record | |
CN110543386B (en) | Data storage method, device, equipment and storage medium | |
CN105376277A (en) | Data synchronization method and device | |
CN104035839A (en) | Method for implementation of recovery of Android system private data | |
KR102012482B1 (en) | Automatic backup apparatus based on real-time file change detection | |
CN103838645B (en) | Remote difference synthesis backup method based on Hash | |
JP2940494B2 (en) | Information retrieval device | |
CN108573172B (en) | Data checking and storing method and device | |
JP4960417B2 (en) | Method and apparatus for determining start / end offsets of variable length data fragments | |
CN107239505A (en) | Cluster mirror image synchronization method and system | |
CN112738249B (en) | File uploading method, device, equipment and storage medium based on quantitative transaction | |
Ravi et al. | A method for carving fragmented document and image files | |
CN109783463A (en) | File synchronisation method, device and computer readable storage medium | |
CN117076204A (en) | Remote replication task recovery method, device, equipment and medium | |
CN106095808B (en) | A kind of method and apparatus that MDB file fragmentation restores | |
CN112433810A (en) | Docker container mirror image storage and pulling method and device and computer readable storage medium | |
EP2787448A1 (en) | Method and device for determining font |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |