CN104331344A - Data backup method and device - Google Patents

Data backup method and device Download PDF

Info

Publication number
CN104331344A
CN104331344A CN201410645307.7A CN201410645307A CN104331344A CN 104331344 A CN104331344 A CN 104331344A CN 201410645307 A CN201410645307 A CN 201410645307A CN 104331344 A CN104331344 A CN 104331344A
Authority
CN
China
Prior art keywords
data
request
data volume
volume
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410645307.7A
Other languages
Chinese (zh)
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410645307.7A priority Critical patent/CN104331344A/en
Publication of CN104331344A publication Critical patent/CN104331344A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data backup method and device. The method comprises the following steps: establishing a one-to-one corresponding relation between a source data volume and a target data volume; partitioning the corresponding source data volume and target data volume into a plurality of data blocks respectively according to a first threshold value, and numbering each data block of the partitioned source data volume and each data block of the partitioned target data volume respectively; copying each data block of the partitioned source data volume into the data blocks of the corresponding data volume, and changing the state of each data block in bitmap information of the source data volume and the target data volume. According to the technical scheme of the invention, load balance on each controller in a storage system is realized.

Description

A kind of method of data backup and device
Technical field
The present invention relates to computer technology, espespecially a kind of method of data backup and device.
Background technology
Along with continuous maturation and the development of storage area network (SAN) technology, more and more enterprise by data placement in centralized storage.Any loss of storage device data will cause irremediable loss, and therefore the stability of memory device and security just become more and more important.In order to ensure the security of data in storage system, data backup is a kind of data protection mode the most conventional.Data backup, by raw data being made a copy, when raw data is destroyed, still can be recovered by Backup Data, thus improve the security of storage system.
At storage line already through there being the practical application of a lot of data protection.Such as snapping technique, it is that raw data is carried out record, and backs up raw data when raw data changes, thus ensures to be protected by Backup Data when raw data goes wrong.But snapshot has its limitation, snapshot only backs up partial data, and not to whole Storage unit backups, if rear end disk array corrupt data cannot recover.
Application number is " 201210443904.2 ", application name is called that the earlier application of " data back up method and device " discloses a kind of method of carrying out data backup between logical unit number (LUN), but the method for this application has its limitation, main manifestations is both ways: on the one hand, source LUN and object LUN must be positioned on identical controller, also be that realized computer program can access originator LUN and object LUN simultaneously, otherwise computer program cannot carry out read-write operation to both simultaneously; Second aspect, in view of source LUN and object LUN must be positioned at same controller, therefore will concentrate on this controller to both access loads, cannot realize the load balancing on each controller within the storage system.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of method and device of data backup, the load balancing on each controller within the storage system can be realized.
In order to reach the object of the invention, the invention provides a kind of method of data backup, comprising: set up the one-to-one relationship that source data volume is rolled up with destination data;
According to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume;
Each data block that source data after dividing is rolled up is copied in the data block of corresponding destination data volume, and changes the state of each data block in the message bit pattern of source data volume and destination data volume.
Further, described corresponding relation comprises: identification information, the size information of described source data volume, and rolls up the corresponding relation between identification information that corresponding destination data rolls up, size information with described source data.
Further, after described each data block numbering of rolling up each data block and the destination data of the source data volume after division respectively, the method also comprises: the message bit pattern that described in initialization, source data volume and described destination data are rolled up;
Wherein, the message bit pattern of described source data volume comprises the state of each data block of source data volume, and the message bit pattern of described destination data volume comprises the state of each data block of destination data volume.
Further, the state of each data block of described source data volume comprises and copies or do not copy; The state of each data block of described destination data volume comprises and upgrades or do not upgrade.
Further, the message bit pattern of described initialization source data volume and destination data volume, comprising: described in initialization, the state of each data block of source data volume is not for copy; Described in initialization, the state of each data block of destination data volume is not for upgrade.
Further, the state of each data block in the message bit pattern of described change source data volume and destination data volume, comprising:
Certain data block of rolling up when described source data is copied in the data block of corresponding destination data volume, then the state updating of this data block of described source data being rolled up is that the state updating of the data block having copied and then the destination data of correspondence rolled up is for upgrade;
When certain data block that described source data is rolled up does not copy, then do not change the state of this data block of described source data volume.
Further, when having monitored input and output I/O request in described overall shared buffer memory, described method has also comprised:
The state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to described source data volume or destination data;
Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
Further, when described I/O request is the write request of source data volume, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: the state obtaining the data block of described source data volume corresponding to the data of described I/O request;
When the state of the data block of the described source data volume obtained is for copying, then the data of described I/O request are write the data block of described source data volume; Or
When the state of the data block of the described source data volume obtained is not for copying, then the data copy in the data block of described source data being rolled up is in the data block of corresponding described destination data volume; After having copied, the data of described I/O request are write the data block of described source data volume; And the state changing the data block of described source data volume is that the state of the data block having copied and changed described destination data volume is for upgrade;
Upgrade the state of I/O request for completing.
Further, when described I/O request is the read request of source data volume, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: upgrade the state of described I/O request for completing;
Judge the data whether having described I/O request in described overall shared buffer memory;
When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described source data volume.
Further, for the purpose of described I/O request during the write request of book, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: judge whether the data in described I/O request have been copied in the data block of described destination data volume;
If so, the state of described I/O request is then upgraded for completing; Otherwise, judge whether the data in described I/O request align with the data block that described destination data is rolled up, if, then upgrade the state of described I/O request for completing, otherwise, by the data copy in described I/O request in the data block of described destination data volume, the state changing the data block of described destination data volume be upgraded and upgraded described I/O request state for completing.
Further, for the purpose of described I/O request during the read request of book, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: the message bit pattern of the message bit pattern rolled up according to described source data and described destination data volume volume, judges whether the data of described I/O request have been rolled up by source data and is copied in destination data volume;
If copy, then upgrade the state of described I/O request for completing; If do not copy, then in the data copy of described I/O request to described destination data being rolled up;
Judge the data whether having described I/O request in described overall shared buffer memory;
When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described destination data volume.
The present invention also provides a kind of device of data backup, comprising:: matching module, division module, data backup module and message bit pattern administration module; Wherein,
Matching module, for setting up the one-to-one relationship that source data volume is rolled up with destination data;
Divide module, for according to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume;
Data backup module, for being copied in the data block of corresponding destination data volume by each data block of the source data volume after division;
Message bit pattern administration module, for changing the state of each data block in message bit pattern that source data volume and destination data roll up.
Further, described corresponding relation comprises: identification information, the size information of described source data volume, and rolls up the corresponding relation between identification information that corresponding destination data rolls up, size information with described source data.
Further, institute's bitmap information administration module, also for the message bit pattern of source data volume and described destination data volume described in initialization; Wherein, the message bit pattern of described source data volume comprises the state of each data block of source data volume, and the message bit pattern of described destination data volume comprises the state of each data block of destination data volume.
Further, the state of each data block of described source data volume comprises and copies or do not copy; The state of each data block of described destination data volume comprises and upgrades or do not upgrade.
Further, the message bit pattern of institute's bitmap information administration module initialization source data volume and destination data volume, comprising: described in initialization, the state of each data block of source data volume is not for copy; Described in initialization, the state of each data block of destination data volume is not for upgrade.
Further, the state of each data block in the message bit pattern of institute's bitmap information administration module change source data volume and destination data volume, specifically comprises:
Certain data block of rolling up when described source data is copied in the data block of corresponding destination data volume, then the state updating of this data block of described source data being rolled up is that the state updating of the data block having copied and then the destination data of correspondence rolled up is for upgrade;
When certain data block that described source data is rolled up does not copy, then do not change the state of this data block of described source data volume.
Further, this device also comprises IO monitoring modular, for when having monitored input and output I/O request in described overall shared buffer memory, the state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to described source data volume or destination data; Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
Further, when described I/O request is the write request of source data volume, institute's bitmap information administration module, also for the state that obtains the data block of described source data volume corresponding to the data of described I/O request; The state of the data block of the described source data volume obtained is sent to described data backup module;
When the state of the data block of the described source data volume obtained is for copying, described data backup module is also for writing the data block of described source data volume by the data of described I/O request; Or
When the state of the data block of the described source data volume obtained is not for copying, the data copy of described data backup module also in the data block of described source data being rolled up is in the data block of corresponding described destination data volume; After having copied, the data of described I/O request are write the data block of described source data volume;
Institute's bitmap information administration module is that the state of the data block having copied and changed described destination data volume is for upgrade for changing the state of the data block of described source data volume;
Described IO monitoring modular, for upgrading the state of I/O request for completing.
Further, this device also comprises: the first read module;
Described IO monitoring modular, also for when described I/O request be source data volume read request time, upgrade the state of described I/O request for completing;
Described first read module, for judging the data whether having described I/O request in described overall shared buffer memory; When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described source data volume.
Further, for the purpose of described I/O request during the write request of book, described data backup module, also for judging whether the data in described I/O request have been copied in the data block of described destination data volume;
If so, then described IO monitoring modular upgrades the state of described I/O request for completing; Otherwise, judging whether the data in described I/O request align with the data block that described destination data is rolled up, if so, then upgrading the state of described I/O request for completing; Otherwise, described data backup module, by the data copy in described I/O request in the data block of described destination data volume, the state that institute's bitmap information administration module changes the data block of described destination data volume is to have upgraded and described IO monitoring modular upgrades the state of described I/O request for completing.
Further, this device also comprises the second read module;
Described data backup module, during read request for book for the purpose of described I/O request, the message bit pattern of the message bit pattern rolled up according to described source data and described destination data volume volume, judges whether the data of described I/O request have been rolled up by source data and is copied in destination data volume;
Described IO monitoring modular, also having been rolled up by source data for the data when described I/O request and has been copied in destination data volume, having upgraded the state of described I/O request for completing;
Described data backup module, also for when the data of described I/O request are not copied in destination data volume by source data volume, by the data copy of described I/O request in described destination data volume; Described IO monitoring modular, upgrades the state of described I/O request for completing;
Described second read module, for judging the data whether having described I/O request in described overall shared buffer memory; When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described destination data volume.
Technical solution of the present invention comprises: set up the one-to-one relationship that each source data volume is rolled up with each destination data; According to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume; Each data block that source data after dividing is rolled up is copied in the data block of corresponding destination data volume, and changes the state of each data block in the message bit pattern of source data volume and destination data volume.In technical solution of the present invention, due to setting up source data volume and the destination data one-to-one relationship of roll up, this just makes source data roll up and destination data is rolled up and need not be positioned on same controller, thus achieves the load balancing on each controller within the storage system.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the method for data backup of the present invention;
Fig. 2 is the structural representation of the device of data backup of the present invention;
Fig. 3 is the process flow diagram of the embodiment one of the method for data backup of the present invention;
Fig. 4 is the process flow diagram of the embodiment two of the method for data backup of the present invention;
Fig. 5 is the process flow diagram of the embodiment three of the method for data backup of the present invention;
Fig. 6 is the process flow diagram of the embodiment four of the method for data backup of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, hereinafter will be described in detail to embodiments of the invention by reference to the accompanying drawings.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually.
Method of the present invention is based on overall shared buffer memory system, overall situation shared buffer memory is the buffer address space that in storage system, each controller can have access to, all access to book (source data volume and destination data volume) all will through overall shared buffer memory system, and method of the present invention is based on this fact.
Fig. 1 is the process flow diagram of the method for data backup of the present invention, as shown in Figure 1, based on overall shared buffer memory, comprising:
Step 101: set up the one-to-one relationship that source data volume is rolled up with destination data.
Wherein, corresponding relation comprises: identification information, the size information of source data volume, and rolls up the corresponding relation between identification information that corresponding destination data rolls up, size information with source data.Source data volume needs identical with the size that destination data corresponding is with it rolled up.
Step 102: according to first threshold, is divided into multiple data block respectively by the source data of correspondence volume and destination data volume, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume.
Wherein, those skilled in the art according to practical application, can arrange first threshold, belong to conventional techniques means well-known to those skilled in the art about how arranging first threshold, are not used for limiting the present invention, do not repeat them here.
Further, after respectively to each data block of the source data volume after division and each data block numbering of destination data volume, the method also comprises:
The message bit pattern of initialization source data volume and destination data volume; Wherein, the message bit pattern of source data volume comprises the state of each data block of source data volume, and the message bit pattern of destination data volume comprises the state of each data block of destination data volume.
The state of each data block of source data volume comprises and copies or do not copy, and such as can be labeled as 1 or 0 respectively; The state of each data block of destination data volume comprises and upgrades or do not upgrade, and such as can be labeled as 1 or 0 respectively.
Wherein, the message bit pattern of initialization source data volume and destination data volume, comprising: the state of each data block of initialization source data volume is not for copy as 0; The state of each data block of initialization destination data volume is not for upgrade as 0.
Step 103: each data block that the source data after dividing is rolled up is copied in the data block of corresponding destination data volume, and changes the state of each data block in the message bit pattern of source data volume and destination data volume.
Wherein, the state of each data block in the message bit pattern of change source data volume and destination data volume, comprising:
When certain data block of source data volume is copied in the data block of corresponding destination data volume, then the state updating of this data block of source data being rolled up is for copy is as 1, and the state updating of the data block of the destination data of correspondence being rolled up is for upgrading as 1;
When certain data block of source data volume does not copy, then do not change the state of this data block of source data volume.
Further, when having monitored input and output (IO) and ask in overall shared buffer memory, method has also comprised:
The state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to source data volume or destination data; Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
Further, when I/O request is the write request of source data volume, according to the attribute of I/O request, row relax is involved in source data volume or destination data and comprise: the state obtaining the data block of source data volume corresponding to the data of I/O request;
When the state of the data block of the source data volume obtained is for copying, then by the data block of the data of I/O request write source data volume; Or,
When the state of the data block of the source data volume obtained is not for copying, then the data copy in the data block of source data being rolled up is in the data block of corresponding destination data volume; After having copied, by the data block of the data of I/O request write source data volume; And the state changing the data block of source data volume is that the state of the data block having copied and changed destination data volume is for upgrade;
Upgrade the state of I/O request for completing.
Further, when I/O request is the read request of source data volume, according to the attribute of I/O request, row relax is involved in source data volume or destination data and comprise: upgrading the state of I/O request for completing;
Judge the data whether having I/O request in overall shared buffer memory;
When there being the data of I/O request in overall shared buffer memory, read the data of I/O request; When there is no the data of I/O request in overall shared buffer memory, read the data of I/O request from source data volume.
Further, for the purpose of I/O request during the write request of book, according to the attribute of I/O request, row relax is involved in source data volume or destination data and comprise: whether the data judging in I/O request have been copied in the data block that destination data rolls up;
If so, the state of I/O request is then upgraded for completing; Otherwise, judge whether the data in I/O request align with the data block that destination data is rolled up, if, then upgrade the state of I/O request for completing, otherwise, in the data block that data copy in I/O request to destination data is rolled up, the state of data block of change destination data volume be upgraded and upgraded I/O request state for completing.
Further, for the purpose of I/O request during the read request of book, involve in row relax according to the attribute of I/O request to source data volume or destination data to comprise: according to the message bit pattern of source data volume and the message bit pattern of destination data volume volume, judge whether the data of I/O request have been rolled up by source data and be copied in destination data volume;
If copy, then upgrade the state of I/O request for completing; If do not copy, then in the data copy of I/O request to destination data being rolled up;
Judge the data whether having I/O request in overall shared buffer memory;
When there being the data of I/O request in overall shared buffer memory, read the data of I/O request; When there is no the data of I/O request in overall shared buffer memory, read the data of I/O request from destination data volume.
In technical solution of the present invention, due to setting up source data volume and the destination data one-to-one relationship of roll up, this just makes source data roll up and destination data is rolled up and need not be positioned on same controller, thus achieves the load balancing on each controller within the storage system.
Fig. 2 is the structural representation of the device of data backup of the present invention, as shown in Figure 2, comprising: matching module, division module, data backup module and message bit pattern administration module.Wherein,
Matching module, for setting up the one-to-one relationship that source data volume is rolled up with destination data.
Wherein, corresponding relation comprises: identification information, the size information of source data volume and roll up identification information, the size information that corresponding destination data rolls up with this source data.
Divide module, for according to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume.
Data backup module, for being copied to each data block of the source data volume after division in the data block of corresponding destination data volume.
Message bit pattern administration module, for changing the state of each data block in message bit pattern that source data volume and destination data roll up.
Specifically comprise:
When certain data block of source data volume is copied in the data block of corresponding destination data volume, then the state updating of this data block of source data being rolled up is that the state updating of the data block having copied and then the destination data of correspondence rolled up is for upgrade;
When certain data block of source data volume does not copy, then do not change the state of this data block of source data volume.
Further, message bit pattern administration module, also for the message bit pattern that initialization source data is rolled up and destination data is rolled up; Wherein, the message bit pattern of source data volume comprises the state of each data block of source data volume, and the message bit pattern of destination data volume comprises the state of each data block of destination data volume.
The message bit pattern of message bit pattern administration module initialization source data volume and destination data volume, comprising: the state of each data block of initialization source data volume is for copy; The state of each data block of initialization destination data volume is for upgrade.
Wherein, the state of each data block of source data volume comprises and copies or do not copy, and such as can be labeled as 1 or 0 respectively; The state of each data block of destination data volume comprises and upgrades or do not upgrade, and such as can be labeled as 1 or 0 respectively.
Further, this device also comprises: input and output (IO) monitoring modular, for: monitor in overall shared buffer memory whether have I/O request;
When having monitored I/O request in overall shared buffer memory, the state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to source data volume or destination data; Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
Further, when I/O request is the write request of source data volume, message bit pattern administration module, also for the state that obtains the data block of source data volume corresponding to the data of I/O request; The state of the data block of the source data of acquisition being rolled up sends to data backup module;
When the state of the data block of the source data volume obtained is for copying, data backup module is also for the data block by the data of I/O request write source data volume; Or
When the state of the data block of the source data volume obtained is not for copying, the data copy of data backup module also in the data block of source data being rolled up is in the data block of corresponding destination data volume; After having copied, by the data block of the data of I/O request write source data volume;
Message bit pattern administration module is that the state of the data block having copied and changed destination data volume is for upgrade for changing the state of the data block of source data volume;
IO monitoring modular, for upgrading the state of I/O request for completing.
Further, this device also comprises: the first read module;
IO monitoring modular, time also for being the read request of source data volume when I/O request, upgrades the state of I/O request for completing;
First read module, for judging the data whether having I/O request in overall shared buffer memory; When there being the data of I/O request in overall shared buffer memory, read the data of I/O request; When there is no the data of I/O request in overall shared buffer memory, read the data of I/O request from source data volume.
Further, for the purpose of I/O request during the write request of book, data backup module, also for judging whether the data in I/O request have been copied in the data block of destination data volume;
If so, then IO monitoring modular upgrades the state of I/O request for completing; Otherwise, judging whether the data in I/O request align with the data block that destination data is rolled up, if so, then upgrading the state of I/O request for completing; Otherwise data backup module, in the data block of roll up the data copy in I/O request to destination data, the state of data block of message bit pattern administration module change destination data volume is to have upgraded and IO monitoring modular upgrades the state of I/O request for completing.
Further, this device also comprises the second read module;
Data backup module, during read request for book for the purpose of I/O request, according to the message bit pattern of source data volume and the message bit pattern of destination data volume volume, judges whether the data of I/O request have been rolled up by source data and is copied in destination data volume;
IO monitoring modular, also having been rolled up by source data for the data when I/O request and has been copied in destination data volume, having upgraded the state of I/O request for completing;
Data backup module, also for when the data of I/O request are not copied in destination data volume by source data volume, by the data copy of I/O request in destination data volume; IO monitoring modular, upgrades the state of I/O request for completing;
Second read module, for judging the data whether having I/O request in overall shared buffer memory; When there being the data of I/O request in overall shared buffer memory, read the data of I/O request; When there is no the data of I/O request in overall shared buffer memory, read the data of I/O request from destination data volume.
In following examples, suppose that the state of each data block that source data is rolled up comprises and copy or do not copy, be labeled as 1 or 0 respectively; The state of each data block of destination data volume comprises and upgrades or do not upgrade, and is labeled as 1 or 0 respectively; And suppose that the state of each data block that initialization source data is rolled up is 0; The state of each data block of initialization destination data volume is 0.
Fig. 3 is the process flow diagram of the embodiment one of the method for data backup of the present invention, as shown in Figure 3, comprising:
Step 300: build backup relation and carry out data backup.
This step is identical with step 101-step 103, does not repeat them here.
Step 301: when having monitored I/O request in overall shared buffer memory, the state arranging I/O request, in process, judges the attribute of I/O request.Wherein the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
Step 302, when I/O request is the write request of source data volume, obtains the state of the data block of source data volume corresponding to the data of I/O request and judges; When the state of the data block of the source data volume obtained is 1, then proceeds to step 303, otherwise proceed to step 304.
Step 303: by the data block of the data of I/O request write source data volume.Proceed to step 305.
Step 304: the data of I/O request, in the data block of corresponding destination data volume, after having copied, are write the data block of source data volume by the data copy in the data block of roll up source data; And the state of data block changing source data volume be 1 and the state of data block of change destination data volume be 1.Proceed to step 305.
Step 305, upgrades the state of I/O request for completing.
Step 306, overall this I/O request process of shared buffer memory notification target device completes.
Embodiment one be with I/O request be source data volume write request time, to the elaboration that the inventive method is carried out.
Fig. 4 is the process flow diagram of the embodiment two of the method for data backup of the present invention, as shown in Figure 4, comprising:
Step 400: build backup relation and carry out data backup.
This step is identical with step 101-step 103, does not repeat them here.
Step 401: when I/O request is the read request of source data volume, upgrade the state of I/O request for completing.
Step 402: judge the data whether having I/O request in overall shared buffer memory.When there being the data of I/O request in overall shared buffer memory, proceeding to step 403, otherwise proceeding to step 404.
Step 403: the data reading I/O request from overall shared buffer memory.Proceed to step 405.
Step 404: the data reading I/O request from source data volume.Proceed to step 405.
Step 405: overall this I/O request process of shared buffer memory notification target device completes.
Embodiment two be with I/O request be source data volume read request time, to the elaboration that the inventive method is carried out.
Fig. 5 is the process flow diagram of the embodiment three of the method for data backup of the present invention, as shown in Figure 5, comprising:
Step 500: build backup relation and carry out data backup.
This step is identical with step 101-step 103, does not repeat them here.
Step 501: for the purpose of I/O request during the write request of book, judges whether the data in I/O request have been copied in the data block of destination data volume.If so, then step 504 is proceeded to, otherwise, proceed to step 502.
Step 502: judge whether the data in I/O request align with the data block that destination data is rolled up, and if so, proceed to step 504, otherwise, proceed to step 503.
Step 503: in the data block of roll up the data copy in I/O request to destination data, the state of the data block of change destination data volume is 1, proceeds to step 504 afterwards.
Step 504: upgrade the state of I/O request for completing.
Step 505: overall this I/O request process of shared buffer memory notification target device completes.
When embodiment three is write requests of book for the purpose of I/O request, to the elaboration that the inventive method is carried out.
Fig. 6 is the process flow diagram of the embodiment four of the method for data backup of the present invention, as shown in Figure 6, comprising:
Step 600: build backup relation and carry out data backup.
This step is identical with step 101-step 103, does not repeat them here.
Step 601: for the purpose of I/O request during the read request of book, according to the message bit pattern of source data volume and the message bit pattern of destination data volume volume, judges whether the data of I/O request have been rolled up by source data and is copied in destination data volume; If so, then proceed to step 604, otherwise proceed to step 602.
Step 602: by the data copy of I/O request in destination data volume; Proceed to step 603.
Step 603: judge the data whether having I/O request in overall shared buffer memory; When there being the data of I/O request in overall shared buffer memory, from overall shared buffer memory, read the data of I/O request; When there is no the data of I/O request in overall shared buffer memory, read the data of I/O request from destination data volume.Proceed to step 604.
Step 604: overall this I/O request process of shared buffer memory notification target device completes.
When embodiment four is read requests of book for the purpose of I/O request, to the elaboration that the inventive method is carried out.
The all or part of step that one of ordinary skill in the art will appreciate that in said method is carried out instruction related hardware by program and is completed, and described program can be stored in computer-readable recording medium, as ROM (read-only memory), disk or CD etc.Alternatively, all or part of step of above-described embodiment also can use one or more integrated circuit to realize.Correspondingly, each module/unit in above-described embodiment can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.The application is not restricted to the combination of the hardware and software of any particular form.
The above, be only preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (22)

