CN104461784A - Single progress bitmap based clone copying method and system - Google Patents

Single progress bitmap based clone copying method and system Download PDF

Info

Publication number
CN104461784A
CN104461784A CN201410768235.5A CN201410768235A CN104461784A CN 104461784 A CN104461784 A CN 104461784A CN 201410768235 A CN201410768235 A CN 201410768235A CN 104461784 A CN104461784 A CN 104461784A
Authority
CN
China
Prior art keywords
clone
cloned copies
bitmap
progress bitmap
block
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
CN201410768235.5A
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 CN201410768235.5A priority Critical patent/CN104461784A/en
Publication of CN104461784A publication Critical patent/CN104461784A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The invention discloses a single progress bitmap based clone copying method and system. The method includes: adopting two clone volumes and a progress bitmap to perform clone copying of data blocks; after clone copying, initializing all bits of the progress bitmap to 0; during clone copying, after clone copying of each data block is finished, setting the relevant position of the progress bitmap as 1. The clone volumes include a clone source logic volume and a clone target logic volume needing copying, and the clone source logic volume and the clone target logic volume are identical in size; the progress bitmap refers to a bitmap for recording the clone copying progress, each bit of the progress bitmap has only two states, namely 0 and 1, wherein 0 represents that clone copying is not implemented, and 1 represents that clone copying is performed already. By the method and system, read and write frequency of disks is reduced in the process of clone copying, memory and disk space is saved, and efficiency of a cloning system of backup for disaster recovery is improved.

Description

A kind of cloned copies method and system based on single progress bitmap
Technical field
The present invention relates to data calamity for field, be specifically related to a kind of cloned copies method and system based on single progress bitmap.
Background technology
In calamity in data backup system, clone is an important technology, is a kind of mode by computer software or hardware, the process copying to another logical volume of the content intact of logical volume, refer to and data are carried out whole copying, and obtain the accurate copy in a certain moment.In current calamity in data backup product, clone and exist as a basic function, generally clone in units of volume.Usually, in clone technology, bitmap technology record can be used to clone progress and volume difference.Clone's task comprises clone's source logical volume and clone's target logic volume, and be called for short source book and target volume, data copy to target volume from source book.Usually, at source book and a target volume corresponding progress bitmap separately, respective record source book and target volume copy progress separately.During each change data bitmap, all need by bitmap content update on disk, with record copies progress at any time.This way needs repeatedly to carry out disk read-write, waste internal memory and disk space, and efficiency is lower.
Summary of the invention
In order to solve the problem, the present invention proposes a kind of cloned copies method and system based on single progress bitmap, disk read-write number of times can be reduced in cloned copies process, save internal memory and disk space, improve the efficiency of calamity for cloning system.
In order to achieve the above object, the present invention proposes a kind of cloned copies method based on single progress bitmap, the method comprises:
Two clone volumes and progress bitmap is adopted to carry out the cloned copies of data block.
Before cloned copies starts, all positions of progress bitmap are initialized as 0; In cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of progress bitmap.
Wherein, clone volume comprises clone source logical volume and clone's target logic volume of needs copy, and clone source logical volume refers to the logical volume be copied, and clone's target logic volume refers to the destination address logical volume copied to.Clone source logical volume is identical with the size of clone's target logic volume; Progress bitmap refers to the bitmap of record cloned copies progress, and each of progress bitmap only has two states: 0 and 1; Cloned copies is not carried out in 0 representative, and 1 representative carries out cloned copies.
Preferably, the method also comprises: before cloned copies starts, according to clone's base unit that user is arranged, clone volume is divided into the block that size is identical, the block number that size and the clone volume of progress bitmap are divided is identical, each block of each difference one_to_one corresponding clone source logical volume in progress bitmap, each block that each the difference one_to_one corresponding clone target logic simultaneously in progress bitmap is rolled up; Each block one_to_one corresponding that each block of clone source logical volume and clone's target logic are rolled up.
Preferably, cloned copies process comprises in following two kinds of cloned copies modes: sequential copy method and physical block copy method.
Sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; After cloned copies completes, be 1 by the correspondence position in progress bitmap; Continuing to search the next one in progress bitmap is the position of 0.
Physical block copy method refers to: for the position of appointed data block, judge whether progress bitmap correspondence position is 0; If the corresponding position of progress bitmap is 0, then carrying out cloned copies, is 1 by correspondence position after cloned copies completes; If progress bitmap correspondence position is not 0, then do not do any action.
Preferably, the method also comprises: in progress bitmap each change time, change is synchronously saved on disk; If broken down in cloned copies process, by the data reconstruction cloned copies process in reading disk.
The present invention also proposes a kind of cloned copies system based on single progress bitmap, and this system comprises: cloned copies module, set module.
Cloned copies module, for the data block between cloned copies two clone volumes.
All positions of progress bitmap, for before cloned copies starts, are initialized as 0 by set module; In cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of progress bitmap.
Preferably, this system also comprises division module: for before cloned copies starts, and according to clone's base unit that user is arranged, clone volume is divided into the block that size is identical; The foundation divided is: the block number that size and the clone volume of progress bitmap are divided is identical, each block of each difference one_to_one corresponding clone source logical volume in progress bitmap, each block that each the difference one_to_one corresponding clone target logic simultaneously in progress bitmap is rolled up; Each block one_to_one corresponding that each block of clone source logical volume and clone's target logic are rolled up.
Preferably, cloned copies module also for: complete copy in following two kinds of modes: sequential copy method and physical block copy method.
Wherein, sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; To complete and the correspondence position in progress bitmap is after 1 by set module at cloned copies; Continuing to search the next one in progress bitmap is the position of 0.
Physical block copy method refers to: for the position of appointed data block, judge whether progress bitmap correspondence position is 0; If the corresponding position of progress bitmap is 0, then carry out cloned copies, after cloned copies completes, correspondence position is 1 by wait set module; If the corresponding position of progress bitmap is not 0, then do not do any action.
Preferably, this system also comprises backup module: when changing for each in progress bitmap, change be synchronously saved on disk; If broken down in cloned copies process, by cloned copies process described in the data reconstruction in reading disk.
Compared with prior art, the present invention includes: adopt two clone volumes and progress bitmap to carry out the cloned copies of data block.Before cloned copies starts, all positions of progress bitmap are initialized as 0; In cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of progress bitmap.Wherein, clone volume comprises clone source logical volume and clone's target logic volume of needs copy, and clone source logical volume is identical with the size of clone's target logic volume; Progress bitmap refers to the bitmap of record cloned copies progress, and each of progress bitmap only has two states: 0 and 1; Cloned copies is not carried out in 0 representative, and 1 representative carries out cloned copies.By the solution of the present invention, disk read-write number of times can be reduced in cloned copies process, save internal memory and disk space, improve the efficiency of calamity for cloning system.
Accompanying drawing explanation
Be described the accompanying drawing in the embodiment of the present invention below, the accompanying drawing in embodiment is for a further understanding of the present invention, is used from explanation the present invention, does not form limiting the scope of the invention with instructions one.
Fig. 1 is the cloned copies method flow diagram based on single progress bitmap of the present invention;
Fig. 2 is the cloned copies system chart based on single progress bitmap of the present invention;
Fig. 3 is the cloned copies method schematic diagram based on single progress bitmap of the present invention;
Fig. 4 is sequential copy method process flow diagram of the present invention;
Fig. 5 is physical block of the present invention copy method process flow diagram.
Embodiment
For the ease of the understanding of those skilled in the art, below in conjunction with accompanying drawing, the invention will be further described, can not be used for limiting the scope of the invention.
The present invention is based on the cloned copies technology of bitmap, use the copy progress of bitmap record clone; Use single progress bitmap copy, simplify the Logic judgment of copy, optimize the disk read-write number of times in copy procedure.
The present invention proposes a kind of cloned copies method based on single progress bitmap, as shown in Figure 1 and Figure 2, the method comprises:
S101, two clone volumes and progress bitmap is adopted to carry out the cloned copies of data block.
Wherein, clone volume comprises clone source logical volume and clone's target logic volume of needs copy, and clone source logical volume is identical with the size of clone's target logic volume.Based on the cloned copies technology of bitmap, refer to the technology of the copy progress used in bitmap record cloning procedure; Progress bitmap refers to the bitmap recording described cloned copies progress, and each of progress bitmap only has two states: 0 and 1; Cloned copies is not carried out in 0 representative, and 1 representative carries out cloned copies.
S102, before cloned copies starts, all positions of progress bitmap are initialized as 0.
Preferably, the method also comprises: before cloned copies starts, according to clone's base unit that user is arranged, clone volume is divided into the block that size is identical, the block number that size and the clone volume of progress bitmap are divided is identical, each block of each difference one_to_one corresponding clone source logical volume in progress bitmap, each block that each the difference one_to_one corresponding clone target logic simultaneously in progress bitmap is rolled up; Each block one_to_one corresponding that each block of clone source logical volume and clone's target logic are rolled up.
S103, in cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of progress bitmap.
Preferably, cloned copies process comprises following two kinds of cloned copies modes: sequential copy method and physical block copy method.Particular flow sheet as shown in Figure 4, Figure 5.
Sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; After cloned copies completes, be 1 by the correspondence position in progress bitmap; Continuing to search the next one in progress bitmap is the position of 0.
Physical block copy method refers to: for the position of appointed data block, judge whether progress bitmap correspondence position is 0; If the corresponding position of progress bitmap is 0, then carrying out cloned copies, is 1 by correspondence position after cloned copies completes; If progress bitmap correspondence position is not 0, then do not do any action.
Preferably, the method also comprises: in progress bitmap each change time, this change is synchronously saved on disk; If broken down in cloned copies process, by the data reconstruction cloned copies process in reading disk.
The present invention also proposes a kind of cloned copies system 01 based on single progress bitmap, and as shown in Figure 2, this system comprises: cloned copies module 02, set module 03.
Cloned copies module 02, for the data block between cloned copies two clone volumes.
All positions of progress bitmap, for before cloned copies starts, are initialized as 0 by set module 03; In cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of progress bitmap.
Preferably, system also comprises division module 04: for before cloned copies starts, and according to clone's base unit that user is arranged, clone volume is divided into the block that size is identical; The foundation divided is: the block number that size and the clone volume of progress bitmap are divided is identical, each block of each difference one_to_one corresponding clone source logical volume in progress bitmap, each block that each the difference one_to_one corresponding clone target logic simultaneously in progress bitmap is rolled up; Each block one_to_one corresponding that each block of clone source logical volume and clone's target logic are rolled up.
Preferably, cloned copies module 02 also for: complete copy in following two kinds of modes: sequential copy method and physical block copy method.
Wherein, sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; To complete and the correspondence position in progress bitmap is after 1 by set module at cloned copies; Continuing to search the next one in progress bitmap is the position of 0.
Physical block copy method refers to: for the position of appointed data block, judge whether progress bitmap correspondence position is 0; If the corresponding position of progress bitmap is 0, then carry out cloned copies, after cloned copies completes, correspondence position is 1 by wait set module; If the corresponding position of progress bitmap is not 0, then do not do any action.
Preferably, this system also comprises backup module 05: when changing for each in progress bitmap, change be synchronously saved on disk; If broken down in cloned copies process, by the data reconstruction cloned copies process in reading disk.
It should be noted that; above-described embodiment is only understand for the ease of those skilled in the art; be not limited to protection scope of the present invention; under the prerequisite not departing from inventive concept of the present invention, any apparent replacement and improvement etc. that those skilled in the art make the present invention are all within protection scope of the present invention.

Claims (8)

1. based on a cloned copies method for single progress bitmap, it is characterized in that, described method comprises:
Two clone volumes and progress bitmap is adopted to carry out the cloned copies of data block;
Before described cloned copies starts, all positions of described progress bitmap are initialized as 0; In described cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of described progress bitmap;
Wherein, described clone volume comprises clone source logical volume and clone's target logic volume of needs copy, and described clone source logical volume is identical with the size of clone's target logic volume; Described progress bitmap refers to the bitmap recording described cloned copies progress, and each of described progress bitmap only has two states: 0 and 1; Cloned copies is not carried out in 0 representative, and 1 representative carries out cloned copies.
2. the method for claim 1, it is characterized in that, described method also comprises: before described cloned copies starts, according to clone's base unit that user is arranged, described clone volume is divided into the identical block of size, the size of described progress bitmap is identical with the block number that described clone volume is divided, each in described progress bitmap clones each block of source logical volume respectively described in one_to_one corresponding, each simultaneously in described progress bitmap clones each block of target logic volume respectively described in one_to_one corresponding; Each block one_to_one corresponding that each block of described clone source logical volume and described clone's target logic are rolled up.
3. the method for claim 1, is characterized in that, described cloned copies process comprises in following two kinds of cloned copies modes: sequential copy method and physical block copy method;
Described sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; After described cloned copies completes, be 1 by the correspondence position in described progress bitmap; Continuing to search the next one in described progress bitmap is the position of 0;
Described physical block copy method refers to: for the position of appointed data block, judge whether described progress bitmap correspondence position is 0; If the corresponding position of described progress bitmap is 0, then carrying out cloned copies, is 1 by described correspondence position after described cloned copies completes; If described progress bitmap correspondence position is not 0, then do not do any action.
4. the method for claim 1, is characterized in that, described method also comprises: in described progress bitmap each change time, described change is synchronously saved on disk; If broken down in described cloned copies process, by reading cloned copies process described in the data reconstruction in described disk.
5. based on a cloned copies system for single progress bitmap, it is characterized in that, described system comprises: cloned copies module, set module;
Described cloned copies module, for the data block between cloned copies two clone volumes;
All positions of described progress bitmap, for before described cloned copies starts, are initialized as 0 by described set module; In described cloned copies process, when the cloned copies of each data block completes, be 1 by the relevant position of described progress bitmap.
6. system as claimed in claim 5, it is characterized in that, described system also comprises division module: for before described cloned copies starts, and according to clone's base unit that user is arranged, described clone volume is divided into the identical block of size; The foundation divided is: the size of described progress bitmap is identical with the block number that described clone volume is divided, each in described progress bitmap clones each block of source logical volume respectively described in one_to_one corresponding, each simultaneously in described progress bitmap clones each block of target logic volume respectively described in one_to_one corresponding; Each block one_to_one corresponding that each block of described clone source logical volume and described clone's target logic are rolled up.
7. system as claimed in claim 5, is characterized in that, described cloned copies module also for: complete copy in following two kinds of modes: sequential copy method and physical block copy method;
Wherein, described sequential copy method refers to: from assigned address, searches in corresponding progress bitmap to represent this block to be not yet cloned first of copy be the position of 0, and the data block that cloned copies is corresponding; To complete and the correspondence position in described progress bitmap is after 1 by described set module at described cloned copies; Continuing to search the next one in described progress bitmap is the position of 0;
Described physical block copy method refers to: for the position of appointed data block, judge whether described progress bitmap correspondence position is 0; If the corresponding position of described progress bitmap is 0, then carry out cloned copies, after described cloned copies completes, described correspondence position is 1 by wait described set module; If the corresponding position of described progress bitmap is not 0, then do not do any action.
8. system as claimed in claim 5, it is characterized in that, described system also comprises backup module: when changing for each in described progress bitmap, described change be synchronously saved on disk; If broken down in described cloned copies process, by reading cloned copies process described in the data reconstruction in described disk.
CN201410768235.5A 2014-12-11 2014-12-11 Single progress bitmap based clone copying method and system Pending CN104461784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410768235.5A CN104461784A (en) 2014-12-11 2014-12-11 Single progress bitmap based clone copying method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410768235.5A CN104461784A (en) 2014-12-11 2014-12-11 Single progress bitmap based clone copying method and system

Publications (1)

Publication Number Publication Date
CN104461784A true CN104461784A (en) 2015-03-25

Family

ID=52907880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410768235.5A Pending CN104461784A (en) 2014-12-11 2014-12-11 Single progress bitmap based clone copying method and system

Country Status (1)

Country Link
CN (1) CN104461784A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224422A (en) * 2015-10-20 2016-01-06 浙江大华技术股份有限公司 A kind of data back up method and equipment
CN106326039A (en) * 2016-08-24 2017-01-11 浪潮(北京)电子信息产业有限公司 Method and device for cloning logical volume in disk and disk
CN107643961A (en) * 2017-09-26 2018-01-30 郑州云海信息技术有限公司 Common volume turns method of data synchronization, system, device and the storage medium of mirrored volume
CN110032475A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of cloning process of logical volume, device and equipment
CN112463033A (en) * 2020-11-09 2021-03-09 苏州浪潮智能科技有限公司 Volume cloning method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658168A (en) * 2004-02-19 2005-08-24 华为技术有限公司 Method for writing data on source film in pistolgraph process
CN102289396A (en) * 2011-09-01 2011-12-21 宇龙计算机通信科技(深圳)有限公司 Terminal and backup and recovery method
CN102446130A (en) * 2010-10-09 2012-05-09 上海研祥智能科技有限公司 Method, system and device for displaying copying process based on bootstrap
US20130297899A1 (en) * 2012-05-01 2013-11-07 Hitachi, Ltd. Traffic reducing on data migration
CN103814360A (en) * 2013-12-12 2014-05-21 华为技术有限公司 Data replication method and storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658168A (en) * 2004-02-19 2005-08-24 华为技术有限公司 Method for writing data on source film in pistolgraph process
CN102446130A (en) * 2010-10-09 2012-05-09 上海研祥智能科技有限公司 Method, system and device for displaying copying process based on bootstrap
CN102289396A (en) * 2011-09-01 2011-12-21 宇龙计算机通信科技(深圳)有限公司 Terminal and backup and recovery method
US20130297899A1 (en) * 2012-05-01 2013-11-07 Hitachi, Ltd. Traffic reducing on data migration
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
CN105224422A (en) * 2015-10-20 2016-01-06 浙江大华技术股份有限公司 A kind of data back up method and equipment
CN105224422B (en) * 2015-10-20 2019-02-12 浙江大华技术股份有限公司 A kind of data back up method and equipment
CN106326039A (en) * 2016-08-24 2017-01-11 浪潮(北京)电子信息产业有限公司 Method and device for cloning logical volume in disk and disk
CN107643961A (en) * 2017-09-26 2018-01-30 郑州云海信息技术有限公司 Common volume turns method of data synchronization, system, device and the storage medium of mirrored volume
CN110032475A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of cloning process of logical volume, device and equipment
CN112463033A (en) * 2020-11-09 2021-03-09 苏州浪潮智能科技有限公司 Volume cloning method and device

