CN110134551A - A kind of continuous data protection method and device - Google Patents

A kind of continuous data protection method and device Download PDF

Info

Publication number
CN110134551A
CN110134551A CN201910423226.5A CN201910423226A CN110134551A CN 110134551 A CN110134551 A CN 110134551A CN 201910423226 A CN201910423226 A CN 201910423226A CN 110134551 A CN110134551 A CN 110134551A
Authority
CN
China
Prior art keywords
cdp
write
metadata
data
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910423226.5A
Other languages
Chinese (zh)
Other versions
CN110134551B (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.)
INFORMATION2 SOFTWARE (SHANGHAI) Ltd
Original Assignee
INFORMATION2 SOFTWARE (SHANGHAI) 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 INFORMATION2 SOFTWARE (SHANGHAI) Ltd filed Critical INFORMATION2 SOFTWARE (SHANGHAI) Ltd
Priority to CN201910423226.5A priority Critical patent/CN110134551B/en
Publication of CN110134551A publication Critical patent/CN110134551A/en
Application granted granted Critical
Publication of CN110134551B publication Critical patent/CN110134551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

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

Abstract

The invention discloses a kind of continuous data protection method and devices, this method comprises: step S1, captures the write IO request O-IO of protected device;Step S2 obtains the address information in the current storable space of CDP data warehouse, and the write IO request information is copied to the C-IO in CDP data warehouse, and generates the M-IO of a metadata structure by newly-built one, establishes connection between the C-IO and the M-IO;The step S2 C-IO created is put into queue by step S3;Step S4, respective queue or Global Queue from each CPU obtain the information of each C-IO;Step S5; it is sent each C-IO in corresponding CDP data warehouse storage equipment according to the information of the C-IO of acquisition; and the M-IO being directed toward is written into corresponding CDP metadata storage devices, through the invention, can optimize the management of the metadata in continuous data protection.

Description

