CN103678039A - Data recovery method and device - Google Patents

Data recovery method and device Download PDF

Info

Publication number
CN103678039A
CN103678039A CN201310655743.8A CN201310655743A CN103678039A CN 103678039 A CN103678039 A CN 103678039A CN 201310655743 A CN201310655743 A CN 201310655743A CN 103678039 A CN103678039 A CN 103678039A
Authority
CN
China
Prior art keywords
memory device
data
logical address
time point
historical data
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
CN201310655743.8A
Other languages
Chinese (zh)
Other versions
CN103678039B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310655743.8A priority Critical patent/CN103678039B/en
Priority claimed from CN201310655743.8A external-priority patent/CN103678039B/en
Publication of CN103678039A publication Critical patent/CN103678039A/en
Application granted granted Critical
Publication of CN103678039B publication Critical patent/CN103678039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data recovery method and device and belongs to the field of data storage. The method includes the steps of receiving a data recovery command which includes a target snapshot time point through a first storage device, confirming that data stored in a logic address are data written to the first storage device after the target snapshot time point, obtaining historical data, and sending the historical data and the logic address to a second storage device. By receiving the data recovery command which includes the target snapshot time point through the first storage device, confirming that the data stored in the logic address are the data written to the first storage device after the target snapshot time point, and sending the historical data and the logic address to the second storage device, the problem that in the prior art, all data in a main storage device are required to be copied to storage devices is solved, and the purposes that copy time is reduced, and broadband resources are saved are achieved.

Description

