CN104298609A - Data copying method and device - Google Patents

Data copying method and device Download PDF

Info

Publication number
CN104298609A
CN104298609A CN201410400157.3A CN201410400157A CN104298609A CN 104298609 A CN104298609 A CN 104298609A CN 201410400157 A CN201410400157 A CN 201410400157A CN 104298609 A CN104298609 A CN 104298609A
Authority
CN
China
Prior art keywords
copies data
data block
task queue
copy
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410400157.3A
Other languages
Chinese (zh)
Other versions
CN104298609B (en
Inventor
王倩
孙承碧
王旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201410400157.3A priority Critical patent/CN104298609B/en
Publication of CN104298609A publication Critical patent/CN104298609A/en
Application granted granted Critical
Publication of CN104298609B publication Critical patent/CN104298609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a data copying method and device. The data copying method comprises the steps that according to a copying task, a copying-out thread and a copying-in thread are started in parallel, the copying-out thread reads out copying data blocks from a source volume, the data blocks are added into a sequential task queue, and a prior copying data block is added into a prior task queue if the prior copying data block exists in the prior task queue; if the prior copying data block exists in the prior task queue, the copying-in thread acquires the prior copying data block from the prior task queue, the acquired prior copying data block is written into a target volume, and the copying data blocks are acquired from the sequential task queue and written into the target volume. According to the data copying method and device, read-out and write-in of copying data are performed through the copying-out thread and the copying-in thread in parallel, so that the efficiency for data copying is enhanced; prior copying is achieved under the data conflict condition through the sequential task queue and the prior task queue, and the consistency of the copying data is guaranteed.

Description

Data copying method and device
Technical field
The present invention relates to calamity for technical field of memory, particularly relate to a kind of data copying method and device.
Background technology
Along with the development of infotech, enterprise more and more depends on data processing to carry out commercial activity, and therefore, the high reliability of data processing and high availability more and more become crucial.Although along with the development of science and technology, the reliability of computer system increases day by day, but still can destroy enterprise easily by the natural and man-made calamities such as earthquake, flood, fire, war or the loss that makes the network equipment entirety situation such as cannot normally to work cause due to hardware and software failure relies the IT system generated.So, set up disaster recovery and backup systems and inevitable choice has just been become for the enterprise extremely relying on IT system.
Data copy is the substance processing data backup in disaster recovery and backup systems, and it is that data are copied to another book from a book of the network equipment, thus reaches the object of backup.In the process of data copy, comprise a data reading and secondary data write.At present, data copy adopts serial mode to carry out data reading and data write, such as, the volume that setting data reads is source book, and the volume of data write is target volume, when carrying out data copy, to all need the data reading backed up from source book, then the data all read be write target volume again.Carry out often needing to back up mass data when calamity is standby to be operated, serial mode certainly will cause long data copy.In addition, if relate to significant data to need preferential backup, also cannot realize at present.
In view of this, a kind of data copying method of improvement is needed to solve the problem of prior art.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of data copying method and device, the efficiency of data copy can be improved, and ensure the consistance of data in data collision situation.
In order to reach the object of the invention, the invention provides a kind of data copying method, comprising: the network equipment is according to copy task, and parallel starting is copied out thread and copied into thread, and copy task comprises copies data information, source book ID and target volume ID; Copy out thread and find source book according to source book ID, according to copies data information determination copies data, and copies data is divided into copies data block, copies out thread and find target volume according to target volume ID; Copy out thread from source book, read copies data block, the copies data block of reading is joined in serial task queue, if there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue; When having preferential copies data block in priority task queue, copy thread from priority task queue, obtain preferential copies data block write target volume, and from serial task queue, obtain copies data block write target volume.
Further, also comprise before the method: the network equipment receives copy request, and the copy request according to receiving arranges copy task, and arrange and corresponding with copy task copy out thread, copy into thread, serial task queue and priority task queue.
Further, the copies data information in copy task comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block; According to copies data information determination copies data, and copies data is divided into copies data block, comprise: according to the copies data reference position in copies data information and end position determination copies data, and according to the base unit in copies data information, copies data is divided into copies data block.
Further, also comprise before the method: the network equipment arranges the storage number upper limit and first interval time of serial task queue; Copy out thread from source book, read copies data block, the copies data block of reading is joined in serial task queue, comprise: copy out thread and from source book, read copies data block according to putting in order, and the copies data block of reading is joined in serial task queue, if copies data block number reaches and stores the number upper limit in serial task queue, copy out thread time-out from source book, read copies data block, through the first interval time of pre-setting, copy out thread and start and from source book, read copies data block join in serial task queue.
Further, if there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue, comprising:
Further, if receive reading and writing data request, according to reference position and the end position of request msg in reading and writing data request, search corresponding copies data block as preferential copies data block, and preferential copies data block is joined in priority task queue.
Further, also comprise before the method: the network equipment arranged for second time interval; Copy and obtain preferential copies data block write target volume into thread from priority task queue, and obtain copies data block write target volume from serial task queue, comprise: copy and judge whether priority task queue is empty into thread, if priority task queue is not empty, the relevant position of preferential copies data block write target volume is obtained from priority task queue, if priority task queue is empty, judge whether serial task queue is empty; If serial task queue is not empty, from serial task queue, obtain the relevant position of copies data block write target volume, if serial task queue is empty, judge whether that all copies data blocks have all copied; If the copies data block do not copied in addition, through the second interval time, again judge whether all data blocks have all copied, if all copies data blocks have all copied, stop copying out thread and copying into thread.
Further, copy out described in stopping thread and described copy thread after, the method also comprises: the network equipment deletes copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of copy task.
The invention provides a kind of data copy device, comprising: start module, for according to copy task, parallel starting copies out thread and copy into thread, and copy task comprises copies data information, source book ID and target volume ID; Copying out thread, for finding source book according to source book ID, according to copies data information determination copies data, and copies data being divided into copies data block; From source book, read copies data block, and the copies data block of reading is joined in serial task queue, if there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue; Copy into thread, during for there being preferential copies data block in priority task queue, from priority task queue, obtain preferential copies data block write target volume, and from serial task queue, obtain copies data block write target volume.
Further, this device also comprises: receiver module, for receiving copy request; Module is set, for arranging copy task according to copy request, and arranges and corresponding with copy task copy out thread, copy into thread, serial task queue and priority task queue.
Further, the copies data information in copy task comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block; Copy out thread, for according to copies data information determination copies data, and copies data is divided into copies data block, be specially: copy out thread for according to the copies data reference position in copies data information and end position determination copies data, and according to the base unit in copies data information, copies data is divided into copies data block.
Further, described module is set, also for arranging the storage number upper limit and first interval time of serial task queue; Copy out thread, for reading copies data block from source book, and the copies data block of reading is joined in serial task queue, be specially: copy out thread for reading copies data block according to putting in order from source book, and the copies data block of reading is joined in serial task queue, if copies data block number reaches and stores the number upper limit in serial task queue, suspend from source book, read copies data block, after the first interval time pre-set, start and from source book, read copies data block join in serial task queue.
Further, copy out thread, if for there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue, be specially: if copy out thread for receiving reading and writing data request, according to reference position and the end position of request msg in reading and writing data request, search corresponding copies data block as preferential copies data block, and preferential copies data block is joined in priority task queue.
Further, module is set, also for arranging for second time interval; Copy into thread, during for there being preferential copies data block in priority task queue, preferential copies data block write target volume is obtained from priority task queue, and from serial task queue, obtain copies data block write target volume, be specially: copy into thread for judging whether priority task queue is empty, if priority task queue is not empty, the relevant position of preferential copies data block write target volume is obtained from priority task queue, if priority task queue is empty, judge whether serial task queue is empty; If serial task queue is not empty, from serial task queue, obtain the relevant position of copies data block write target volume, if serial task queue is empty, judge whether that all copies data blocks have all copied; If the copies data block do not copied in addition, after the second interval time, again judge whether all data blocks have all copied, if all copies data blocks have all copied, stop copying out thread and copying into thread.
Further, this device also comprises: removing module, for copying out thread in stopping and after copying thread, deleting copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of copy task.
Compared with prior art, the present invention includes: the network equipment is according to copy task, and parallel starting is copied out thread and copied into thread, and this copy task comprises copies data information, source book ID and target volume ID; Copy out thread and find source book according to source book ID, according to copies data information determination copies data, and copies data is divided into copies data block, copies out thread and find target volume according to target volume ID; Copy out thread from source book, read copies data block, the copies data block of reading is joined in serial task queue, if there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue; If there is preferential copies data block in priority task queue, copies thread from priority task queue, obtain preferential copies data block write target volume, and from serial task queue, obtain copies data block write target volume.The present invention copies out thread and copy into thread by setting, when carrying out data copy, copying out thread and reading copies data from source book and copy and copies data write target volume into thread and can walk abreast and carry out, thus improving the efficiency of data copy.In addition, serial task queue and priority task queue are set copying out thread and copy between thread, copy out thread and reading copies data block is joined serial task queue, copy and obtain copies data block into thread from serial task queue and be written to target volume, so ensure the consistance that put in order of copies data in source book and target volume; If desired priority processing is carried out to request of data, copies data block corresponding for request msg is joined priority task queue as preferential copies data block, copy and preferentially obtain preferential copies data block from priority task queue into thread and be written to target volume, thus the preferential copy under realizing data collision situation, and copies data consistance can be ensured.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of data copying method of the present invention.
Fig. 2 is that the present invention copies into the schematic flow sheet of thread by copies data block write target volume.
Fig. 3 is the structural representation of data copy device of the present invention.
Embodiment
Describe the present invention below with reference to embodiment shown in the drawings.
Fig. 1 is the schematic flow sheet of data copying method of the present invention, as shown in Figure 1, comprising:
Step 11, the network equipment receives copy request, according to this copy request, copy task is set, and arrange and corresponding with this copy task copy out thread, copy into thread, serial task queue and priority task queue, the task that wherein copies comprises copies data information, source book identify label (ID, identification) and target volume ID.
In this step, the network equipment receives the copy request from user, according to this copy request, copy task is set, this copy task comprises copies data information, source book ID and target volume ID, wherein, copies data information comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block.
The network equipment also arranges copy out thread and copy into thread corresponding with this copy task, wherein, copy out thread for reading copies data from source book, copy into thread for copies data is write target volume, then the process of data copy comprises and copies out thread and read copies data from source book and copy, into thread, copies data is write target volume.
The network equipment also arranges serial task queue and priority task queue in advance between source book and target volume, in addition, the network equipment can also arrange the storage number upper limit and first interval time of this serial task queue, the storage number upper limit such as arranging serial task queue was the 200, first interval time is 1ms.
Step 12, the network equipment is according to copy task, and parallel starting is copied out thread and copied into thread.
In this step, the network equipment can copy out thread and copy into thread by parallel starting, so, copies out thread and reads copies data from source book and copy and copies data write target volume into thread and can walk abreast and carry out, thus improve the efficiency of data copy.
Step 13, copies out thread and finds source book according to source book ID, according to copies data information determination copies data, and copies data is divided into copies data block; Copy out thread and find target volume according to target volume ID.
In this step, copy out thread and find source book according to source book ID, according to the copies data reference position in copies data information and end position determination copies data, and according to the base unit in copies data information, copies data is divided into copies data block.
Step 14, copies out thread from source book, reads copies data block.
In this step, copying out thread can according to the reading carrying out copies data block from source book that puts in order.
Step 15, copies out thread and is joined in serial task queue by the copies data block of reading, if there is preferential copies data block in copies data block, is then joined in priority task queue by this preferential copies data block.
In this step, copy out thread copies data block is joined in serial task queue according to reading order.If copies data block number reaches and stores the number upper limit in serial task queue, copy out thread time-out from source book, read copies data block, because copy thread can walk abreast, from serial task queue, copy task block is written to target volume, so after the first interval time, the copies data block of serial task queue can below the storage number upper limit, and copying out thread can again read copies data block and join in serial task queue by parallel starting from source book.
If in the process of data copy, the network equipment receives the reading and writing data request of user, then request msg needs preferentially to copy.This reading and writing data request comprises reference position and the end position of request msg, according to reference position and the end position of this request msg, in copies data block, search corresponding copies data block as preferential copies data block, and preferential copies data block is joined in priority task queue.
Step 16, when there being preferential copies data block in priority task queue, copying and obtaining preferential copies data block write target volume into thread from priority task queue, and obtain copies data block write target volume from serial task queue.
This step specifically can as shown in Figure 2, and Fig. 2 is that the present invention copies into the schematic flow sheet of thread by copies data block write target volume, comprising:
Step 161, copies and judges whether priority task queue is empty, if not, enters step 162 into thread; If so, step 163 is entered.
Step 162, if judge priority task queue not for empty, then copies thread from priority task queue, obtains preferential copies data block, and by the relevant position of preferential copies data block write target volume.
In this step, copies data block is consistent at source book with putting in order of target volume, so copy after thread obtains preferential copies data block from priority task queue, by the relevant position of preferential copies data block write target volume, thus can ensure the copies data consistance in data collision situation.
Step 163, if judge, priority task queue is for empty, copies and judges whether serial task queue is empty, if not, enters step 164 into thread; If so, step 165 is entered.
Step 164, if judge serial task queue not for empty, then copies thread from serial task queue, obtains copies data block, and respectively by the relevant position of copies data block write target volume.
Step 165, if judge, serial task queue is for empty, copies judging whether that all copies data blocks have all copied into thread, if not, enters step 166; If so, step 167 is entered.
Step 166, to copy into thread through the second interval time, returns step 161.
In this step, the network equipment pre-set for the second interval time, and such as the second interval time is 1ms.
It is not synchronized for copying out thread and copying into the process of thread to copies data block, likely copy very fast for the velocity ratio of copies data block write target volume into thread, copy out thread also copies data block not to be joined in priority task queue or serial task queue, occur that priority task queue or serial task queue are all empty, but also there is the copies data block not having to have copied, therefore, within the second interval time waited for, copy out thread and all can not stop into thread with copying.Copy thread after the second interval time, return step 161, until all copies data blocks have all copied.
Step 167, stops copying out thread and copying into thread.
In this step, if judge that all copies data blocks have all copied, stop copying out thread and copying into thread, data copy terminates.
Step 17, stops copying out thread and after copying thread, the network equipment deletes copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of this copy task.
The present invention copies out thread by setting and copies into thread, when carrying out data copy, parallel starting is copied out thread and is copied into thread, so, copy out thread to read copies data from source book and copy and copies data write target volume into thread and can walk abreast and carry out, thus improve the efficiency of data copy.
In addition, copy out thread and copy between thread and serial task queue and priority task queue are also set, copy out thread and copies data is divided into copies data block, after read copies data block from source book, copies data block is joined in serial task queue, copy and obtain copies data block into thread from serial task queue and be written to target volume, so, the consistance that put in order of copies data in source book and target volume can be ensured.Notably, if when receiving reading and writing data request and needing preferentially to copy request msg, copy thread, according to request msg, the respective copies data block read from source book is joined priority task queue as preferential copies data block, copy and preferentially obtain preferential copies data block from priority task queue into thread and be written to target volume, thus the preferential copy under realizing data collision situation, and copies data consistance can be ensured.
Fig. 3 is the structural representation of data copy device of the present invention, as shown in Figure 3, comprising:
Receiver module, for receiving copy request.
Arrange module, for arranging copy task according to copy request, and corresponding with this copy task copy out thread, copy into thread, serial task queue and priority task queue, the task that wherein copies comprises copies data information, source book ID and target volume ID.
Particularly, the copies data information in copy task comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block.
Module is set and can also be used for arranging respectively the storage number upper limit of this serial task queue and priority task queue, the first interval time and second time interval.
Start module, for according to copy task, parallel starting copies out thread and copying into thread.
Copying out thread, for finding source book according to source book ID, according to copies data information determination copies data, and copies data being divided into copies data block; From source book, read copies data block, and the copies data block of reading is joined in serial task queue, if there is preferential copies data block in copies data block, then this preferential copies data block is joined in priority task queue.
Particularly, copy out thread for according to the copies data reference position in copies data information and end position determination copies data, and according to the base unit in copies data information, copies data is divided into copies data block.
Copy out thread and from source book, read copies data block according to putting in order, and the copies data block of reading is joined in serial task queue, if copies data block number reaches and stores the number upper limit in serial task queue, copy out thread time-out from source book, read copies data block, after the first interval time that module installation is set, start and from source book, read copies data block join in serial task queue.
If receive reading and writing data request, copy out thread according to the reference position of request msg in reading and writing data request and end position, search corresponding copies data block as preferential copies data block, and preferential copies data block is joined in priority task queue.
Copy into thread, for finding target volume according to target volume ID; When having preferential copies data block in priority task queue, obtain preferential copies data block write target volume from priority task queue, and obtain copies data block write target volume from serial task queue.
Particularly, copy and judge whether priority task queue is empty into thread, if priority task queue is not empty, from priority task queue, obtain the relevant position of preferential copies data block write target volume, if priority task queue is empty, judge whether serial task queue is empty; If serial task queue is not empty, from serial task queue, obtain the relevant position of copies data block write target volume, if serial task queue is empty, judge whether that all copies data blocks have all copied; If the copies data block do not copied in addition, after the second interval time that module installation is set, again judge whether that all data blocks have all copied, if all copies data blocks have all copied, stop copying out thread and copying into thread, data copy terminates.
Removing module, copies out thread for stopping and after copying thread, deletes copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of this copy task.
The present invention copies out thread and copy into thread by setting, when carrying out data copy, copying out thread and reading copies data from source book and copy and copies data write target volume into thread and can walk abreast and carry out, thus improving the efficiency of data copy.In addition, serial task queue and priority task queue are set copying out thread and copy between thread, copy out thread and reading copies data block is joined serial task queue, copy and obtain copies data block into thread from serial task queue and be written to target volume, so ensure the consistance that put in order of copies data in source book and target volume; If desired priority processing is carried out to request of data, copies data block corresponding for request msg is joined priority task queue as preferential copies data block, copy and preferentially obtain preferential copies data block from priority task queue into thread and be written to target volume, thus the preferential copy under realizing data collision situation, and copies data consistance can be ensured.
Be to be understood that, although this instructions is described according to embodiment, but not each embodiment only comprises an independently technical scheme, this narrating mode of instructions is only for clarity sake, those skilled in the art should by instructions integrally, technical scheme in each embodiment also through appropriately combined, can form other embodiments that it will be appreciated by those skilled in the art that.
A series of detailed description listed is above only illustrating for feasibility embodiment of the present invention; they are not for limiting the scope of the invention, all do not depart from equivalent implementations that skill of the present invention spirit does or change all should be included within protection scope of the present invention.

Claims (14)

1. a data copying method, is characterized in that, comprising:
The network equipment is according to copy task, and parallel starting is copied out thread and copied into thread, and described copy task comprises copies data information, source book identify label ID and target volume ID;
Described thread of copying out finds source book according to source book ID, according to copies data information determination copies data, and copies data is divided into copies data block, copies out thread and find target volume according to target volume ID;
Described thread of copying out reads copies data block from source book, is joined in serial task queue by the copies data block of reading, if there is preferential copies data block in copies data block, joins in priority task queue by preferential copies data block;
When having preferential copies data block in priority task queue, described in copy thread obtain from priority task queue preferential copies data block write target volume, and obtain from serial task queue copies data block write target volume.
2. data copying method according to claim 1, is characterized in that, also comprises before the method:
The described network equipment receives copy request, arranges described copy task according to the copy request received, and arranges and corresponding with described copy task copy out thread, copy into thread, serial task queue and priority task queue.
3. data copying method according to claim 1 and 2, is characterized in that, the copies data information in described copy task comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block;
Described according to copies data information determination copies data, and copies data is divided into copies data block, comprising:
According to the copies data reference position in described copies data information and end position determination copies data, and according to the base unit in described copies data information, copies data is divided into copies data block.
4. data copying method according to claim 1 and 2, is characterized in that, also comprises before the method: the described network equipment arranges the storage number upper limit and first interval time of serial task queue;
Described thread of copying out reads copies data block from source book, is joined in serial task queue by the copies data block of reading, comprising:
Described thread of copying out reads copies data block according to putting in order from source book, and the copies data block of reading is joined in serial task queue, if copies data block number reaches and stores the number upper limit in described serial task queue, described thread time-out of copying out reads copies data block from source book, through the first interval time of pre-setting, described in copy out thread and start and from source book, read copies data block join in described serial task queue.
5. data copying method according to claim 1 and 2, is characterized in that, if there is preferential copies data block in described copies data block, is joined in priority task queue by preferential copies data block, comprising:
If receive reading and writing data request, according to reference position and the end position of request msg in described reading and writing data request, search corresponding copies data block as preferential copies data block, and described preferential copies data block is joined in described priority task queue.
6. data copying method according to claim 1 or 5, is characterized in that, also comprise before the method: the described network equipment arranged for second time interval;
Described copying obtains preferential copies data block write target volume into thread from priority task queue, and obtains copies data block write target volume from described serial task queue, comprising:
Into thread, described copying judges whether priority task queue is empty, if described priority task queue is not empty, from described priority task queue, obtain the relevant position of preferential copies data block write target volume, if described priority task queue is empty, judge whether described serial task queue is empty;
If described serial task queue is not empty, from described serial task queue, obtain the relevant position of copies data block write target volume, if described serial task queue is empty, judge whether that all copies data blocks have all copied; If the copies data block do not copied in addition, through described second interval time, again judge whether all data blocks have all copied, if all copies data blocks have all copied, copied out thread described in stopping and describedly copying into thread.
7. data copying method according to claim 6, is characterized in that, copy out described in described stopping thread and described copy thread after, the method also comprises:
The described network equipment deletes described copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of described copy task.
8. a data copy device, is characterized in that, comprising:
Start module, for according to copy task, parallel starting copies out thread and copy into thread, and described copy task comprises copies data information, source book ID and target volume ID;
Copying out thread, for finding source book according to source book ID, according to copies data information determination copies data, and copies data being divided into copies data block; From source book, read copies data block, and the copies data block of reading is joined in serial task queue, if there is preferential copies data block in copies data block, preferential copies data block is joined in priority task queue;
Copy into thread, during for there being preferential copies data block in priority task queue, from priority task queue, obtain preferential copies data block write target volume, and from serial task queue, obtain copies data block write target volume.
9. data copy device according to claim 8, is characterized in that, this device also comprises:
Receiver module, for receiving copy request;
Module is set, for arranging copy task according to described copy request, and arranges and corresponding with described copy task copy out thread, copy into thread, serial task queue and priority task queue.
10. data copy device according to claim 8 or claim 9, it is characterized in that, the copies data information in described copy task comprises copies data reference position and end position, and copies data is divided into the base unit of copies data block;
Describedly copy out thread, for according to copies data information determination copies data, and copies data be divided into copies data block, be specially:
Copies data for according to the copies data reference position in described copies data information and end position determination copies data, and is divided into copies data block according to the base unit in described copies data information by described thread of copying out.
11. data copy devices according to claim 9, is characterized in that, describedly arrange module, also for arranging the storage number upper limit and first interval time of serial task queue;
Describedly copy out thread, for reading copies data block from source book, and the copies data block of reading being joined in serial task queue, being specially:
Described thread of copying out for reading copies data block according to putting in order from source book, and the copies data block of reading is joined in serial task queue, if copies data block number reaches and stores the number upper limit in described serial task queue, suspend from source book, read copies data block, after the first interval time pre-set, start and from source book, read copies data block join in described serial task queue.
12. data copy devices according to claim 8 or claim 9, is characterized in that, described in copy out thread, if for there is preferential copies data block in copies data block, being joined in priority task queue by preferential copies data block, being specially:
If thread is copied out for receiving reading and writing data request described, according to reference position and the end position of request msg in described reading and writing data request, search corresponding copies data block as preferential copies data block, and described preferential copies data block is joined in described priority task queue.
13. data copy devices according to claim 9 or 12, is characterized in that, describedly arrange module, also for arranging for second time interval;
Describedly copy into thread, during for there being preferential copies data block in priority task queue, from priority task queue, obtaining preferential copies data block write target volume, and from serial task queue, obtain copies data block write target volume, being specially:
Describedly to copy into thread for judging that whether priority task queue is empty, if described priority task queue is not empty, the relevant position of preferential copies data block write target volume is obtained from described priority task queue, if described priority task queue is empty, judge whether described serial task queue is empty; If described serial task queue is not empty, from described serial task queue, obtain the relevant position of copies data block write target volume, if described serial task queue is empty, judge whether that all copies data blocks have all copied; If the copies data block do not copied in addition, after described second interval time, again judge whether all data blocks have all copied, if all copies data blocks have all copied, copied out thread described in stopping and describedly copying into thread.
14. data copy devices according to claim 13, is characterized in that, this device also comprises:
Removing module, for copy out described in described stopping thread and described copy thread after, delete copy task, and and corresponding the copying out thread, copy into thread, serial task queue and priority task queue of described copy task.
CN201410400157.3A 2014-08-14 2014-08-14 Data copying method and device Active CN104298609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410400157.3A CN104298609B (en) 2014-08-14 2014-08-14 Data copying method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410400157.3A CN104298609B (en) 2014-08-14 2014-08-14 Data copying method and device

Publications (2)

Publication Number Publication Date
CN104298609A true CN104298609A (en) 2015-01-21
CN104298609B CN104298609B (en) 2017-11-10

Family

ID=52318343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410400157.3A Active CN104298609B (en) 2014-08-14 2014-08-14 Data copying method and device

Country Status (1)

Country Link
CN (1) CN104298609B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445421A (en) * 2016-10-14 2017-02-22 郑州云海信息技术有限公司 Storage system data migration method and system
CN106502808A (en) * 2016-10-28 2017-03-15 广东欧珀移动通信有限公司 A kind of method of copied files, device and terminal
CN110673797A (en) * 2019-09-20 2020-01-10 浪潮电子信息产业股份有限公司 Logical volume copying method in distributed block storage service
CN113778914A (en) * 2020-06-09 2021-12-10 华为技术有限公司 Apparatus, method, and computing device for performing data processing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020078307A1 (en) * 2000-12-15 2002-06-20 Zahir Achmed Rumi Memory-to-memory copy and compare/exchange instructions to support non-blocking synchronization schemes
CN1624670A (en) * 2003-12-03 2005-06-08 华为技术有限公司 Method of local data migration
CN1704903A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot backup method
US7552294B1 (en) * 2003-08-07 2009-06-23 Crossroads Systems, Inc. System and method for processing multiple concurrent extended copy commands to a single destination device
CN102402401A (en) * 2011-12-13 2012-04-04 云海创想信息技术(无锡)有限公司 Method for scheduling input output (IO) request queue of disk
CN103186438A (en) * 2013-04-02 2013-07-03 浪潮电子信息产业股份有限公司 Method of improving disk array data reconstruction efficiency

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020078307A1 (en) * 2000-12-15 2002-06-20 Zahir Achmed Rumi Memory-to-memory copy and compare/exchange instructions to support non-blocking synchronization schemes
US7552294B1 (en) * 2003-08-07 2009-06-23 Crossroads Systems, Inc. System and method for processing multiple concurrent extended copy commands to a single destination device
CN1624670A (en) * 2003-12-03 2005-06-08 华为技术有限公司 Method of local data migration
CN1704903A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot backup method
CN102402401A (en) * 2011-12-13 2012-04-04 云海创想信息技术(无锡)有限公司 Method for scheduling input output (IO) request queue of disk
CN103186438A (en) * 2013-04-02 2013-07-03 浪潮电子信息产业股份有限公司 Method of improving disk array data reconstruction efficiency

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445421A (en) * 2016-10-14 2017-02-22 郑州云海信息技术有限公司 Storage system data migration method and system
CN106502808A (en) * 2016-10-28 2017-03-15 广东欧珀移动通信有限公司 A kind of method of copied files, device and terminal
CN110673797A (en) * 2019-09-20 2020-01-10 浪潮电子信息产业股份有限公司 Logical volume copying method in distributed block storage service
CN113778914A (en) * 2020-06-09 2021-12-10 华为技术有限公司 Apparatus, method, and computing device for performing data processing

Also Published As

Publication number Publication date
CN104298609B (en) 2017-11-10

Similar Documents

Publication Publication Date Title
RU2714098C1 (en) Data processing method and device
CN102306115B (en) Asynchronous remote copying method, system and equipment
US10067692B2 (en) Method and apparatus for backing up and restoring cross-virtual machine application
CN105843702B (en) A kind of method and device for data backup
EP3258396A1 (en) Data synchronization method, device and system
JP2014513338A5 (en) Method, computer readable storage medium and system for optimal compression of a virtual disk
JP2007286860A (en) Data transfer method and information processor
CN104298609A (en) Data copying method and device
US11030048B2 (en) Method a source storage device to send a source file and a clone file of the source file to a backup storage device, a source storage device and a backup storage device
CN105824846B (en) Data migration method and device
CN105653345A (en) Method and device supporting data nonvolatile random access
WO2016078529A1 (en) Service processing method, device and system
EP3147797B1 (en) Data management method, node and system for database cluster
CN103198122A (en) Method and device for restarting in-memory database
CN106528338B (en) Remote data copying method, storage device and storage system
CN105808374A (en) Snapshot processing method and associated equipment
CN106815094B (en) Method and equipment for realizing transaction submission in master-slave synchronization mode
CN103973727A (en) Data synchronizing method and device
CN104182182A (en) Intelligent terminal and data backup method thereof
CN105760251B (en) A kind of method and apparatus of Backup Data
CN105205160A (en) Data write-in method and device
US20160253247A1 (en) Method and device for restoring system file indexes
CN104484354A (en) Snapshot method for guaranteeing data consistency and storage equipment
US8977897B2 (en) Computer-readable recording medium, data management method, and storage device
CN105373549A (en) Data migration method and device and data node server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant