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
copy
progress bitmap
progress
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

本发明公开了一种基于单进度位图的克隆拷贝方法和系统,包括:采用两个克隆卷和一个进度位图进行数据块的克隆拷贝。在克隆拷贝开始前,将进度位图的所有位初始化为0;在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。其中,克隆卷包括需要拷贝的克隆源逻辑卷和克隆目标逻辑卷,克隆源逻辑卷和克隆目标逻辑卷的大小相同;进度位图是指记录克隆拷贝进度的位图,进度位图的每一位只有两种状态:0和1;0代表未进行克隆拷贝,1代表已进行克隆拷贝。通过本发明的方案,能够在克隆拷贝过程中减少磁盘读写次数,节省内存和磁盘空间,提高灾备克隆系统的效率。

The invention discloses a clone copy method and system based on a single progress bitmap, comprising: using two clone volumes and a progress bitmap to perform clone copy of a data block. Before the clone copy starts, all bits of the progress bitmap are initialized to 0; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1. Among them, the clone volume includes the clone source logical volume and the clone target logical volume that need to be copied. The bit has only two states: 0 and 1; 0 means that no clone copy has been made, and 1 means that a clone copy has been done. Through the scheme of the present invention, the number of reads and writes of the disk can be reduced during the cloning and copying process, memory and disk space can be saved, and the efficiency of the disaster backup cloning system can be improved.

Description

一种基于单进度位图的克隆拷贝方法和系统A clone copy method and system based on single-progress bitmap

技术领域technical field

本发明涉及数据灾备领域,具体涉及一种基于单进度位图的克隆拷贝方法和系统。The invention relates to the field of data disaster recovery, in particular to a clone copy method and system based on a single progress bitmap.

背景技术Background technique

在灾备数据备份系统中,克隆是一项重要的技术,是一种通过计算机软件或硬件的方式,把逻辑卷的内容完整的复制到另一逻辑卷的过程,是指将数据进行全部的复制,而得到某一时刻的精确的副本。在当前的灾备数据备份产品中,克隆作为一项基本功能存在,一般以卷为单位进行克隆。通常,在克隆技术中,会使用位图技术记录克隆进度和卷差异。一个克隆任务包括一个克隆源逻辑卷和一个克隆目标逻辑卷,简称源卷和目标卷,数据从源卷复制到目标卷。通常,在源卷和目标卷各自对应一个进度位图,相应记录源卷和目标卷各自的拷贝进度。每次改变位图数据时,都需要将位图内容更新到磁盘上,以随时记录拷贝进度。这一做法需要反复进行磁盘读写,浪费内存和磁盘空间,并且效率较低。In the disaster recovery data backup system, cloning is an important technology. It is a process of completely copying the contents of a logical volume to another logical volume through computer software or hardware. Copy, and get an exact copy of a moment in time. In the current disaster recovery data backup products, cloning exists as a basic function, and the cloning is generally performed in units of volumes. Typically, in cloning technology, bitmap technology is used to record the cloning progress and volume differences. A cloning task includes a clone source logical volume and a clone target logical volume, referred to as source volume and target volume, and data is copied from the source volume to the target volume. Usually, there is a progress bitmap corresponding to the source volume and the target volume respectively, and the respective copying progress of the source volume and the target volume are correspondingly recorded. Every time the bitmap data is changed, the content of the bitmap needs to be updated to the disk to record the copying progress at any time. This approach requires repeated disk reads and writes, wasting memory and disk space, and is less efficient.

发明内容Contents of the invention

为了解决上述问题,本发明提出了一种基于单进度位图的克隆拷贝方法和系统,能够在克隆拷贝过程中减少磁盘读写次数,节省内存和磁盘空间,提高灾备克隆系统的效率。In order to solve the above problems, the present invention proposes a single-progress bitmap-based clone copy method and system, which can reduce the number of disk reads and writes during the clone copy process, save memory and disk space, and improve the efficiency of the disaster recovery clone system.

