[go: up one dir, main page]

CN106502831B - A kind of method and device of image file duplication - Google Patents

A kind of method and device of image file duplication Download PDF

Info

Publication number
CN106502831B
CN106502831B CN201610936644.0A CN201610936644A CN106502831B CN 106502831 B CN106502831 B CN 106502831B CN 201610936644 A CN201610936644 A CN 201610936644A CN 106502831 B CN106502831 B CN 106502831B
Authority
CN
China
Prior art keywords
write request
image file
data
corresponding numerical
numerical value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610936644.0A
Other languages
Chinese (zh)
Other versions
CN106502831A (en
Inventor
夏文
付忞
吴大立
古亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201610936644.0A priority Critical patent/CN106502831B/en
Publication of CN106502831A publication Critical patent/CN106502831A/en
Application granted granted Critical
Publication of CN106502831B publication Critical patent/CN106502831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of method and devices of image file duplication.The method comprise the steps that obtaining the target position information of the data block of current image file duplication when the image file of the heart carries out image file duplication to Disaster Preparation Center in production;If receiving the write request to image file, and the corresponding numerical value in position that write request starts is greater than the corresponding numerical value in target position, then directly execute write request, if the corresponding numerical value in the position that write request terminates is less than the corresponding numerical value in target position, write request is then executed, and write request is recorded in the write request log pre-established;When the image file of the heart carries out image file duplication completion to Disaster Preparation Center in production, the data of write request log are transmitted into Disaster Preparation Center and are reset, to form a valid image snapshot.It is extremely low that the embodiment of the present invention requests operation to influence upper layer I/O in image file reproduction process, reduces the daily record reproduction operation close to half, improves the efficiency of image file duplication.

Description

A kind of method and device of image file duplication
Technical field
The present invention relates to storage calamities for technical field, in particular to a kind of square law device of image file duplication.
Background technique
Super fusion all-in-one machine is to be fused together the basic components such as virtual management software, virtual memory, virtual network, Using the IT infrastructure portion of the softwares such as 86 server hardware of standard x carrying virtual management software, virtual memory, virtual network Part.Super fusion all-in-one machine storage uses distributed storage framework, needs first to set up cluster before use, all all-in-one machines in cluster Physical disk is invented memory resource pool, then provides storage service to virtual management software.By virtual management software, Virtual machine can be allowed to share same physical computer, but for virtual machine, it operates in virtual management software and simulates Inside the hardware system come, as oneself having monopolized entire computer.To sum up, super fusion all-in-one machine helps enterprise to subtract Lack " manual labor " that IT infrastructure needs to consume a lot of time and resources during deployment, has also been cloud platform, data Deployment of the innovation and applications such as analysis system in enterprise, which provides, disposes solution easier, that extension is smoother.
For IT field, occurs operation error in order to prevent, system failure natural calamity leads to the feelings of loss of data Condition, under normal circumstances, it is standby to need to carry out data calamity, business high continuity highly reliable to be finally reached system, data High Availabitity etc. Purpose.In super fusion all-in-one machine, image file duplication is that the virtual machine image file of the production center is copied to Disaster Preparation Center Information storing process, with achieve the purpose that data catastrophic failure-tolerant backup and improve data reliability.
It is raw in image file reproduction process in order to eliminate influence of the image file duplication to super fusion all-in-one machine business Production center ensures the continuous service of its business using snapping technique, to reduce image file duplication to super fusion all-in-one machine system The influence that system business operates normally.Here the main function of snapshot is that an image file data access is provided for Disaster Preparation Center Channel, when the production center is while I/O business operates normally, the accessible snapshot data of Disaster Preparation Center realizes that image file is multiple System.Existing snapshot mainly has two kinds of Copy on write (Copy On Write, COW) and I/O redirection (I/O Redirect).
These existing image file reproduction technologies based on snapping technique are inadequate, for example, Copy on write The write operation operation of technique influence upper-layer service, it is very big for intensive service impact is write in other words, it is the production center Each write operation increase a write operation, which increase the delays of the write operation of system, at the same also be image file dubs The expense of disk random access is carried out;And I/O redirection is then very big to intensive service impact is read, because of write operation requests It is written to other a piece of memory space, then each read request requires to look up whether its data is redirected, it originally may sequence Read request operation become disk random access, the response time of system upper-layer service is increased in this way, in addition, image file Also need additionally to merge the data that I/O is redirected after duplication, which increases the influences to upper-layer service.
Summary of the invention
The embodiment of the invention provides a kind of square law devices of image file duplication, avoid the mirror image based on traditional snapshot The problem of influence of the file replication technique to upper-layer service, the delay of increase write operation or upper-layer service response time.
In a first aspect, the embodiment of the present application provides a kind of method of image file duplication, the method is applied to the standby system of calamity The production center in system, the disaster recovery and backup systems further include Disaster Preparation Center, and the production center is by network as unit of data block Image file replicate data is sent to Disaster Preparation Center, which comprises
When image file in the production center carries out image file duplication to Disaster Preparation Center, current image file is obtained The target position information of the data block of duplication;
If receiving the write request to the image file, and the corresponding numerical value in position that the write request starts is greater than institute The corresponding numerical value in target position is stated, then directly executes the write request, if the corresponding numerical value in position that the write request terminates is small In the corresponding numerical value in the target position, then the write request is executed, and the write request is recorded in writing of pre-establishing and is asked It asks in log;
When image file in the production center carries out image file duplication completion to Disaster Preparation Center, by the write request The data of log are transferred to the Disaster Preparation Center, and form effective snapshot of image file duplication.
Optionally, the method also includes:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and described write is asked The corresponding numerical value in the position of end is asked to be greater than the corresponding numerical value in the target position, then to greater than the corresponding number in the target position The data block of value executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, And the write request is recorded in the write request log pre-established.
Optionally, after described receive to the write request of the image file, the method also includes:
Lock the corresponding numerical variable in the target position;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly execution After the write request, the corresponding numerical variable in the target position is unlocked;
When in the position that the write request terminates, corresponding numerical value is less than the corresponding numerical value in the target position, described in execution Before write request, the corresponding numerical variable in the target position is unlocked.
Optionally, the method also includes:
When the data by write request log are transferred to the Disaster Preparation Center, continue the note of write request log Record, the data of the write request log saved before starting the data by write request log and being transferred to the Disaster Preparation Center When being transmitted, the write request daily record data saved after the data transmission for starting write request log is sent.
Second aspect, the application provide a kind of method of image file duplication, and the method is applied in disaster recovery and backup systems Disaster Preparation Center, the disaster recovery and backup systems further include the production center, and the Disaster Preparation Center receives life by network as unit of data block Production center carries out the data that image file duplication is sent, which comprises
Receive the image file data block that the production center is sent;
In the image file that image file data block write-in is pre-created;
When the image file replicates completion, the write request daily record data that the production center is sent is received;
According to the write request daily record data, write request operation is executed in the image file, resets write request log.
Optionally, described according to write request daily record data, write request operation is executed in the image file, comprising:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
Optionally, the method also includes:
After receiving the write request daily record data that the production center is sent, continue to what the production center was sent Iteration daily record data.
The third aspect, the application provide a kind of device of image file duplication, and described device is applied in disaster recovery and backup systems The production center, the disaster recovery and backup systems further include Disaster Preparation Center, and the production center is standby to calamity as unit of data block by network Center sends image file replicate data, and described device includes:
Acquiring unit obtains when carrying out image file duplication to Disaster Preparation Center for the image file in the production center Take the target position information of the data block of current image file duplication;
Write request processing unit, if for receiving the write request to the image file, and the write request starts The corresponding numerical value in position is greater than the corresponding numerical value in the target position, then the write request is directly executed, if the write request knot The corresponding numerical value in the position of beam is less than the corresponding numerical value in the target position, then executes the write request, and by the write request It is recorded in the write request log pre-established;
Log transmission unit carries out image file to Disaster Preparation Center for the image file in the production center and has replicated The data of the write request log are transferred to the Disaster Preparation Center by Cheng Shi, and form the effective fast of an image file duplication According to.
Optionally, the write request processing unit is also used to:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and described write is asked The corresponding numerical value in the position of end is asked to be greater than the corresponding numerical value in the target position, then to greater than the corresponding number in the target position The data block of value executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, And the write request is recorded in the write request log pre-established.
Optionally, described device further includes locking unit, and the locking unit is used for:
After described receive to the write request of the image file, locks the corresponding numerical value in the target position and become Amount;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly execution After the write request, the corresponding numerical variable in the target position is unlocked;
When in the position that the write request terminates, corresponding numerical value is less than the corresponding numerical value in the target position, described in execution Before write request, the corresponding numerical variable in the target position is unlocked.
Optionally, the write request processing unit is also used to that the data of the write request log are transferred to the calamity is standby When center, continue the record of write request log;
The log transmission unit is also used to starting the data of the write request log being transferred to the Disaster Preparation Center The data of the write request log saved are transmitted before when, the data transmission preservation later for starting write request log is sent Write request daily record data.
Fourth aspect, the application also provide a kind of device of image file duplication, and described device is applied in disaster recovery and backup systems Disaster Preparation Center, the disaster recovery and backup systems further include the production center, and the Disaster Preparation Center is received as unit of data block by network The production center carries out the data that image file duplication is sent, and described device includes:
Image file receiving unit, the image file data block sent for receiving the production center;
Writing unit, for the image file data block to be written in the image file being pre-created;
Log receiving unit is asked for when the image file replicates completion, receiving the writing for production center transmission Seek daily record data;
Execution unit, for executing write request operation, weight in the image file according to the write request daily record data Put write request log.
Optionally, the execution unit is specifically used for:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
Optionally, the log receiving unit be also used to receive write request daily record data that the production center is sent it Afterwards, the iteration daily record data that the production center is sent is continued to.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
The read-write requests of the production center of the embodiment of the present invention operate normally, and Disaster Preparation Center is also that normal sequence reads mirror image text Number of packages evidence passes through the position number corresponding with the target position for the data block that current image file replicates for the write request that judgement obtains The relationship of value judges whether to need to record corresponding write request into write request log, and image file has been copied over New write request is charged to write request log by (containing what is replicated) region;Equal image files duplication is completed, then write asking It asks daily record reproduction to Disaster Preparation Center, just forms primary complete image file duplication in this way.The embodiment of the present invention is in image file It requests operation to influence upper layer I/O in reproduction process extremely low, only to the write request in replicated region, carries out write request day Will record;Simultaneously as only carrying out write request log recording to replicated region, reduce last operation close to half Daily record reproduction operation, improves the efficiency of image file duplication, while maintaining effective snapshot of image file duplication.
Detailed description of the invention
Fig. 1 is a configuration diagram of disaster recovery and backup systems in the embodiment of the present invention;
Fig. 2 is one embodiment schematic diagram for the method that image file replicates in the embodiment of the present invention;
Fig. 3 is that target position and write request position compare embodiment schematic diagram in the embodiment of the present invention;
Fig. 4 is synchronous doubling time axis embodiment schematic diagram in the embodiment of the present invention;
Fig. 5 is asynchronous replication time shaft embodiment schematic diagram in the embodiment of the present invention;
Fig. 6 is another embodiment schematic diagram for the method that image file replicates in the embodiment of the present invention;
Fig. 7 is one embodiment schematic diagram for the device that image file replicates in the embodiment of the present invention;
Fig. 8 is another embodiment schematic diagram for the method that image file replicates in the embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
Description and claims of this specification and the (if present)s such as term " first " in above-mentioned attached drawing, " second " It is to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that the number used in this way According to being interchangeable under appropriate circumstances, so as to the embodiments described herein can in addition to the content for illustrating or describing herein with Outer sequence is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover non-exclusive packet Contain, for example, what the process, method, system, product or equipment for containing a series of steps or units were not necessarily limited to be clearly listed Those step or units, but may include be not clearly listed or it is intrinsic for these process, methods, product or equipment Other step or units.
The technology being partially related in the embodiment of the present invention is simply introduced first below.
Super fusion all-in-one machine: the basic components such as virtual management software, virtual memory, virtual network are fused together, Using the IT infrastructure portion of the softwares such as 86 server hardware of standard x carrying virtual management software, virtual memory, virtual network Part.Storage uses distributed storage framework, needs first to set up cluster before use, the physical disk of all all-in-one machines is empty in cluster Intend into memory resource pool, then provides storage service to virtual management software.Wherein crucial technology has Hypervisor, i.e., empty Quasi-ization management program, computer that can be virtual by the computer simulation Cheng Duotai of a physics, and in the environment of virtualization The software of face operation operating system.By virtual management software, virtual machine can be allowed to share same physical computer, but right For virtual machine, it operates in virtual management software and simulates inside the hardware system come, as oneself having monopolized entire meter Calculation machine is the same.It needs to expend during deployment greatly to sum up, super fusion all-in-one machine helps enterprise to reduce IT infrastructure The deployment of the innovation and applications in enterprise such as " manual labor " for measuring time and resource is also cloud platform, data analysis system provide The solution that deployment is easier, extension is smoother.
Data calamity is standby: data calamity is data disaster backup for full name, is referred to prevent operation error or the system failure Lead to loss of data, and by total system or partial data set, other storages, which are copied to, from the hard disk or array of applied host machine is situated between The process of matter.Data calamity is standby at this stage mainly uses three center disaster recovery solution of two places, and two places refer to that same city, strange land, three centers are Refer to the production center, with city disaster recovery center, long-distance disaster center.Wherein refer to the double centers in city and establishes two in same city or neighbouring city A data center that can independently undertake critical system operation, double centers have substantially equivalent traffic handing capacity and pass through high speed Link real-time synchronization data can share the operation of business and management system, and changeable operation under even in everyday situations simultaneously;Disaster feelings The standby emergency switching of calamity can be carried out under condition in the case where not losing data substantially, keeps business continuity operation.With strange land calamity for mould Formula compares, with the double centers in city with cost of investment is low, construction speed is fast, operation management is relatively easy, reliability is more high excellent Point.Strange land Disaster Preparation Center, which refers to, establishes the Disaster Preparation Center of a backup in the city in strange land, is used for bicentric data backup, when When double centers the reasons such as natural calamity occur and break down, strange land Disaster Preparation Center can carry out the extensive of business with Backup Data It is multiple, to be finally reached the purpose of system is highly reliable, the high continuity of business, data High Availabitity.
Disaster tolerance system: for IT, the ring of various disasters can be exactly dealt with for one that computer information system provides Border.When computer system by the irresistible natural disaster such as such as fire, floods, earthquake, war and computer crime, When the human-made disasters such as computer virus, power down, network/communication failure, hardware/software mistake and manual operation mistake, disaster tolerance system System will guarantee the safety (data disaster tolerance) of user data, even, a more perfect disaster tolerance system, moreover it is possible to provide uninterrupted Application service (apply disaster tolerance).It can be said that disaster tolerance system is the standby highest level of data calamity.
Store snapshot: about a completely available copy of specified data acquisition system, which includes corresponding data at some The image at time point (time point that copy starts).Snapshot can be a copy of the data represented by it, be also possible to count According to a duplicate.The effect of snapshot is mainly able to carry out online data backup and restores.When storage equipment is applied Quick data recovery can be carried out when failure or file corruption, and data are restored to the state at some available time point.Fastly According to another effect be for storage user provide another data access channel, when former data carry out application on site processing When, the accessible snapshot data of user can also carry out the work such as testing using snapshot.Existing snapshot mainly has Copy on write Two kinds are redirected with IO.
Image file duplication: in super fusion all-in-one machine, image file duplication is by the virtual machine image text of the production center Part copies to the information storing process of Disaster Preparation Center, to achieve the purpose that data catastrophic failure-tolerant backup and improve data reliability.In order to Influence of the image file duplication to super fusion all-in-one machine business is eliminated, in image file reproduction process, the production center uses fast The continuous service of its business is ensured according to technology, and super fusion integrated machine system business is normally transported to reduce image file duplication Capable influence.
Particular content in the embodiment of the present invention is described below.
As shown in Figure 1, the embodiment of the present invention is applied to disaster recovery and backup systems, which includes the production center and at least one Disaster Preparation Center, the production center send image file replicate data to Disaster Preparation Center as unit of data block by network, wherein mirror As file replicate basic unit be data block, size can be adjusted voluntarily as the case may be, for example, 2MB, bandwidth provide In the case that source meets, 5M, 10M, 50M etc. can also be.
Referring to Fig. 2, method one embodiment that image file replicates in the embodiment of the present invention includes:
201, when the image file in the production center carries out image file duplication to Disaster Preparation Center, current mirror image is obtained The target position information of the data block of file duplication;
If 202, receiving the write request to the image file, and the corresponding numerical value in position that the write request starts is big In the corresponding numerical value in the target position, then the write request is directly executed, if the corresponding number in position that the write request terminates Value is less than the corresponding numerical value in the target position, then executes the write request, and the write request is recorded in and is pre-established In write request log;
203, it when the image file in the production center carries out image file duplication completion to Disaster Preparation Center, is write described The data of Request Log are transferred to the Disaster Preparation Center, and form effective snapshot of image file duplication.
The read-write requests of the production center of the embodiment of the present invention operate normally, and Disaster Preparation Center is also that normal sequence reads mirror image text Number of packages evidence passes through the position number corresponding with the target position for the data block that current image file replicates for the write request that judgement obtains The relationship of value judges whether to need to record corresponding write request into write request log, and image file has been copied over New write request is charged to write request log by (containing what is replicated) region;Equal image files duplication is completed, then write asking It asks daily record reproduction to Disaster Preparation Center, just forms primary complete image file duplication in this way.The embodiment of the present invention is in image file Hardly I/O request operation in upper layer is impacted in reproduction process, only to the write request in replicated region, carries out one Secondary write request log recording;Simultaneously as only carrying out write request log recording to replicated region, reduce last operation Daily record reproduction close to half operates.
And the snapshot point that image file replicates in the embodiment of the present invention has been deferred to image file end of transmission Time point, and the snapshot point of traditional image file duplication is the time point that image file transmission starts.It ensure that image file The timeliness of duplication improves the efficiency of image file duplication.
Optionally, the method also includes:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and described write is asked The corresponding numerical value in the position of end is asked to be greater than the corresponding numerical value in the target position, then to greater than the corresponding number in the target position The data block of value executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, And the write request is recorded in the write request log pre-established.
As shown in figure 3, the position of identification data block is the target position of the data block of current image file duplication.It is asked if writing Ask before the target position that (embodiment of the present invention judged by data block location, such as the position that write request starts The comparison of corresponding with target position numerical value, the numerical value can be the number of data block, such as 1,2,3 ..., from small to large, data The position of block 1 is before the position of data block 2), the write request is directly executed, if the position that the write request terminates is corresponding Numerical value is less than the corresponding numerical value in the target position, then executes the write request, and the write request is recorded in and is pre-established Write request log in.If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and The corresponding numerical value in the position that the write request terminates is greater than the corresponding numerical value in the target position, then to greater than the target position The data block of corresponding numerical value executes the write request;To described in the data block execution less than the corresponding numerical value in the target position Write request, and the write request is recorded in the write request log pre-established.
Optionally, after described receive to the write request of the image file, the method also includes:
Lock the corresponding numerical variable in the target position;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly execution After the write request, the corresponding numerical variable in the target position is unlocked;
When in the position that the write request terminates, corresponding numerical value is less than the corresponding numerical value in the target position, described in execution Before write request, the corresponding numerical variable in the target position is unlocked.
Specifically, target position is set as variable CUR, the write request of the production center then presses region division progress, this when It waits and first locks variable CUR:
If the initial position of write request is greater than CUR, write request is normally executed, CUR is then unlocked.
If the end position of write request is less than CUR, CUR is unlocked, write request is executed, write request data is charged into write request day Will.
If write request range spans CUR, write request is split into two parts according to the position CUR, for being greater than the region CUR Write request executes write request, unlocks CUR;For being less than the write request in the region CUR, CUR is unlocked, executes write request, and will write and ask Data are asked to charge to write request log.
Optionally, the method also includes:
When the data by the write request log are transferred to the Disaster Preparation Center, continue write request log Record, the write request log saved before starting the data by the write request log and being transferred to the Disaster Preparation Center Data when being transmitted, send the write request daily record data saved after the data transmission for starting write request log.
The embodiment of the present invention can be the synchronization replication mode of disaster recovery and backup systems, be also possible to asynchronous replication mode, as Fig. 4, Shown in Fig. 5, synchronous duplication also needs to wait for the long-range of Disaster Preparation Center after the completion of referring to the writing and do request operation of each production center It is just discharged after the completion of duplication.Fig. 4 illustrates the synchronous duplication disaster tolerance time shaft figure of data based on image file duplication, Middle time point t2 is the practical Snapshot time point of the mirror image, and t3 is the time point that data start synchronous duplication, multiple to iteration log System terminates, so that it may open the synchronization copy function of disaster recovery and backup systems, i.e., it is the operation of write request each time of the production center is all synchronous To Disaster Preparation Center.
Certainly, image file duplication can also be easy to turn to the asynchronous replication mode of disaster recovery and backup systems, and asynchronous replication is Referring to and operates the write request of the production center, Disaster Preparation Center is copied in a manner of running background, and each write request normally discharges, Without waiting for the completion of remote copy.As shown in figure 5, this patent only needs to terminate daily record reproduction here, that is, complete primary Complete image file duplication, then circulation carries out log recording and duplication, completes the calamity of asynchronous replication for function.
Furthermore, it is noted that operations such as special write requests, such as file renaming, deletion, creation in the embodiment of the present invention It is not applicable, traditional file read-write data block operation is only used only.
The embodiment of the method for the image file duplication of the other side in the embodiment of the present invention is described below.
Referring to Fig. 6, for another embodiment schematic diagram of image file duplication in the embodiment of the present invention, this method application Disaster Preparation Center in disaster recovery and backup systems, the disaster recovery and backup systems further include the production center, and the Disaster Preparation Center is by network with data Block is the data that unit receives that the production center carries out image file duplication transmission, which comprises
601, the image file data block that the production center is sent is received;
602, in the image file that image file data block write-in is pre-created;
603, when the image file replicates completion, the write request daily record data that the production center is sent is received;
604, according to the write request daily record data, write request operation is executed in the image file, resets write request Log.
Optionally, according to the write request daily record data, write request operation is executed in the image file, comprising:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
Optionally, the method also includes:
After receiving the write request daily record data that the production center is sent, continue to what the production center was sent Iteration daily record data.
The embodiment for the device that image file replicates in the embodiment of the present invention is described below.
Referring to Fig. 7, for one embodiment schematic diagram of the device of image file duplication in the embodiment of the present invention, the device Applied to the production center in disaster recovery and backup systems, the disaster recovery and backup systems further include Disaster Preparation Center, the production center by network with Data block is unit to Disaster Preparation Center's transmission image file replicate data, and described device includes:
Acquiring unit 701, when carrying out image file duplication to Disaster Preparation Center for the image file in the production center, Obtain the target position information of the data block of current image file duplication;
Write request processing unit 702, if for receiving the write request to the image file, and the write request starts The corresponding numerical value in position be greater than the corresponding numerical value in the target position, then the write request is directly executed, if the write request The corresponding numerical value in the position of end is less than the corresponding numerical value in the target position, then executes the write request, and described write is asked It asks and is recorded in the write request log pre-established;
Log transmission unit 703 carries out image file to Disaster Preparation Center for the image file in the production center and answers When system is completed, the data of the write request log are transferred to the Disaster Preparation Center, and form having for an image file duplication Imitate snapshot.
Optionally, the write request processing unit 702 is also used to:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and described write is asked The corresponding numerical value in the position of end is asked to be greater than the corresponding numerical value in the target position, then to greater than the corresponding number in the target position The data block of value executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, And the write request is recorded in the write request log pre-established.
Optionally, described device further includes locking unit 704, and the locking unit 704 is used for:
After described receive to the write request of the image file, locks the corresponding numerical value in the target position and become Amount;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly execution After the write request, the corresponding numerical variable in the target position is unlocked;
When in the position that the write request terminates, corresponding numerical value is less than the corresponding numerical value in the target position, described in execution Before write request, the corresponding numerical variable in the target position is unlocked.
Optionally, the write request processing unit 702 be also used to the data of the write request log are transferred to it is described When Disaster Preparation Center, continue the record of write request log;
The log transmission unit 703 is also used to starting for the data of the write request log to be transferred to the calamity in When the data of the write request log saved before the heart are transmitted, the data transmission for sending beginning write request log saves later Write request daily record data.
Referring to Fig. 8, for another embodiment schematic diagram of the device of image file duplication in the embodiment of the present invention, the dress The Disaster Preparation Center being applied in disaster recovery and backup systems is set, the disaster recovery and backup systems further include the production center, and the Disaster Preparation Center passes through network The production center is received as unit of data block and carries out the data that image file duplication is sent, and described device includes:
Image file receiving unit 801, the image file data block sent for receiving the production center;
Writing unit 802, for the image file data block to be written in the image file being pre-created;
Log receiving unit 803, for receiving writing for the production center transmission when the image file replicates completion Request Log data;
Execution unit 804, for executing write request behaviour in the image file according to the write request daily record data Make, resets write request log.
Optionally, the execution unit 804 is specifically used for:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
Optionally, the log receiving unit 803 is also used in the write request log number for receiving the production center transmission The iteration daily record data sent according to the production center later, is continued to.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (14)

1. a kind of method of image file duplication, which is characterized in that the method is applied to the production center in disaster recovery and backup systems, institute Stating disaster recovery and backup systems further includes Disaster Preparation Center, and the production center sends mirror image to Disaster Preparation Center as unit of data block by network File replicate data, which comprises
When image file in the production center carries out image file duplication to Disaster Preparation Center, current image file duplication is obtained Data block target position information;
If receiving the write request to the image file, and the corresponding numerical value in position that the write request starts is greater than the mesh The corresponding numerical value of cursor position, then directly execute the write request, if the corresponding numerical value in position that the write request terminates is less than institute The corresponding numerical value in target position is stated, then executes the write request, and the write request is recorded in the write request day pre-established In will;
When image file in the production center carries out image file duplication completion to Disaster Preparation Center, by the write request log Data be transferred to the Disaster Preparation Center, and form effective snapshot of image file duplication.
2. according to the method described in claim 1, it is characterized by:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and the write request knot The corresponding numerical value in the position of beam is greater than the corresponding numerical value in the target position, then to greater than the corresponding numerical value in the target position Data block executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, and will The write request is recorded in the write request log pre-established.
3. method according to claim 1 or 2, which is characterized in that receive to the write request of the image file it Afterwards, specific method further include:
Lock the corresponding numerical variable in the target position;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly described in execution After write request, the corresponding numerical variable in the target position is unlocked;
When corresponding numerical value is less than the corresponding numerical value in the target position in the position that the write request terminates, writes and ask described in execution Before asking, the corresponding numerical variable in the target position is unlocked.
4. the method according to claim 1, wherein specific method further include:
When the data of the write request log are transferred to the Disaster Preparation Center, continue the record of write request log, Start the data transmission that the data by write request log are transferred to the write request log saved before the Disaster Preparation Center When completion, the write request daily record data saved after the data transmission for starting write request log is sent.
5. a kind of method of image file duplication, which is characterized in that the method is applied to the Disaster Preparation Center in disaster recovery and backup systems, uses In the remote copy disaster tolerance of image file, the disaster recovery and backup systems further include the production center, and the Disaster Preparation Center is by network with number It is the data that unit receives that the production center carries out image file duplication transmission according to block, specific method includes:
Receive the image file data block that the production center is sent;
In the image file that image file data block write-in is pre-created;
When the image file replicates completion, the write request daily record data that the production center is sent, the log number are received According to the corresponding new write request in region that is being copied over comprising image file and replicating;
According to the write request daily record data, write request operation is executed in the image file, resets write request log.
6. according to the method described in claim 5, it is characterized in that, according to the write request daily record data, in the mirror image text Write request operation is executed in part, comprising:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
7. method according to claim 5 or 6, which is characterized in that the method also includes:
After receiving the write request daily record data that the production center is sent, the iteration that the production center is sent is continued to Daily record data.
8. a kind of device of image file duplication, which is characterized in that described device is applied to the production center in disaster recovery and backup systems, institute Stating disaster recovery and backup systems further includes Disaster Preparation Center, and the production center sends mirror image to Disaster Preparation Center as unit of data block by network File replicate data, described device include:
Acquiring unit, when carrying out image file duplication to Disaster Preparation Center for the image file in the production center, acquisition is worked as The target position information of the data block of preceding image file duplication;
Write request processing unit, if for receiving the write request to the image file, and the position that the write request starts Corresponding numerical value is greater than the corresponding numerical value in the target position, then directly executes the write request, if what the write request terminated The corresponding numerical value in position is less than the corresponding numerical value in the target position, then executes the write request, and the write request is recorded In the write request log pre-established;
Log transmission unit will when the image file for the heart in production carries out image file duplication completion to Disaster Preparation Center The data of the write request log are transferred to Disaster Preparation Center, and form effective snapshot of image file duplication.
9. device according to claim 8, which is characterized in that the write request processing unit is also used to:
If the corresponding numerical value in the position that the write request starts is less than the corresponding numerical value in the target position, and the write request knot The corresponding numerical value in the position of beam is greater than the corresponding numerical value in the target position, then to greater than the corresponding numerical value in the target position Data block executes the write request;The write request is executed to the data block for being less than the corresponding numerical value in the target position, and will The write request is recorded in the write request log pre-established.
10. device according to claim 8 or claim 9, which is characterized in that
Described device further includes locking unit, and the locking unit is used for:
After described receive to the write request of the image file, the corresponding numerical variable in the target position is locked;
When in the position that the write request starts, corresponding numerical value is greater than the corresponding numerical value in the target position, directly described in execution After write request, the corresponding numerical variable in the target position is unlocked;
When corresponding numerical value is less than the corresponding numerical value in the target position in the position that the write request terminates, writes and ask described in execution Before asking, the corresponding numerical variable in the target position is unlocked.
11. device according to claim 8, which is characterized in that
The write request processing unit is also used to when the data by the write request log are transferred to the Disaster Preparation Center, Continue the record of write request log;
The log transmission unit is also used to be transferred to the Disaster Preparation Center in the beginning data by the write request log The data of the write request log saved are transmitted before when, the data transmission preservation later for starting write request log is sent Write request daily record data.
12. a kind of device of image file duplication, which is characterized in that described device is applied to the Disaster Preparation Center in disaster recovery and backup systems, The disaster recovery and backup systems further include the production center, and the Disaster Preparation Center receives production center progress by network as unit of data block The data that image file duplication is sent, described device include:
Image file receiving unit, the image file data block sent for receiving the production center;
Writing unit, for the image file data block to be written in the image file being pre-created;
Log receiving unit, for receiving the write request day that the production center is sent when the image file replicates completion Will data, the daily record data include image file be copied over and the corresponding newcomer in region that is replicating Write request;
Execution unit, for executing write request operation in the image file according to the write request daily record data, playback is write Request Log.
13. device according to claim 12, which is characterized in that the execution unit is specifically used for:
Successively obtain each write request operation data in the write request daily record data;
In the image file, the corresponding write request operation of each write request operation data is executed.
14. device according to claim 12 or 13, which is characterized in that the log receiving unit is also used to receiving institute After the write request daily record data for stating production center transmission, the iteration daily record data that the production center is sent is continued to.
CN201610936644.0A 2016-10-24 2016-10-24 A kind of method and device of image file duplication Active CN106502831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610936644.0A CN106502831B (en) 2016-10-24 2016-10-24 A kind of method and device of image file duplication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610936644.0A CN106502831B (en) 2016-10-24 2016-10-24 A kind of method and device of image file duplication

Publications (2)

Publication Number Publication Date
CN106502831A CN106502831A (en) 2017-03-15
CN106502831B true CN106502831B (en) 2019-08-13

Family

ID=58320087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610936644.0A Active CN106502831B (en) 2016-10-24 2016-10-24 A kind of method and device of image file duplication

Country Status (1)

Country Link
CN (1) CN106502831B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291924B (en) * 2017-06-29 2020-08-14 深信服科技股份有限公司 Synchronous log replication control method and system for disaster recovery backup system
CN110147296B (en) * 2018-02-11 2021-07-09 华为技术有限公司 Data processing method, apparatus, device and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014152A (en) * 2010-10-18 2011-04-13 浪潮(北京)电子信息产业有限公司 Long-distance duplicating system and method
CN102306115A (en) * 2011-05-20 2012-01-04 成都市华为赛门铁克科技有限公司 Asynchronous remote copying method, system and equipment
US8335771B1 (en) * 2010-09-29 2012-12-18 Emc Corporation Storage array snapshots for logged access replication in a continuous data protection system
CN104572355A (en) * 2015-01-30 2015-04-29 浪潮(北京)电子信息产业有限公司 Asynchronous remote data copying method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8335771B1 (en) * 2010-09-29 2012-12-18 Emc Corporation Storage array snapshots for logged access replication in a continuous data protection system
CN102014152A (en) * 2010-10-18 2011-04-13 浪潮(北京)电子信息产业有限公司 Long-distance duplicating system and method
CN102306115A (en) * 2011-05-20 2012-01-04 成都市华为赛门铁克科技有限公司 Asynchronous remote copying method, system and equipment
CN104572355A (en) * 2015-01-30 2015-04-29 浪潮(北京)电子信息产业有限公司 Asynchronous remote data copying method and device

Also Published As

Publication number Publication date
CN106502831A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
US11734306B2 (en) Data replication method and storage system
EP3961365B1 (en) Synchronously replicating datasets and other managed objects to cloud-based storage systems
US10216431B2 (en) Consistent data retrieval in a multi-site computing infrastructure
US20190129649A1 (en) Data storage method and apparatus
CN101667181B (en) Method, device and system for data disaster tolerance
TWI514249B (en) Method for remote asynchronous replication of volumes and apparatus therefor
DE102021113808A1 (en) Handling replications between different networks
US7941622B2 (en) Point in time remote copy for multiple sites
CN106062742B (en) System and method for improving snapshot performance
US20200117547A1 (en) System state recovery in a distributed, cloud-based storage system
KR102016095B1 (en) System and method for persisting transaction records in a transactional middleware machine environment
CN105049258B (en) The data transmission method of network disaster tolerance system
CN108762982A (en) A database recovery method, device and system
CN110058813A (en) It is a kind of that management method is locally stored based on the storage of cloud platform block
US11914867B2 (en) Coordinated snapshots among storage systems implementing a promotion/demotion model
CN112948484A (en) Distributed database system and data disaster recovery drilling method
CN105988901A (en) Data copying method and storage system
WO2023070025A1 (en) Declarative provisioning of storage
CN106502831B (en) A kind of method and device of image file duplication
US9367413B2 (en) Detecting data loss during site switchover
CN114760302A (en) Private cloud platform architecture suitable for smart power plant
US10891205B1 (en) Geographically dispersed disaster restart multitenancy systems
CN110413370A (en) For realizing the method and system of the data backup for the virtual machine for relying on original device mapping disk
CN116389233B (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN109828950A (en) Data protection method, management system, server and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518055 First Floor, Building A1, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: SANGFOR TECHNOLOGIES Inc.

Address before: 518055 First Floor, Building A1, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Sangfor Technologies Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Method and Device for Copying Mirror Files

Effective date of registration: 20231212

Granted publication date: 20190813

Pledgee: Shenzhen Branch of China Merchants Bank Co.,Ltd.

Pledgor: SANGFOR TECHNOLOGIES Inc.

Registration number: Y2023980070863