A kind of continuous data protection method and device
Technical field
The present invention relates to computer data backup disaster tolerance technology fields, can optimize continuous data protection more particularly to one kind The continuous data protection method and device of middle metadata management.
Background technique
Technology of data copy is generallyd use in order to protect important data information in computer field, it is unavailable in data When restore data from backup medium.But when restoring data, the data between backup may lose twice, for some Crucial information system, the patient amount of data lost of institute, i.e. recovery point objectives (RPO, Recovery Point Object) are wanted Low as much as possible, this is just needed using continuous data protection (CDP, Continuous Data Protection) technology.
Continuous data protection technology (CDP) is to protect disk write request each time by recording, by write request data backup Into another memory space, and any point-in-time in recording can be being restored data to later, it is extensive to reach data The effect of multiple disaster tolerance.It is different from the reset mode by snapshot, RPO can be reduced to close to 0 by CDP.
SNIA in 2011 defines three big standards of CDP technology, i.e., capture arbitrary data variation, storage change data and Any point-in-time can be restored to.Based on this definition, manufacturer is respectively stored in the realization of CDP mainly around following exhibition It opens:
1, CDP how is reduced to the influence of production system
2, CDP calamity how is managed efficiently for data
3, the data for how accelerating specified time point are restored
The core design purpose of the above 3 points CDP has different in different application scenarios and architecture environment Design stresses and implementation.In general, the process of CDP technology is as follows: after CDP system captures a write request, needing The data portion of write request is additionally copied to save in the warehouse CDP, and generates a metadata to describe CDP data bins How replicate data in library corresponds to the information such as the time point of original storage position and capture;When needs store number to protection It when according to being restored, needs through time point information to be restored, to inquire CDP metadata, to obtain replicate data in the storehouse CDP Location information in library;During CDP system is rebuild, then need quickly to navigate to available CDP by metadata information Warehouse location, so as to the efficient starting of CDP system.As it can be seen that from CDP data how efficient storage, to how quickly positioning reading, From CDP Data lifecycle management, visual data query is arrived, the management of metadata has run through entire CDP system design, because This, the design of metadata management module plays whole CDP system reliability and performance key, it may be said that is CDP system Core.
In the prior art, cdp traffic is divided into write-back and writes two ways:
1, in write-back mode, trapping module only does seldom processing to raw requests, raw requests is directly issued, by CDP number According to being put into FIFO (First In First Out, first in first out) queue, brush processing is carried out by background process, original write is asked Upper layer is returned to after asking to call.The advantage of this mode is that do not have delayed impact to original system I/O request substantially, not will receive The possible performance decline of CDP system causes service pause.The disadvantage is that when system exception shutdown, if had not yet in fifo queue The data of brush, then a small amount of data can be omitted in CDP data;
2, it writes in mode, trapping module is necessary to ensure that original write request and CDP write request are all successfully written and respectively deposits After storing up equipment, upper layer application can be just returned to, advantage is, under the constraint of strong consistency, each pen of CDP data record, which is write, is asked It asks, the RPO that data are restored later is 0, the disadvantage is that the delay of whole system is decided by the common work of original storage and CDP system With having bigger jitter phenomenon under different IO pressure.
Therefore, it is really necessary to propose a kind of technological means, with different based on the strategy that CDP data are written, realizes to holding Reliable effective management of metadata in continuation of insurance shield data CDP.
Summary of the invention
In order to overcome the deficiencies of the above existing technologies, purpose of the present invention is to provide a kind of continuous data protection methods And device, to optimize the management of the metadata in continuous data protection.
In order to achieve the above object, the present invention proposes a kind of continuous data protection method, include the following steps:
Step S1 captures the write IO request O-IO of protected device;
Step S2 obtains the address information in the current storable space of CDP data warehouse, and newly-built one is asked the IO that writes Ask O-IO information to copy to the C-IO in CDP data warehouse, and generate the M-IO of a metadata structure, the C-IO with it is described Connection is established between M-IO;
The step S2 C-IO created is put into queue by step S3;
Step S4, respective queue or Global Queue from each CPU obtain the information of each C-IO;
Step S5 sends corresponding CDP data warehouse storage equipment for each C-IO according to the information of the C-IO of acquisition In, and the M-IO being directed toward is written into corresponding CDP metadata storage devices.
Preferably, step S2 further comprises:
Step S200 inquires current CDP metadata information, and obtaining in CDP data warehouse can accommodate next C-IO's Offset C-IO offset;
Step S201 records the capture time of the write IO request O-IO, and according to the offset of acquisition, the CDP of write-in Metadata storage devices number and write IO request O-IO generate the M-IO of metadata structure;
Step S202 creates institute according to the information of the write IO request O-IO and the CDP data warehouse device number of write-in C-IO is stated, and the pointer (m-pt) in the C-IO structural body is directed toward current M-IO.
Preferably, the information for including in the write IO request O-IO includes but is not limited to write device dev_id, write-in Initial address O-IO offset, is written length O-IO length and write-in data data, the C-IO request the letter for including Breath includes but is not limited to CDP data warehouse the device number cdp_dev_id, the pointer m-pt, Yi Jifu of a direction M-IO of write-in Write-in the data data, the M-IO for being formed on the write IO request include but is not limited to timestamp, the CDP metadata storage of write-in Device number metadata_dev_id, O-IO offset, C-IO offset, O-IO length, and by the structure of the C-IO Pointer m-pt in body is directed toward current M-IO.
Preferably, step S5 further comprises:
Step S500 requests each C-IO according to the CDP data warehouse device number being written in the information of the C-IO of acquisition It is sent to corresponding CDP data warehouse storage equipment;
The pointer m-pt of direction M-IO in the information of the C-IO of the acquisition M-IO being directed toward is inserted into memory by step S501 B+ tree in;
Step S502 traverses B+ tree, metadata structure M-IO is obtained, according to the CDP metadata of the write-in in the M-IO It stores device number (metadata_dev_id) and corresponding metadata storage devices is written into the M-IO.
Preferably, the method also includes:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to selection by nearest snapshot Recovery time point.
Preferably, step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
Preferably, the method also includes:
Step S7 carries out rapid build to CDP metadata, continues to run CDP system as the system reboots.
Preferably, step S7 further comprises following steps:
Step S700 reads CDP metadata from metadata storage devices, and constructs B+ tree system with timestamp;
Step S701 finds the IO metadata information at nearest time point;
Step S702 obtains the next available storage location of CDP data warehouse according to the information that step S701 is found.
In order to achieve the above objectives, the present invention also provides a kind of continuous data protection devices, including
CDP trapping module, for capturing the write IO request of protected device;
C-IO/M-IO creating unit is created for obtaining the address information in the current storable space of CDP data warehouse The write IO request information is copied to the C-IO in CDP data warehouse, and generates the M-IO of a metadata structure, institute by one It states and establishes connection between C-IO and the M-IO;
Queue processing unit, for the newly-built C-IO of C-IO request creating unit to be put into queue;
C-IO request unit, for from each CPU respective queue or Global Queue obtain each C-IO request Information;
Each C-IO is sent corresponding CDP by I/O request information process unit, the information for the C-IO according to acquisition In data warehouse storage equipment, and the M-IO being directed toward is written into corresponding CDP metadata storage devices.
In order to achieve the above objectives, the present invention also provides a kind of continuous data protection method, include the following steps:
Step S1 captures the write IO request O-IO of protected device;
Step S2 obtains the address information in the current storable space of CDP data warehouse, and newly-built one is asked the IO that writes Seek the C-IO copied in CDP data warehouse;
Step S3 obtains CDP metadata according to the C-IO, which temporally stab as KEY, is inserted into interior It deposits in B+ tree;
The C-IO and write IO request O-IO are sent to corresponding storage equipment by step S4;
Step S5 returns result to upper layer application after the C-IO and write IO request O-IO are returned.
Preferably, step S2 further comprises:
Step S200 inquires current CDP metadata information, and obtaining in CDP data warehouse can accommodate next C-IO's Offset;
Step S201, according to the CDP data warehouse of the offset of acquisition, the information of the write IO request O-IO and write-in Device number creates the C-IO.
Preferably, the information for including in the write IO request O-IO includes but is not limited to write device dev_id, write-in Initial address O-IO offset, is written length O-IO length and write-in data data, the C-IO request the letter for including Breath includes but is not limited to timestamp, the CDP data warehouse device number cdp_dev_id of write-in, from the offset conduct of step S200 Initial address C-IO offset, the write-in initial address O-IO offset of write IO request O-IO is written, length is written and answers It is formed on the write-in data data of the write IO request, the information that the CDP metadata includes includes but is not limited to timestamp, O-IO Offset, C-IO offset and O-IO length.
Preferably, the method also includes:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to selection by nearest snapshot Recovery time point.
Preferably, step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
Preferably, the method also includes:
Step S7 quickly rebuilds CDP data warehouse, continues to run CDP system as the system reboots.
Preferably, step S7 further comprises:
Step S700 reads entire CDP data warehouse, obtains the metadata information of preservation;
Step S701 positions time point last in metadata, obtains the next storable position of CDP data warehouse.
In order to achieve the above objectives, the present invention also provides a kind of continuous data protection devices, comprising:
CDP trapping module, for capturing the write IO request O-IO of protected device;
C-IO requests creating unit, for obtaining the address information in the current storable space of CDP data warehouse, creates one A C-IO for copying to the write IO request information in CDP data warehouse;
The CDP metadata is temporally stabbed for obtaining CDP metadata according to the C-IO and is by metadata processing unit KEY is inserted into memory in B+ tree;
I/O request processing unit, for C-IO request and write IO request O-IO to be sent to corresponding storage equipment;
Result treatment unit, for returning result to after C-IO request and write IO request O-IO all return Layer application.
Compared with prior art, a kind of continuous data protection method and device of the present invention is based on the plan that CDP data are written It is slightly different, and consider the diversity of CDP data storage medium, it realizes metadata in optimization continuous data protection and effectively manages The purpose of reason.
Detailed description of the invention
Fig. 1 is a kind of step flow chart of one of continuous data protection method of present invention embodiment;
Fig. 2 is continuous data protection process schematic in the embodiment of the present invention;
Fig. 3 is that C-IO is put into showing for queue write-in CDP data warehouse in the environment of two CPU in the specific embodiment of the invention It is intended to;
Fig. 4 is the schematic diagram that metadata storage devices are written in M-IO in the specific embodiment of the invention;
Fig. 5 is the detailed flowchart of step S6 in the specific embodiment of the invention;
Fig. 6 is the instance graph that initial data is restored in the specific embodiment of the invention;
Fig. 7 is the detailed flowchart of step S7 in the specific embodiment of the invention;
Fig. 8 is the instance graph of CDP data reconstruction in the specific embodiment of the invention;
Fig. 9 is a kind of step flow chart of another embodiment of continuous data protection method of the present invention;
Figure 10 is the detailed flowchart of step S6 in the specific embodiment of the invention;
Figure 11 is the detailed flowchart of step S7 in the specific embodiment of the invention;
Figure 12 is the optimization schematic diagram of the layout in the specific embodiment of the invention to C-IO in disk;
Figure 13 is a kind of system architecture diagram of one embodiment of continuous data protection device of the present invention;
Figure 14 is a kind of system architecture diagram of another embodiment of continuous data protection device of the present invention.
Specific embodiment
Below by way of specific specific example and embodiments of the present invention are described with reference to the drawings, those skilled in the art can Understand further advantage and effect of the invention easily by content disclosed in the present specification.The present invention can also pass through other differences Specific example implemented or applied, details in this specification can also be based on different perspectives and applications, without departing substantially from Various modifications and change are carried out under spirit of the invention.
In general, in the case where RPO requirement is not 0, it is contemplated that as far as possible by the delayed impact to original storage It is reduced to the smallest scheme.CDP data are more satisfactory selections using write-back mode.Fig. 1 is a kind of duration data of the present invention The step flow chart of one of guard method embodiment, Fig. 2 are continuous data protection process schematic in the embodiment of the present invention.Such as figure Shown in 1 and Fig. 2, a kind of continuous data protection method of the present invention is included the following steps: using write-back mode
Step S1 captures the write IO request of protected device.
In the specific embodiment of the invention, write IO request is captured by CDP trapping module, the write IO request can be referred to as O-IO (original IO, original I O) is requested, and the information for including in the write IO request includes but is not limited to: write device number (dev_id), initial address (O-IO offset) is written, is written length (O-IO length), be written data (data).
Step S2 obtains the address information in the current storable space of CDP data warehouse, and newly-built one is asked the IO that writes It asks information to copy to the I/O request in CDP data warehouse, and generates the M-IO (metadata IO) of a metadata structure, institute It states and establishes connection between C-IO and the M-IO.In the specific embodiment of the invention, this newly-built is believed the write IO request It ceases the I/O request copied in CDP data warehouse and is known as C-IO (CDP IO), for the storage equipment of C-IO solicited message to be written For CDP data warehouse.
In the specific embodiment of the invention, step S2 further comprises:
Step S200 inquires current CDP metadata information, and next CDP IO can be accommodated by obtaining in CDP data warehouse Offset.In the specific embodiment of the invention, CDP metadata is using in the tree-like formula write-in CDP metadata storage devices of B+ , therefore, in the B+ tree saved in memory, current CDP metadata information is inquired, can be held with obtaining in CDP data warehouse Receive the offset (C-IO offset) of next C-IO (CDP IO).
Step S201, records the capture time of the write IO request, and according to the offset of acquisition (C-IO offset), The CDP metadata storage devices number (metadata_dev_id) and write IO request of write-in generate the M-IO of metadata structure (metadata IO).In the specific embodiment of the invention, the information that the M-IO (metadata IO) includes includes but unlimited In: timestamp, the CDP metadata storage devices number (metadata_dev_id) of write-in, O-IO offset, C-IO offset, O-IO length。
Step S202 creates the C- according to the information of the write IO request and the CDP data warehouse device number of write-in IO, and the pointer (m-pt) in the C-IO structural body is directed toward current M-IO.In the specific embodiment of the invention, the C-IO Including information include but is not limited to be written CDP data warehouse device number (cdp_dev_id), a direction M-IO is (by CDP Metadata write-in is specifically used to store the IO of the CDP metadata storage devices of metadata) pointer (m-pt), and be replicated in institute State the write-in data (data) of write IO request.
The step S2 C-IO created is put into fifo queue by step S3.In the specific embodiment of the invention, if to quilt Protection storage equipment enables more queues, then the C-IO is put into respective cpu queue;If being single team by protection storage equipment Column, then be put into Global Queue for the C-IO.That is, can also be applied to multi -CPU present invention can apply to single CPU environment Environment, multiple CPU may be simultaneously toward a little data in same storage equipment, if each CPU has respective queue, the C- IO is put to respective queue, if only one Global Queue, all C-IO are put into Global Queue
Step S4, respective C-IO queue or Global Queue from each CPU obtain the information of each C-IO request.Here It should be noted that if it is monokaryon (CPU), then only one FIFO, if it is multicore (multiple CPU), each core There is a respective FIFO, then successively being obtained each C-IO's again after then needing to merge multiple FIFO operation Information.
Step S5 sends corresponding CDP data warehouse storage for each C-IO according to the information that the C-IO of acquisition is requested In equipment, and the M-IO being directed toward is written into corresponding CDP metadata storage devices.
Specifically, step S5 further comprises:
Step S500 sends each C-IO according to the CDP data warehouse device number being written in the information of the C-IO of acquisition To corresponding CDP data warehouse storage equipment.In the specific embodiment of the invention, for each C-IO, then believed according to C-IO CDP data warehouse device number cdp_dev_id in breath, sends C-IO in corresponding CDP data warehouse storage equipment.
The pointer m-pt of direction M-IO in the information of the C-IO of the acquisition M-IO being directed toward is inserted into B+ tree by step S501 In, in the present invention, B+ tree is cached in memory, and the leaf node content of B+ tree can be stored in metadata as M-IO and deposit Chu Zhong.
Step S502 traverses B+ tree, the M-IO of metadata structure is obtained, according to the CDP member number of the write-in in the M-IO Corresponding metadata storage devices are written into the M-IO according to storage device number (metadata_dev_id).
Here it should be noted that, in the specific embodiment of the invention, step S5-S6 is backstage brush thread, but of the invention It is not limited.
As shown in Figure 3, it is assumed that there are two in the environment of CPU, more queue characteristics are opened in rear end storage, it means that two CPU may be simultaneously toward writing data in same storage.Assuming that each CPU has local queue to be used to store C-IO, such as DATA1 in Fig. 3,3,5, No. 7 C-IO are placed on the queue of CPU1, DATA2, and 4,6, No. 8 C-IO are placed in the queue of CPU2, work as write-back When thread brings into operation, the queue on CPU1 and CPU2 is obtained first, and merge, such as the middle section Fig. 3, opened later from DATA1 Beginning is written sequentially in CDP data warehouse.
While CDP data warehouse is written in C-IO, by the pointer m-pt of the direction M-IO in the information of corresponding C-IO The M-IO of direction is inserted into the B+ tree of memory, and traverses B+ number, obtains M-IO, and first number is written according to metadata_dev_id According to storage equipment, as shown in Figure 4.
As it can be seen that M-IO and C-IO data are that different equipment, this M-IO and C- is written in a point different IO under write-back mode The design of I/O data separation is also beneficial to the inquiry and reconstruction of CDP system.On the other hand, with the development of storage medium, due to Storage characteristics different from HDD, the SSD based on flash be widely used, in the near future as dsc data the main force be situated between Matter.For this novel medium, operating system also develops novel transport protocol for it, it is made to give full play to medium belt Performance boost, although SSD is substantially better than HDD on readwrite performance, but need to wipe the hardware feature write, also to storage How system improves SSD life cycle and proposes the requirement for being different from HDD.For the CDP system in storage system, in design such as What compatible SSD and HDD, for the medium of different rear end original storages, can play due characteristic and performance becomes one kind Challenge.In the present invention, since M-IO and C-IO all batches are continuously written into, if CDP uses HDD storage medium, this hair It is bright, the sequence write performance of HDD storage medium can be made full use of, if CDP uses SSD storage medium, present invention if can cooperate TRIM order can also utmostly avoid SSD storage medium from writing amplification and service life problem.
Preferably, a kind of continuous data protection method of the present invention, further includes following steps:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to selection by nearest snapshot Recovery time point.As shown in figure 5, specifically, step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
As shown in fig. 6, it according to the timestamp of each IO is KEY that the tree structure of its top half, which is current CDP metadata, The B+ tree construction of composition, from left to right has recorded the metadata of TIME1 to TIME11, and as B+ leaf child node, metadata is logical The specifying information of this metadata item can be obtained by crossing pointer, include IO by the offset in protection storage equipment, length etc. Information.In CDP data warehouse, the specific I/O data information for currently corresponding to metadata is also stored, respectively DATA1 is extremely DATA11, each DATA are a data duplications of original write IO request.
Assuming that now time point is TIME11, but at the time of need to restore data to TIME8.Its process description is such as Under:
First from the TIME8 moment, recent snapshot point is found forward.Such as exist at the time of finding TIME4 fast According to information, next, until needing to find TIME4 to TIME8, record of the data in CDP data warehouse.At this time, it needs Utilize the function of search of B+ number.In Fig. 6, detailed process is the direction by solid arrow 1, finds TIME4 leaf node, is led to Dotted arrow direction is crossed, TIME8 leaf node is found, since B+ leaf intra-node has pointer connection, it is possible to pass through The above-mentioned TIME4 leaf found traverses the leaf node of TIME8.So far, it has been obtained between TIME4~TIME8, CDP All information of metadata, later, traversal read each metadata item information, by CDP offset and length information, Data are read in CDP data warehouse, and snapshot is in turn written into data.Such as the content that dotted line frame marks in Fig. 6, completed with this Data are restored to the whole process of TIME8 from TIME11.
Preferably, a kind of continuous data protection method of the present invention, further includes following steps:
Step S7 carries out rapid build to CDP metadata, continues to run CDP system as the system reboots.Specifically, As shown in fig. 7, step S7 further comprises following steps:
Step S700 reads CDP metadata from metadata storage devices, and constructs B+ tree system with timestamp;
Step S701 finds the IO metadata information at nearest time point;
Step S702 obtains the next available storage location of CDP data warehouse according to the information that step S701 is found, when When having new write IO request to occur, the initial position of its corresponding CDP data warehouse can be quickly obtained.
As shown in figure 8, the right-hand column table simulation of Fig. 8 is storage layout of the CDP metadata on metadata storage devices. As the system reboots, it is read from metadata storage devices (such as disk), is in the present embodiment exactly successively to be read from TIME1 TIME11, due to the physical continuity of metadata storage, so disk can be by limited sequence read operation, quickly by CDP Metadata is read to memory;During being successively read, by being KEY with TIME timestamp, the B+ number on the left side Fig. 8 is constructed Structure;After completing the building of B+ number, the leaf node of rightmost then has recorded the last CDP metadata information, when having It when new write request occurs, can quickly know, the initial position (CDP that TIME11 is represented of corresponding CDP data warehouse Offset+length), so far, the reconstruction of CDP system is accomplished.
Described in brought forward, in the case where it is 0 that RPO, which is strict with, the write mode of CDP data needs use to write mode, In such a mode, the performance of entire storage system is heavily dependent on the performance of CDP equipment, so metadata Enterprise schema can be different with write-back mode, and under mode of writing, the delay of system can depend on the delay of CDP system, institute Under this scheme, mainly to reduce delay by reducing the quantity of IO.
Fig. 9 is a kind of step flow chart of another embodiment of continuous data protection method of the present invention.As shown in figure 9, this A kind of continuous data protection method is invented to include the following steps: using mode is write
Step S1 captures the write IO request of protected device.
In the specific embodiment of the invention, write IO request is captured by CDP trapping module, O-IO can be referred to as (original IO, original I O) is requested, and the information for including in the write IO request includes but is not limited to: write device number (dev_ Id), initial address (O-IO offset) is written, is written length (length), be written data (data).
Step S2 obtains the address information in the current storable space of CDP data warehouse, and newly-built one is asked the IO that writes Information is asked to copy to the I/O request in CDP data warehouse.In the specific embodiment of the invention, this newly-built is asked the IO that writes The I/O request for asking information to copy in CDP data warehouse is known as C-IO (CDP IO).
In the specific embodiment of the invention, step S2 further comprises:
Step S200 inquires current CDP metadata information, and next CDP IO can be accommodated by obtaining in CDP data warehouse Offset.In the specific embodiment of the invention, CDP metadata is using in the tree-like formula write-in CDP metadata storage devices of B+ , therefore, in the B+ tree saved in memory, current CDP metadata information is inquired, can be held with obtaining in CDP data warehouse Receive the offset of next CDP IO.
Step S201, according to the CDP data warehouse equipment of the offset of acquisition, the information of the write IO request and write-in Number, create the C-IO request.In the specific embodiment of the invention, when the information that the C-IO request includes includes but is not limited to Between stab, the CDP data warehouse device number (cdp_dev_id) of write-in, from the offset of step S200 as write-in initial address Initial address O-IO offset is written in (C-IO offset), O-IO, is written length (O-IO length), and be replicated in institute State the write-in data (data) of write IO request.
Step S3 obtains CDP metadata according to the C-IO, and the metadata is temporally stabbed as KEY, is inserted into memory In middle B+ tree.In the specific embodiment of the invention, the information that the CDP metadata includes includes but is not limited to timestamp, O-IO Offset, C-IO offset, O-IO length, and the metadata is temporally stabbed as KEY, it is inserted into memory in B+ tree, Under mode of writing, since the content of metadata has been attached to before C-IO, metadata is not required to write-in metadata storage and sets In standby.
That is, a C-IO structural body, the C- can be distributed in memory according to step S2 first under mode of writing The field of I/O fabric body include timestamp, cdp_dev_id, O-IO offset, O-IO length, C-IO offset and Data is assigned to the C-IO structural body wherein getting next offset that can store C-IO from the B+ tree of memory C-IO offset field obtains current time stamp, is assigned to the timestamp field of the C-IO, and in the C-IO structural body field Timestamp, O-IO offset, O-IO length and C-IO offset are re-used again, as CDP metadata structure, and with Timestamp is Key, is put into B+ tree.That is, without the M-IO under write-back mode, CDP metadata is all under mode of writing It is saved in C-IO structural body.
C-IO request and O-IO request are sent to corresponding storage equipment, i.e., requested the C-IO by step S4 Be sent to CDP data warehouse, the O-IO request is the IO being captured to, need to continue to be dealt into should to disk on.
Step S5 returns result to upper layer application after C-IO and O-IO is returned, and return here refers to next layer Driver completes the notice driven after specific IO to upper layer, and the content of return will include the information such as disk whether are written.
As it can be seen that comparison write-back mode, under mode of writing, metadata information and CDP replicate data are merged in an IO It requests in (that is, containing the content of M-IO and C-IO), rather than (IO is the independent IO of two in write-back mode Write the data duplication in the warehouse CDP, another IO is to write metadata to be specifically used to store the storage of metadata and set It is standby), this is to slow down the delay of strong consistency under the mode of writing by reducing IO quantity and show.But when CDP system needs When rebuilding, (refer to it is content by M-IO and C-IO since metadata and CDP replicate data be continuously placed in CDP data warehouse Merge, sent as an IO toward lower layer) so that reconstruction process needs to read entire CDP data warehouse and could obtain Enough information can greatly delay the uptime of business, so also it is necessary on backstage even with mode of writing Tactic by meta-data preservation in some memory space, with accelerate CDP rebuild process.Based on this consideration, the backstage CDP Set storage equipment is written in the metadata by the tree-like formula tissue of B+ of thread meeting tactic.
Preferably, a kind of continuous data protection method of the present invention, further includes following steps:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to selection by nearest snapshot Recovery time point.Specifically, as shown in Figure 10, step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
Consistent under write-back mode to the recovery process of initial data under mode due to writing, it will not be described here.
Preferably, a kind of continuous data protection method of the present invention, further includes following steps:
Step S7 quickly rebuilds CDP data warehouse, continues to run CDP system as the system reboots.Also It is to say, when the system restarts, system needs to read the record in the warehouse CDP, and B+ tree is reconfigured out, is put into memory, for The mode of writing rebuilds no metadata storage, and write-back mode is rebuild, and needs to read metadata storage.
Specifically, as shown in figure 11, step S7 further comprises following steps:
Step S700 reads entire CDP data warehouse, obtains the metadata information of preservation, CDP is carried out under mode of writing It rebuilds, since metadata is dispersed in each corner of CDP data warehouse, it is therefore desirable to read the content ability in all warehouses CDP The metadata information collection of needs is finished.
Step S701 positions time point last in metadata, obtains the next storable position of CDP data warehouse, Such as disk2 is cdp data warehouse storage, then needs to obtain here on disk2 since which offset, can be used to store Subsequent C-IO.It should be noted that since CDP data warehouse is the equipment being recycled, in the present embodiment disk2 conduct CDP data warehouse, after capacity is finished, subsequent C-IO can cover original content from the initial position of disk2, so next A disk offset that can store C-IO when the CDP of reconstruction, might not need next in last back The position of C-IO.
For example, if disk2 can only store 5 numbers, 1,2,3,4,5 have successively been housed now, then again When adding one 6,6 can replace 1, and at this time next position that can be used to store data is exactly 2 place seats.
Write under mode, due to containing its metadata information in C-IO, and the IO that file system issues be typically all with The alignment of 4K integral multiple, the C-IO under mode of writing not only contains the data that upper layer is sent, and further comprises write-back mould The content metadata of M-IO under formula in this way brings disk write performance so that entire IO is aligned with 4K integral multiple Loss, it is therefore desirable to additional Optimized Measures.The first row of Figure 12 is shown when not optimizing, layout feelings of the C-IO in disk Condition.1 indicates metadata information part (timestamp, O-IO offset, O-IO length) in C-IO, and 2 indicate to replicate from O-IO The data come.If 1 part occupies 256 bytes, if 2 parts are usually 4K, entire I O size is exactly 4352 bytes.After assuming that The block size of end storage is 512 bytes, and from No. 0 block, the data of 4352 bytes are written, the meeting in bottom storage equipment It evolves into, preceding 4096 byte is written to preceding 8 block, will be read out on the data from device of the 9th block, by 4352 Preceding 256 byte of 512 bytes that reads out of rear 256 byte covering, then will merge the data completed again and be written the 9th block.It can be seen that the write operation being misaligned can be evolved into multiple IO in the storage of rear end and be carried out, this is also serious Affect overall performance.
For this phenomenon, what is expected first is exactly the integral multiple by 256 byte expansions of 1 part for block size, example Such as 4096 bytes.In this case, the write operation of an original 4K is exactly to occupy the space 8K in the form of expression of C-IO, and first Preceding 256 byte records C-IO metadata in the space 4K, remaining writes 0.4K is from the part data that O-IO duplication comes afterwards.In this way, Rear end storage is avoided due to being misaligned operation bring loss.
But such layout very wasting space.It is also unfavorable to CDP reconstruction process.How the space of first 4K is utilized, Store some C-IO metadata becomes the main points of design more.Assuming that each C-IO needs to store metadata using 256 bytes, that 4K capacity can store 16 C-IO metadata informations.So in CDP operational process, C-IO metadata is closed as far as possible It and together, is a space-saving scheme, as shown in the lower half portion of Figure 12, the 4K memory space of first 1 part is deposited 16 C-IO metadata have been put (not show in figure entirely, if 4K (4096 byte) can store 16 if metadata occupies 256 bytes A metadata), on the one hand such design avoids is misaligned the loss of write operation bring, on the other hand also saves storage member Space required for data.
Figure 13 is a kind of system architecture diagram of one embodiment of continuous data protection device of the present invention.As shown in figure 13, this hair Bright a kind of continuous data protection device, using write-back mode, comprising:
CDP trapping module 101, for capturing the write IO request of protected device.
In the specific embodiment of the invention, write IO request is captured by CDP trapping module 101, O-IO can be referred to as (original IO, original I O) is requested, and the information for including in the write IO request includes but is not limited to: write device number (dev_ Id), initial address (offset) is written, is written length (length), be written data (data).
C-IO/M-IO creating unit 102, for obtaining the address information in the current storable space of CDP data warehouse, newly Build the I/O request write IO request information copied in CDP data warehouse, to replicate the information of the write IO request, And the M-IO (metadata IO) of CDP metadata structure is generated, connection is established between the C-IO and the M-IO.In this hair In bright specific embodiment, which is known as C- IO(CDP IO)。
In the specific embodiment of the invention, C-IO request creating unit 102 further comprises:
Address offset amount obtains module, and for inquiring current CDP metadata information, obtaining can hold in CDP data warehouse Receive the offset of next CDP IO.In the specific embodiment of the invention, CDP metadata is using the tree-like formula write-in CDP member of B+ In data storage device, therefore, in the B+ tree that offset acquiring unit saves in memory, current CDP metadata is inquired Information, to obtain the offset (C-IO offset) that can accommodate next CDP IO in CDP data warehouse.
M-IO creation module, for recording the capture time of the write IO request, and according to the offset (C-IO of acquisition Offset), the CDP metadata storage devices number (metadata_dev_id) and write IO request being written generate metadata structure M-IO (metadata IO).In the specific embodiment of the invention, the information that the M-IO (metadata IO) includes includes But it is not limited to: timestamp, the CDP metadata storage devices number (metadata_dev_id) of write-in, O-IO offset, C-IO Offset, O-IO length.
C-IO creation module, for according to the information of the write IO request and the CDP data warehouse device number of write-in, newly The C-IO is built, and the pointer (m-pt) in the C-IO structural body is directed toward current M-IO.In the specific embodiment of the invention, The information that the C-IO includes includes but is not limited to the CDP data warehouse device number (cdp_dev_id) being written, a direction M- The pointer (m-pt) of IO (write-in of CDP metadata is specifically used to store the IO of the CDP metadata storage devices of metadata), and It is replicated in the write-in data (data) of the write IO request.
Queue processing unit 103, for the newly-built C-IO of C-IO request creating unit 102 to be put into queue.In this hair In bright specific embodiment, if enabling more queues to by protection storage equipment, the C-IO is put into respective cpu queue; If being single queue by protection storage equipment, the C-IO is put into Global Queue.That is, present invention can apply to lists CPU environment, can also be applied to multi -CPU environment, and multiple CPU may be simultaneously toward a little data in same storage equipment, if each CPU There is respective queue, then the C-IO is put to respective queue, if only one Global Queue, all C-IO are put into entirely Office's queue.
C-IO request unit 104, it is every for being obtained in respective C-IO queue of the backstage from each CPU or Global Queue The information of one C-IO.
I/O request information process unit 105, for being sent each C-IO request to pair according to the information of the C-IO of acquisition In the CDP data warehouse storage equipment answered, and the M-IO being directed toward is written into corresponding CDP metadata storage devices.
Specifically, I/O request information process unit 105 further comprises:
C-IO solicited message processing unit, the CDP data warehouse equipment for being written in the information according to the C-IO of acquisition Number corresponding CDP data warehouse storage equipment is sent by each C-IO.In the specific embodiment of the invention, for each C- IO sends C-IO in corresponding CDP data warehouse storage equipment according to the cdp_dev_id in C-IO information.
M-IO is inserted into unit, for inserting the M-IO of the pointer m-pt direction of the direction M-IO in the information of the C-IO of acquisition Enter into the B+ tree of memory.
M-IO information writing unit obtains metadata structure M-IO, according to the write-in in the M-IO for traversing B+ tree CDP metadata storage devices number (metadata_dev_id) corresponding metadata storage devices are written.
Preferably, a kind of continuous data protection device of the present invention, further includes:
Original data recovery unit, for initial data to be restored to the recovery time point of selection.Specifically, described original Data recovery unit further comprises:
Recovery time selecting module when for restoring to initial data, selects recovery time, as cdp_ endtime;
Snapshot searching module, for searching a nearest snapshot before the time point;
Same time start position determining module, for finding the identical time in CDP metadata by Snapshot time Start position, as cdp_starttime;
Data write. module is captured, for until being written snapshot data from cdp_starttime to cdp_endtime Capture data.
Preferably, a kind of continuous data protection device of the present invention, further includes following steps:
CDP metadata reconstruction unit, for as the system reboots, carrying out rapid build to CDP metadata, making operation system It continues to run.Specifically, the CDP metadata reconstruction unit further comprises:
B+ tree system constructs module, for reading CDP metadata from metadata storage devices, and constructs B+ tree with timestamp System;
Module is found, for finding the IO metadata information at nearest time point;
Available storage location determining module, the information for being obtained according to the searching module, obtains under CDP data warehouse One available storage location can be quickly obtained rising for its corresponding CDP data warehouse when there is new write IO request to occur Beginning position.
Figure 14 is a kind of system architecture diagram of another embodiment of continuous data protection device of the present invention.As shown in figure 14, A kind of continuous data protection device of the present invention, applied to writing mode, comprising:
CDP trapping module 140, for capturing the write IO request of protected device.
In the specific embodiment of the invention, write IO request is captured by CDP trapping module, O-IO can be referred to as (original IO, original I O) is requested, and the information for including in the write IO request includes but is not limited to: write device number (dev_ Id), initial address (offset) is written, is written length (length), be written data (data).
C-IO requests creating unit 141, for obtaining the address information in the current storable space of CDP data warehouse, newly Build the I/O request write IO request information copied in CDP data warehouse.In the specific embodiment of the invention, by this The newly-built I/O request copied to the information in the write IO request in CDP data warehouse becomes referred to as C-IO (CDP IO).
In the specific embodiment of the invention, C-IO request creating unit 131 further comprises:
Address offset amount obtains module, and for inquiring current CDP metadata information, obtaining can hold in CDP data warehouse Receive the offset of next CDP IO.In the specific embodiment of the invention, CDP metadata is using the tree-like formula write-in CDP member of B+ In data storage device, therefore, in the B+ tree saved in memory, current CDP metadata information is inquired, to obtain CDP The offset of next CDP IO can be accommodated in data warehouse.
C-IO requests creation module, for the offset, the information of the write IO request and the CDP of write-in according to acquisition Data warehouse device number creates the C-IO request.In the specific embodiment of the invention, the C-IO requests the packet for including Timestamp is included but is not limited to, the CDP data warehouse device number (cdp_dev_id) of write-in obtains the inclined of module from address offset amount Initial address O-IO offset is written as write-in initial address (C-IO offset), O-IO in shifting amount, and length (O-IO is written Length), and it is replicated in the write-in data (data) of the write IO request.
Metadata processing unit 142 for obtaining CDP metadata according to the C-IO, and the metadata is temporally stabbed For KEY, it is inserted into memory in B+ tree.In the specific embodiment of the invention, the information that the CDP metadata includes includes but not It is limited to timestamp, O-IO offset, C-IO offset, O-IO length, and the metadata is temporally stabbed as KEY, insertion Into memory in B+ tree.Under mode of writing, since the content of metadata has been attached to before C-IO, metadata is not required to It is written in metadata storage devices.
I/O request processing unit 143, for C-IO request and O-IO request to be sent to corresponding storage equipment.
Result treatment unit 144, for returning result to upper layer application after the C-IO and O-IO is returned.
Preferably, a kind of continuous data protection device of the present invention, further includes:
Original data recovery unit, for initial data to be restored to the recovery time point of selection.Specifically, described original Data recovery unit further comprises:
Recovery time selecting module when for restoring to initial data, selects recovery time, as cdp_ endtime;
Snapshot searching module, for searching a nearest snapshot before the time point;
Same time start position determining module, for finding the identical time in CDP metadata by Snapshot time Start position, as cdp_starttime;
Data write. module is captured, for until being written snapshot data from cdp_starttime to cdp_endtime Capture data.
Preferably, a kind of continuous data protection device of the present invention, further includes:
CDP data warehouse reconstruction unit, for being rebuild to CDP data warehouse.I.e. when the system restarts, CDP data Warehouse reconstruction unit needs to read the record in the warehouse CDP, reconfigures out B+ tree, is put into memory, for writing mode weight No metadata storage is built, write-back mode is rebuild, and needs to read metadata storage.Specifically, the CDP data warehouse is rebuild Unit further comprises:
Metadata information obtains module and obtains the metadata information of preservation for reading entire CDP data warehouse;It is writing CDP reconstruction is carried out under saturating mode, since metadata is dispersed in each corner of CDP data warehouse, it is therefore desirable to read all CDP The metadata information of needs could be collected and be finished by the content in warehouse;
Next storage location obtains module, for positioning time point last in metadata, obtains one under CDP data warehouse A storable position.
It will illustrate the present invention by specific embodiment below:
In the system environments of the present embodiment, it is assumed that there are three pieces of storage equipment, is disk1, disk2 and disk3 respectively, Middle Disk1 is the source device that user needs to carry out CDP protection, and disk2 is the storage equipment for storing CDP data, and disk3 is For saving the storage equipment of CDP metadata.
What is described first is as follows using the CDP scheme of write-back mode:
1, a CDP Preservation tactics are established, use disk2 as CDP data warehouse, disk3 is tracked as CDP metadata All write requests of disk1, and use CDP write-back mode.
2, the B+ tree of storage metadata is constructed in memory.
3, local fifo queue is distributed for each CPU.
4, assume that current CDP system is captured to disk1 offset 4096, the write request OIO that length is 8192.
5, the data of original write request are replicated with a, referred to as C-IO.
6, current time stamp is obtained, for example, T1 creates a CDP metadata Description M-IO, including information has T1, Disk1 offset 4096, length 8192.
7, CIO is put into the fifo queue of current CPU.
8, captured original write request O-IO is issued, (disk1, offset 4096, length 8192)
9, when backstage refresh process brings into operation, the fifo queue of each CPU is obtained, and is merged into a queue, is traversed Each C-IO in queue is obtained the writable offset in the warehouse CDP (such as 1024), and 1024 are updated into corresponding M-IO The warehouse CDP offset field, and M-IO is inserted into B+ tree.
10, backstage refresh process is by each C-IO (disk2, offset 1024, length in the queue after merging 8192) it is sequentially written in disk2
11, disk3 is written in the nodal information M-IO created in B+ tree by backstage refresh process.
Described below is the CDP scheme using mode of writing:
1, a CDP Preservation tactics are established, uses disk2 as the warehouse CDP, to track all write requests of disk1, and uses Write mode.
2, the B+ tree of storage metadata is constructed in memory.If being not equipped with disk3 as additional metadata storage If, this structure is only used to quickly positioning metadata when data are restored.
3, local fifo queue is distributed for each CPU.
4, assume that current CDP system is captured to disk1 offset 4096, the write request (O-IO) that length is 8192.
5, the current warehouse the CDP free address of B+ tree information acquisition, such as disk2offset 1024 are inquired.
6, a C-IO is created, the C-IO contains current time stamp, O-IO offset 4096, O-IO The duplication of length8192, O-IO data.
7, one is created for storing the structural body of cloud data, contains timestamp, O-IO offset 4096, O-IO length8192,C-IO offset 1024.And it is inserted into B+ tree.
8, O-IO is issued.(disk1offset 4096,length 8192,data)
9, C-IO is issued.(disk2,offset 1024,length 8192+metadata_size,data)
Next it describes the present embodiment and restores protected by CDP data to store data into any one time The process of point:
1, the data for protecting disk1 by using any one of the above scheme now are assumed, since guard time point T1 Start, the write request data on disk1 can be all stored on disk2, and save each of which member for writing IO in memory Data B+ tree information.
2, current point in time hypothesis is T11, please refers to Fig. 6.
3, it needs the data-backoff of source storage to T8 now.
4, by T8 time point, back from the recent Snapshot time point of T8, such as in Fig. 6, hypothesis is retrospective search T4。
5, disk1 data are return back to T4 time dotted state by snap shot.
6, the leaf section where leaf node (solid arrow 1 in Fig. 6) and T8 where T4 is navigated to rapidly by B+ tree Point (dotted arrow in Fig. 6) obtains metadata information from T4 to T8 one by one, and is positioned by metadata information and read disk2 In replicate data write data into disk1 further according to the original storage offset information of metadata record.
7, CDP data-backoff is completed.
Finally illustrate the process that CDP system is rebuild by using additional metadata storage:
1, upon power-up of the system, CDP system records according to strategy and waits disk1 (original disk), disk2 (warehouse CDP), The storage driving of disk3 (CDP metadata) is in place.
2, from the root node of second sector of disk3 load B+ tree, referring to FIG. 8, being that metadata exists on the right of Fig. 8 Storage layout on disk3.
3, the data of disk3 are read to obtain all metadata informations, generate B+ tree, such as tree structure in Fig. 8)
4, CDP harvesting policy is opened.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.Any Without departing from the spirit and scope of the present invention, modifications and changes are made to the above embodiments by field technical staff.Therefore, The scope of the present invention, should be as listed in the claims.