Data reconstruction method and equipment
Technical field
The present invention relates to field of data storage, particularly a kind of data reconstruction method and equipment.
Background technology
ROW(Redirect On Write, is redirected and writes) be a kind of application method for writing data very widely.In the data-storage system based on ROW, in the time need to modifying to data corresponding to a certain logical address, system can keep these data and physical address constant, for the new physical address of the data allocations revised and write; Managerial personnel are regularly for the data of current storage are set up snapshot, when in system, data are made mistakes, system can be carried out snapshot rollback according to managerial personnel's instruction, by Data Update corresponding to each logical address, be the data of target snapshot while setting up moment point, thus state when data are returned to target snapshot and set up.
Simultaneously, for fear of causing local data cannot recover damnous situation because of factors such as disasteies, data-storage system also carries out remote copy to the data on main storage device, be about to data Replica on main storage device in the storing from memory device of far-end, to set up remote backup.
In the data-storage system based on ROW, existing data reconstruction method, when in system, data are made mistakes and carry out snapshot rollback, system all copies all data on main storage device and sends to from memory device carries out data recovery.
In realizing process of the present invention, inventor finds that prior art at least exists following problem:
Data reconstruction method in the existing data-storage system based on ROW, in system, data are made mistakes and while carrying out snapshot rollback, all data Replicas in main storage device need to be given from memory device, and doubling time is long, and wastes massive band width resource.
Summary of the invention
The embodiment of the present invention provides a kind of data reconstruction method and equipment, the efficiency of recovering to improve data.Described technical scheme is as follows:
First aspect, a kind of data reconstruction method is provided, described method is applied in storage system, described storage system at least comprises the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described method comprises:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are after described target snapshot time point, to write the data of described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In the first possibility implementation of first aspect, described method also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
In the second possibility implementation of first aspect, the described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
In conjunction with the first possibility implementation of first aspect, first aspect or the second possibility implementation of first aspect, in the third possibility implementation of first aspect, described method also comprises:
When the last time generates the snapshot of the data in described the first memory device, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve the corresponding relation between described logical address and described operational label.
Second aspect, the first memory device is provided, described the first memory device is applied in storage system, described storage system at least comprises described the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described the first memory device comprises:
Command reception module, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are to write the data of described the first memory device after described target snapshot time point, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge module, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module, if store described historical data for the described logical address of judgment result is that of described judge module at described target snapshot time point, obtain described historical data;
The first sending module, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In the first possibility implementation of second aspect, described the first memory device also comprises:
The second sending module, if the described logical address that judgment result is that for described judge module does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
In the second possibility implementation of second aspect, described acquisition module, comprising:
Address acquisition unit, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit, for obtaining described historical data according to described physical address.
In conjunction with the first possibility implementation of second aspect, second aspect or the second possibility implementation of second aspect, in the third possibility implementation of second aspect, described the first memory device also comprises:
Mark generation module, when generating the snapshot of data of described the first memory device in the last time, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve module, for preserving the corresponding relation between described logical address and described operational label.
The third aspect, a kind of data reconstruction method is provided, described method is applied in storage system, described storage system at least comprises the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described method comprises:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are deleted after described target snapshot time point from described the first memory device, described operational label is used to indicate the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In the first possibility implementation of the third aspect, described method also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
In the second possibility implementation of the third aspect, the described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
In conjunction with the first possibility implementation of the third aspect, the third aspect or the second possibility implementation of the third aspect, described method also comprises:
When the last time generates the snapshot of the data in described the first memory device, according to the data of storing in described logical address, by the temporal information of deleting, generated described operational label from described the first memory device;
Preserve the corresponding relation between described logical address and described operational label.
Fourth aspect, the first memory device is provided, described the first memory device is applied in storage system, described storage system at least comprises described the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described the first memory device comprises:
Command reception module, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are deleted after described target snapshot time point from described the first memory device, described operational label is used to indicate the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Judge module, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module, if store described historical data for the described logical address of judgment result is that of described judge module at described target snapshot time point, obtain described historical data;
The first sending module, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In the first possibility implementation of fourth aspect, described the first memory device also comprises:
The second sending module, if the described logical address that judgment result is that for described judge module does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
In the second possibility implementation of fourth aspect, described acquisition module, comprising:
Address acquisition unit, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit, for obtaining described historical data according to described physical address.
In conjunction with the first possibility implementation of fourth aspect, fourth aspect or the second possibility implementation of fourth aspect, in the third possibility implementation of fourth aspect, described the first memory device also comprises:
Mark generation module, when generating the snapshot of data of described the first memory device in the last time, is generated described operational label according to the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Preserve module, for preserving the corresponding relation between described logical address and described operational label.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data change only need to occur after the second memory device is sent in target snapshot time point corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the system pie graph of storage system provided by the invention;
Fig. 2 is the method flow diagram of the data reconstruction method that provides of one embodiment of the invention;
Fig. 3 is the method flow diagram of the data reconstruction method that provides of another embodiment of the present invention;
Fig. 4 is the corresponding relation schematic diagram between another embodiment of the present invention logical address, physical address and the operational label that provide;
Fig. 5 is the structural representation of the first memory device of providing of one embodiment of the invention;
Fig. 6 is the structural representation of the first memory device of providing of another embodiment of the present invention;
Fig. 7 is the structural representation of the first memory device of providing of further embodiment of this invention;
Fig. 8 is the structural representation of the first memory device of providing of further embodiment of this invention;
Fig. 9 is the method flow diagram of the data reconstruction method that provides of one embodiment of the invention;
Figure 10 is the method flow diagram of the data reconstruction method that provides of another embodiment of the present invention;
Figure 11 is the corresponding relation schematic diagram between another embodiment of the present invention logical address, physical address and the operational label that provide;
Figure 12 is the structural representation of the first memory device of providing of one embodiment of the invention;
Figure 13 is the structural representation of the first memory device of providing of another embodiment of the present invention;
Figure 14 is the structural representation of the first memory device of providing of further embodiment of this invention;
Figure 15 is the structural representation of the first memory device of providing of further embodiment of this invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Scheme provided by the invention can be in a kind of storage system, as shown in Figure 1, this storage system at least comprises the first memory device and the second memory device, wherein, the second memory device is the backup of the first memory device, user is at every turn in the first memory device during data writing, and the first memory device all sends to the second memory device to carry out back-up storage the data that write.In addition, the first memory device also periodically generates the snapshot of the data in the first memory device, the time point of each generating snapshot is a snapshot time point, when the data in the first memory device are made mistakes, state when the first memory device can return to this target snapshot time point by data according to the snapshot of setting up at target snapshot time point.Wherein, when carrying out data recovery, the first memory device need to recover two class data conventionally: a class is after this target snapshot time point, to write the data of the first memory device, and another kind of is the data of deleting from the first memory device after this target snapshot time point.The following embodiment of the present invention is described facing to the rejuvenation of two class data respectively.
Refer to Fig. 2, it shows the method flow diagram of the data reconstruction method that one embodiment of the invention provides.This data reconstruction method can be in storage system as shown in Figure 1, when the data fault in the first memory device is carried out data recovery, the data in the second memory device is recovered accordingly.This data reconstruction method can comprise:
Step 102, the first memory device receives data and recovers instruction, and these data are recovered instruction and are comprised target snapshot time point;
Step 104, according to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in this logical address are the data that write the first memory device or delete after target snapshot time point from described the first memory device, this operational label is used to indicate the temporal information that the data of storing in this logical address write the first memory device;
Step 106, judges whether this logical address stores historical data at target snapshot time point;
Step 108, if judgment result is that, this logical address stores historical data at target snapshot time point, obtains this historical data;
Step 110, sends to the second memory device by this historical data and this logical address, makes the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data.
In sum, the data reconstruction method that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the data reconstruction method shown in above-mentioned Fig. 2 is further described, refer to Fig. 3, it shows the method flow diagram of the data reconstruction method that another embodiment of the present invention provides.This data reconstruction method can be in storage system as shown in Figure 1, when the data fault in the first memory device is carried out data recovery, the data in the second memory device is recovered accordingly.With the first memory device, based on ROW, carry out data and be stored as example, this data reconstruction method can comprise:
Step 202, the first memory device receives data and recovers instruction, and these data are recovered instruction and are comprised target snapshot time point;
It can be the snapshot rollback instruction that managerial personnel send while carrying out snapshot rolling back action on the first memory device that this data are recovered instruction.Concrete, while there is hard disk write error, file corruption or program mal in the first memory device, managerial personnel can send snapshot rollback instruction to the first memory device, state when this snapshot rollback instruction is used to indicate the first memory device data are returned to target snapshot time point.
Step 204, determines that according to the corresponding relation between the logical address of prior preservation and operational label the data of storing in this logical address are after target snapshot time point, to write the data of the first memory device;
Wherein, this operational label is used to indicate the temporal information that the data of storing in this logical address write the first memory device.When the last time generates the snapshot of the data in this first memory device, the temporal information that the first memory device writes this first memory device according to the data of storing in this logical address generates this operational label, and preserves the corresponding relation between this logical address and this operational label.When the first memory device receives the data recovery instruction that includes target snapshot time point, can determine whether the data in this logical address are after this target snapshot time point, to write the data of the first memory device according to this logical address and the corresponding relation between this operational label of storage.
When based on ROW storage data, the situation of the data writing in the first memory device mainly contains two kinds: newly write data in logical address or the data in existing logical address are modified.Each time during the snapshot of generated data, the logical address of first each data of memory device corresponding stored and the corresponding relation between physical address, simultaneously, the first memory device also generates corresponding operational label according to the write time of the data in each logical address for each logical address, and the operational label that generates of storage and the corresponding relation between each logical address.Wherein, snapshot time point when this operational label specifically can be generating snapshot, can be also the serial number of each snapshot or transaction number etc.
Concrete, take operational label as snapshot time point be example, suppose the successively snapshot of 3 generated datas of the first memory device, each logical address of at every turn storing during generating snapshot and the corresponding relation between physical address and operational label are as shown in Figure 4.Wherein, at t1, before the moment, store a, b, c and tetra-data of d in the first memory device, the logical address of these four data is respectively L1, L2, L3 and L4, and physical address is respectively P1, P2, P3 and P4.At t1, constantly time, the first memory device is the snapshot of generated data first, and generate operational label corresponding to each logical address is t1 simultaneously, the write time that this operational label t1 is used to indicate the data in corresponding logical address t1 constantly before.When t1, be carved into t2 in the time period between the moment, logical address is that the data of L1 are modified to a ', corresponding physical address is revised as P1 ', data and physical address that all the other logical addresses are corresponding are constant, at t2 constantly time, the first memory device is the snapshot of generated data for the second time, operational label corresponding to formation logic address L1 is t2 simultaneously, generating operational label corresponding to all the other logical addresses is t1, wherein, the write time that this operational label t2 is used to indicate the data in logical address L1 when t1, be carved into t2 constantly between.When t2, be carved into t3 in the time period between the moment, logical address is that the data of L1, L2, L3 and L4 remain unchanged, and a newly-increased logical address is L5 simultaneously, and corresponding data are e, and its physical address is P5; At t3 constantly time, the first memory device is the snapshot of generated data for the third time, operational label corresponding to formation logic address L5 is t3 simultaneously, the operational label that formation logic address L1 is corresponding is t2, generating operational label corresponding to all the other logical addresses is t1, wherein, the write time that this operational label t3 is used to indicate the data in logical address L5 when t2, be carved into t3 constantly between.
T3 constantly after, when the first memory device receives data recovery instruction, if the target snapshot time point that these data are recovered in instruction is t1, now, the first memory device obtains each logical address that t3 generates constantly and the corresponding relation between operational label, and determine that the data that corresponding operational label is greater than in the logical address of t1 are that t1 writes the data of the first memory device constantly, logical address is that the data in L1 and L5 are that t1 writes the data of the first memory device constantly.
In addition,, when the each data writing of the first memory device or deletion data, all can carry out data with the second memory device and synchronize.Such as, when the first memory device newly writes data corresponding to logical address or the data in original logical address are modified, the data that write are sent to the second memory device, by the second memory device, carry out Data Update; When the first memory device is deleted the data in original logical address, to the second memory device, send and delete notice, by the second memory device, the data in corresponding logical address are deleted.
Step 206, judges whether this logical address stores historical data at target snapshot time point; If so, enter step 208, otherwise, step 212 entered;
The first memory device determines that data in a certain logical address for after writing the data of the first memory device after target snapshot time point, each logical address generating in the time of can obtaining target snapshot time point and the corresponding relation between physical address, and each logical address generating during according to target snapshot time point and the corresponding relation between physical address judge this logical address when this target snapshot time point whether to there being physical address, if each logical address generating during target snapshot time point and the corresponding relation between physical address show that this logical address is to there being physical address when target snapshot time point, judge this logical address and store historical data at target snapshot time point, if each logical address generating during target snapshot time point and the corresponding relation between physical address show that when target snapshot time point this logical address is not to having physical address or not have this logical address when the target snapshot time point, judge this logical address in target snapshot time point store historical data not.
Step 208, obtains this historical data;
While storing historical data when judging this logical address at target snapshot time point, the first memory device obtains this logical address corresponding physical address when target snapshot time point, and obtains this historical data according to this physical address.
Take Fig. 4 as example, wherein logical address L1 and L4 t1 constantly time to there being physical address, decision logic address L1 and L4 store historical data constantly at t1, it is the historical data of logical address L1 that the first memory device obtains the data a storing in the t1 physical address P1 that during moment, logical address L1 is corresponding, and is the historical data of logical address L4 by the data d acquisition of storing in the t1 physical address P4 that during moment, logical address L4 is corresponding.
Step 210, sends to the second memory device by this historical data and this logical address;
The first memory device sends to the second memory device by this historical data and this logical address, and data replacement corresponding to this logical address that the second memory device is stored self is this historical data, completed the recovery of data.
Take Fig. 4 as example, the first memory device sends to the second memory device by logical address L1 and data a, and logical address L4 and data d are sent to the second memory device, making the second memory device is a and d by the logical address L1 in the second memory device and data replacement corresponding to L4, thereby completes the recovery of data.
Step 212, sends to the second memory device by this logical address and the deletion indication corresponding with this logical address;
While storing historical data when judging this logical address at target snapshot time point, the first memory device sends to the second memory device by this logical address and the deletion indication corresponding with this logical address, make the second memory device when storing the data corresponding with this logical address, according to this deletion indication, the data corresponding with this logical address of storing in the second memory device are deleted.Wherein, this deletion indication can be one and be used to indicate the delete code that the second memory device is deleted data, the second memory device receives after this delete code, detect and in the second memory device, whether store the data corresponding with this logical address, and while storing the data corresponding with this logical address in detecting the second memory device, the data that this logical address in the second memory device is corresponding are deleted.
Still take Fig. 4 as example, wherein, t1 subsistence logic address L5 not in the first memory device constantly time, presentation logic address L5 does not store historical data at t1 constantly time, and now, the first memory device sends logical address L5 and delete code to the second memory device.Owing to being carved into the first memory device when the t3, receiving data and recover in this period of time of instruction, historical data in this logical address L5 may be deleted from the first memory device and the second memory device, therefore, this second memory device receives after this delete code, first detect the local data that logical address L5 is corresponding that whether store, if have, data corresponding with logical address L5 in the second memory device are deleted.
In sum, the data reconstruction method that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Refer to Fig. 5, it shows the structural representation of the first memory device that one embodiment of the invention provides, this first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 2 or Fig. 3.This first memory device can comprise:
Command reception module 301, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module 302, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are to write the data of described the first memory device after described target snapshot time point, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge module 303, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module 304, if store described historical data for the described logical address of judgment result is that of described judge module 303 at described target snapshot time point, obtain described historical data;
The first sending module 305, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In sum, the first memory device that the embodiment of the present invention provides, by comprise the data of target snapshot time point in reception, recover instruction, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the first memory device shown in above-mentioned Fig. 5 is further described, refer to Fig. 6, it shows the structural representation of the first memory device that another embodiment of the present invention provides.This first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 2 or Fig. 3.This first memory device can comprise:
Command reception module 401, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module 402, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are to write the data of described the first memory device after described target snapshot time point, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge module 403, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module 404, if store described historical data for the described logical address of judgment result is that of described judge module 403 at described target snapshot time point, obtain described historical data;
The first sending module 405, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
Described the first memory device also comprises:
The second sending module 406, if the described logical address that judgment result is that for described judge module 403 does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, make described the second memory device when storing the data corresponding with described logical address, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
Described acquisition module 404, comprising:
Address acquisition unit 404a, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit 404b, for obtaining described historical data according to described physical address.
Described the first memory device also comprises:
Mark generation module 407, when generating the snapshot of data of described the first memory device in the last time, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve module 408, for preserving the corresponding relation between described logical address and described operational label.
In sum, the first memory device that the embodiment of the present invention provides, by comprise the data of target snapshot time point in reception, recover instruction, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Refer to Fig. 7, it shows the structural representation of the first memory device that further embodiment of this invention provides, this first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 2 or Fig. 3.This first memory device can comprise:
At least one I/O interface 001, at least one processor 002, such as CPU, storer 003 and display 004; Storer 003 may comprise high speed Ram storer, also may also comprise non-unsettled storer (non-volatile memory), for example at least one magnetic disk memory.Storer 003 optionally can comprise at least one and be positioned at the memory storage away from aforementioned processing device 002.In some embodiments, storer 003 has been stored following element, module or data structure, or their subset, or their superset:
Operating system 0031, comprises various programs, for realizing various basic businesses and processing hardware based task;
Application module 0032, comprises one or more modules, and described one or more modules are configured to be carried out by described one or more processors 002, and described one or more modules have following function:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are after described target snapshot time point, to write the data of described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In sum, the first memory device that the embodiment of the present invention provides, by comprise the data of target snapshot time point in reception, recover instruction, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the first memory device shown in above-mentioned Fig. 7 is further described, refer to Fig. 8, it shows the structural representation of the first memory device that further embodiment of this invention provides.This first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 2 or Fig. 3.This first memory device can comprise:
At least one I/O interface 005, at least one processor 006, such as CPU, storer 007 and display 008; Storer 007 may comprise high speed Ram storer, also may also comprise non-unsettled storer (non-volatile memory), for example at least one magnetic disk memory.Storer 007 optionally can comprise at least one and be positioned at the memory storage away from aforementioned processing device 006.In some embodiments, storer 007 has been stored following element, module or data structure, or their subset, or their superset:
Operating system 0071, comprises various programs, for realizing various basic businesses and processing hardware based task;
Application module 0072, comprises one or more modules, and described one or more modules are configured to be carried out by described one or more processors 006, and described one or more modules have following function:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are after described target snapshot time point, to write the data of described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
Described function also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, make described the second memory device when storing the data corresponding with described logical address, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
The described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
Described function also comprises:
When the last time generates the snapshot of the data in described the first memory device, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve the corresponding relation between described logical address and described operational label.
In sum, the first memory device that the embodiment of the present invention provides, by comprise the data of target snapshot time point in reception, recover instruction, determine that the data of storing in logical address are after target snapshot time point, to write the data of the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, only need to after being sent in target snapshot time point, the second memory device there is logical address that data write corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Refer to Fig. 9, it shows the method flow diagram of the data reconstruction method that one embodiment of the invention provides.This data reconstruction method can be in storage system as shown in Figure 1, when the data fault in the first memory device is carried out data recovery, the data in the second memory device is recovered accordingly.This data reconstruction method can comprise:
Step 502, the first memory device receives data and recovers instruction, and these data are recovered instruction and are comprised target snapshot time point;
Step 504, according to the corresponding relation between the logical address of prior preservation and operational label determine the data of storing in this logical address be after target snapshot time point by the data of deleting from described the first memory device, this operational label is used to indicate the data of storing in this logical address by the temporal information of deleting from the first memory device;
Step 506, judges whether this logical address stores historical data at target snapshot time point;
Step 508, if judgment result is that, this logical address stores historical data at target snapshot time point, obtains this historical data;
Step 510, sends to the second memory device by this historical data and this logical address, makes the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data.
In sum, the data reconstruction method that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the data reconstruction method shown in above-mentioned Fig. 9 is further described, refer to Figure 10, it shows the method flow diagram of the data reconstruction method that another embodiment of the present invention provides.This data reconstruction method can be in storage system as shown in Figure 1, when the data fault in the first memory device is carried out data recovery, the data in the second memory device is recovered accordingly.With the first memory device, based on ROW, carry out data and be stored as example, this data reconstruction method can comprise:
Step 602, the first memory device receives data and recovers instruction, and these data are recovered instruction and are comprised target snapshot time point;
It can be the snapshot rollback instruction that managerial personnel send while carrying out snapshot rolling back action on the first memory device that this data are recovered instruction.Concrete, while there is hard disk write error, file corruption or program mal in the first memory device, managerial personnel can send snapshot rollback instruction to the first memory device, state when this snapshot rollback instruction is used to indicate the first memory device data are returned to target snapshot time point.
Step 604, determines that according to the corresponding relation between the logical address of prior preservation and operational label the data of storing in this logical address are by the data of deleting from the first memory device after target snapshot time point;
Wherein, this operational label is used to indicate the data of storing in this logical address by the temporal information of deleting from the first memory device.When the last time generates the snapshot of the data in this first memory device, the first memory device is generated this operational label according to the data of storing in this logical address by the temporal information of deleting from this first memory device, and preserves the corresponding relation between this logical address and this operational label.When the first memory device receives the data recovery instruction that includes target snapshot time point, can determine whether the data in this logical address are by the data of deleting after this target snapshot time point from the first memory device according to this logical address and the corresponding relation between this operational label of storage.
In based on ROW storage data procedures, each time during the snapshot of generated data, the logical address of first each data of memory device corresponding stored and the corresponding relation between physical address, simultaneously, the first memory device also generates corresponding operational label according to the erasing time of the data in each logical address for each logical address, and the operational label that generates of storage and the corresponding relation between each logical address.Wherein, snapshot time point when this operational label specifically can be generating snapshot, can be also the serial number of each snapshot or transaction number etc.
Concrete, take operational label as snapshot time point be example, suppose the successively snapshot of 2 generated datas of the first memory device, each logical address of at every turn storing during generating snapshot and the corresponding relation between physical address and operational label are as shown in figure 11.Wherein, at t1, before the moment, store a, b, c and tetra-data of d in the first memory device, the logical address of these four data is respectively L1, L2, L3 and L4, and physical address is respectively P1, P2, P3 and P4.At t1, constantly time, the first memory device is the snapshot of generated data first, and generate operational label corresponding to each logical address is t1 simultaneously, the write time that this operational label t1 is used to indicate the data in corresponding logical address t1 constantly before.When t1, be carved into t2 in the time period between the moment, logical address is that the data of L1, L2 and L3 remain unchanged, and logical address is that the data d that L4 is corresponding is deleted; At t2 constantly time, the first memory device is the snapshot of generated data for the second time, operational label corresponding to formation logic address L4 is t2 simultaneously, generating operational label corresponding to all the other logical addresses is t1, wherein, the erasing time that this operational label t2 is used to indicate the data in logical address L4 when t2, be carved into t3 constantly between.
T2 constantly after, when the first memory device receives data recovery instruction, if the target snapshot time point that these data are recovered in instruction is t1, now, the first memory device obtains each logical address that t2 generates constantly and the corresponding relation between operational label, and determine that the data that corresponding operational label is greater than in the logical address of t1 are the data that t1 writes the first memory device or deletes from the first memory device constantly, the data in logical address L4 be t1 constantly after by the data of deleting from the first memory device.
In addition,, when the each data writing of the first memory device or deletion data, all can carry out data with the second memory device and synchronize.Such as, when the first memory device newly writes data corresponding to logical address or the data in original logical address are modified, the data that write are sent to the second memory device, by the second memory device, carry out Data Update; When the first memory device is deleted the data in original logical address, to the second memory device, send and delete notice, by the second memory device, the data in corresponding logical address are deleted.
Step 606, judges whether this logical address stores historical data at target snapshot time point; If so, enter step 608, otherwise, step 612 entered;
The first memory device determine data in a certain logical address for after target snapshot time point by the data of deleting from the first memory device after, each logical address generating in the time of can obtaining target snapshot time point and the corresponding relation between physical address, and each logical address generating during according to target snapshot time point and the corresponding relation between physical address judge this logical address when this target snapshot time point whether to there being physical address, if each logical address generating during target snapshot time point and the corresponding relation between physical address show that this logical address is to there being physical address when target snapshot time point, judge this logical address and store historical data at target snapshot time point, if each logical address generating during target snapshot time point and the corresponding relation between physical address show that when target snapshot time point this logical address is not to having physical address or not have this logical address when the target snapshot time point, judge this logical address in target snapshot time point store historical data not.
Step 608, obtains this historical data;
While storing historical data when judging this logical address at target snapshot time point, the first memory device obtains this logical address corresponding physical address when target snapshot time point, and obtains this historical data according to this physical address.
Take Figure 11 as example, wherein logical address L4 t1 constantly time to there being physical address, decision logic address L4 stores historical data constantly at t1, and it is the historical data of logical address L4 that the first memory device obtains the data d storing in the t1 physical address P4 that during moment, logical address L4 is corresponding.
Step 610, sends to the second memory device by this historical data and this logical address;
The first memory device sends to the second memory device by this historical data and this logical address, and data replacement corresponding to this logical address that the second memory device is stored self is this historical data, completed the recovery of data.
Take Fig. 4 as example, and the first memory device sends to the second memory device by logical address L4 and data d, and making the second memory device is d by data replacement corresponding to the logical address L4 in the second memory device, thereby completes the recovery of data.
Step 612, sends to the second memory device by this logical address and the deletion indication corresponding with this logical address;
While storing historical data when judging this logical address at target snapshot time point, the first memory device sends to the second memory device by this logical address and the deletion indication corresponding with this logical address, make the second memory device when storing the data corresponding with this logical address, according to this deletion indication, the data corresponding with this logical address of storing in the second memory device are deleted.Wherein, this deletion indication can be a delete code that is used to indicate the second memory device deletion data.
Because receiving data constantly to the first memory device, the snapshot at the last generated data of the first memory device and the corresponding relation between logical address and operational label recover in a period of time between instruction, in the first memory device, may again write the data in this logical address and back up to the second memory device, therefore, the second memory device receives after this delete code, first detect and in the second memory device, whether store the data corresponding with this logical address, and while storing the data corresponding with this logical address in detecting the second memory device, the data that this logical address in the second memory device is corresponding are deleted.
In sum, the data reconstruction method that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Refer to Figure 12, it shows the structural representation of the first memory device that one embodiment of the invention provides, this first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 9 or Figure 10.This first memory device can comprise:
Command reception module 701, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module 702, for according to the logical address of preserving in advance and the corresponding relation between operational label, determine data that described logical address is stored be after described target snapshot time point by the data of deleting from described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address are deleted from described the first memory device;
Judge module 703, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module 704, if store described historical data for the described logical address of judgment result is that of described judge module 703 at described target snapshot time point, obtain described historical data;
The first sending module 705, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In sum, the first memory device that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the first memory device shown in above-mentioned Figure 12 is further described, refer to Figure 13, it shows the structural representation of the first memory device that another embodiment of the present invention provides.This first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 9 or Figure 10.This first memory device can comprise:
Command reception module 801, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module 802, for according to the logical address of preserving in advance and the corresponding relation between operational label, determine data that described logical address is stored be after described target snapshot time point by the data of deleting from described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address are deleted from described the first memory device;
Judge module 803, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module 804, if store described historical data for the described logical address of judgment result is that of described judge module 803 at described target snapshot time point, obtain described historical data;
The first sending module 805, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
Described the first memory device also comprises:
The second sending module 806, if the described logical address that judgment result is that for described judge module 803 does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, make described the second memory device when storing the data corresponding with described logical address, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
Described acquisition module 804, comprising:
Address acquisition unit 804a, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit 804b, for obtaining described historical data according to described physical address.
Described the first memory device also comprises:
Mark generation module 807, when generating the snapshot of data of described the first memory device in the last time, the temporal information of deleting from described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve module 808, for preserving the corresponding relation between described logical address and described operational label.
In sum, the first memory device that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
Refer to Figure 14, it shows the structural representation of the first memory device that further embodiment of this invention provides, this first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 9 or Figure 10.This first memory device can comprise:
At least one I/O interface 009, at least one processor 010, such as CPU, storer 011 and display 012; Storer 011 may comprise high speed Ram storer, also may also comprise non-unsettled storer (non-volatile memory), for example at least one magnetic disk memory.Storer 011 optionally can comprise at least one and be positioned at the memory storage away from aforementioned processing device 010.In some embodiments, storer 011 has been stored following element, module or data structure, or their subset, or their superset:
Operating system 0111, comprises various programs, for realizing various basic businesses and processing hardware based task;
Application module 0112, comprises one or more modules, and described one or more modules are configured to be carried out by described one or more processors 010, and described one or more modules have following function:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are to write by the data of deleting after described target snapshot time point from described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address are deleted from described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
In sum, the first memory device that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
For the first memory device shown in above-mentioned Figure 14 is further described, refer to Figure 15, it shows the structural representation of the first memory device that further embodiment of this invention provides.This first memory device is used for storage system as shown in Figure 1, and this first memory device can be for the data reconstruction method shown in execution graph 9 or Figure 10.This first memory device can comprise:
At least one I/O interface 013, at least one processor 014, such as CPU, storer 015 and display 016; Storer 015 may comprise high speed Ram storer, also may also comprise non-unsettled storer (non-volatile memory), for example at least one magnetic disk memory.Storer 015 optionally can comprise at least one and be positioned at the memory storage away from aforementioned processing device 014.In some embodiments, storer 007 has been stored following element, module or data structure, or their subset, or their superset:
Operating system 0151, comprises various programs, for realizing various basic businesses and processing hardware based task;
Application module 0152, comprises one or more modules, and described one or more modules are configured to be carried out by described one or more processors 014, and described one or more modules have following function:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label determine the data of storing in described logical address be after described target snapshot time point by the data of deleting from described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address are deleted from described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
Described function also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, make described the second memory device when storing the data corresponding with described logical address, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
The described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
Described function also comprises:
When the last time generates the snapshot of the data in described the first memory device, the temporal information of deleting from described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve the corresponding relation between described logical address and described operational label.
In sum, the first memory device that the embodiment of the present invention provides, by receive the data recovery instruction that comprises target snapshot time point at the first memory device, determine that the data of storing in logical address are by the data of deleting after target snapshot time point from the first memory device, and judge this logical address and store after historical data at target snapshot time point, this historical data and this logical address are sent to the second memory device, make the second memory device that the data corresponding with this logical address of storing in the second memory device are reverted to this historical data, the first memory device is when carrying out data recovery, the logical address that data deletion only need to occur to the second memory device is sent in target snapshot time point after corresponding historical data when target snapshot time point, solved and in prior art, needed all data in main storage device to be all copied to the problem from memory device, reach minimizing doubling time, save the object of bandwidth resources.
It should be noted that: the first memory device that above-described embodiment provides is when carrying out data recovery, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the inner structure of the equipment of being about to is divided into different functional modules, to complete all or part of function described above.In addition, the embodiment of the method that the first memory device that above-described embodiment provides and data are recovered belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (16)