Similar Documents

Publication Publication Date Title
CN102945201B (en) The non-volatile media log recording of verification msg set
CN104461784A (en) Single progress bitmap based clone copying method and system
CN103970585B (en) Create the method and device of virtual machine
CN102929748B (en) Data back up method and device
CN102096616B (en) Logical object data duplication method and related device
CN105893184B (en) A kind of incremental backup method and device
CN104142872A (en) Quick reestablishment method for RAID (redundan array of inexpensive disk)
CN102411524A (en) Snapshot volume data copying method
CN103678036B (en) A kind of backup method found based on virtual machine operation information data
WO2012097691A1 (en) Data backup method and device
CN112000426B (en) Data processing method and device
CN103955433A (en) Shingled magnetic recording hard disk, and method and device for writing data in shingled magnetic recording hard disk
CN103500146A (en) Method and system for migrating stored data of virtual machine disks
CN107544865B (en) Method and device for quickly making backup data available
JP5057887B2 (en) Data update device, data update method, and data update program
CN104331344A (en) Data backup method and device
CN105094711B (en) A kind of method and device for realizing copy-on-write file system
US9535796B2 (en) Method, apparatus and computer for data operation
CN106611364B (en) Storage fragment sorting method and device
RU2014144437A (en) METHOD OF MODIFICATION OF A DATA SET IN MEMORY
CN100565467C (en) The backed up in synchronization apparatus and method that are used for storage device
CN106844094B (en) File repair method and device
JP6399755B2 (en) Mirroring apparatus and control method thereof
JP5561303B2 (en) Data replication system, data replication method, and program thereof
TWI417889B (en) Write timeout methods for a flash memory and memory device using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150325