为了达到上述目的,本发明提出了一种基于单进度位图的克隆拷贝方法,该方法包括:In order to achieve the above object, the present invention proposes a clone copy method based on a single progress bitmap, the method comprising:

采用两个克隆卷和一个进度位图进行数据块的克隆拷贝。Clone copies of data blocks using two clone volumes and a progress bitmap.

在克隆拷贝开始前,将进度位图的所有位初始化为0;在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。Before the clone copy starts, all bits of the progress bitmap are initialized to 0; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1.

其中,克隆卷包括需要拷贝的克隆源逻辑卷和克隆目标逻辑卷,克隆源逻辑卷是指被拷贝的逻辑卷,克隆目标逻辑卷是指拷贝到的目标地址逻辑卷。克隆源逻辑卷和克隆目标逻辑卷的大小相同;进度位图是指记录克隆拷贝进度的位图,进度位图的每一位只有两种状态:0和1;0代表未进行克隆拷贝,1代表已进行克隆拷贝。Wherein, the clone volume includes a clone source logical volume and a clone target logical volume that need to be copied, the clone source logical volume refers to the copied logical volume, and the clone target logical volume refers to the copied target address logical volume. The size of the clone source logical volume and the clone target logical volume are the same; the progress bitmap refers to the bitmap that records the progress of the clone copy, and each bit of the progress bitmap has only two states: 0 and 1; 0 means no clone copy, 1 Indicates that a cloned copy has been made.

优选地,该方法还包括:在克隆拷贝开始前,根据用户设置的克隆基本单位,将克隆卷划分为大小相同的块,进度位图的大小与克隆卷被划分的块数相同,进度位图中的每一位分别一一对应克隆源逻辑卷的每一块,同时进度位图中的每一位分别一一对应克隆目标逻辑卷的每一块;克隆源逻辑卷的每一块与克隆目标逻辑卷的每一块一一对应。Preferably, the method further includes: before the start of the clone copy, divide the clone volume into blocks of the same size according to the clone basic unit set by the user, the size of the progress bitmap is the same as the number of blocks divided into the clone volume, and the progress bitmap Each bit in the progress bitmap corresponds to each block of the clone source logical volume, and each bit in the progress bitmap corresponds to each block of the clone target logical volume; each block of the clone source logical volume corresponds to the clone target logical volume Each block corresponds to one by one.

优选地,克隆拷贝过程包括以下述两种克隆拷贝方式:顺序拷贝法和指定块拷贝法。Preferably, the clone copy process includes the following two clone copy methods: sequential copy method and designated block copy method.

顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在克隆拷贝完成后,将进度位图中的对应位置为1;继续查找进度位图中下一个为0的位置。The sequential copy method refers to: starting from the specified position, find the first position of 0 in the corresponding progress bitmap representing that the block has not been cloned and copied, and clone and copy the corresponding data block; after the cloning copy is completed, the progress bit The corresponding position in the figure is 1; continue to find the next position of 0 in the progress bitmap.

指定块拷贝法是指:对于被指定的数据块的位置,判断进度位图对应位置是否为0;如果进度位图的对应位为0,则进行克隆拷贝,克隆拷贝完成后将对应位置为1;如果进度位图对应位置不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, and the corresponding position is set to 1 after the clone copy is completed ; If the corresponding position of the progress bitmap is not 0, no action will be taken.

优选地,该方法还包括:进度位图中的每一位改变时,将改变同步保存到磁盘上;如果在克隆拷贝过程中发生故障,通过读取磁盘中的数据重建克隆拷贝过程。Preferably, the method further includes: when each bit in the progress bitmap is changed, synchronously saving the change to the disk; if a failure occurs during the cloning copy process, rebuilding the cloning copy process by reading data from the disk.