1. a data reconstruction method, it is characterized in that, described method is applied in storage system, described storage system at least comprises the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described method comprises:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are after described target snapshot time point, to write the data of described the first memory device, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
2. method according to claim 1, is characterized in that, described method also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
3. method according to claim 1, is characterized in that, the described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
4. according to the arbitrary described method of claims 1 to 3, it is characterized in that, described method also comprises:
When the last time generates the snapshot of the data in described the first memory device, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve the corresponding relation between described logical address and described operational label.
5. the first memory device, it is characterized in that, described the first memory device is applied in storage system, described storage system at least comprises described the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described the first memory device comprises:
Command reception module, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are to write the data of described the first memory device after described target snapshot time point, described operational label is used to indicate the temporal information that the data of storing in described logical address write described the first memory device;
Judge module, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module, if store described historical data for the described logical address of judgment result is that of described judge module at described target snapshot time point, obtain described historical data;
The first sending module, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
6. the first memory device according to claim 5, is characterized in that, described the first memory device also comprises:
The second sending module, if the described logical address that judgment result is that for described judge module does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
7. the first memory device according to claim 5, is characterized in that, described acquisition module, comprising:
Address acquisition unit, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit, for obtaining described historical data according to described physical address.
8. according to arbitrary the first described memory device of claim 5 to 7, it is characterized in that, described the first memory device also comprises:
Mark generation module, when generating the snapshot of data of described the first memory device in the last time, the temporal information that writes described the first memory device according to the data of storing in described logical address generates described operational label;
Preserve module, for preserving the corresponding relation between described logical address and described operational label.
9. a data reconstruction method, it is characterized in that, described method is applied in storage system, described storage system at least comprises the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described method comprises:
Described the first memory device receives data and recovers instruction, and described data are recovered instruction and comprised target snapshot time point;
According to the corresponding relation between the logical address of prior preservation and operational label, determine that the data of storing in described logical address are deleted after described target snapshot time point from described the first memory device, described operational label is used to indicate the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Judge whether described logical address stores historical data at described target snapshot time point;
If judgment result is that, described logical address stores described historical data at described target snapshot time point, obtains described historical data;
Described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
10. method according to claim 9, is characterized in that, described method also comprises:
If judgment result is that, described logical address does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
11. methods according to claim 9, is characterized in that, the described historical data of described acquisition, comprising:
Obtain described logical address corresponding physical address when described target snapshot time point;
According to described physical address, obtain described historical data.
12. according to the arbitrary described method of claim 9 to 11, it is characterized in that, described method also comprises:
When the last time generates the snapshot of the data in described the first memory device, according to the data of storing in described logical address, by the temporal information of deleting, generated described operational label from described the first memory device;
Preserve the corresponding relation between described logical address and described operational label.
13. first memory devices, it is characterized in that, described the first memory device is applied in storage system, described storage system at least comprises described the first memory device and the second memory device, wherein, described the first memory device periodically generates the snapshot of the data in described the first memory device, and the time point of each generating snapshot is a snapshot time point, and described the first memory device comprises:
Command reception module, recovers instruction for receiving data, and described data are recovered instruction and comprised target snapshot time point;
Determination module, for determining that according to logical address and the corresponding relation between operational label preserved in advance the data that described logical address is stored are deleted after described target snapshot time point from described the first memory device, described operational label is used to indicate the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Judge module, for judging whether described logical address stores historical data at described target snapshot time point;
Obtain module, if store described historical data for the described logical address of judgment result is that of described judge module at described target snapshot time point, obtain described historical data;
The first sending module, for described historical data and described logical address are sent to described the second memory device, make described the second memory device that the data corresponding with described logical address of storing in described the second memory device are reverted to described historical data.
14. the first memory devices according to claim 13, is characterized in that, described the first memory device also comprises:
The second sending module, if the described logical address that judgment result is that for described judge module does not store described historical data at described target snapshot time point, described logical address and the deletion indication corresponding with described logical address are sent to described the second memory device, while making described the second memory device store the data corresponding with described logical address in described the second memory device, according to described deletion indication, the data corresponding with described logical address of storing in described the second memory device are deleted.
15. the first memory devices according to claim 13, is characterized in that, described acquisition module, comprising:
Address acquisition unit, obtains described logical address corresponding physical address when described target snapshot time point;
Data acquisition unit, for obtaining described historical data according to described physical address.
16. according to claim 13 to 15 arbitrary the first described memory devices, it is characterized in that, described the first memory device also comprises:
Mark generation module, when generating the snapshot of data of described the first memory device in the last time, is generated described operational label according to the data of storing in described logical address by the temporal information of deleting from described the first memory device;
Preserve module, for preserving the corresponding relation between described logical address and described operational label.
CN201310655743.8A 2013-12-05 Data reconstruction method and equipment Active CN103678039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310655743.8A CN103678039B (en) 2013-12-05 Data reconstruction method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310655743.8A CN103678039B (en) 2013-12-05 Data reconstruction method and equipment