1. a method for data backup, based on overall shared buffer memory, is characterized in that, comprising:
Set up the one-to-one relationship that source data volume is rolled up with destination data;
According to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume;
Each data block that source data after dividing is rolled up is copied in the data block of corresponding destination data volume, and changes the state of each data block in the message bit pattern of source data volume and destination data volume.
2. method according to claim 1, is characterized in that, described corresponding relation comprises: identification information, the size information of described source data volume, and rolls up the corresponding relation between identification information that corresponding destination data rolls up, size information with described source data.
3. method according to claim 1, it is characterized in that, after described each data block numbering of rolling up each data block and the destination data of the source data volume after division respectively, the method also comprises: the message bit pattern that described in initialization, source data volume and described destination data are rolled up;
Wherein, the message bit pattern of described source data volume comprises the state of each data block of source data volume, and the message bit pattern of described destination data volume comprises the state of each data block of destination data volume.
4. method according to claim 3, is characterized in that, the state of each data block of described source data volume comprises and copies or do not copy; The state of each data block of described destination data volume comprises and upgrades or do not upgrade.
5. method according to claim 1, is characterized in that, the message bit pattern of described initialization source data volume and destination data volume, comprising: described in initialization, the state of each data block of source data volume is not for copy; Described in initialization, the state of each data block of destination data volume is not for upgrade.
6. the method according to claim 1 or 4, is characterized in that, the state of each data block in the message bit pattern of described change source data volume and destination data volume, comprising:
Certain data block of rolling up when described source data is copied in the data block of corresponding destination data volume, then the state updating of this data block of described source data being rolled up is that the state updating of the data block having copied and then the destination data of correspondence rolled up is for upgrade;
When certain data block that described source data is rolled up does not copy, then do not change the state of this data block of described source data volume.
7. method according to claim 1, is characterized in that, when having monitored input and output I/O request in described overall shared buffer memory, described method also comprises:
The state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to described source data volume or destination data;
Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
8. method according to claim 7, it is characterized in that, when described I/O request is the write request of source data volume, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: the state obtaining the data block of described source data volume corresponding to the data of described I/O request;
When the state of the data block of the described source data volume obtained is for copying, then the data of described I/O request are write the data block of described source data volume; Or
When the state of the data block of the described source data volume obtained is not for copying, then the data copy in the data block of described source data being rolled up is in the data block of corresponding described destination data volume; After having copied, the data of described I/O request are write the data block of described source data volume; And the state changing the data block of described source data volume is that the state of the data block having copied and changed described destination data volume is for upgrade;
Upgrade the state of I/O request for completing.
9. method according to claim 7, is characterized in that, when described I/O request is the read request of source data volume, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: upgrade the state of described I/O request for completing;
Judge the data whether having described I/O request in described overall shared buffer memory;
When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described source data volume.
10. method according to claim 7, it is characterized in that, for the purpose of described I/O request during the write request of book, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: judge whether the data in described I/O request have been copied in the data block of described destination data volume;
If so, the state of described I/O request is then upgraded for completing; Otherwise, judge whether the data in described I/O request align with the data block that described destination data is rolled up, if, then upgrade the state of described I/O request for completing, otherwise, by the data copy in described I/O request in the data block of described destination data volume, the state changing the data block of described destination data volume be upgraded and upgraded described I/O request state for completing.
11. methods according to claim 7, it is characterized in that, for the purpose of described I/O request during the read request of book, the described attribute according to I/O request involves in row relax to described source data volume or destination data and comprises: the message bit pattern of the message bit pattern rolled up according to described source data and described destination data volume volume, judges whether the data of described I/O request have been rolled up by source data and is copied in destination data volume;
If copy, then upgrade the state of described I/O request for completing; If do not copy, then in the data copy of described I/O request to described destination data being rolled up;
Judge the data whether having described I/O request in described overall shared buffer memory;
When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described destination data volume.
The device of 12. 1 kinds of data backups, based on overall shared buffer memory, is characterized in that, comprising: matching module, division module, data backup module and message bit pattern administration module; Wherein,
Matching module, for setting up the one-to-one relationship that source data volume is rolled up with destination data;
Divide module, for according to first threshold, the source data of correspondence volume and destination data volume are divided into multiple data block respectively, and respectively to each data block of the source data volume after division and each data block numbering of destination data volume;
Data backup module, for being copied in the data block of corresponding destination data volume by each data block of the source data volume after division;
Message bit pattern administration module, for changing the state of each data block in message bit pattern that source data volume and destination data roll up.
13. devices according to claim 12, it is characterized in that, described corresponding relation comprises: identification information, the size information of described source data volume, and rolls up the corresponding relation between identification information that corresponding destination data rolls up, size information with described source data.
14. devices according to claim 12, is characterized in that, institute's bitmap information administration module, also for the message bit pattern of source data volume and described destination data volume described in initialization; Wherein, the message bit pattern of described source data volume comprises the state of each data block of source data volume, and the message bit pattern of described destination data volume comprises the state of each data block of destination data volume.
15. devices according to claim 14, is characterized in that, the state of each data block of described source data volume comprises and copies or do not copy; The state of each data block of described destination data volume comprises and upgrades or do not upgrade.
16. devices according to claim 12, is characterized in that, the message bit pattern of institute's bitmap information administration module initialization source data volume and destination data volume, comprising: described in initialization, the state of each data block of source data volume is not for copy; Described in initialization, the state of each data block of destination data volume is not for upgrade.
17. devices according to claim 12 or 15, is characterized in that, the state of each data block in the message bit pattern that institute's bitmap information administration module change source data volume and destination data are rolled up, specifically comprises:
Certain data block of rolling up when described source data is copied in the data block of corresponding destination data volume, then the state updating of this data block of described source data being rolled up is that the state updating of the data block having copied and then the destination data of correspondence rolled up is for upgrade;
When certain data block that described source data is rolled up does not copy, then do not change the state of this data block of described source data volume.
18. devices according to claim 12, it is characterized in that, this device also comprises IO monitoring modular, for when having monitored input and output I/O request in described overall shared buffer memory, the state arranging I/O request is in process, and the attribute according to I/O request involves in row relax to described source data volume or destination data; Wherein, the attribute of I/O request comprises: read request or write request, IO carry out source and destination.
19. devices according to claim 18, is characterized in that, when described I/O request is the write request of source data volume, institute's bitmap information administration module, also for the state that obtains the data block of described source data volume corresponding to the data of described I/O request; The state of the data block of the described source data volume obtained is sent to described data backup module;
When the state of the data block of the described source data volume obtained is for copying, described data backup module is also for writing the data block of described source data volume by the data of described I/O request; Or
When the state of the data block of the described source data volume obtained is not for copying, the data copy of described data backup module also in the data block of described source data being rolled up is in the data block of corresponding described destination data volume; After having copied, the data of described I/O request are write the data block of described source data volume;
Institute's bitmap information administration module is that the state of the data block having copied and changed described destination data volume is for upgrade for changing the state of the data block of described source data volume;
Described IO monitoring modular, for upgrading the state of I/O request for completing.
20. devices according to claim 18, is characterized in that, this device also comprises: the first read module;
Described IO monitoring modular, also for when described I/O request be source data volume read request time, upgrade the state of described I/O request for completing;
Described first read module, for judging the data whether having described I/O request in described overall shared buffer memory; When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described source data volume.
21. devices according to claim 18, it is characterized in that, for the purpose of described I/O request during the write request of book, described data backup module, also for judging whether the data in described I/O request have been copied in the data block of described destination data volume;
If so, then described IO monitoring modular upgrades the state of described I/O request for completing; Otherwise, judging whether the data in described I/O request align with the data block that described destination data is rolled up, if so, then upgrading the state of described I/O request for completing; Otherwise, described data backup module, by the data copy in described I/O request in the data block of described destination data volume, the state that institute's bitmap information administration module changes the data block of described destination data volume is to have upgraded and described IO monitoring modular upgrades the state of described I/O request for completing.
22. devices according to claim 18, is characterized in that, this device also comprises the second read module;
Described data backup module, during read request for book for the purpose of described I/O request, the message bit pattern of the message bit pattern rolled up according to described source data and described destination data volume volume, judges whether the data of described I/O request have been rolled up by source data and is copied in destination data volume;
Described IO monitoring modular, also having been rolled up by source data for the data when described I/O request and has been copied in destination data volume, having upgraded the state of described I/O request for completing;
Described data backup module, also for when the data of described I/O request are not copied in destination data volume by source data volume, by the data copy of described I/O request in described destination data volume; Described IO monitoring modular, upgrades the state of described I/O request for completing;
Described second read module, for judging the data whether having described I/O request in described overall shared buffer memory; When there being the data of described I/O request in described overall shared buffer memory, read the data of described I/O request; When there is no the data of described I/O request in described overall shared buffer memory, read the data of described I/O request from described destination data volume.
CN201410645307.7A 2014-11-11 2014-11-11 Data backup method and device Pending CN104331344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410645307.7A CN104331344A (en) 2014-11-11 2014-11-11 Data backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410645307.7A CN104331344A (en) 2014-11-11 2014-11-11 Data backup method and device