本发明还提出一种基于单进度位图的克隆拷贝系统,该系统包括:克隆拷贝模块、置位模块。The present invention also proposes a clone copy system based on a single-progress bitmap, which includes: a clone copy module and a position setting module.

克隆拷贝模块,用于克隆拷贝两个克隆卷之间的数据块。The clone copy module is used to clone and copy data blocks between two clone volumes.

置位模块,用于在克隆拷贝开始前,将进度位图的所有位初始化为0;在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。The bit setting module is used to initialize all bits of the progress bitmap to 0 before the clone copy starts; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1.

优选地,该系统还包括划分模块:用于在克隆拷贝开始前,根据用户设置的克隆基本单位,将克隆卷划分为大小相同的块;划分的依据为:进度位图的大小与克隆卷被划分的块数相同,进度位图中的每一位分别一一对应克隆源逻辑卷的每一块,同时进度位图中的每一位分别一一对应克隆目标逻辑卷的每一块;克隆源逻辑卷的每一块与克隆目标逻辑卷的每一块一一对应。Preferably, the system further includes a division module: used to divide the clone volume into blocks of the same size according to the cloning basic unit set by the user before the start of the clone copy; the division basis is: the size of the progress bitmap and the clone volume being divided The number of divided blocks is the same, each bit in the progress bitmap corresponds to each block of the clone source logical volume, and each bit in the progress bitmap corresponds to each block of the clone target logical volume; the clone source logic Each block of the volume has a one-to-one correspondence with each block of the clone target logical volume.

优选地,克隆拷贝模块还用于:以下述两种方式完成拷贝:顺序拷贝法和指定块拷贝法。Preferably, the clone copy module is also used for: completing the copy in the following two ways: sequential copy method and designated block copy method.

其中,顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在克隆拷贝完成并且置位模块将进度位图中的对应位置为1后;继续查找进度位图中下一个为0的位置。Among them, the sequential copy method refers to: start from the specified position, search for the first position of 0 in the corresponding progress bitmap representing the block that has not been cloned, and clone the corresponding data block; when the clone copy is completed and set After the module sets the corresponding position in the progress bitmap to 1; continue to search for the next position in the progress bitmap that is 0.

指定块拷贝法是指:对于被指定的数据块的位置,判断进度位图对应位置是否为0;如果进度位图的对应位为0,则进行克隆拷贝,克隆拷贝完成后等待置位模块将对应位置为1;如果进度位图的对应位不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, and after the clone copy is completed, the wait setting module will The corresponding bit is 1; if the corresponding bit of the progress bitmap is not 0, no action is taken.

优选地,该系统还包括备份模块:用于在进度位图中的每一位改变时,将改变同步保存到磁盘上;如果在克隆拷贝过程中发生故障,通过读取磁盘中的数据重建所述克隆拷贝过程。Preferably, the system also includes a backup module: used for synchronously saving the change to the disk when each bit in the progress bitmap is changed; if a failure occurs during the cloning copy process, the data in the disk is read to reconstruct the Describe the cloning and copying process.

与现有技术相比,本发明包括:采用两个克隆卷和一个进度位图进行数据块的克隆拷贝。在克隆拷贝开始前,将进度位图的所有位初始化为0;在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。其中,克隆卷包括需要拷贝的克隆源逻辑卷和克隆目标逻辑卷,克隆源逻辑卷和克隆目标逻辑卷的大小相同;进度位图是指记录克隆拷贝进度的位图,进度位图的每一位只有两种状态:0和1;0代表未进行克隆拷贝,1代表已进行克隆拷贝。通过本发明的方案,能够在克隆拷贝过程中减少磁盘读写次数,节省内存和磁盘空间,提高灾备克隆系统的效率。Compared with the prior art, the present invention includes: using two clone volumes and a progress bitmap to clone and copy data blocks. Before the clone copy starts, all bits of the progress bitmap are initialized to 0; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1. Among them, the clone volume includes the clone source logical volume and the clone target logical volume that need to be copied. The bit has only two states: 0 and 1; 0 means that no clone copy has been made, and 1 means that a clone copy has been done. Through the scheme of the present invention, the number of reads and writes of the disk can be reduced during the cloning and copying process, memory and disk space can be saved, and the efficiency of the disaster backup cloning system can be improved.