Publications (2)

Publication Number Publication Date
CN103678039A true CN103678039A (en) 2014-03-26
CN103678039B CN103678039B (en) 2016-11-30

Family

ID=

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536852A (en) * 2014-12-31 2015-04-22 华为技术有限公司 Data recovery method and device
WO2017132790A1 (en) * 2016-02-01 2017-08-10 华为技术有限公司 Data recovery method and storage device
CN108664353A (en) * 2017-03-29 2018-10-16 中国移动通信集团四川有限公司 The method, apparatus and replica management server that data are restored
CN109522154A (en) * 2015-09-10 2019-03-26 华为技术有限公司 Data reconstruction method and relevant device and system
WO2020024772A1 (en) * 2018-08-03 2020-02-06 华为技术有限公司 Method and apparatus for querying data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1483164A (en) * 2000-12-21 2004-03-17 ���ܿ���ϵͳ���޹�˾ Restoring large capacity memory to previous state responding to processing information
US20070094467A1 (en) * 2005-10-20 2007-04-26 Yasuo Yamasaki Method for rolling back from snapshot with log
CN101061467A (en) * 2004-07-23 2007-10-24 Emc公司 Storing data replicas remotely
CN102014152A (en) * 2010-10-18 2011-04-13 浪潮(北京)电子信息产业有限公司 Long-distance duplicating system and method
CN103617096A (en) * 2013-11-04 2014-03-05 华为技术有限公司 Storage data copying method, equipment and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1483164A (en) * 2000-12-21 2004-03-17 ���ܿ���ϵͳ���޹�˾ Restoring large capacity memory to previous state responding to processing information
CN101061467A (en) * 2004-07-23 2007-10-24 Emc公司 Storing data replicas remotely
US20070094467A1 (en) * 2005-10-20 2007-04-26 Yasuo Yamasaki Method for rolling back from snapshot with log
CN102014152A (en) * 2010-10-18 2011-04-13 浪潮(北京)电子信息产业有限公司 Long-distance duplicating system and method
CN103617096A (en) * 2013-11-04 2014-03-05 华为技术有限公司 Storage data copying method, equipment and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536852A (en) * 2014-12-31 2015-04-22 华为技术有限公司 Data recovery method and device
CN109522154A (en) * 2015-09-10 2019-03-26 华为技术有限公司 Data reconstruction method and relevant device and system
WO2017132790A1 (en) * 2016-02-01 2017-08-10 华为技术有限公司 Data recovery method and storage device
CN108351821A (en) * 2016-02-01 2018-07-31 华为技术有限公司 Data reconstruction method and storage device
CN108351821B (en) * 2016-02-01 2022-03-29 华为技术有限公司 Data recovery method and storage device
CN108664353A (en) * 2017-03-29 2018-10-16 中国移动通信集团四川有限公司 The method, apparatus and replica management server that data are restored
WO2020024772A1 (en) * 2018-08-03 2020-02-06 华为技术有限公司 Method and apparatus for querying data
US11579986B2 (en) 2018-08-03 2023-02-14 Huawei Cloud Computing Technologies Co., Ltd. Data query method and apparatus

