CN104536919A - Method and device both for avoiding IO conflict in cloning system - Google Patents
Method and device both for avoiding IO conflict in cloning system Download PDFInfo
- Publication number
- CN104536919A CN104536919A CN201410765172.8A CN201410765172A CN104536919A CN 104536919 A CN104536919 A CN 104536919A CN 201410765172 A CN201410765172 A CN 201410765172A CN 104536919 A CN104536919 A CN 104536919A
- Authority
- CN
- China
- Prior art keywords
- request
- data block
- clone
- task processing
- processing queue
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000010367 cloning Methods 0.000 title claims abstract description 33
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1461—Backup scheduling policy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device both for avoiding IO conflict in a cloning system. The method comprises the following steps: logically dividing two cloning rolls into a plurality of data blocks with the same size according to a copying basic unit set by a user; when any one of the two cloning rolls receives an IO request, aligning content corresponding to the IO request to each data block in a range from the data blocks of starting positions of the cloning rolls to the data blocks of stopping positions of the cloning rolls according to the starting positions and stopping positions read and written by the IO request; and locking each data block corresponding to the IO request and rejecting other operation except the IO request. By the aid of the method and the device, the data consistency in a cloning process can be avoided.
Description
Technical field
The present invention relates to the cloning system of data calamity for field, be specifically related to a kind of method and apparatus avoiding IO conflict in cloning system.
Background technology
In calamity in data backup system, clone is an important technology, refers 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 cloning system, volume is divided into data block by the base unit arranged by user, as the base unit of clone.Clone in disaster recovery and backup systems, general support is read and write online, the IO process namely in cloned copies process.Because IO process is generally multi-thread concurrent, and online read-write needs IO process, so very easily occur that IO conflicts, causes data inconsistent.
Summary of the invention
In order to solve the problem, the present invention proposes a kind of method and apparatus avoiding IO conflict in cloning system, the data in cloning procedure can be avoided inconsistent.
In order to achieve the above object, the present invention proposes in a kind of cloning system the method avoiding input and output IO to conflict, the method comprises:
According to the copy base unit that user is arranged, two clone volumes are divided in logic the identical multiple data blocks of size.
When any clone volume in two clone volumes receives I/O request, according to reference position and the final position of I/O request read-write, content corresponding for I/O request is snapped to each data block within the scope of the data block from the data block at reference position place to final position place of clone volume.
Each data block I/O request corresponded to locks, and refuses other operation beyond this I/O request.
Preferably, two clone volumes comprise source book and target volume, and source book is identical with the size of target volume.
Preferably, the method also comprises: for the I/O operation of multithreading, after cloning system receives I/O request, by I/O request according to reception order, put into task processing queue, and described in subsequent treatment during I/O request, from task processing queue, take out I/O request in order, process successively.
Preferably, by I/O request according to reception order, the task processing queue of putting into comprises: after receiving I/O request, I/O request is joined the afterbody of task processing queue; Take out I/O request in task processing queue in order to comprise: get an I/O request from the head of task process and process.
Preferably, avoid the device that input and output IO conflicts in a kind of cloning system, this device comprises: divide module, respective modules and add lock module.
Divide module, for the copy base unit arranged according to user, two clone volumes are divided in logic the identical multiple data blocks of size.
Respective modules, for when any clone volume in two clone volumes receives I/O request, according to reference position and the final position of I/O request read-write, content corresponding for I/O request is snapped to data block each within the scope of the data block from the data block at reference position place to final position place of clone volume.
Add lock module, lock for each data block that I/O operation is corresponded to, refuse other operation beyond this I/O request.
Preferably, this device also comprises order module: for the I/O operation for multithreading, after cloning system receives I/O request, by I/O request according to reception order, put into task processing queue, and when subsequent treatment I/O request, from task processing queue, take out I/O request in order, process successively.
Preferably, order module also for: after receiving I/O request, I/O request is joined the afterbody of task processing queue; When taking out I/O request in order from task processing queue, get an I/O request from the head of task process and process.
Compared with prior art, the present invention includes: two clone volumes are divided into the identical multiple data blocks of size by copy base unit in logic that arrange according to user; When any clone volume in two clone volumes receives I/O request, according to reference position and the final position of I/O request read-write, content corresponding for I/O request is snapped to each data block within the scope of the data block from the data block at reference position place to described final position place of clone volume.Each data block I/O request corresponded to locks, and refuses other operation beyond this I/O request.By the solution of the present invention, the data in cloning procedure can be avoided inconsistent.
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 method flow diagram avoiding IO to conflict in cloning system of the present invention;
Fig. 2 is the system chart avoiding IO to conflict in cloning system of the present invention;
Fig. 3 is the system schematic avoiding IO to conflict in cloning system of the present invention;
Fig. 4 is the I/O request processing flow chart avoiding IO to conflict in cloning system of the present invention.
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 proposes in a kind of cloning system the method avoiding input and output IO to conflict, the method comprises the following steps:
Two clone volumes are divided into the identical multiple data blocks of size by S101, the copy base unit arranged according to user in logic.
Preferably, two clone volumes comprise source book and target volume, and source book is identical with the size of target volume.That is, source book and target volume are all called clone volume.
The base unit of cloned copies is determined by user, and user defines the size of base unit when creating clone and being right, according to this size, two clone volumes are divided into the identical data block of size in logic.
S102, when any clone volume in two clone volumes receives I/O request, the reference position read and write according to this I/O request and final position, snap to content corresponding for I/O request each data block within the scope of the data block from the data block at reference position place to final position place of clone volume.
S103, each data block I/O request corresponded to lock, other operation beyond refusal I/O request.
For all data blocks, the corresponding lock of each data block.When I/O operation corresponds to data block, respective data blocks is locked, ensure this IO monopolizing data block, prevent data collision.
Preferably, the method also comprises: for the I/O operation of multithreading, after cloning system receives I/O request, by I/O request according to reception order, put into task processing queue, and when subsequent treatment I/O request, from task processing queue, take out this I/O request in order, process successively.
By task queue, ensure the sequencing of IO process, thus avoid data and occur inconsistent situation.
Preferably, by I/O request according to reception order, the task processing queue of putting into comprises: after receiving I/O request, I/O request is joined the afterbody of task processing queue; Take out described I/O request in task processing queue in order to comprise: get an I/O request from the head of task process and process.
The present invention also proposes the device 01 avoiding input and output IO to conflict in a kind of cloning system, and this device comprises: divide module 02, respective modules 03 and add lock module 04.
Divide module 02, for the copy base unit arranged according to user, two clone volumes are divided in logic the identical multiple data blocks of size.
Respective modules 03, for when any clone volume in two clone volumes receives I/O request, according to reference position and the final position of I/O request read-write, content corresponding for I/O request is snapped to data block each within the scope of the data block from the data block at reference position place to final position place of clone volume.
Add lock module 04, lock for each data block that I/O operation is corresponded to, refuse other operation beyond this I/O request.
Preferably, this device also comprises order module 05: for the I/O operation for multithreading, after cloning system receives I/O request, by this I/O request according to reception order, put into task processing queue, and when subsequent treatment I/O request, from task processing queue, take out this I/O request in order, process successively.
Preferably, order module 05 also for: after receiving I/O request, I/O request is joined the afterbody of task processing queue; When taking out I/O request in order from task processing queue, get an I/O request from the head of task process and process.
Below in conjunction with accompanying drawing, the present invention is further described in more detail.
Accompanying drawing 3 is cloning system schematic diagram, comprises two clone volumes.
In clone's relation, source book and target volume are all called clone volume, and source book is identical with the size of target volume.The direction of data copy is from source book to target volume.According to the base unit that user is arranged, clone volume is divided into the identical data block of size, and each data block, to there being a lock, ensures the exclusivity of data block.
Accompanying drawing 4 is I/O request processing flow charts.When receiving I/O request, no matter be source book I/O request or target volume I/O request, first I/O request put in task queue.Cloning system takes out a pending I/O request from task queue, calculates data block corresponding to I/O request, and lock to these data blocks according to the data area of this request.After complete paired data block locks, process this request.Cloning system discharges the lock of this request corresponding data block after completing for the process of I/O request, perform in I/O request preset complete after action, process ends.
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 (7)
1. the method avoiding input and output IO to conflict in cloning system, is characterized in that, described method comprises:
According to the copy base unit that user is arranged, two clone volumes are divided in logic the identical multiple data blocks of size;
When any clone volume in described two clone volumes receives I/O request, the reference position read and write according to described I/O request and final position, snap to each data block within the scope of the data block from the data block at described reference position place to described final position place of described clone volume by content corresponding for described I/O request;
The each data block described I/O request corresponded to locks, and refuses other operation beyond described I/O request.
2. the method for claim 1, is characterized in that, described two clone volumes comprise source book and target volume, and described source book is identical with the size of target volume.
3. the method for claim 1, it is characterized in that, described method also comprises: for the I/O operation of multithreading, after described cloning system receives described I/O request, by described I/O request according to reception order, put into task processing queue, and described in subsequent treatment during I/O request, from described task processing queue, take out described I/O request in order, process successively.
4. method as claimed in claim 3, is characterized in that, described by described I/O request according to reception order, the task processing queue of putting into comprises: after receiving described I/O request, described I/O request is joined the afterbody of described task processing queue; Take out described I/O request in order in described task processing queue to comprise: get an I/O request from the head of described task process and process.
5. the device avoiding input and output IO to conflict in cloning system, is characterized in that, described device comprises: divide module, respective modules and add lock module;
Two clone volumes, for the copy base unit arranged according to user, are divided into the identical multiple data blocks of size by described division module in logic;
Described respective modules, for when any clone volume in described two clone volumes receives I/O request, the reference position read and write according to described I/O request and final position, snap to data block each within the scope of the data block from the data block at described reference position place to described final position place of described clone volume by content corresponding for described I/O request;
Describedly add lock module, lock for each data block that described I/O operation is corresponded to, refuse other operation beyond described I/O request.
6. device as claimed in claim 1, it is characterized in that, described device also comprises order module: for the I/O operation for multithreading, after described cloning system receives described I/O request, by described I/O request according to reception order, put into task processing queue, and described in subsequent treatment during I/O request, from described task processing queue, take out described I/O request in order, process successively.
7. device as claimed in claim 6, is characterized in that, described order module also for: after receiving described I/O request, described I/O request is joined the afterbody of described task processing queue; When taking out described I/O request in order from described task processing queue, get an I/O request from the head of described task process and process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765172.8A CN104536919B (en) | 2014-12-11 | 2014-12-11 | A kind of method and apparatus for avoiding IO to conflict in cloning system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410765172.8A CN104536919B (en) | 2014-12-11 | 2014-12-11 | A kind of method and apparatus for avoiding IO to conflict in cloning system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104536919A true CN104536919A (en) | 2015-04-22 |
CN104536919B CN104536919B (en) | 2018-02-13 |
Family
ID=52852449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410765172.8A Active CN104536919B (en) | 2014-12-11 | 2014-12-11 | A kind of method and apparatus for avoiding IO to conflict in cloning system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104536919B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138471A (en) * | 2015-09-01 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Mirroring process treatment method and device |
CN106326039A (en) * | 2016-08-24 | 2017-01-11 | 浪潮(北京)电子信息产业有限公司 | Method and device for cloning logical volume in disk and disk |
CN106648468A (en) * | 2016-12-29 | 2017-05-10 | 郑州云海信息技术有限公司 | Control method and system for IO request during data migration process |
CN108984112A (en) * | 2015-09-29 | 2018-12-11 | 华为数字技术(成都)有限公司 | Store the implementation method and device of QoS control strategy |
CN109582467A (en) * | 2018-12-18 | 2019-04-05 | 广东浪潮大数据研究有限公司 | Processing method, system and the relevant apparatus of I/O request in a kind of storage system |
CN110008065A (en) * | 2019-04-11 | 2019-07-12 | 苏州浪潮智能科技有限公司 | A kind of consistency group snapshot management method and relevant apparatus |
CN111427519A (en) * | 2020-06-10 | 2020-07-17 | 广东睿江云计算股份有限公司 | Distributed storage data migration method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1484151A (en) * | 2002-08-08 | 2004-03-24 | �Ҵ���˾ | Method and system for storing memory compressed data onto memory compressed disks |
CN101196829A (en) * | 2007-12-27 | 2008-06-11 | 电子科技大学 | Method for adding lock to data collision module in cooperating edit |
CN101706802A (en) * | 2009-11-24 | 2010-05-12 | 成都市华为赛门铁克科技有限公司 | Method, device and sever for writing, modifying and restoring data |
CN102375696A (en) * | 2010-08-20 | 2012-03-14 | 英业达股份有限公司 | Data storage system and data access method by utilizing virtual disk |
US20130138904A1 (en) * | 2011-11-30 | 2013-05-30 | Fujitsu Limited | Storage device, controller, and computer-readable recording medium having stored therein program |
CN103176868A (en) * | 2013-04-02 | 2013-06-26 | 浪潮电子信息产业股份有限公司 | File status backup method |
CN104065636A (en) * | 2013-07-02 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Data processing method and system |
-
2014
- 2014-12-11 CN CN201410765172.8A patent/CN104536919B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1484151A (en) * | 2002-08-08 | 2004-03-24 | �Ҵ���˾ | Method and system for storing memory compressed data onto memory compressed disks |
CN101196829A (en) * | 2007-12-27 | 2008-06-11 | 电子科技大学 | Method for adding lock to data collision module in cooperating edit |
CN101706802A (en) * | 2009-11-24 | 2010-05-12 | 成都市华为赛门铁克科技有限公司 | Method, device and sever for writing, modifying and restoring data |
CN102375696A (en) * | 2010-08-20 | 2012-03-14 | 英业达股份有限公司 | Data storage system and data access method by utilizing virtual disk |
US20130138904A1 (en) * | 2011-11-30 | 2013-05-30 | Fujitsu Limited | Storage device, controller, and computer-readable recording medium having stored therein program |
CN103176868A (en) * | 2013-04-02 | 2013-06-26 | 浪潮电子信息产业股份有限公司 | File status backup method |
CN104065636A (en) * | 2013-07-02 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Data processing method and system |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138471A (en) * | 2015-09-01 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Mirroring process treatment method and device |
CN105138471B (en) * | 2015-09-01 | 2018-04-13 | 浪潮(北京)电子信息产业有限公司 | Mirrored procedure treating method and apparatus |
CN108984112A (en) * | 2015-09-29 | 2018-12-11 | 华为数字技术(成都)有限公司 | Store the implementation method and device of QoS control strategy |
CN106326039A (en) * | 2016-08-24 | 2017-01-11 | 浪潮(北京)电子信息产业有限公司 | Method and device for cloning logical volume in disk and disk |
CN106648468A (en) * | 2016-12-29 | 2017-05-10 | 郑州云海信息技术有限公司 | Control method and system for IO request during data migration process |
CN109582467A (en) * | 2018-12-18 | 2019-04-05 | 广东浪潮大数据研究有限公司 | Processing method, system and the relevant apparatus of I/O request in a kind of storage system |
CN110008065A (en) * | 2019-04-11 | 2019-07-12 | 苏州浪潮智能科技有限公司 | A kind of consistency group snapshot management method and relevant apparatus |
CN111427519A (en) * | 2020-06-10 | 2020-07-17 | 广东睿江云计算股份有限公司 | Distributed storage data migration method and device |
CN111427519B (en) * | 2020-06-10 | 2020-10-16 | 广东睿江云计算股份有限公司 | Distributed storage data migration method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104536919B (en) | 2018-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104536919A (en) | Method and device both for avoiding IO conflict in cloning system | |
GB2558478A (en) | Copy-Redirect on write | |
GB2504645A (en) | Methods, systems and computer program products for coordinated disaster recovery | |
US10489378B2 (en) | Detection and resolution of conflicts in data synchronization | |
US10437788B2 (en) | Automatic detection, retry, and resolution of errors in data synchronization | |
CN103744906A (en) | System, method and device for data synchronization | |
JP2015144000A5 (en) | ||
GB2540700A (en) | Merging multiple point-in-time copies into a merged point-in-time copy | |
GB2538464A (en) | Creating restore copy from copy of source data in repository having source data at different point-in-times | |
US9069790B2 (en) | Multi-threaded message passing journal | |
GB2489635B (en) | Multi-phase file system restore with selective on-demand data availability | |
CN103384262A (en) | Traffic reducing on data migration | |
US10049020B2 (en) | Point in time recovery on a database | |
US20130346713A1 (en) | Source cleaning cascaded volumes | |
US20190052709A1 (en) | Clustered storage system synchronization | |
JP6455898B2 (en) | Data replication method, primary data storage controller, apparatus, system, and program | |
CN106155839B (en) | A kind of method and apparatus for Backup Data | |
US9009431B2 (en) | Virtual snapshot system and method | |
US20150169475A1 (en) | Local locking in a bi-directional synchronous mirroring environment | |
CN106919473A (en) | A kind of data disaster recovery and backup systems and method for processing business | |
CN105574127A (en) | Quasi real-time disaster recovery method of distributed database system | |
CN105550076B (en) | Image splicing control system and redundant hot backup method thereof | |
CN104111867A (en) | Virtual machine transfer device and method | |
CN104461784A (en) | Single progress bitmap based clone copying method and system | |
CN104331344A (en) | Data backup method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180827 Address after: 200436 Room 411, No. three, JIANGCHANG Road, Jingan District, Shanghai, 411 Patentee after: Shanghai wave Cloud Computing Service Co., Ltd. Address before: 100085 floor 1, C 2-1, No. 2, Shang Di Road, Haidian District, Beijing. Patentee before: Electronic information industry Co.,Ltd of the tide (Beijing) |
|
TR01 | Transfer of patent right |