附图说明Description of drawings

下面对本发明实施例中的附图进行说明,实施例中的附图是用于对本发明的进一步理解,与说明书一起用于解释本发明,并不构成对本发明保护范围的限制。The accompanying drawings in the embodiments of the present invention are described below. The accompanying drawings in the embodiments are used for further understanding of the present invention and are used together with the description to explain the present invention, and do not constitute a limitation to the protection scope of the present invention.

图1为本发明的基于单进度位图的克隆拷贝方法流程图;Fig. 1 is the flow chart of the clone copy method based on the single-progress bitmap of the present invention;

图2为本发明的基于单进度位图的克隆拷贝系统框图;Fig. 2 is the clone copy system block diagram based on single progress bitmap of the present invention;

图3为本发明的基于单进度位图的克隆拷贝方法示意图;Fig. 3 is a schematic diagram of the clone copy method based on a single progress bitmap of the present invention;

图4为本发明的顺序拷贝法流程图;Fig. 4 is the sequence copy method flowchart of the present invention;

图5为本发明的指定块拷贝法流程图。Fig. 5 is a flow chart of the designated block copy method of the present invention.

具体实施方式Detailed ways

为了便于本领域技术人员的理解,下面结合附图对本发明作进一步的描述,并不能用来限制本发明的保护范围。In order to facilitate the understanding of those skilled in the art, the present invention will be further described below in conjunction with the accompanying drawings, which cannot be used to limit the protection scope of the present invention.

本发明基于位图的克隆拷贝技术,使用位图记录克隆的拷贝进度;使用单进度位图拷贝,简化拷贝的逻辑判断,优化拷贝过程中的磁盘读写次数。The bitmap-based clone copying technology of the present invention uses the bitmap to record the copying progress of the clone; uses a single-progress bitmap copying, simplifies the logic judgment of copying, and optimizes the number of disk reads and writes in the copying process.

本发明提出了一种基于单进度位图的克隆拷贝方法,如图1、图2所示,该方法包括:The present invention proposes a clone copy method based on a single progress bitmap, as shown in Figure 1 and Figure 2, the method includes:

S101、采用两个克隆卷和一个进度位图进行数据块的克隆拷贝。S101. Perform clone copying of data blocks by using two clone volumes and a progress bitmap.

其中,克隆卷包括需要拷贝的克隆源逻辑卷和克隆目标逻辑卷,克隆源逻辑卷和克隆目标逻辑卷的大小相同。基于位图的克隆拷贝技术,是指使用位图记录克隆过程中的拷贝进度的技术;进度位图是指记录所述克隆拷贝进度的位图,进度位图的每一位只有两种状态:0和1;0代表未进行克隆拷贝,1代表已进行克隆拷贝。Wherein, the clone volume includes a clone source logical volume and a clone target logical volume that need to be copied, and the clone source logical volume and the clone target logical volume have the same size. The bitmap-based clone copy technology refers to the technology that uses bitmaps to record the copy progress during the cloning process; the progress bitmap refers to the bitmap that records the progress of the clone copy, and each bit of the progress bitmap has only two states: 0 and 1; 0 represents no cloned copy, 1 represents cloned copy.

S102、在克隆拷贝开始前,将进度位图的所有位初始化为0。S102. Before the cloning starts, initialize all bits of the progress bitmap to 0.

