CN104360914A - Incremental snapshot method and device - Google Patents

Incremental snapshot method and device Download PDF

Info

Publication number
CN104360914A
CN104360914A CN201410568524.0A CN201410568524A CN104360914A CN 104360914 A CN104360914 A CN 104360914A CN 201410568524 A CN201410568524 A CN 201410568524A CN 104360914 A CN104360914 A CN 104360914A
Authority
CN
China
Prior art keywords
snapshot
cow
data
latest
written
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
CN201410568524.0A
Other languages
Chinese (zh)
Other versions
CN104360914B (en
Inventor
王佳
王倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410568524.0A priority Critical patent/CN104360914B/en
Publication of CN104360914A publication Critical patent/CN104360914A/en
Application granted granted Critical
Publication of CN104360914B publication Critical patent/CN104360914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention provides an incremental snapshot method and device. The method comprises the following steps: when a snapshot source volume needs to be subjected to data write operation, finding a latest created snapshot according to a snapshot linked list of the snapshot source volume to be written, confirming that COW mapping is stored in a copied COW volume during writing of the latest created snapshot, and writing data to be written into the corresponding sectors of the snapshot source volume; when the snapshot needs to be subjected to data read operation, judging whether the snapshot to be read has the COW mapping in the COW volume or not, and if so, reading the corresponding data to be read from the COW volume according to the COW mapping of the snapshot to be read; otherwise, searching the latest created snapshot associated with the snapshot to be read according to a snapshot linked list of the snapshot to be read, and reading the corresponding data to be read from the snapshot source volume according to the COW mapping of the latest created snapshot. According to the method, the storage space and cost are reduced, the risk of complicated storage management is lowered, and the storage management operation is convenient.

Description

Incremental snapshot method and apparatus
Technical field
The present invention relates to and store calamity for technical field, particularly relate to a kind of incremental snapshot method and apparatus.
Background technology
Along with the fast development of computer technology, digital information progressively replaces paper media's data, presents quick growth.Mass data has expedited the emergence of the development of cloud computing, greatly data and mass storage system (MSS), also more and more higher to the demand of memory device and storage application.Government's industry, banking system, electric power enterprise etc. have higher requirement to the security of data and business continuance, must provide online data protection.
Snapshot (Snapshot) is the effective ways that a kind of Online storage device prevents loss of data.A function of snapshot is to back up as required online data and to recover.Fast data recovery can be carried out, by the state of date restoring to certain pot life point when memory device generation application and trouble or file corruption.Another function of snapshot is to provide a data access channel for storing user, and when former data carry out application on site process, user can access snapshot data, and snapshot can also be utilized to carry out the work such as test.All storage systems, no matter senior middle school's low side, as long as be applied to on-line system, so snapshot just becomes an indispensable function.
Traditional snapping technique carries out single mapping and protection for the data mode of each storage resources time point, be convenient to snapshot directly recover, but because the snapshot of different time points does not associate, the redundant copy existed when creating multiple snapshot is more, on the one hand, make memory capacity become large, carrying cost is higher; On the other hand, when carrying out data modification to snapshot source book, corresponding multiple snapshots also need to carry out data modification, complicated operation.
In addition, traditional snapping technique is the snapshot for each time point, and the source data of each snapshot and the mapping relations of write data need to adopt independently rolls up storage.When snapshot number gets more and more, the problems such as the volume of needs also gets more and more, and this brings storage administration complexity undoubtedly, and carrying cost is large.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of incremental snapshot method and apparatus of shared volume, storage space and carrying cost can be reduced, facilitate storage administration.
In order to reach the object of the invention, the invention provides a kind of incremental snapshot method, comprise: when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon during Copy on write COW rolls up of creating the latest described in determining has COW mapping, by sector corresponding for data write snapshot source book to be written; When needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if had, the COW according to the described snapshot that continues maps, from COW volume reading correspondence treat read data; If no, according to the snapshot chained list of the described snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues, the COW according to the described snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
Further, the described snapshot chained list according to snapshot source book to be written, before searching the snapshot created the latest, also comprise: in described COW volume, set up snapshot chained list and corresponding exception Hash table in advance, wherein, in described snapshot chained list, the dependence between snapshot is represented by snap_ID, each snapshot, as head pointer, points to the exception Hash table of described snapshot.
Further, described determine described in create the latest impinge upon soon during Copy on write COW rolls up and have COW and map, by sector corresponding for data to be written write snapshot source book, comprising: determine corresponding block number according to the sector number of sector to be written in described snapshot source book; Judge whether described piece number corresponding blocks of data has COW to map at COW volume; If had, by the sector to be written of described data write snapshot source book to be written; If no, by the data copy of sector to be written in described snapshot source book in described piece number corresponding block, the COW setting up data to be written maps, and described COW is mapped write COW volume, by the sector to be written of described data write snapshot source book to be written.
Further, described judge described piece number corresponding blocks of data COW volume whether have COW to map, comprise: in the exception Hash table that the described snapshot created the latest points to, search described piece number and whether have corresponding blocks of data, if had, then represent that described piece number corresponding blocks of data has COW to map at COW volume, if do not had, then described piece number corresponding blocks of data does not have COW to map at COW volume.
Further, whether described judgement continues to impinge upon soon in COW volume has COW to map, comprise: determine corresponding block number according to the sector number of sector of continuing in snapshot, in the exception Hash table of the snapshot that continues, search described piece number and whether have corresponding blocks of data, if had, then represent that described piece number corresponding blocks of data has COW to map at COW volume, if no, then described piece number corresponding blocks of data does not have COW to map at COW volume.
Further, continue described in described basis the snapshot chained list of snapshot, search the snapshot created the latest associated with the described snapshot that continues, COW according to the described snapshot created the latest maps, read from snapshot source book and corresponding treat read data, comprising: at the described snapshot that continues according to the snapshot searching adjacent with the described snapshot that continues creation-time evening in chained list; Judge whether the snapshot found out is the snapshot created the latest; If so, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book; If not, the dependent snapshot of the snapshot that continues described in traversal, searches the snapshot created the latest associated with the described snapshot that continues.
Further, described method also comprises: when needs carry out deletion snapshot operation, and it is invalid to be set to by the snap_ID impinged upon soon in described snapshot chained list to be deleted, and is added to by described snap_ID in release chained list, deletes described snapshot to be deleted.
Further, the described snapshot to be deleted of described deletion, comprising: judge whether described snapshot to be deleted is the snapshot set up the earliest; If so, described snapshot to be deleted is deleted; If not, the data of described snapshot to be deleted are write in the creation-time adjacent with described snapshot to be deleted snapshot early, delete described snapshot to be deleted.
A kind of incremental snapshot device, comprise: write operation processing module, for when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon during Copy on write COW rolls up of creating the latest described in determining has COW mapping, by sector corresponding for data write snapshot source book to be written; Read operation processing module, for when needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if had, the COW according to the described snapshot that continues maps, from COW volume reading correspondence treat read data; If no, according to the snapshot chained list of the described snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues, the COW according to the described snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
Further, also comprise and module is set, for setting up snapshot chained list and corresponding exception Hash table in advance in described COW volume, wherein, in described snapshot chained list, the dependence between snapshot is represented by snap_ID, each snapshot, as head pointer, points to the exception Hash table of described snapshot.
Further, described write operation processing module, have COW for impinging upon soon during Copy on write COW rolls up of creating the latest described in determining to map, by in sector corresponding for data write snapshot source book to be written, be specially: described write operation processing module, specifically for determining corresponding block number according to the sector number of sector to be written in snapshot source book; Judge whether described piece number corresponding blocks of data has COW to map at COW volume; If had, by the sector to be written of described data write snapshot source book to be written; If no, by the data copy of sector to be written in described snapshot source book in described piece number corresponding block, the COW setting up data to be written maps, and described COW is mapped write COW volume, by the sector to be written of described data write snapshot source book to be written.
Further, described read operation processing module, for the snapshot chained list of the snapshot that continues described in basis, search the snapshot created the latest associated with the described snapshot that continues, COW according to the described snapshot created the latest maps, read from snapshot source book and corresponding treat read data, be specially: described read operation processing module, at the described snapshot that continues according to the snapshot searching adjacent with the described snapshot that continues creation-time evening in chained list; Judge whether the snapshot found out is the snapshot created the latest; If so, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book; If not, the dependent snapshot of the snapshot that continues described in traversal, searches the snapshot created the latest associated with the described snapshot that continues.
Further, also comprise: delete processing module, for when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in described snapshot chained list to be deleted, and is added to by described snap_ID in release chained list, deletes described snapshot to be deleted.
Further, described delete processing module, for deleting described snapshot to be deleted, is specially: described delete processing module, for judging whether described snapshot to be deleted is the snapshot set up the earliest; If so, described snapshot to be deleted is deleted; If not, the data of described snapshot to be deleted are write in the creation-time adjacent with described snapshot to be deleted snapshot early, delete described snapshot to be deleted.
Compared with prior art, the present invention includes: when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon during Copy on write COW rolls up of creating the latest described in determining has COW mapping, by sector corresponding for data write snapshot source book to be written; When needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if had, the COW according to the described snapshot that continues maps, from COW volume reading correspondence treat read data; If no, according to the snapshot chained list of the described snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues, the COW according to the described snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.The snapshot that the present invention is created by the different time points of same snapshot source book is associated, and decreases storage space and carrying cost, reduces the risk that storage administration complexity is brought, facilitates storage administration.
Accompanying drawing explanation
Fig. 1 is the framed structure schematic diagram of fast photographic system of the present invention.
Fig. 2 is the internal storage structure schematic diagram of incremental snapshot of the present invention.
Fig. 3 is the schematic flow sheet of incremental snapshot method of the present invention.
Fig. 4 is that the present invention carries out the schematic flow sheet of data writing operation to snapshot source book.
Fig. 5 is that the present invention carries out the schematic flow sheet of read data operation to snapshot.
Fig. 6 is that the present invention carries out the schematic flow sheet of deletion action to snapshot.
Fig. 7 is the structural representation of incremental snapshot device of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.By these exemplifying embodiments of enough detailed description, those skilled in the art are made to put into practice the present invention.Without departing from the spirit and scope in the present invention, can to implement to make logic, realize and other change.
Fig. 1 is the framed structure schematic diagram of fast photographic system of the present invention, as shown in Figure 1, snapshot data is stored in high in the clouds, there is multiple snapshot relation in fast photographic system, in a snapshot relation, disk volume composition physically comprises: snapshot source book, Copy on write (COW, Copy On Write) roll up and snapshot, three is separate, wherein
Snapshot source book, sets when creating snapshot relation by user, for depositing data when user writes dish;
Snapshot is a logical volume, for depositing the data of the snapshot source book needing protection, to user access;
COW rolls up, the exception produced when the multiple snapshots for recording same snapshot source book perform COW operation, and this exception refers to the mapping relations between the data on snapshot source book and the data on snapshot, and the data content of COW volume is shared snapshot source book and snapshot.
Snapshot source book can corresponding multiple snapshot, and the corresponding COW volume of each snapshot source book, the read-write operation of snapshot jointly can complete on snapshot source book and COW volume.
Fig. 2 is the internal storage structure schematic diagram of incremental snapshot of the present invention, and as shown in Figure 2, the relatively traditional snapshot of incremental snapshot, add the contact of different time points snapshot state, the relation between incremental snapshot is represented by snapshot chained list.
Particularly, according to the time point of snapshot creation, can by early forming snapshot chained list to evening, because generally can operate more late snapshot, during traversal chained list, from snapshot the latest, like this by early making traversal chained list can reach very soon to arrangement in evening, can certainly other setting order, this is not limited.
Each snapshot, as head pointer, points to the exception Hash table of this snapshot.Represent dependence by snap_ID between snapshot, little compared with snapshot snap_ID early, the snapshot comparatively early created depends on the snapshot of more late establishment.
Fig. 3 is the schematic flow sheet of incremental snapshot method of the present invention, as shown in Figure 3, specifically can comprise:
Step 31, when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon of determining that this creates the latest has COW in COW volume and maps, by sector corresponding for data write snapshot source book to be written.
In this step, the idiographic flow that snapshot source book carries out data writing operation can as shown in Figure 4, be comprised:
Step 311, when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, searches the snapshot created the latest.
Particularly, need in COW volume, to set up snapshot chained list and corresponding exception Hash table in advance, in snapshot chained list, the dependence between snapshot is represented by snap_ID, in an embodiment, arranged by the order early to evening according to the snapshot creation time, little compared with the snapshot snap_ID early created, the snapshot comparatively early created depends on the snapshot of more late establishment.
Because snapshot in incremental snapshot comparatively early depends on more late snapshot, so need to search the snapshot created the latest.After finding the snapshot created the latest, the snap_ID impinged upon soon in snapshot chained list created the latest found can be labeled as snap_find.
Step 312, determines corresponding block (chunk) number according to the sector number of sector to be written in snapshot source book.
Particularly, in the present embodiment, block number=(sector number × sector-size)/block size.
Step 313, judges whether this block number corresponding blocks of data has COW to map at COW volume, if not, enters step 314; If so, step 315 is entered.
Whether particularly, in the exception Hash table that snap_find points to, searching this block number has corresponding blocks of data, if had, then represent that this block number corresponding blocks of data has COW to map at COW volume, if do not had, then this block number corresponding blocks of data does not have COW to map at COW volume.
Step 314, by the data copy of sector to be written in snapshot source book in this block number corresponding block, the COW setting up data to be written maps, and this COW is mapped write COW volume, then enters 315.
Step 315, by the sector to be written of data write snapshot source book to be written.
Step 32, when needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if so, the COW according to the snapshot that continues maps, from COW volume reading correspondence treat read data; If not, according to the snapshot chained list of the snapshot that continues, search the snapshot created the latest that the snapshot that to continue with this associates, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
In this step, the idiographic flow that snapshot carries out read data operation can as shown in Figure 5, be comprised:
Step 321, when needs carry out read data operation to snapshot, determines corresponding block number according to the sector number of sector of continuing in snapshot.
Step 322, judges whether this block number corresponding blocks of data has COW to map at COW volume, if so, enters step 323; If not, step 324 is entered.
Whether particularly, in the exception Hash table of the snapshot that continues, searching this block number has corresponding blocks of data, if had, then represent that this block number corresponding blocks of data has COW to map at COW volume, if do not had, then this block number corresponding blocks of data does not have COW to map at COW volume.
Step 323, the COW according to the snapshot that continues maps, and reads corresponding treat read data from COW volume.
Step 324, at the snapshot that continues according to the snapshot searching the snapshot that to continue with this adjacent creation-time evening in chained list.
Step 325, judges whether the snapshot found out is the snapshot created the latest, if so, enters step 326; If not, return step 322, namely travel through the dependent snapshot of this snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues.
Step 326, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
Step 33, when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in snapshot chained list to be deleted, is added to by this snap_ID in release chained list, deletes this snapshot to be deleted.
The idiographic flow carrying out deleting snapshot operation in this step can as shown in Figure 6, comprise:
Step 331, when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in snapshot chained list to be deleted, is added to by this snap_ID in release chained list.
Step 332, judges whether this snapshot to be deleted is the snapshot set up the earliest, if not, enters step 333; If so, step 334 is entered.
The data of this snapshot to be deleted are write in the creation-time adjacent with this snapshot to be deleted snapshot early, then enter 334 by step 333.
Step 334, deletes this snapshot to be deleted.
The snapshot that the present invention is created by the different time points of same snapshot source book is associated, when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon of determining that this creates the latest has COW in COW volume and maps, by sector corresponding for data write snapshot source book to be written; When needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if so, the COW according to the snapshot that continues maps, from COW volume reading correspondence treat read data; If not, according to the snapshot chained list of the snapshot that continues, search the snapshot created the latest that the snapshot that to continue with this associates, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.So, decrease storage space and carrying cost, reduce the risk that storage administration complexity is brought, facilitate storage administration.
Fig. 6 is the structural representation of incremental snapshot device of the present invention, as shown in Figure 6, specifically can comprise:
Module is set, for setting up snapshot chained list and corresponding exception Hash table in advance in COW volume, in snapshot chained list, wherein, in snapshot chained list, represent the dependence between snapshot by snap_ID, each snapshot, as head pointer, points to the exception Hash table of described snapshot.
Write operation processing module, for when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon of determining that this creates the latest has COW in COW volume and maps, by sector corresponding for data write snapshot source book to be written;
Particularly, write operation processing module, for when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, searches the snapshot created the latest; Corresponding block number is determined according to the sector number of sector to be written in snapshot source book; Judge whether this block number corresponding blocks of data has COW to map at COW volume; If so, by the sector to be written of data write snapshot source book to be written; If not, by the data copy of sector to be written in snapshot source book in this block number corresponding block, the COW setting up data to be written maps, and this COW is mapped write COW volume, by the sector to be written of data write snapshot source book to be written.
Read operation processing module, for when needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if so, the COW according to the snapshot that continues maps, from COW volume reading correspondence treat read data; If not, according to the snapshot chained list of the snapshot that continues, search the snapshot created the latest that the snapshot that to continue with this associates, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book;
Particularly, read operation processing module, for when needs carry out read data operation to snapshot, determines corresponding block number according to the sector number of sector of continuing in snapshot; Judge whether this block number corresponding blocks of data has COW to map at COW volume, if so, the COW according to the snapshot that continues maps, and reads corresponding treat read data from COW volume, if not, at the snapshot that continues according to the snapshot searching the snapshot that to continue with this adjacent creation-time evening in chained list; Judge whether the snapshot that finds out is the snapshot created the latest, and if so, the COW according to the snapshot created the latest maps, that reads correspondence from snapshot source book treats read data.
Delete processing module, for when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in snapshot chained list to be deleted, is added to by this snap_ID in release chained list, deletes this snapshot to be deleted.
Particularly, delete processing module, for when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in snapshot chained list to be deleted, is added to by this snap_ID in release chained list; Judge whether this snapshot to be deleted is the snapshot set up the earliest, if so, delete this snapshot to be deleted, if not, the data of this snapshot to be deleted are write in the creation-time adjacent with this snapshot to be deleted snapshot early, delete this snapshot to be deleted.
Incremental snapshot device be with incremental snapshot method corresponding, therefore, details that what incremental snapshot device was concrete realize can referring to incremental snapshot method, be not repeated herein.
The snapshot that the present invention is created by the different time points of same snapshot source book is associated, and decreases storage space and carrying cost, reduces the risk that storage administration complexity is brought, facilitates storage administration.
Be to be understood that, although this instructions is described according to embodiment, but not each embodiment only comprises an independently technical scheme, this narrating mode of instructions is only for clarity sake, those skilled in the art should by instructions integrally, technical scheme in each embodiment also through appropriately combined, can form other embodiments that it will be appreciated by those skilled in the art that.

Claims (14)

1. an incremental snapshot method, is characterized in that, comprising:
When needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon during Copy on write COW rolls up of creating the latest described in determining has COW mapping, by sector corresponding for data write snapshot source book to be written;
When needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if had, the COW according to the described snapshot that continues maps, from COW volume reading correspondence treat read data; If no, according to the snapshot chained list of the described snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues, the COW according to the described snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
2. incremental snapshot method according to claim 1, is characterized in that, the described snapshot chained list according to snapshot source book to be written, before searching the snapshot created the latest, also comprises:
In described COW volume, set up snapshot chained list and corresponding exception Hash table in advance, wherein, in described snapshot chained list, represent the dependence between snapshot by snap_ID, each snapshot, as head pointer, points to the exception Hash table of described snapshot.
3. incremental snapshot method according to claim 1 and 2, is characterized in that, described determine described in create the latest impinge upon soon during Copy on write COW rolls up and have COW and map, by sector corresponding for data to be written write snapshot source book, comprising:
Corresponding block number is determined according to the sector number of sector to be written in described snapshot source book;
Judge whether described piece number corresponding blocks of data has COW to map at COW volume;
If had, by the sector to be written of described data write snapshot source book to be written;
If no, by the data copy of sector to be written in described snapshot source book in described piece number corresponding block, the COW setting up data to be written maps, and described COW is mapped write COW volume, by the sector to be written of described data write snapshot source book to be written.
4. incremental snapshot method according to claim 3, is characterized in that, described judge described piece number corresponding blocks of data COW volume whether have COW to map, comprising:
In the exception Hash table that the described snapshot created the latest points to, search described piece number and whether have corresponding blocks of data, if had, then represent that described piece number corresponding blocks of data has COW to map at COW volume, if no, then described piece number corresponding blocks of data does not have COW to map at COW volume.
5. incremental snapshot method according to claim 1, is characterized in that, whether described judgement continues to impinge upon soon in COW volume has COW to map, and comprising:
Corresponding block number is determined according to the sector number of sector of continuing in snapshot, in the exception Hash table of the snapshot that continues, search described piece number and whether have corresponding blocks of data, if had, then represent that described piece number corresponding blocks of data has COW to map at COW volume, if no, then described piece number corresponding blocks of data does not have COW to map at COW volume.
6. incremental snapshot method according to claim 1 or 5, it is characterized in that, continue described in described basis the snapshot chained list of snapshot, search the snapshot created the latest associated with the described snapshot that continues, COW according to the described snapshot created the latest maps, read from snapshot source book and corresponding treat read data, comprising:
At the described snapshot that continues according to the snapshot searching adjacent with the described snapshot that continues creation-time evening in chained list;
Judge whether the snapshot found out is the snapshot created the latest;
If so, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book;
If not, the dependent snapshot of the snapshot that continues described in traversal, searches the snapshot created the latest associated with the described snapshot that continues.
7. incremental snapshot method according to claim 2, it is characterized in that, described method also comprises: when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in described snapshot chained list to be deleted, and described snap_ID is added in release chained list, delete described snapshot to be deleted.
8. incremental snapshot method according to claim 7, is characterized in that, the described snapshot to be deleted of described deletion, comprising:
Judge whether described snapshot to be deleted is the snapshot set up the earliest;
If so, described snapshot to be deleted is deleted;
If not, the data of described snapshot to be deleted are write in the creation-time adjacent with described snapshot to be deleted snapshot early, delete described snapshot to be deleted.
9. an incremental snapshot device, is characterized in that, comprising:
Write operation processing module, for when needs carry out data writing operation to snapshot source book, according to the snapshot chained list of snapshot source book to be written, find the snapshot created the latest, impinging upon soon during Copy on write COW rolls up of creating the latest described in determining has COW mapping, by sector corresponding for data write snapshot source book to be written;
Read operation processing module, for when needs to snapshot carry out read data operation time, judge continue impinge upon soon COW volume in whether have COW to map, if had, the COW according to the described snapshot that continues maps, from COW volume reading correspondence treat read data; If no, according to the snapshot chained list of the described snapshot that continues, search the snapshot created the latest associated with the described snapshot that continues, the COW according to the described snapshot created the latest maps, and reads corresponding treat read data from snapshot source book.
10. incremental snapshot device according to claim 8, it is characterized in that, also comprise and module is set, for setting up snapshot chained list and corresponding exception Hash table in advance in described COW volume, wherein, in described snapshot chained list, the dependence between snapshot is represented by snap_ID, each snapshot, as head pointer, points to the exception Hash table of described snapshot.
11. incremental snapshot devices according to claim 8 or claim 9, it is characterized in that, described write operation processing module having COW for impinging upon soon during Copy on write COW rolls up of creating the latest described in determining and map, by in sector corresponding for data write snapshot source book to be written, be specially:
Described write operation processing module, specifically for determining corresponding block number according to the sector number of sector to be written in snapshot source book; Judge whether described piece number corresponding blocks of data has COW to map at COW volume; If had, by the sector to be written of described data write snapshot source book to be written; If no, by the data copy of sector to be written in described snapshot source book in described piece number corresponding block, the COW setting up data to be written maps, and described COW is mapped write COW volume, by the sector to be written of described data write snapshot source book to be written.
12. incremental snapshot devices according to claim 9, it is characterized in that, described read operation processing module, for the snapshot chained list of the snapshot that continues described in basis, search the snapshot created the latest associated with the described snapshot that continues, COW according to the described snapshot created the latest maps, and reads and corresponding treats read data, be specially from snapshot source book:
Described read operation processing module, at the described snapshot that continues according to the snapshot searching adjacent with the described snapshot that continues creation-time evening in chained list; Judge whether the snapshot found out is the snapshot created the latest; If so, the COW according to the snapshot created the latest maps, and reads corresponding treat read data from snapshot source book; If not, the dependent snapshot of the snapshot that continues described in traversal, searches the snapshot created the latest associated with the described snapshot that continues.
13. incremental snapshot devices according to claim 9, it is characterized in that, also comprise: delete processing module, for when needs carry out deletion snapshot operation, it is invalid to be set to by the snap_ID impinged upon soon in described snapshot chained list to be deleted, and described snap_ID is added in release chained list, delete described snapshot to be deleted.
14. incremental snapshot devices according to claim 13, is characterized in that, described delete processing module, for deleting described snapshot to be deleted, are specially:
Described delete processing module, for judging whether described snapshot to be deleted is the snapshot set up the earliest; If so, described snapshot to be deleted is deleted; If not, the data of described snapshot to be deleted are write in the creation-time adjacent with described snapshot to be deleted snapshot early, delete described snapshot to be deleted.
CN201410568524.0A 2014-10-22 2014-10-22 Incremental snapshot method and apparatus Active CN104360914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410568524.0A CN104360914B (en) 2014-10-22 2014-10-22 Incremental snapshot method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410568524.0A CN104360914B (en) 2014-10-22 2014-10-22 Incremental snapshot method and apparatus

Publications (2)

Publication Number Publication Date
CN104360914A true CN104360914A (en) 2015-02-18
CN104360914B CN104360914B (en) 2017-10-13

Family

ID=52528178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410568524.0A Active CN104360914B (en) 2014-10-22 2014-10-22 Incremental snapshot method and apparatus

Country Status (1)

Country Link
CN (1) CN104360914B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017054636A1 (en) * 2015-09-30 2017-04-06 中兴通讯股份有限公司 Method and apparatus for processing virtual machine snapshots
CN106569738A (en) * 2016-09-30 2017-04-19 华为技术有限公司 Method and apparatus for deleting cascading snapshot
CN107179964A (en) * 2016-03-11 2017-09-19 中兴通讯股份有限公司 The reading/writing method and device of snapshot
CN107577558A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of cloud storage
CN109213636A (en) * 2018-09-25 2019-01-15 郑州云海信息技术有限公司 A kind of storage snapshot creation method, device, equipment and storage medium
CN109324929A (en) * 2018-09-17 2019-02-12 郑州云海信息技术有限公司 A kind of snapshot creation method, device, equipment and readable storage medium storing program for executing
CN109598156A (en) * 2018-11-19 2019-04-09 杭州信核数据科技股份有限公司 Engine snapshot stream method is redirected when one kind is write
CN110413444A (en) * 2018-04-27 2019-11-05 伊姆西Ip控股有限责任公司 Realize the snapshot collection of the consistency group of storage volume
CN110968645A (en) * 2019-12-03 2020-04-07 携程旅游网络技术(上海)有限公司 Data read-write method, system, equipment and storage medium of distributed system
CN111158593A (en) * 2019-12-26 2020-05-15 浪潮(北京)电子信息产业有限公司 Multi-snapshot dependency relationship processing method and device and related components

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658168A (en) * 2004-02-19 2005-08-24 华为技术有限公司 Method for writing data on source film in pistolgraph process
US20060107085A1 (en) * 2004-11-02 2006-05-18 Rodger Daniels Recovery operations in storage networks
CN101183383A (en) * 2007-12-17 2008-05-21 中国科学院计算技术研究所 Snapshot system and method of use thereof
CN101777016A (en) * 2010-02-08 2010-07-14 北京同有飞骥科技有限公司 Snapshot storage and data recovery method of continuous data protection system
CN102968381A (en) * 2012-11-19 2013-03-13 浪潮电子信息产业股份有限公司 Method for improving snapshot performance by using solid state disk

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1658168A (en) * 2004-02-19 2005-08-24 华为技术有限公司 Method for writing data on source film in pistolgraph process
US20060107085A1 (en) * 2004-11-02 2006-05-18 Rodger Daniels Recovery operations in storage networks
CN101183383A (en) * 2007-12-17 2008-05-21 中国科学院计算技术研究所 Snapshot system and method of use thereof
CN101777016A (en) * 2010-02-08 2010-07-14 北京同有飞骥科技有限公司 Snapshot storage and data recovery method of continuous data protection system
CN102968381A (en) * 2012-11-19 2013-03-13 浪潮电子信息产业股份有限公司 Method for improving snapshot performance by using solid state disk

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017054636A1 (en) * 2015-09-30 2017-04-06 中兴通讯股份有限公司 Method and apparatus for processing virtual machine snapshots
CN107179964A (en) * 2016-03-11 2017-09-19 中兴通讯股份有限公司 The reading/writing method and device of snapshot
CN106569738A (en) * 2016-09-30 2017-04-19 华为技术有限公司 Method and apparatus for deleting cascading snapshot
CN106569738B (en) * 2016-09-30 2019-11-29 华为技术有限公司 A kind of method and device for deleting cascade snapshot
US11093162B2 (en) 2016-09-30 2021-08-17 Huawei Technologies Co., Ltd. Method and apparatus for deleting cascaded snapshot
CN107577558B (en) * 2017-08-31 2021-03-09 苏州浪潮智能科技有限公司 Cloud storage snapshot method and device
CN107577558A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of cloud storage
CN110413444A (en) * 2018-04-27 2019-11-05 伊姆西Ip控股有限责任公司 Realize the snapshot collection of the consistency group of storage volume
CN109324929A (en) * 2018-09-17 2019-02-12 郑州云海信息技术有限公司 A kind of snapshot creation method, device, equipment and readable storage medium storing program for executing
CN109324929B (en) * 2018-09-17 2021-11-09 郑州云海信息技术有限公司 Snapshot creating method, device and equipment and readable storage medium
CN109213636A (en) * 2018-09-25 2019-01-15 郑州云海信息技术有限公司 A kind of storage snapshot creation method, device, equipment and storage medium
CN109598156A (en) * 2018-11-19 2019-04-09 杭州信核数据科技股份有限公司 Engine snapshot stream method is redirected when one kind is write
CN110968645A (en) * 2019-12-03 2020-04-07 携程旅游网络技术(上海)有限公司 Data read-write method, system, equipment and storage medium of distributed system
CN111158593A (en) * 2019-12-26 2020-05-15 浪潮(北京)电子信息产业有限公司 Multi-snapshot dependency relationship processing method and device and related components
CN111158593B (en) * 2019-12-26 2022-07-08 浪潮(北京)电子信息产业有限公司 Multi-snapshot dependency relationship processing method and device and related components

Also Published As

Publication number Publication date
CN104360914B (en) 2017-10-13

Similar Documents

Publication Publication Date Title
CN104360914A (en) Incremental snapshot method and device
US9910620B1 (en) Method and system for leveraging secondary storage for primary storage snapshots
CN101777017B (en) Rapid recovery method of continuous data protection system
US9483511B2 (en) Stubbing systems and methods in a data replication environment
US8352422B2 (en) Data restore systems and methods in a replication environment
US8725698B2 (en) Stub file prioritization in a data replication system
CN101840362B (en) Method and device for achieving copy-on-write snapshot
US9411821B1 (en) Block-based backups for sub-file modifications
US10649897B2 (en) Access request processing method and apparatus, and computer device
US10108356B1 (en) Determining data to store in retention storage
US9122692B1 (en) Systems and methods for reducing file-system fragmentation when restoring block-level backups utilizing an identification module, an optimization module, and a restore module
CN102722536B (en) Method and device for realizing snapshot based on distributed file system
EP2879040B1 (en) Data storage method, data storage apparatus, and storage device
US8924353B1 (en) Systems and methods for copying database files
CN103049349B (en) Based on Snapshot Method and the system of Bedding storage
CN109144416B (en) Method and device for querying data
CN102591790B (en) Data based on solid state hard disc store snapshot implementing method and solid state hard disc
US8572338B1 (en) Systems and methods for creating space-saving snapshots
CN104077380A (en) Method and device for deleting duplicated data and system
US9798761B2 (en) Apparatus and method for fsync system call processing using ordered mode journaling with file unit
CN103034592A (en) Data processing method and device
CN104461773A (en) Backup deduplication method of virtual machine
US8972351B1 (en) Systems and methods for creating selective snapshots
US8595271B1 (en) Systems and methods for performing file system checks
US7865472B1 (en) Methods and systems for restoring file systems

Legal Events

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