Claims (17)

1. a kind of continuous data protection method, includes the following steps:
Step S1 captures the write IO request O-IO of protected device;
Step S2 obtains the address information in the current storable space of CDP data warehouse, creates one for the write IO request O- IO information copies to the C-IO in CDP data warehouse, and generates the M-IO, the C-IO and the M-IO of a metadata structure Between establish connection;
The step S2 C-IO created is put into queue by step S3;
Step S4, respective queue or Global Queue from each CPU obtain the information of each C-IO;
Step S5 sends each C-IO in corresponding CDP data warehouse storage equipment according to the information of the C-IO of acquisition, and The M-IO being directed toward is written into corresponding CDP metadata storage devices.
2. a kind of continuous data protection method as described in claim 1, which is characterized in that step S2 further comprises:
Step S200 inquires current CDP metadata information, obtains the offset that next C-IO can be accommodated in CDP data warehouse Measure C-IO offset;
Step S201 records the capture time of the write IO request O-IO, and according to the offset of acquisition, the CDP member number of write-in The M-IO of metadata structure is generated according to storage device number and write IO request O-IO;
Step S202 creates the C- according to the information of the write IO request O-IO and the CDP data warehouse device number of write-in IO, and the pointer in the C-IO structural body is directed toward current M-IO.
3. a kind of continuous data protection method as claimed in claim 2, it is characterised in that: include in the write IO request O-IO Information include but is not limited to write device dev_id, be written initial address O-IO offset, be written length O-IO Length and write-in data data, the information that the C-IO request includes include but is not limited to that the CDP data warehouse being written is set Standby number cdp_dev_id, the pointer m-pt of a direction M-IO, and it is replicated in the write-in data data of the write IO request, institute Stating M-IO includes but is not limited to timestamp, CDP the metadata storage devices metadata_dev_id, O-IO of write-in Offset, C-IO offset, O-IO length, and the pointer m-pt in the structural body of the C-IO is directed toward current M-IO.
4. a kind of continuous data protection method as claimed in claim 2, it is characterised in that: step S5 further comprises:
Each C-IO is requested to send by step S500 according to the CDP data warehouse device number being written in the information of the C-IO of acquisition To corresponding CDP data warehouse storage equipment;
The pointer m-pt of direction M-IO in the information of the C-IO of the acquisition M-IO being directed toward is inserted into the B+ of memory by step S501 In tree;
Step S502 traverses B+ tree, obtains metadata structure M-IO, is stored according to the CDP metadata of the write-in in the M-IO Corresponding metadata storage devices are written in the M-IO by device number.
5. a kind of continuous data protection method as claimed in claim 4, which is characterized in that the method also includes:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to the extensive of selection by nearest snapshot Multiple time point.
6. a kind of continuous data protection method as claimed in claim 5, it is characterised in that: step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
7. a kind of continuous data protection method as claimed in claim 4, which is characterized in that the method also includes:
Step S7 carries out rapid build to CDP metadata, continues to run CDP system as the system reboots.
8. a kind of continuous data protection method as claimed in claim 7, which is characterized in that step S7 further comprises walking as follows It is rapid:
Step S700 reads CDP metadata from metadata storage devices, and constructs B+ tree system with timestamp;
Step S701 finds the IO metadata information at nearest time point;
Step S702 obtains the next available storage location of CDP data warehouse according to the information that step S701 is found.
9. a kind of continuous data protection device, including
CDP trapping module, for capturing the write IO request of protected device;
C-IO/M-IO creating unit creates one for obtaining the address information in the current storable space of CDP data warehouse The write IO request information is copied into the C-IO in CDP data warehouse, and generates the M-IO, the C- of a metadata structure Connection is established between IO and the M-IO;
Queue processing unit, for the newly-built C-IO of C-IO request creating unit to be put into queue;
C-IO request unit, for from each CPU respective queue or Global Queue obtain each C-IO request letter Breath;
Each C-IO is sent corresponding CDP data by I/O request information process unit, the information for the C-IO according to acquisition In the storage apparatus of storehouse, and the M-IO being directed toward is written into corresponding CDP metadata storage devices.
10. a kind of continuous data protection method, includes the following steps:
Step S1 captures the write IO request O-IO of protected device;
Step S2 obtains the address information in the current storable space of CDP data warehouse, and newly-built one is answered the write IO request Make the C-IO in CDP data warehouse;
Step S3 obtains CDP metadata according to the C-IO, which is temporally stabbed as KEY, B in memory is inserted into In+tree;
The C-IO and write IO request O-IO are sent to corresponding storage equipment by step S4;
Step S5 returns result to upper layer application after the C-IO and write IO request O-IO are returned.
11. a kind of continuous data protection method as claimed in claim 10, which is characterized in that step S2 further comprises:
Step S200 inquires current CDP metadata information, obtains the offset that next C-IO can be accommodated in CDP data warehouse Amount;
Step S201, according to the CDP data warehouse equipment of the offset of acquisition, the information of the write IO request O-IO and write-in Number, create the C-IO.
12. a kind of continuous data protection method as claimed in claim 11, it is characterised in that: wrapped in the write IO request O-IO The information contained includes but is not limited to write device dev_id, and initial address O-IO offset is written, and length O-IO is written Length and write-in data data, the information that the C-IO request includes includes but is not limited to timestamp, the CDP data of write-in Depot equipment cdp_dev_id, from the offset of step S200 as write-in initial address C-IO offset, write IO request O- The write-in initial address O-IO offset of IO is written length and is replicated in the write-in data data of the write IO request, described The information that CDP metadata includes includes but is not limited to timestamp, O-IO offset, C-IO offset and O-IO length。
13. a kind of continuous data protection method as claimed in claim 12, which is characterized in that the method also includes:
Step S6 selects recovery time point, and according to the acquisition time point, initial data is restored to the extensive of selection by nearest snapshot Multiple time point.
14. a kind of continuous data protection method as claimed in claim 13, which is characterized in that step S6 further comprises:
Step S600 when restoring to initial data, selects recovery time, as cdp_endtime;
Step S601 searches a nearest snapshot before the time point;
Step S602 finds identical start time position by Snapshot time, as cdp_ in CDP metadata starttime;
Step S603, the capture data until being written snapshot data from cdp_starttime to cdp_endtime.
15. a kind of continuous data protection method as claimed in claim 12, which is characterized in that the method also includes:
Step S7 quickly rebuilds CDP data warehouse, continues to run CDP system as the system reboots.
16. a kind of continuous data protection method as claimed in claim 15, which is characterized in that step S7 further comprises:
Step S700 reads entire CDP data warehouse, obtains the metadata information of preservation;
Step S701 positions time point last in metadata, obtains the next storable position of CDP data warehouse.
17. a kind of continuous data protection device, comprising:
CDP trapping module, for capturing the write IO request O-IO of protected device;
C-IO requests creating unit, and for obtaining the address information in the current storable space of CDP data warehouse, creating one will The write IO request information copies to the C-IO in CDP data warehouse;
Metadata processing unit temporally stabs the CDP metadata as KEY for obtaining CDP metadata according to the C-IO, It is inserted into memory in B+ tree;
I/O request processing unit, for C-IO request and write IO request O-IO to be sent to corresponding storage equipment;
Result treatment unit, for returning result to upper layer and answering after C-IO request and write IO request O-IO all return With.
CN201910423226.5A 2019-05-21 2019-05-21 Continuous data protection method and device Active CN110134551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423226.5A CN110134551B (en) 2019-05-21 2019-05-21 Continuous data protection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423226.5A CN110134551B (en) 2019-05-21 2019-05-21 Continuous data protection method and device