优选地,该方法还包括:在克隆拷贝开始前,根据用户设置的克隆基本单位,将克隆卷划分为大小相同的块,进度位图的大小与克隆卷被划分的块数相同,进度位图中的每一位分别一一对应克隆源逻辑卷的每一块,同时进度位图中的每一位分别一一对应克隆目标逻辑卷的每一块;克隆源逻辑卷的每一块与克隆目标逻辑卷的每一块一一对应。Preferably, the method further includes: before the start of the clone copy, divide the clone volume into blocks of the same size according to the clone basic unit set by the user, the size of the progress bitmap is the same as the number of blocks divided into the clone volume, and the progress bitmap Each bit in the progress bitmap corresponds to each block of the clone source logical volume, and each bit in the progress bitmap corresponds to each block of the clone target logical volume; each block of the clone source logical volume corresponds to the clone target logical volume Each block corresponds to one by one.

S103、在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。S103. During the clone copy process, when the clone copy of each data block is completed, set the corresponding position of the progress bitmap to 1.

优选地,克隆拷贝过程包括以下两种克隆拷贝方式:顺序拷贝法和指定块拷贝法。具体流程图如图4、图5所示。Preferably, the clone copy process includes the following two clone copy methods: sequential copy method and designated block copy method. The specific flow chart is shown in Figure 4 and Figure 5 .

顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在克隆拷贝完成后,将进度位图中的对应位置为1;继续查找进度位图中下一个为0的位置。The sequential copy method refers to: starting from the specified position, find the first position of 0 in the corresponding progress bitmap representing that the block has not been cloned and copied, and clone and copy the corresponding data block; after the cloning copy is completed, the progress bit The corresponding position in the figure is 1; continue to find the next position of 0 in the progress bitmap.

指定块拷贝法是指:对于被指定的数据块的位置,判断进度位图对应位置是否为0;如果进度位图的对应位为0,则进行克隆拷贝,克隆拷贝完成后将对应位置为1;如果进度位图对应位置不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, and the corresponding position is set to 1 after the clone copy is completed ; If the corresponding position of the progress bitmap is not 0, no action will be taken.

优选地,该方法还包括:进度位图中的每一位改变时,将该改变同步保存到磁盘上;如果在克隆拷贝过程中发生故障,通过读取磁盘中的数据重建克隆拷贝过程。Preferably, the method further includes: when each bit in the progress bitmap is changed, synchronously saving the change to the disk; if a fault occurs during the cloning copy process, rebuilding the cloning copy process by reading data from the disk.

本发明还提出一种基于单进度位图的克隆拷贝系统01,如图2所示,该系统包括:克隆拷贝模块02、置位模块03。The present invention also proposes a clone copy system 01 based on a single progress bitmap. As shown in FIG. 2 , the system includes: a clone copy module 02 and a position setting module 03 .

克隆拷贝模块02,用于克隆拷贝两个克隆卷之间的数据块。The clone copy module 02 is used to clone and copy data blocks between two clone volumes.

置位模块03,用于在克隆拷贝开始前,将进度位图的所有位初始化为0;在克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将进度位图的相应位置为1。The bit setting module 03 is used to initialize all bits of the progress bitmap to 0 before the clone copy starts; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1.

优选地,系统还包括划分模块04:用于在克隆拷贝开始前,根据用户设置的克隆基本单位,将克隆卷划分为大小相同的块;划分的依据为:进度位图的大小与克隆卷被划分的块数相同,进度位图中的每一位分别一一对应克隆源逻辑卷的每一块,同时进度位图中的每一位分别一一对应克隆目标逻辑卷的每一块;克隆源逻辑卷的每一块与克隆目标逻辑卷的每一块一一对应。Preferably, the system further includes a division module 04: used to divide the clone volume into blocks of the same size according to the cloning basic unit set by the user before the start of the clone copy; the basis for division is: the size of the progress bitmap and the clone volume The number of divided blocks is the same, each bit in the progress bitmap corresponds to each block of the clone source logical volume, and each bit in the progress bitmap corresponds to each block of the clone target logical volume; the clone source logic Each block of the volume has a one-to-one correspondence with each block of the clone target logical volume.