Publications (1)

Publication Number Publication Date
CN104331344A true CN104331344A (en) 2015-02-04

Family

ID=52406076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410645307.7A Pending CN104331344A (en) 2014-11-11 2014-11-11 Data backup method and device

Country Status (1)

Country Link
CN (1) CN104331344A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183385A (en) * 2015-09-10 2015-12-23 深圳大学 Flash memory and copying method and system thereof
CN105260264A (en) * 2015-09-23 2016-01-20 浪潮(北京)电子信息产业有限公司 Snapshot implementation method and snapshot system
WO2017054539A1 (en) * 2015-09-28 2017-04-06 华为技术有限公司 Data snapshot method and storage device
CN115495288A (en) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 Data backup method, device and equipment and computer readable storage medium
CN115826878A (en) * 2023-02-14 2023-03-21 浪潮电子信息产业股份有限公司 Copy-on-write method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100131728A1 (en) * 2008-11-21 2010-05-27 Fujitsu Limited Computer-readable recording medium storing data migration program, data migration method, and data migration apparatus
CN102549984A (en) * 2009-05-05 2012-07-04 思杰系统有限公司 Systems and methods for packet steering in a multi-core architecture
CN102929748A (en) * 2012-11-08 2013-02-13 华为技术有限公司 Method and device for data backup
US20130346713A1 (en) * 2012-06-25 2013-12-26 International Business Machines Corporation Source cleaning cascaded volumes
CN103530204A (en) * 2013-10-15 2014-01-22 上海爱数软件有限公司 Method and system for real-time data backup
CN103814360A (en) * 2013-12-12 2014-05-21 华为技术有限公司 Data replication method and storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100131728A1 (en) * 2008-11-21 2010-05-27 Fujitsu Limited Computer-readable recording medium storing data migration program, data migration method, and data migration apparatus
CN102549984A (en) * 2009-05-05 2012-07-04 思杰系统有限公司 Systems and methods for packet steering in a multi-core architecture
US20130346713A1 (en) * 2012-06-25 2013-12-26 International Business Machines Corporation Source cleaning cascaded volumes
CN102929748A (en) * 2012-11-08 2013-02-13 华为技术有限公司 Method and device for data backup
CN103530204A (en) * 2013-10-15 2014-01-22 上海爱数软件有限公司 Method and system for real-time data backup
CN103814360A (en) * 2013-12-12 2014-05-21 华为技术有限公司 Data replication method and storage system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183385A (en) * 2015-09-10 2015-12-23 深圳大学 Flash memory and copying method and system thereof
CN105260264A (en) * 2015-09-23 2016-01-20 浪潮(北京)电子信息产业有限公司 Snapshot implementation method and snapshot system
WO2017054539A1 (en) * 2015-09-28 2017-04-06 华为技术有限公司 Data snapshot method and storage device
CN115495288A (en) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 Data backup method, device and equipment and computer readable storage medium
CN115495288B (en) * 2022-11-17 2023-03-10 苏州浪潮智能科技有限公司 Data backup method, device and equipment and computer readable storage medium
CN115826878A (en) * 2023-02-14 2023-03-21 浪潮电子信息产业股份有限公司 Copy-on-write method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US8166241B2 (en) Method of improving efficiency of capacity of volume used for copy function and apparatus thereof
CN100440155C (en) Method and apparatus for creating a virtual data copy
EP1814033B1 (en) Storage system and data restoration method thereof
US7930477B2 (en) Achieving data consistency with point-in-time copy operations in a parallel I/O environment
US7610465B2 (en) Method and related apparatus for data migration utilizing disk arrays
CN104331344A (en) Data backup method and device
US20060047926A1 (en) Managing multiple snapshot copies of data
JP4170056B2 (en) Backup / restore management method between replicated volumes and storage control device used in this method
JP2002041368A (en) Method and device for processing data to access independently of duplicated data
US20090132779A1 (en) Storage system and remote copy control method
CN102929748A (en) Method and device for data backup
CN103392164A (en) Storage system and storage control method
US8316196B1 (en) Systems, methods and computer readable media for improving synchronization performance after partially completed writes
CN105988895B (en) Snapshot processing method and device
US20180089077A1 (en) Method of managing redundant array of independent disks and electronic device
CN105653345A (en) Method and device supporting data nonvolatile random access
US20090254722A1 (en) Data storage apparatus
CN106844597A (en) The method and its device of a kind of quick deletion dependent snapshot target volume
CN103377090A (en) Method and system for sharing catalogs of different data sets in a multiprocessor system
CN102025758A (en) Method, device and system fore recovering data copy in distributed system
CN104461784A (en) Single progress bitmap based clone copying method and system
US7318168B2 (en) Bit map write logging with write order preservation in support asynchronous update of secondary storage
CN105488139B (en) The method of cross-platform storing data migration based on power information acquisition system
CN108628701B (en) Cache data protection method and device
CN100444130C (en) Storage device, data processing method thereof, data processing program thereof, and data processing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150204