Publications (2)

Publication Number Publication Date
CN110134551A true CN110134551A (en) 2019-08-16
CN110134551B CN110134551B (en) 2020-04-17

Family

ID=67571841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910423226.5A Active CN110134551B (en) 2019-05-21 2019-05-21 Continuous data protection method and device

Country Status (1)

Country Link
CN (1) CN110134551B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502457A (en) * 2019-08-23 2019-11-26 北京浪潮数据技术有限公司 A kind of metadata storing method and device
CN111338845A (en) * 2020-02-16 2020-06-26 西安奥卡云数据科技有限公司 Fine-grained local data protection method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070088768A1 (en) * 2005-10-14 2007-04-19 Revivio, Inc. Technique for improving scalability and portability of a storage management system
CN101187948A (en) * 2007-12-20 2008-05-28 中国科学院计算技术研究所 A continuous data protection system and its realization method
CN101430657A (en) * 2008-11-17 2009-05-13 华中科技大学 Continuous data protection method
CN103336728A (en) * 2013-05-08 2013-10-02 上海爱数软件有限公司 Disk data recovery method
US8762342B1 (en) * 2007-03-30 2014-06-24 Symantec Corporation Method of inserting a validated time-image on the primary CDP subsystem in a continuous data protection and replication (CDP/R) subsystem
US9679039B1 (en) * 2011-12-30 2017-06-13 EMC IP Holding Company LLC Continuous protection of data and storage management configuration
US10042579B1 (en) * 2013-09-24 2018-08-07 EMC IP Holding Company LLC Crash consistent snapshot
CN108628700A (en) * 2017-03-22 2018-10-09 杭州信核数据科技股份有限公司 A kind of continuous data protection method and device
US10229006B1 (en) * 2015-12-28 2019-03-12 EMC IP Holding Company LLC Providing continuous data protection on a storage array configured to generate snapshots

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070088768A1 (en) * 2005-10-14 2007-04-19 Revivio, Inc. Technique for improving scalability and portability of a storage management system
US8762342B1 (en) * 2007-03-30 2014-06-24 Symantec Corporation Method of inserting a validated time-image on the primary CDP subsystem in a continuous data protection and replication (CDP/R) subsystem
CN101187948A (en) * 2007-12-20 2008-05-28 中国科学院计算技术研究所 A continuous data protection system and its realization method
CN101430657A (en) * 2008-11-17 2009-05-13 华中科技大学 Continuous data protection method
US9679039B1 (en) * 2011-12-30 2017-06-13 EMC IP Holding Company LLC Continuous protection of data and storage management configuration
CN103336728A (en) * 2013-05-08 2013-10-02 上海爱数软件有限公司 Disk data recovery method
US10042579B1 (en) * 2013-09-24 2018-08-07 EMC IP Holding Company LLC Crash consistent snapshot
US10229006B1 (en) * 2015-12-28 2019-03-12 EMC IP Holding Company LLC Providing continuous data protection on a storage array configured to generate snapshots
CN108628700A (en) * 2017-03-22 2018-10-09 杭州信核数据科技股份有限公司 A kind of continuous data protection method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JING YANG ET AL: "ST-CDP: Snapshots in TRAP for Continuous Data Protection", 《IEEE TRANSACTIONS ON COMPUTERS》 *
MAOHUA LU ET AL: "File versioning for block-level continuous data protection", 《2009 29TH IEEE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS》 *
王欣兴: "基于群组的块级连续数据保护服务研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502457A (en) * 2019-08-23 2019-11-26 北京浪潮数据技术有限公司 A kind of metadata storing method and device
CN110502457B (en) * 2019-08-23 2022-02-18 北京浪潮数据技术有限公司 Metadata storage method and device
CN111338845A (en) * 2020-02-16 2020-06-26 西安奥卡云数据科技有限公司 Fine-grained local data protection method
CN111338845B (en) * 2020-02-16 2021-05-07 西安奥卡云数据科技有限公司 Fine-grained local data protection method

Also Published As

Publication number Publication date
CN110134551B (en) 2020-04-17

Similar Documents

Publication Publication Date Title
US11755415B2 (en) Variable data replication for storage implementing data backup
US8161321B2 (en) Virtual machine-based on-demand parallel disaster recovery system and the method thereof
US8103628B2 (en) Directed placement of data in a redundant data storage system
US8478729B2 (en) System and method for controlling the storage of redundant electronic files to increase storage reliability and space efficiency
US7774565B2 (en) Methods and apparatus for point in time data access and recovery
US7107395B1 (en) Apparatus and methods for operating a computer storage system
US7472139B2 (en) Database recovery method applying update journal and database log
US7584337B2 (en) Method and system for obtaining data stored in a data store
US8214334B2 (en) Systems and methods for distributed system scanning
US9317375B1 (en) Managing cache backup and restore for continuous data replication and protection
CN103761190B (en) Data processing method and apparatus
US20160004481A1 (en) Storage system with virtual disks
US20160004611A1 (en) Storage system with virtual disks
US8694729B2 (en) Methods for managing ownership of redundant data and systems thereof
Nelson Pro data backup and recovery
JPH1097451A (en) Method and device for optimizing log file of client/server computer system
CN103037004A (en) Implement method and device of cloud storage system operation
US7386664B1 (en) Method and system for mirror storage element resynchronization in a storage virtualization device
US10803012B1 (en) Variable data replication for storage systems implementing quorum-based durability schemes
CN113377292B (en) Single machine storage engine
US20230139582A1 (en) Forwarding operations to bypass persistent memory
KR20060007435A (en) Managing a relationship between one target volume and one source volume
CN112379825B (en) Distributed data storage method and device based on data feature sub-pools
CN110134551A (en) A kind of continuous data protection method and device
CN109254958A (en) Distributed data reading/writing method, equipment and system

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