优选地,克隆拷贝模块02还用于:以下述两种方式完成拷贝:顺序拷贝法和指定块拷贝法。Preferably, the clone copy module 02 is also used for: completing the copy in the following two ways: sequential copy method and designated block copy method.

其中,顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在克隆拷贝完成并且置位模块将进度位图中的对应位置为1后;继续查找进度位图中下一个为0的位置。Among them, the sequential copy method refers to: start from the specified position, search for the first position of 0 in the corresponding progress bitmap representing the block that has not been cloned, and clone the corresponding data block; when the clone copy is completed and set After the module sets the corresponding position in the progress bitmap to 1; continue to search for the next position in the progress bitmap that is 0.

指定块拷贝法是指:对于被指定的数据块的位置,判断进度位图对应位置是否为0;如果进度位图的对应位为0,则进行克隆拷贝,克隆拷贝完成后等待置位模块将对应位置为1;如果进度位图的对应位不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, and after the clone copy is completed, the wait setting module will The corresponding bit is 1; if the corresponding bit of the progress bitmap is not 0, no action is taken.

优选地,该系统还包括备份模块05:用于在进度位图中的每一位改变时,将改变同步保存到磁盘上;如果在克隆拷贝过程中发生故障,通过读取磁盘中的数据重建克隆拷贝过程。Preferably, the system also includes a backup module 05: used to save the change to the disk synchronously when each bit in the progress bitmap is changed; if a failure occurs during the cloning copy process, rebuild Clone copying process.

需要说明的是,以上所述的实施例仅是为了便于本领域的技术人员理解而已,并不用于限制本发明的保护范围,在不脱离本发明的发明构思的前提下,本领域技术人员对本发明所做出的任何显而易见的替换和改进等均在本发明的保护范围之内。It should be noted that the above-described embodiments are only for the convenience of those skilled in the art to understand, and are not intended to limit the protection scope of the present invention. Any obvious replacements and improvements made by the invention are within the protection scope of the present invention.

Claims (8)