Similar Documents

Publication Publication Date Title
US10795788B2 (en) Remote data replication method and system
CN103019888B (en) Backup method and device
US8689047B2 (en) Virtual disk replication using log files
US10055148B1 (en) Storing application data as an enhanced copy
CN103970585B (en) Create the method and device of virtual machine
US8285679B2 (en) Creating a buffer point-in-time copy relationship for a point-in-time copy function executed to create a point-in-time copy relationship
CN100498796C (en) Logic log generation method, database backup/ restoration method and system
US9165012B2 (en) Periodic file system checkpoint manager
US9069711B2 (en) Source cleaning cascaded volumes using write and background copy indicators
CN104166606A (en) File backup method and main storage device
US11269737B2 (en) Incrementally updating recovery map data for a memory system
US10884871B2 (en) Systems and methods for copying an operating source volume
CN103761190A (en) Data processing method and apparatus
US9471439B2 (en) Systems and methods for reducing load database time
CN104166605A (en) Data backup method and system based on incremental data files
CN110188068A (en) A kind of volume grade backup method and device guaranteeing file system data consistency
US9804926B1 (en) Cataloging file system-level changes to a source storage between image backups of the source storage
US9262290B2 (en) Flash copy for disaster recovery (DR) testing
CN106104515A (en) Utilize File system design and the fault recovery method of nonvolatile memory
CN109933461A (en) A kind of method and apparatus of data processing
US9430485B2 (en) Information processor and backup method
WO2017067397A1 (en) Data recovery method and device
US11093348B2 (en) Method, device and computer program product for recovering metadata
CN103729301A (en) Data processing method and device
CN105068760A (en) Data storage method, data storage apparatus and storage device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant