CN105988723A - Snapshot processing method and device - Google Patents
Snapshot processing method and device Download PDFInfo
- Publication number
- CN105988723A CN105988723A CN201510075327.XA CN201510075327A CN105988723A CN 105988723 A CN105988723 A CN 105988723A CN 201510075327 A CN201510075327 A CN 201510075327A CN 105988723 A CN105988723 A CN 105988723A
- Authority
- CN
- China
- Prior art keywords
- address
- source book
- volume
- data
- snapshot
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a snapshot processing method and device, and relates to the technical field of disk arrays. The method comprises the following steps: establishing a snapshot volume which contains a resource volume, a modification record bitmap, a modification address mapping table and a snapshot mapping table; and in a source volume writing period, writing corresponding data in a source volume into the resource volume by utilizing the modification record bitmap, the modification address mapping table and the snapshot mapping table in the snapshot volume, wherein the modification record bitmap is used for recording modification condition of each data block in the source volume after the snapshot volume is established, the modification address mapping table is used for recording the address of the source volume, the storage address of each data block of snapshot at the time point, and data generated during the snapshot volume writing period. According to the snapshot processing method and device, the influence, caused by the snapshot process, on the IO writing of a host is decreased, and the snapshot processing system and resource volume recovery efficiency is improved.
Description
Technical field
The present invention relates to disk array technology, particularly to a kind of snap processing method and device.
Background technology
In fast photographic system, the logical volume being written and read is referred to as source book, it is achieved the auxiliary logic volume that snapshot increases
Being referred to as resource volume, differential DNA replication is to set up in snapshot conveniently mode, and differential DNA replication includes two kinds of methods,
Copy on write (Copy-on-Write) and redirection write (Redirect-on-Write).Copy on write method
When being to receive write operation every time, first copy the data being capped in source book to resource volume, then data are write
To source book;When redirection write method is to receive write operation every time, directly write data in resource volume.Fast at this
Lighting system, the unit one processing data is the data of stripe size, referred to as one data block chunk.
When reading snapshot data in the snapshot using Copy on write method to set up, if data block is not modified,
Directly read from source book, otherwise read from snapped volume;Source is read using redirection to write in the snapshot of foundation
During data, if data are not modified, directly read from source book, otherwise read from snapped volume.Often read
Take a data block to be accomplished by judging once whether this data block is modified, have influence on the property reading snapped volume data
Energy.When using both approaches to set up snapshot, data writing operation is similar with reading the method for data in snapped volume,
Illustrate as a example by Copy on write method below.
Create snapshot and generate snapshot as it is shown in figure 1, create snapshot and generate the motion flow after snapshot such as
Under:
In the T0 moment, there are source book V1, resource volume R1, create snapshot S0, produce address mapping table F0 of S0,
This part of table is empty in the T0 moment.
In the T1 moment, have and write IO (Logical Block Address, patrols by the LBA of source book chunk 0 correspondence
Volume block address) A0 on address is updated to A1, and system first checks for all address mapping table existed
In not for the map entry of this LBA address of source book, find that F0 does not has, so Copy on write A0 is to resource
Volume R1, then at F0 more new mappings item (0,0), the meaning is the data mesh of the chunk 0 in source book T0 moment
Before be saved in chunk 0 position of resource volume.Finally A1 is normally written source book chunk 0.
The T2 moment creates snapshot S2, creates address blank mapping table F2.
Being carved with during T3 and write IO the A1 on source book chunk 0 address is updated to A3, system first checks for be owned
Not for the map entry of source book chunk 0 address in the address mapping table existed, find that F2 does not has,
So Copy on write A1 is to resource volume R1, writing new entry (0,1) at F2, the meaning is the chunk in source book T2 moment
The data of 0 are saved in chunk 1 position of resource volume at present.Finally A3 is write source book.
In the T4 moment, having and write IO the D0 on source book chunk 3 address is updated to D4, system first checks for institute
Have in the address mapping table existed the map entry not for source book chunk 3 address, find F0 and
F2 does not has, so Copy on write D0 is to resource volume R1, then in F0 and F2 simultaneously more new mappings item (3,
2), D4 is write source book.
In the T5 moment, having and write IO the D4 on source book chunk 3 address is updated to D5, system first checks for institute
Have in the address mapping table existed the map entry not for source book chunk 3 address, find F0 and
F2 has, so not carrying out Copy on write, directly D5 is write source book.
In sum, traditional method is when IO write by main frame, it may be judged whether need Copy on write, needs first to examine
Look into all address mapping table existed, this metadata requiring to read all snapshots, be equivalent to main frame
Write IO and add a read latency.When newly written IO does not the most map in all snapshots, need to revise institute
Some snapmap tables, first read all snapmap tables and write all mapping tables again, increase extra to main frame IO
Time delay;
Delete the motion flow of snapshot.
Deleting snapshot S0, after system receives request, the first F0 address of the corresponding S0 snapshot of scanning maps
Table, and scan the mapping table of other all snapshots, find out only F0 exist and in other snapmap table the most not
The entry existed, is labeled as the free time, when all entries of F0 all scan and processed it on resource volume bitmap
After, delete whole F0.
Existing method, when deleting snapshot, needs scanning to be deleted the mapping table of snapshot and other all snapshots,
Find out the block of deleted snapshot exclusive resource volume, be i.e. only deleted the snapmap block of resource volume, other institute
Having snapshot not take this block, the block meeting this condition just can be recovered, this process need to read all soon
According to mapping table, add and delete the time delay that flow process and resource volume reclaim.
Existing method deletes certain snapshot, travels through snapshot bitmap, for for 1 position, the money of this block is set
Source book bitmap was 0 (representing this block resource reclaim).Existing all snapshot bitmaps must be traveled through, have other snapshot
Bitmap the most then can not reclaim, and can produce the read request that all snapshot positions map, affects systematic function and take slow
Deposit space.
Said method has a few place to have a strong impact on snapshot efficiency and systematic function, and one is that main frame is when writing IO, it is judged that be
No needing Copy on write, need to first check for all address mapping table existed, this requires to read all
The metadata of snapshot, is equivalent to write IO to main frame and adds a read latency.Two be delete snapshot time, need
Scanning is deleted the mapping table of snapshot and other all snapshots, adds and deletes flow process and time resource volume reclaims
Prolong.Three is when the IO that main frame is newly written does not has entry in mapping table in all snapshots, needs to revise institute
There is the mapping table of snapshot, write again after first reading all snapmap tables and updating, increase volume to main frame IO
Outer time delay.
Summary of the invention
It is an object of the invention to provide a kind of snap processing method and device, solve serious shadow in prior art
Ring snapshot efficiency and the problem of systematic function.
According to an aspect of the invention, it is provided a kind of snap processing method, comprise the following steps:
Create and comprise resource volume, amendment record bitmap, modified address mapping table and the snapped volume of snapmap table;
During writing source book, utilize amendment record bitmap, modified address mapping table and the snapshot in described snapped volume
Mapping table, is written to the corresponding data in source book in described resource volume;
Wherein, described amendment record bitmap is for recording after described snapped volume is set up repairing of each data block in source book
Change situation;Described modified address mapping table is for recording the address and this region legacy data being modified region in source book
The address being stored in resource volume;Described snapmap table is used for recording source book address and this time point snapshot is every
The address that individual data block is deposited, and the data produced when snapped volume write in record.
Preferably, also include:
During reading snapshot, utilize the snapmap table in described snapped volume and amendment record bitmap, from described money
Source book and source book read corresponding data.
Preferably, also include:
During deleting snapshot, utilize the snapmap table in described snapped volume, delete described modified address and map
Table.
Preferably, the described amendment record bitmap, modified address mapping table and the snapshot that utilize in described snapped volume
Mapping table, includes the step that the corresponding data in source book is written in described resource volume:
The record being modified about data block to be covered in source book according to amendment record bitmap, writes new data
Enter in the region that source book data block to be covered is corresponding, and in the mapping table of described modified address, record ground, described region
Location and this region legacy data are stored in the mapping relations of address in resource volume, record in described snapmap table
Described regional address and this region legacy data are stored in mapping relations and the resource volume number of address in resource volume
Global index according to amendment;
When described modified address mapping table exists the map entry of data block address to be covered in source book, according to
The record that amendment record bitmap is not modified about data block to be covered in source book, by described data block to be covered
Legacy data copy in resource volume relevant position, and described amendment record bitmap in by described data to be covered
Block is recorded as being modified.
Preferably, the described amendment record bitmap, modified address mapping table and the snapshot that utilize in described snapped volume
Mapping table, also includes the step that the corresponding data in source book is written in described resource volume:
When described modified address mapping table does not exist the map entry of data block address to be covered in source book, root
The record not being modified about data block to be covered in source book according to amendment record bitmap, by described data block to be covered
In legacy data copy in resource volume relevant position, and copy resource volume relevant position to described legacy data
Record substitute the record of data block to be covered described in described amendment record bitmap.
Preferably, described utilize the snapmap table in described snapped volume and amendment record bitmap, from described money
The step reading corresponding data in source book and source book includes:
According to described snapmap table, determine that read data address and this source book legacy data in source book are protected
There is address in resource volume;
Determined by according to, in source book, address and this source book legacy data are stored in address in resource volume, from described
Resource volume and source book read corresponding data.
Preferably, described utilize the snapmap table in described snapped volume and amendment record bitmap, from described money
The step reading corresponding data in source book and source book also includes:
According to the labelling of described amendment record bitmap, determine whether read data did Copy on write;
When determining that read data did Copy on write, then from described resource volume, read corresponding data;
When determining that read data did not did Copy on write, then from described source book, read corresponding data.
Preferably, the described snapmap table utilized in described snapped volume, delete described modified address mapping table
Step include:
The described source book address and the source book legacy data that utilize record in described snapmap table are stored in resource volume
The mapping relations of middle address, delete the mapping relations of source book and resource volume;
According to the mapping relations of the source book deleted Yu resource volume, delete snapped volume, and reclaim deleted snapped volume
Resource space.
Preferably, the described described source book address utilizing record in described snapmap table and source book legacy data quilt
Being saved in the mapping relations of address in resource volume, deletion source book includes with the step of the mapping relations of resource volume:
Utilize the global index of the described resource volume data modification of record in described snapmap table, it may be judged whether need
Travel through other described modified address mapping table;
When judging to need to travel through other described modified address mapping table, reflect by scanning other described modified address
Entry present in firing table, the entry that labelling is different from entry in described snapmap table in described resource volume,
And utilize the described source book address of record in described snapmap table and source book legacy data to be stored in resource volume
The mapping relations of address, delete the mapping relations of source book and resource volume;
When judging to need not travel through other described modified address mapping table, utilize record in described snapmap table
Described source book address and source book legacy data be stored in the mapping relations of address in resource volume, delete source book and money
The mapping relations of source book.
According to a further aspect in the invention, it is provided that a kind of snapshot processing means, including:
Create snapped volume module, for establishment comprise resource volume, amendment record bitmap, modified address mapping table and
The snapped volume of snapmap table;
Write snapshot module, for during writing snapshot, utilize the amendment record bitmap in described snapped volume, amendment
Address mapping table and snapmap table, be written to the corresponding data in source book in described resource volume;
Wherein, described amendment record bitmap is for recording after described snapped volume is set up repairing of each data block in source book
Change situation;Described modified address mapping table is for recording the address and this region legacy data being modified region in source book
The address being stored in resource volume;Described snapmap table is used for recording source book address and this time point snapshot is every
The address that individual data block is deposited, and the data produced when snapped volume write in record.
Compared with prior art, the beneficial effects of the present invention is:
The present invention improves the system that snapshot processes, and reduces snapshot flow process and main frame is write the impact of IO, and carry
The efficiency that high resource volume reclaims.
Accompanying drawing explanation
Fig. 1 is the establishment snapshot that prior art provides and the schematic diagram generating snapshot;
Fig. 2 is a kind of snap processing method flow chart that the embodiment of the present invention provides;
Fig. 3 is a kind of snapshot processing means schematic diagram that the embodiment of the present invention provides;
Fig. 4 is the composition schematic diagram of the snapshot time point snapshot data block that the embodiment of the present invention provides;
Fig. 5 is the snapped volume logical structure schematic diagram that the embodiment of the present invention provides;
Fig. 6 be the embodiment of the present invention provide write snapshot flow chart;
Fig. 7 is the first schematic diagram writing snapshot that the embodiment of the present invention provides;
Fig. 8 is the second schematic diagram writing snapshot that the embodiment of the present invention provides;
Fig. 9 is the reading snapshot flow chart that the embodiment of the present invention provides;
Figure 10 is the deletion snapshot flow chart that the embodiment of the present invention provides;
Figure 11 is the schematic diagram deleting snapshot that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, it will be appreciated that described below
Preferred embodiment be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Fig. 2 shows a kind of snap processing method flow chart that the embodiment of the present invention provides, as in figure 2 it is shown, bag
Include following steps:
Step S201: create and comprise resource volume, amendment record bitmap, modified address mapping table and snapmap
The snapped volume of table;
Step S202: during writing source book, utilizes the amendment record bitmap in described snapped volume, modified address
Mapping table and snapmap table, be written to the corresponding data in source book in described resource volume;
Wherein, described amendment record bitmap is for recording after described snapped volume is set up repairing of each data block in source book
Change situation;Described modified address mapping table is for recording the address and this region legacy data being modified region in source book
The address being stored in resource volume;Described snapmap table is used for recording source book address and this time point snapshot is every
The address that individual data block is deposited, and the data produced when snapped volume write in record.
Present invention additionally comprises: during reading snapshot, utilize the snapmap table in described snapped volume and amendment record
Bitmap, reads corresponding data from described resource volume and source book.
Present invention additionally comprises: during deleting snapshot, utilize the snapmap table in described snapped volume, delete institute
State modified address mapping table.
Specifically, described the amendment record bitmap in described snapped volume, modified address mapping table and fast are utilized
According to mapping table, the step that the corresponding data in source book is written in described resource volume is included: according to amendment record
The record that bitmap has been modified about data block to be covered in source book, writes new data into source book data to be covered
In the region that block is corresponding, and in the mapping table of described modified address, record described regional address and this region legacy data
It is stored in the mapping relations of address in resource volume, described snapmap table records described regional address and is somebody's turn to do
Region legacy data is stored in mapping relations and the global index of resource volume data modification of address in resource volume;
When described modified address mapping table exists the map entry of data block address to be covered in source book, according to amendment
The record record that is not modified about data block to be covered in source book of bitmap, old by described data block to be covered
Data copy in resource volume relevant position, and described data block to be covered are remembered in described amendment record bitmap
Record is for be modified.When described modified address mapping table does not exist reflecting of data block address to be covered in source book
When penetrating entry, the record not being modified about data block to be covered in source book according to amendment record bitmap, by described
Legacy data in data block to be covered copies in resource volume relevant position, and copies money to described legacy data
The record of source book relevant position substitutes the record of data block to be covered described in described amendment record bitmap.
Specifically, described utilize the snapmap table in described snapped volume and amendment record bitmap, from described
The step reading corresponding data in resource volume and source book includes: according to described snapmap table, determines and is read
Data address and this source book legacy data in source book are stored in address in resource volume;At source book determined by according to
Middle address and this source book legacy data are stored in address in resource volume, read corresponding from described resource volume and source book
Data.According to the labelling of described amendment record bitmap, determine whether read data did Copy on write;When
Determine that read data did Copy on write, then from described resource volume, read corresponding data;Read when determining
The data taken did not did Copy on write, then read corresponding data from described source book.
Specifically, the described snapmap table utilized in described snapped volume, delete described modified address and map
The step of table includes: utilize the described source book address of record in described snapmap table and source book legacy data to be saved
The mapping relations of address in resource volume, delete the mapping relations of source book and resource volume;According to the source book deleted
With the mapping relations of resource volume, delete snapped volume, and reclaim the resource space of deleted snapped volume.Wherein, institute
The described source book address utilizing record in described snapmap table stated and source book legacy data are stored in resource volume
The mapping relations of middle address, delete source book and include with the step of the mapping relations of resource volume: utilize described snapshot to reflect
The global index of the described resource volume data modification of record in firing table, it may be judged whether need to travel through other described amendment
Address mapping table;When judging to need to travel through other described modified address mapping table, repair described in other by scanning
Entry present in the mapping table of change of address, in described resource volume, labelling is different from entry in described snapmap table
Entry, and utilize in described snapmap table the described source book address of record and source book legacy data to be stored in money
The mapping relations of address in source book, delete the mapping relations of source book and resource volume;When judging to need not travel through other
During described modified address mapping table, utilize described source book address and the old number of source book of record in described snapmap table
According to being stored in the mapping relations of address in resource volume, delete the mapping relations of source book and resource volume.
Fig. 3 shows a kind of snapshot processing means schematic diagram that the embodiment of the present invention provides, as it is shown on figure 3, bag
Include: create snapped volume module 301 and write snapshot module 302.Wherein, described establishment snapped volume module 301,
Resource volume, amendment record bitmap, modified address mapping table and the snapped volume of snapmap table is comprised for creating;
Described write snapshot module 302, for during writing snapshot, utilize the amendment record bitmap in described snapped volume,
Modified address mapping table and snapmap table, be written to the corresponding data in source book in described resource volume;Wherein,
Described amendment record bitmap is for recording after described snapped volume is set up the amendment situation of each data block in source book;Institute
State modified address mapping table and be stored in for recording the address being modified region in source book and this region legacy data
Address in resource volume;Described snapmap table is used for recording source book address and this each data block of time point snapshot
The address deposited, and the data produced when snapped volume write in record.
Present invention additionally comprises reading snapshot module, for, during reading snapshot, utilizing the snapshot in described snapped volume to reflect
Firing table and amendment record bitmap, read corresponding data from described resource volume and source book;Delete snapshot module, use
During deleting snapshot, utilize the snapmap table in described snapped volume, delete described modified address mapping table.
Further, described snapshot module 302 of writing includes: first writes snapshot unit, for according to amendment note
The record that record bitmap has been modified about data block to be covered in source book, writes new data into source book number to be covered
According in the region that block is corresponding, and in the mapping table of described modified address, record described regional address and the old number in this region
According to being stored in the mapping relations of address in resource volume, record in described snapmap table described regional address and
This region legacy data is stored in the mapping relations of address in resource volume and the overall rope of resource volume data modification
Draw;Second writes snapshot unit, for when there is data block to be covered ground in source book in the mapping table of described modified address
During the map entry of location, the record not being modified about data block to be covered in source book according to amendment record bitmap,
Legacy data in described data block to be covered is copied in resource volume relevant position, and in described amendment record position
Described data block to be covered is recorded as being modified by figure.3rd writes snapshot unit, for when described amendment
When address mapping table does not exist the map entry of data block address to be covered in source book, according to amendment record bitmap
The record not being modified about data block to be covered in source book, copies the legacy data in described data block to be covered
In resource volume relevant position, and copy the record of resource volume relevant position to described legacy data and substitute described
The record of data block to be covered described in amendment record bitmap.
Fig. 4 shows the composition schematic diagram of the snapshot time point snapshot data block that the embodiment of the present invention provides, such as figure
Shown in 4, in snapshot, each data block contents is the data or unit that after snapshot creates time point, first revision preserves
Data, when main frame reads the data (S, 1) of snapped volume, (S, 2), (S, 3), time (S, 4), can inquire about fast
According to mapping table, finding that data block (S, 2) has done Copy on write, data are saved in resource volume (R, 1)
Position, other data block do not does Copy on write, and data are also saved in source book.So paired data can be become
Block (B, 1), (R, 1), (B, 3), the read request of (B, 4).
Fig. 5 shows the snapped volume logical structure schematic diagram that the embodiment of the present invention provides, as it is shown in figure 5, described soon
Include that data field 51, amendment record bitmap 52, modified address mapping table 53 and snapshot reflect according to volume logical structure
Firing table 54.Specifically, described data field 51, for depositing the legacy data being modified region in snapshot.Institute
State amendment record bitmap 52, be used for recording this moment begin setting up after snapshot in source book each data block whether by
Amendment.Being initialized as 0, if data are modified, new data can be written directly to source book;If data not by
Amendment, needs to copy legacy data to resource volume, then writes new data in source book, and revise this data block
Corresponding bitmap.Described modified address mapping table 53, for preserving the address being modified region in source book and being somebody's turn to do
Region legacy data is stored in the address in resource volume.Described snapmap table 54, is used for preserving source book address
The address being stored with this each data block of time point snapshot, when reading snapshot, according to snapshot data block storing place
Location read block can directly obtain snapshot contents.
After creating snapshot, user writable data can be affected by snapshot, and user writable data include to source book
Write data, read source book legacy data and read snapshot data.When wherein reading source book, can be direct, it is not subject to
Snapshot affects.Write data to source book and reading snapshot is affected by snapshot.
The invention provides a kind of snap processing method and device, including source book and snapped volume, specifically, bag
Include the following steps that source book and snapped volume perform:
Step one: set up snapshot, is that a source book creates snapshot;
Step 2: write snapshot, at writing data on source film in pistolgraph process;
Step 3: read snapshot, reads snapshot data after snapshot has been set up from snapped volume;
Step 4: delete snapshot, gain quick return according to shared storage resource and safeguards that source book is normal data state.
Wherein, described snapped volume includes data field, amendment record bitmap, modified address mapping table and snapmap
Table.Described data field is for depositing the legacy data being modified region in snapshot;Amendment record bitmap is used for recording this
Moment begin setting up snapshot after in source book each data block whether be modified;Modified address mapping table is used for preserving source
Address and this region legacy data of being modified region in volume are stored in address in resource volume;Snapmap table is used for
Preserve the address that source book address is deposited with this each data block of time point snapshot.And record produces when writing snapped volume
Data.
It is specifically described below and sets up snapshot, write snapshot, reading snapshot and delete the process of snapshot:
Described snapshot of setting up comprises the following steps:
Step one: for set up snapshot distribution one new resource volume, and distribute data field, amendment record bitmap with
And modified address mapping table;
Step 2: initialize amendment record bitmap, positions all in bitmap are labeled as 0;
Step 3: initialize modified address mapping table, set up an empty table.
Fig. 6 shows that what the embodiment of the present invention provided writes snapshot flow chart, as shown in Figure 6, comprises the following steps:
Step 61, the IO received are divided into data block;
The data writing IO received are divided into accessible piece, say, that according to the minimum unit processed
By deblocking.
Step 62, judge whether these part data are modified;
Take and need a data block to be processed, check the value of this data block of labelling in amendment record bitmap, it is judged that source
Volume data block Copy on write to be done, if source volume data has been modified, then enters step 66;If
Source volume data is not modified, then enter step 63.It is to say, check in source book in amendment record bitmap
This data block will cover the amendment labelling of data block, it is judged that source volume data has been modified, if data block
It is modified, then enters step 66;If data block is not modified, then enter step 63.
Step 63, copy legacy data in source book to resource volume;
Copy the legacy data to be covered on source book to resource volume.
Step 64, modified address mapping table;
Legacy data for copy sets up address mapping table, old with resource volume including the address of old data block in source book
The address that data block is deposited.It is to say, set up source volume data block address and resource in the mapping table of modified address
The relation of volume data block.
Step 65, renewal amendment record bitmap;
In amendment record bitmap, labelling source volume data block has been modified.It is to say, at amendment record bitmap
In, the amendment of corresponding data block is labeled as 1.
Step 66, write new data into source book.
Wherein in step 63, when IO write by main frame, it may be judged whether need Copy on write, the present invention is by amendment
Record bitmap, can directly judge whether source book did Copy on write in each moment, as it is shown in fig. 7, amendment
Record bitmap laterally represents the time point in this each moment of source book, longitudinally represents source book minimal processing unit.
Particularly, in step 63, when the IO that main frame is newly written does not the most map in all snapshots,
The present invention solves this problem, following scene, T4 moment main frame by amendment record bitmap and resource volume position
Write C1, find that all snapshots the most do not exist for the mapping of C1 by amendment record bitmap, C1 needs are described
Copy on write, and need mapping table (amendment T0, T1, T2, T3, the T4 revising all snapshots for C1
The mapping table in all moment), as shown in Figure 8, source volume data is copied by the present invention first with Copy on write mechanism
Shellfish is in resource volume, it is not necessary to revise the mapping item in all snapmap tables, it is only necessary to depositing source volume data
Putting location change is the R0 in resource volume, and copies the record of resource volume relevant position to described legacy data
Substitute the record of data block to be covered described in described amendment record bitmap.
Fig. 9 shows the reading snapshot flow chart that the embodiment of the present invention provides, as it is shown in figure 9, comprise the following steps:
Step 91, receive the read request that main frame issues;
The snapmap table of Snapshot time point is read in step 92, reading;
First check for data in snapmap table, determine data deposit position in snapped volume, if snapped volume
In have data, then directly the data of snapped volume are returned to main frame;If snapped volume does not has data, then perform
Step S93.It is to say, determine data deposit position in snapped volume from snapmap table, if number
According to there being deposit position in snapped volume, then directly the data of snapped volume are returned to main frame, if data are at snapshot
Volume does not has deposit position, then performs step S93.
Step 93, inspection amendment record bitmap, determine data position in resource space and source book, if
The value of amendment record bitmap is 0, illustrates not do Copy on write, reads corresponding data from source book;If
Amendment record bitmap values is 1, reads corresponding data from resource volume.Resource volume bitmap block number is when writing snapshot
Amendment, is specifically shown in prior process and describes.
Figure 10 shows the deletion snapshot flow chart that the embodiment of the present invention provides, as shown in Figure 10, when user not
When needing snapshot, can delete the snapshot of establishment, it comprises the following steps:
Step 101, deletion source book and the logical relation of resource volume;
Step 102, deletion snapped volume;
Step 103, Resource recovery space.
The present invention redesigns the structure of snapmap table, increases snapshot and creates complete with what resource volume blocks of data was revised
Office index index.When such as S0 creates, index is 0, and the index of chunk 0 amendment of S0 is 1, and list is said
Bright such as table 1 below: snapshot creates and resource volume blocks of data is revised and the relation table of index.
Table 1: snapshot creates and resource volume blocks of data is revised and the relation table of index
Index | Event |
0 | Create snapshot S0 |
1 | Source book chunk 0 is revised as A1 |
2 | Source book chunk 7 is revised as E2 |
3 | Create snapshot S1 |
4 | Source book chunk 2 is revised as B2 |
5 | Create snapshot S2 |
6 | Source book chunk 0 is revised as A2 |
Optimize the mapping table of snapshot, increase index entry, as shown in figure 11, according to original method, when deleting
During except S1, when 2 of S1 mappings are deleted respectively, need to scan in S1 and exist and other all snapshots
The most non-existent entry in mapping table, such as, searches chunk 0, chunk 2 in S0 and S2 mapping table
Mesh.The present invention, by increasing index entry in the mapping table of snapshot, can compare the size of index when deleting,
Such as delete S1, compare index value, for the index value 6 of the entry chunk 0 establishment index 5 more than S2,
So needing to travel through S0 and S2 for chunk 0, but for chunk 2 entry, owing to index value 4 is big
It is less than the establishment index value 5 of S2 in the index value 0 of S0, illustrates that S2 will not share resource volume chunk 1
Data, so source book chunk 2 entry only checks S0, do not check S2, which save reading S2 map
The request of list item, when mapping item cannot can save system resource during internal memory entirely, including CPU, caching, adjusts
Degree.
In sum, the present invention has following technical effect that
Present invention decreases snapshot flow process and main frame is write the impact of IO, improve system and resource that snapshot processes
The efficiency that rollback is received.
Although above the present invention being described in detail, but the invention is not restricted to this, the art technology
Personnel can carry out various amendment according to the principle of the present invention.Therefore, all amendments made according to the principle of the invention,
All should be understood to fall into protection scope of the present invention.
Claims (10)
1. a snap processing method, it is characterised in that comprise the following steps:
Create and comprise resource volume, amendment record bitmap, modified address mapping table and the snapped volume of snapmap table;
During writing source book, utilize amendment record bitmap, modified address mapping table and the snapshot in described snapped volume
Mapping table, is written to the corresponding data in source book in described resource volume;
Wherein, described amendment record bitmap is for recording after described snapped volume is set up repairing of each data block in source book
Change situation;Described modified address mapping table is for recording the address and this region legacy data being modified region in source book
The address being stored in resource volume;Described snapmap table is used for recording source book address and this time point snapshot is every
The address that individual data block is deposited, and the data produced when snapped volume write in record.
Method the most according to claim 1, it is characterised in that also include:
During reading snapshot, utilize the snapmap table in described snapped volume and amendment record bitmap, from described money
Source book and source book read corresponding data.
Method the most according to claim 1 and 2, it is characterised in that also include:
During deleting snapshot, utilize the snapmap table in described snapped volume, delete described modified address and map
Table.
Method the most according to claim 1, it is characterised in that described utilizes in described snapped volume
Amendment record bitmap, modified address mapping table and snapmap table, be written to described by the corresponding data in source book
Step in resource volume includes:
The record being modified about data block to be covered in source book according to amendment record bitmap, writes new data
Enter in the region that source book data block to be covered is corresponding, and in the mapping table of described modified address, record ground, described region
Location and this region legacy data are stored in the mapping relations of address in resource volume, record in described snapmap table
Described regional address and this region legacy data are stored in mapping relations and the resource volume number of address in resource volume
Global index according to amendment;
When described modified address mapping table exists the map entry of data block address to be covered in source book, according to
The record that amendment record bitmap is not modified about data block to be covered in source book, by described data block to be covered
Legacy data copy in resource volume relevant position, and described amendment record bitmap in by described data to be covered
Block is recorded as being modified.
Method the most according to claim 4, it is characterised in that described utilizes in described snapped volume
Amendment record bitmap, modified address mapping table and snapmap table, be written to described by the corresponding data in source book
Step in resource volume also includes:
When described modified address mapping table does not exist the map entry of data block address to be covered in source book, root
The record not being modified about data block to be covered in source book according to amendment record bitmap, by described data block to be covered
In legacy data copy in resource volume relevant position, and copy resource volume relevant position to described legacy data
Record substitute the record of data block to be covered described in described amendment record bitmap.
Method the most according to claim 2, it is characterised in that described utilizes in described snapped volume
Snapmap table and amendment record bitmap, the step reading corresponding data from described resource volume and source book includes:
According to described snapmap table, determine that read data address and this source book legacy data in source book are protected
There is address in resource volume;
Determined by according to, in source book, address and this source book legacy data are stored in address in resource volume, from described
Resource volume and source book read corresponding data.
Method the most according to claim 6, it is characterised in that described utilizes in described snapped volume
Snapmap table and amendment record bitmap, the step reading corresponding data from described resource volume and source book is also wrapped
Include:
According to the labelling of described amendment record bitmap, determine whether read data did Copy on write;
When determining that read data did Copy on write, then from described resource volume, read corresponding data;
When determining that read data did not did Copy on write, then from described source book, read corresponding data.
Method the most according to claim 3, it is characterised in that described utilizes in described snapped volume
Snapmap table, the step deleting described modified address mapping table includes:
The described source book address and the source book legacy data that utilize record in described snapmap table are stored in resource volume
The mapping relations of middle address, delete the mapping relations of source book and resource volume;
According to the mapping relations of the source book deleted Yu resource volume, delete snapped volume, and reclaim deleted snapped volume
Resource space.
Method the most according to claim 8, it is characterised in that described utilizes described snapmap table
The described source book address of middle record and source book legacy data are stored in the mapping relations of address in resource volume, delete source
Roll up the step with the mapping relations of resource volume to include:
Utilize the global index of the described resource volume data modification of record in described snapmap table, it may be judged whether need
Travel through other described modified address mapping table;
When judging to need to travel through other described modified address mapping table, reflect by scanning other described modified address
Entry present in firing table, the entry that labelling is different from entry in described snapmap table in described resource volume,
And utilize the described source book address of record in described snapmap table and source book legacy data to be stored in resource volume
The mapping relations of address, delete the mapping relations of source book and resource volume;
When judging to need not travel through other described modified address mapping table, utilize record in described snapmap table
Described source book address and source book legacy data be stored in the mapping relations of address in resource volume, delete source book and money
The mapping relations of source book.
10. a snapshot processing means, it is characterised in that including:
Create snapped volume module, for establishment comprise resource volume, amendment record bitmap, modified address mapping table and
The snapped volume of snapmap table;
Write source book module, for during writing source book, utilize the amendment record bitmap in described snapped volume, amendment
Address mapping table and snapmap table, be written to the corresponding data in source book in described resource volume;
Wherein, described amendment record bitmap is for recording after described snapped volume is set up repairing of each data block in source book
Change situation;Described modified address mapping table is for recording the address and this region legacy data being modified region in source book
The address being stored in resource volume;Described snapmap table is used for recording source book address and this time point snapshot is every
The address that individual data block is deposited, and the data produced when snapped volume write in record.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510075327.XA CN105988723A (en) | 2015-02-12 | 2015-02-12 | Snapshot processing method and device |
PCT/CN2015/092327 WO2016127658A1 (en) | 2015-02-12 | 2015-10-20 | Snapshot processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510075327.XA CN105988723A (en) | 2015-02-12 | 2015-02-12 | Snapshot processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105988723A true CN105988723A (en) | 2016-10-05 |
Family
ID=56614169
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510075327.XA Withdrawn CN105988723A (en) | 2015-02-12 | 2015-02-12 | Snapshot processing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105988723A (en) |
WO (1) | WO2016127658A1 (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106909514A (en) * | 2017-03-01 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of localization method and device of snapshot disk address |
CN107391391A (en) * | 2017-07-19 | 2017-11-24 | 深圳大普微电子科技有限公司 | The method, system and solid state hard disc of data copy are realized in the FTL of solid state hard disc |
CN107423165A (en) * | 2017-08-01 | 2017-12-01 | 郑州云海信息技术有限公司 | A kind of data snapshot head writes copy method and device |
CN107423637A (en) * | 2017-07-31 | 2017-12-01 | 南京理工大学 | Support the traceable integrality auditing method of electronic health record data on cloud |
CN107491363A (en) * | 2017-08-24 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of Snapshot Method and device of the storage volume based on linux kernel |
CN107888689A (en) * | 2017-11-16 | 2018-04-06 | 无锡地铁集团有限公司 | Locking resource allocation method based on shared storage |
CN109598156A (en) * | 2018-11-19 | 2019-04-09 | 杭州信核数据科技股份有限公司 | Engine snapshot stream method is redirected when one kind is write |
CN109725851A (en) * | 2017-10-27 | 2019-05-07 | Netapp股份有限公司 | Intelligent snapping layering |
CN109902034A (en) * | 2019-02-25 | 2019-06-18 | 杭州宏杉科技股份有限公司 | Snapshot creation method, device, electronic equipment and machine readable storage medium |
CN110032475A (en) * | 2019-04-15 | 2019-07-19 | 苏州浪潮智能科技有限公司 | A kind of cloning process of logical volume, device and equipment |
CN111007990A (en) * | 2019-12-24 | 2020-04-14 | 曙光信息产业(北京)有限公司 | Positioning method for quickly positioning data block reference in snapshot system |
CN111563006A (en) * | 2020-04-17 | 2020-08-21 | 深圳震有科技股份有限公司 | Data processing method, intelligent terminal and storage medium |
CN113721861A (en) * | 2021-11-01 | 2021-11-30 | 深圳市杉岩数据技术有限公司 | Fixed-length block-based data storage implementation method and computer-readable storage medium |
CN114116312A (en) * | 2021-11-25 | 2022-03-01 | 北京大道云行科技有限公司 | ROW snapshot design method and system based on distributed block storage |
CN115826878A (en) * | 2023-02-14 | 2023-03-21 | 浪潮电子信息产业股份有限公司 | Copy-on-write method, device, equipment and computer readable storage medium |
WO2023206950A1 (en) * | 2022-04-29 | 2023-11-02 | 苏州元脑智能科技有限公司 | Cascaded snapshot processing method and apparatus, and device and storage medium |
CN117311911A (en) * | 2023-11-29 | 2023-12-29 | 苏州元脑智能科技有限公司 | Virtual machine snapshot method and device, electronic equipment and storage medium |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110990194A (en) * | 2019-11-22 | 2020-04-10 | 浪潮(北京)电子信息产业有限公司 | Calculation method, calculation system and related device for snapshot stop time |
CN111338850A (en) * | 2020-02-25 | 2020-06-26 | 上海英方软件股份有限公司 | Method and system for improving backup efficiency based on COW mode multi-snapshot |
US12039168B2 (en) * | 2022-10-14 | 2024-07-16 | Dell Products, L.P. | Multiple version write pending support in shared global memory |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060047926A1 (en) * | 2004-08-25 | 2006-03-02 | Zheng Calvin G | Managing multiple snapshot copies of data |
CN101140536A (en) * | 2007-05-21 | 2008-03-12 | 中兴通讯股份有限公司 | Snapshot system supporting cascades snapshot and snapshot processing method thereof |
CN101174231A (en) * | 2006-11-03 | 2008-05-07 | 英业达股份有限公司 | Snap backup method |
CN102012852A (en) * | 2010-12-27 | 2011-04-13 | 创新科存储技术有限公司 | Method for implementing incremental snapshots-on-write |
CN102012853A (en) * | 2011-01-14 | 2011-04-13 | 南开大学 | Zero-copy snapshot method |
-
2015
- 2015-02-12 CN CN201510075327.XA patent/CN105988723A/en not_active Withdrawn
- 2015-10-20 WO PCT/CN2015/092327 patent/WO2016127658A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060047926A1 (en) * | 2004-08-25 | 2006-03-02 | Zheng Calvin G | Managing multiple snapshot copies of data |
CN101174231A (en) * | 2006-11-03 | 2008-05-07 | 英业达股份有限公司 | Snap backup method |
CN101140536A (en) * | 2007-05-21 | 2008-03-12 | 中兴通讯股份有限公司 | Snapshot system supporting cascades snapshot and snapshot processing method thereof |
CN102012852A (en) * | 2010-12-27 | 2011-04-13 | 创新科存储技术有限公司 | Method for implementing incremental snapshots-on-write |
CN102012853A (en) * | 2011-01-14 | 2011-04-13 | 南开大学 | Zero-copy snapshot method |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106909514A (en) * | 2017-03-01 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of localization method and device of snapshot disk address |
CN107391391A (en) * | 2017-07-19 | 2017-11-24 | 深圳大普微电子科技有限公司 | The method, system and solid state hard disc of data copy are realized in the FTL of solid state hard disc |
CN107423637A (en) * | 2017-07-31 | 2017-12-01 | 南京理工大学 | Support the traceable integrality auditing method of electronic health record data on cloud |
CN107423165A (en) * | 2017-08-01 | 2017-12-01 | 郑州云海信息技术有限公司 | A kind of data snapshot head writes copy method and device |
CN107491363A (en) * | 2017-08-24 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of Snapshot Method and device of the storage volume based on linux kernel |
CN109725851B (en) * | 2017-10-27 | 2022-04-22 | Netapp股份有限公司 | Intelligent snapshot tiering |
CN109725851A (en) * | 2017-10-27 | 2019-05-07 | Netapp股份有限公司 | Intelligent snapping layering |
CN107888689A (en) * | 2017-11-16 | 2018-04-06 | 无锡地铁集团有限公司 | Locking resource allocation method based on shared storage |
CN107888689B (en) * | 2017-11-16 | 2019-04-30 | 无锡地铁集团有限公司 | Locking resource allocation method based on shared storage |
CN109598156A (en) * | 2018-11-19 | 2019-04-09 | 杭州信核数据科技股份有限公司 | Engine snapshot stream method is redirected when one kind is write |
CN109902034A (en) * | 2019-02-25 | 2019-06-18 | 杭州宏杉科技股份有限公司 | Snapshot creation method, device, electronic equipment and machine readable storage medium |
CN110032475A (en) * | 2019-04-15 | 2019-07-19 | 苏州浪潮智能科技有限公司 | A kind of cloning process of logical volume, device and equipment |
CN111007990A (en) * | 2019-12-24 | 2020-04-14 | 曙光信息产业(北京)有限公司 | Positioning method for quickly positioning data block reference in snapshot system |
CN111007990B (en) * | 2019-12-24 | 2023-09-19 | 曙光信息产业(北京)有限公司 | Positioning method for quickly positioning data block references in snapshot system |
CN111563006A (en) * | 2020-04-17 | 2020-08-21 | 深圳震有科技股份有限公司 | Data processing method, intelligent terminal and storage medium |
CN113721861A (en) * | 2021-11-01 | 2021-11-30 | 深圳市杉岩数据技术有限公司 | Fixed-length block-based data storage implementation method and computer-readable storage medium |
CN113721861B (en) * | 2021-11-01 | 2022-02-08 | 深圳市杉岩数据技术有限公司 | Fixed-length block-based data storage implementation method and computer-readable storage medium |
CN114116312A (en) * | 2021-11-25 | 2022-03-01 | 北京大道云行科技有限公司 | ROW snapshot design method and system based on distributed block storage |
WO2023206950A1 (en) * | 2022-04-29 | 2023-11-02 | 苏州元脑智能科技有限公司 | Cascaded snapshot processing method and apparatus, and device and storage medium |
CN115826878A (en) * | 2023-02-14 | 2023-03-21 | 浪潮电子信息产业股份有限公司 | Copy-on-write method, device, equipment and computer readable storage medium |
CN117311911A (en) * | 2023-11-29 | 2023-12-29 | 苏州元脑智能科技有限公司 | Virtual machine snapshot method and device, electronic equipment and storage medium |
CN117311911B (en) * | 2023-11-29 | 2024-02-23 | 苏州元脑智能科技有限公司 | Virtual machine snapshot method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2016127658A1 (en) | 2016-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105988723A (en) | Snapshot processing method and device | |
US10649910B2 (en) | Persistent memory for key-value storage | |
CN110825748B (en) | High-performance and easily-expandable key value storage method by utilizing differentiated indexing mechanism | |
EP3170106B1 (en) | High throughput data modifications using blind update operations | |
US8868624B2 (en) | Blob manipulation in an integrated structured storage system | |
US8620884B2 (en) | Scalable blob storage integrated with scalable structured storage | |
US8874515B2 (en) | Low level object version tracking using non-volatile memory write generations | |
US9501421B1 (en) | Memory sharing and page deduplication using indirect lines | |
JP6218869B2 (en) | System and method for copy-on-write to SSD | |
US8112607B2 (en) | Method and system for managing large write-once tables in shadow page databases | |
US20140244935A1 (en) | Storage system capable of managing a plurality of snapshot families and method of snapshot family based read | |
CN109697016B (en) | Method and apparatus for improving storage performance of containers | |
US10552377B2 (en) | Data discard method for journaling file system and memory management apparatus thereof | |
CN107391391A (en) | The method, system and solid state hard disc of data copy are realized in the FTL of solid state hard disc | |
KR20150053720A (en) | Swat command and appication programming interface for automic swap and trim of lbas | |
JP6198992B2 (en) | Computer system and database management method | |
CN112035294A (en) | Security log file system, and implementation method and medium thereof | |
CN111414320B (en) | Method and system for constructing disk cache based on nonvolatile memory of log file system | |
US10990486B2 (en) | Data storage system with repair of mid-level mapping blocks of internal file system | |
CN110515897B (en) | Method and system for optimizing reading performance of LSM storage system | |
US20200311030A1 (en) | Optimizing file system defrag for deduplicated block storage | |
CN105912277B (en) | The method that file system list writes log is realized in virtual machine image | |
CN102508790A (en) | Content-based cache method applied to content analysis storage | |
JP6788386B2 (en) | File access provision methods, computers, and software products | |
CN103838647A (en) | Data state transition method and system based on snapshot remapping |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20161005 |
|
WW01 | Invention patent application withdrawn after publication |