1.一种基于单进度位图的克隆拷贝方法,其特征在于,所述方法包括:1. A clone copy method based on single progress bitmap, it is characterized in that, described method comprises: 采用两个克隆卷和一个进度位图进行数据块的克隆拷贝;Clone copies of data blocks using two clone volumes and a progress bitmap; 在所述克隆拷贝开始前,将所述进度位图的所有位初始化为0;在所述克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将所述进度位图的相应位置为1;Before the clone copy starts, all bits of the progress bitmap are initialized to 0; during the clone copy process, when the clone copy of each data block is completed, the corresponding position of the progress bitmap is set to 1 ; 其中,所述克隆卷包括需要拷贝的克隆源逻辑卷和克隆目标逻辑卷,所述克隆源逻辑卷和克隆目标逻辑卷的大小相同;所述进度位图是指记录所述克隆拷贝进度的位图,所述进度位图的每一位只有两种状态:0和1;0代表未进行克隆拷贝,1代表已进行克隆拷贝。Wherein, the clone volume includes a clone source logical volume and a clone target logical volume that need to be copied, and the clone source logical volume and the clone target logical volume have the same size; the progress bitmap refers to a bit that records the progress of the clone copy As shown in the figure, each bit of the progress bitmap has only two states: 0 and 1; 0 represents that no clone copy has been performed, and 1 represents that clone copy has been performed. 2.如权利要求1所述的方法,其特征在于,所述方法还包括:在所述克隆拷贝开始前,根据用户设置的克隆基本单位,将所述克隆卷划分为大小相同的块,所述进度位图的大小与所述克隆卷被划分的块数相同,所述进度位图中的每一位分别一一对应所述克隆源逻辑卷的每一块,同时所述进度位图中的每一位分别一一对应所述克隆目标逻辑卷的每一块;所述克隆源逻辑卷的每一块与所述克隆目标逻辑卷的每一块一一对应。2. The method according to claim 1, further comprising: before the clone copy starts, dividing the clone volume into blocks of the same size according to the clone basic unit set by the user, so The size of the progress bitmap is the same as the number of blocks divided into the clone volume, each bit in the progress bitmap corresponds to each block of the clone source logical volume one by one, and the bit in the progress bitmap Each bit corresponds one-to-one to each block of the clone target logical volume; each block of the clone source logical volume corresponds to each block of the clone target logical volume. 3.如权利要求1所述的方法,其特征在于,所述克隆拷贝过程包括以下述两种克隆拷贝方式:顺序拷贝法和指定块拷贝法;3. method as claimed in claim 1, is characterized in that, described cloning copying process comprises following two kinds of cloning copying modes: sequential copying method and appointed block copying method; 所述顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在所述克隆拷贝完成后,将所述进度位图中的对应位置为1;继续查找所述进度位图中下一个为0的位置;The sequential copying method refers to: starting from a specified position, searching for the first position of 0 in the corresponding progress bitmap representing that the block has not been cloned and copied, and cloning and copying the corresponding data block; after the cloning copy is completed , set the corresponding position in the progress bitmap to 1; continue to search for the next position in the progress bitmap that is 0; 所述指定块拷贝法是指:对于被指定的数据块的位置,判断所述进度位图对应位置是否为0;如果所述进度位图的对应位为0,则进行克隆拷贝,所述克隆拷贝完成后将所述对应位置为1;如果所述进度位图对应位置不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, the clone After the copy is completed, the corresponding position is set to 1; if the corresponding position of the progress bitmap is not 0, no action is taken. 4.如权利要求1所述的方法,其特征在于,所述方法还包括:所述进度位图中的每一位改变时,将所述改变同步保存到磁盘上;如果在所述克隆拷贝过程中发生故障,通过读取所述磁盘中的数据重建所述克隆拷贝过程。4. The method according to claim 1, further comprising: when each bit in the progress bitmap is changed, saving the change to disk synchronously; If a failure occurs during the process, the clone copy process is rebuilt by reading the data in the disk. 5.一种基于单进度位图的克隆拷贝系统,其特征在于,所述系统包括:克隆拷贝模块、置位模块;5. A clone copy system based on a single progress bitmap, characterized in that, the system comprises: a clone copy module, a positioning module; 所述克隆拷贝模块,用于克隆拷贝两个克隆卷之间的数据块;The clone copy module is used to clone and copy data blocks between two clone volumes; 所述置位模块,用于在所述克隆拷贝开始前,将所述进度位图的所有位初始化为0;在所述克隆拷贝过程中,每一个数据块的克隆拷贝完成时,将所述进度位图的相应位置为1。The setting module is used to initialize all bits of the progress bitmap to 0 before the clone copy starts; during the clone copy process, when the clone copy of each data block is completed, the The corresponding position of the progress bitmap is 1. 6.如权利要求5所述的系统,其特征在于,所述系统还包括划分模块:用于在所述克隆拷贝开始前,根据用户设置的克隆基本单位,将所述克隆卷划分为大小相同的块;划分的依据为:所述进度位图的大小与所述克隆卷被划分的块数相同,所述进度位图中的每一位分别一一对应所述克隆源逻辑卷的每一块,同时所述进度位图中的每一位分别一一对应所述克隆目标逻辑卷的每一块;所述克隆源逻辑卷的每一块与所述克隆目标逻辑卷的每一块一一对应。6. The system according to claim 5, further comprising a division module: used to divide the clone volume into volumes of the same size according to the basic clone unit set by the user before the clone copy starts. The basis for division is: the size of the progress bitmap is the same as the number of blocks divided by the clone volume, and each bit in the progress bitmap corresponds to each block of the clone source logical volume one by one , and each bit in the progress bitmap corresponds to each block of the clone target logical volume; each block of the clone source logical volume corresponds to each block of the clone target logical volume. 7.如权利要求5所述的系统,其特征在于,所述克隆拷贝模块还用于:以下述两种方式完成拷贝:顺序拷贝法和指定块拷贝法;7. The system according to claim 5, wherein the clone copy module is also used for: completing the copy in the following two ways: sequential copy method and designated block copy method; 其中,所述顺序拷贝法是指:从指定位置开始,查找对应进度位图中代表该块尚未被克隆拷贝的第一个为0的位置,并克隆拷贝对应的数据块;在所述克隆拷贝完成并且所述置位模块将所述进度位图中的对应位置为1后;继续查找所述进度位图中下一个为0的位置;Wherein, the sequential copying method refers to: starting from a specified position, searching for the first position of 0 in the corresponding progress bitmap representing that the block has not been cloned and copied, and cloning and copying the corresponding data block; After completion and the bit setting module sets the corresponding position in the progress bitmap to 1; continue to search for the next position of 0 in the progress bitmap; 所述指定块拷贝法是指:对于被指定的数据块的位置,判断所述进度位图对应位置是否为0;如果所述进度位图的对应位为0,则进行克隆拷贝,所述克隆拷贝完成后等待所述置位模块将所述对应位置为1;如果所述进度位图的对应位不为0,则不做任何动作。The designated block copy method refers to: for the position of the designated data block, it is judged whether the corresponding position of the progress bitmap is 0; if the corresponding bit of the progress bitmap is 0, the clone copy is performed, the clone Waiting for the bit setting module to set the corresponding bit to 1 after copying is completed; if the corresponding bit of the progress bitmap is not 0, then do nothing. 8.如权利要求5所述的系统,其特征在于,所述系统还包括备份模块:用于在所述进度位图中的每一位改变时,将所述改变同步保存到磁盘上;如果在所述克隆拷贝过程中发生故障,通过读取所述磁盘中的数据重建所述克隆拷贝过程。8. The system according to claim 5, further comprising a backup module: when each bit in the progress bitmap is changed, the change is saved to the disk synchronously; if If a fault occurs during the cloning copy process, the cloning copy process is rebuilt by reading data in the 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 华为技术有限公司 A method of writing data to a source volume during a snapshot
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 equipment for displaying copying progress under bootstrap program
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 华为技术有限公司 A method of writing data to a source volume during a snapshot
CN102446130A (en) * 2010-10-09 2012-05-09 上海研祥智能科技有限公司 Method, system and equipment for displaying copying progress under bootstrap program
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
CN102096616B (en) Logical object data duplication method and related device
CN103793291B (en) Distributed data copying method and device
WO2018098972A1 (en) Log recovery method, storage device and storage node
CN107544870A (en) A kind of disk backup method of virtue machine and device
CN103617096A (en) Storage data copying method, equipment and system
CN103034566A (en) Method and device for restoring virtual machine
CN106537353B (en) A data replication method, device and system
CN106776147A (en) A kind of variance data backup method and variance data back-up device
CN107798063B (en) Snapshot processing method and snapshot processing device
CN105760245A (en) Data storage method and device
CN104407814B (en) Double method and apparatus for writing data
CN104461773A (en) A method for deduplication of virtual machine backup
CN100504800C (en) Method for snapshot of magnetic disk
TW201712540A (en) Data backup system
CN106855834A (en) A kind of data back up method, device and system
WO2013170702A1 (en) File processing method based on snapshot and solid state disk with snapshot function
US10740189B2 (en) Distributed storage system
JP6281511B2 (en) BACKUP CONTROL DEVICE, BACKUP CONTROL METHOD, AND PROGRAM
CN104484354B (en) Ensure the Snapshot Method and storage device of data consistency
CN104331344A (en) Data backup method and device
CN102609224B (en) Redundant array of independent disk system and initializing method thereof
CN103617010B (en) Date storage method and storage device
CN106844094B (en) File repair method and device

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

Application publication date: 20150325

RJ01 Rejection of invention patent application after publication