CN101140536B - Snapshot system supporting cascades snapshot and snapshot processing method thereof - Google Patents

Snapshot system supporting cascades snapshot and snapshot processing method thereof Download PDF

Info

Publication number
CN101140536B
CN101140536B CN200710074386A CN200710074386A CN101140536B CN 101140536 B CN101140536 B CN 101140536B CN 200710074386 A CN200710074386 A CN 200710074386A CN 200710074386 A CN200710074386 A CN 200710074386A CN 101140536 B CN101140536 B CN 101140536B
Authority
CN
China
Prior art keywords
snapshot
address
logical volume
data
data block
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.)
Active
Application number
CN200710074386A
Other languages
Chinese (zh)
Other versions
CN101140536A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN200710074386A priority Critical patent/CN101140536B/en
Publication of CN101140536A publication Critical patent/CN101140536A/en
Application granted granted Critical
Publication of CN101140536B publication Critical patent/CN101140536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a snapshot system supporting cascade snapshot as well as a relevant snapshot process method. The snapshot system supporting cascade snapshot comprises a source logic film and a snapshot film; the structure of the snapshot film comprises: A data area, a modified record bitmap, a modified address index list and a snapshot address index list; the data area is used to save old data in a modified region during snapshot process; the modified record bitmap is used to record, after a snapshot is started to establish at the time point, whether each data block in a source logic film has been modified; the modified address index list is used to save the address of the modified region in the source logic film, as well as the address where the old data in the region is saved in the data area in the snapshot film; the snapshot address index list is used to save the address of the source logic film, and the address where each data block is saved inside the snapshot at the time point. The invention can acquire snapshots at each time point in a one-through mode, so as to reduce data acquisition times, and meanwhile, shorten time of each data acquisition, and improve the performance of cascade snapshots in acquiring snapshot film data.

Description

A kind of fast photographic system and snap processing method thereof of supporting the cascade snapshot
Technical field
The present invention relates to disk array technology, relate in particular to a kind of snapshot of supporting cascade.
Background technology
In digital Age, the key business data of company's electronization storage is growing.File is lost when taking place, quick-recovery simply soon when corrupted data or user misoperation.Snapping technique provides solution for this reason, convenient realization data backup.
In this fast photographic system, the logical volume that will read and write is called the source logical volume, realizes that the auxiliary logic volume that snapshot increases is called the snapshot logical volume.It is to set up in the snapshot conveniently mode that difference is duplicated, and difference is duplicated and comprised two kinds of methods, writes copy (Copy-on-Write) and is redirected and write (Redirect-on-Write).Write copy method is when receiving write operation at every turn, and elder generation to the snapshot logical volume, writes the source logical volume with data with the copying data that is capped in the logical volume of source then; Redirected write method is when receiving write operation, directly data to be write in the snapshot logical volume at every turn.In this fast photographic system, the unit of deal with data is the data of a stripe size, is called a data block.
Write when reading snapshot data in the snapshot that copy method sets up in use, if data block is not modified, directly from the logical volume of source, read, otherwise from the snapshot logical volume, read; When in use being redirected the snapshot of writing foundation, reading source data,, directly from the logical volume of source, read, otherwise from the snapshot logical volume, read if when data are not modified.Whenever reading a data block just needs to judge once whether this data block is modified, and has influence on the performance that reads snapshot logical volume data.When using these two kinds of methods to set up snapshot, data writing operation with read the snapshot logical volume in the method for data similar, be that example describes to write copy method below.
Use is write copy method and is set up a cascade snapshot, and the time point of setting up snapshot is 9 points, 10 points, ten one points, and the present time is ten two points, and is as shown in Figure 1.The data of source logical volume when Figure 1A is at 9; The data of 100 logical volumes of source when being at 10 among Figure 1B, 101 data for being capped when the logical volume write data of source from 9 o'clock to 10 o'clock are saved in 9 snapshot logical volume; The data of 100 logical volumes of source when being at ten one among Fig. 1 C, 101 data for when the logical volume write data of source, being capped from 10 o'clock to ten one are saved in 10 snapshot logical volume; The data of 100 logical volumes of source when being at ten two among Fig. 1 D, 101 data for being capped when the logical volume write data of source to ten point to points from ten one o'clock are saved in ten one snapshot logical volume.After snapshot set up to be accomplished, the physics data of preserving had ten two source logical volume and 9 points, 10 points, ten one snapshot logical volume at present.If read 9 data (being snapshot); The data of source logical volume and ten one snapshot logical volume obtain ten one data in the time of need be according to ten two; Obtain 10 data according to ten one data and 10 snapshot logical volume then; At last obtain 9 data, i.e. 9 snapshot according to 10 data and 9 snapshot logical volume.
When said method reads the data in the snapshot logical volume; Need read step by step, and some data block all is modified in each time point, these data blocks all will be read when every grade of reading of data; In fact have only that to read for the last time be effectively, influenced the performance of system.
Summary of the invention
Technical matters to be solved by this invention provides a kind of system and the disposal route thereof that can support the cascade snapshot, improves the performance that in snapshot, reads snapshot logical volume data.
For solving the problems of the technologies described above, the present invention realizes through following technical scheme:
A kind of fast photographic system of supporting the cascade snapshot comprises source logical volume and snapshot logical volume, and the structure of said snapshot logical volume comprises: data field, amendment record bitmap, modified address concordance list, snapshot address reference table;
The data field is used to leave in the legacy data that source logical volume during the snapshot is modified the zone;
Whether the amendment record bitmap is used for record and creates the snapshot time point and begin to set up each data block of snapshot opisthogenesis logical volume and be modified;
The modified address concordance list is used for preserving the address that the source logical volume is modified the zone and is modified the address that regional legacy data is stored in said data field with this;
The snapshot address reference table is used for preserving the address that logical volume address, source and said each data block of establishment snapshot time point snapshot are stored.
The time point that said cascade snapshot refers to create snapshot is continuous, and the snapshot of earliest time point depends on and comprises the snapshot logical volume of said earliest time point at interior follow-up all time points.
Wherein, the list item of stored address reference table is two data block address in the concordance list of said modified address, and the first column data block address is a source logical volume data block address, and the secondary series data block address is old data block storage addresses in the snapshot logical volume.
Wherein, the list item of stored address reference table is two data block address in the said snapshot address reference table, and what the first column data piece was deposited is source logical volume data block address; What the secondary series data block was deposited is the stored address of snapshot data, can be that the address in the logical volume of source also can be the address in the snapshot logical volume.
A kind of snap processing method of supporting the fast photographic system of cascade snapshot may further comprise the steps:
A, setting up snapshot, is an establishing logical volume snapshot;
B, write snapshot, in snapshot processes to source logical volume write data;
C, end snapshot upgrade this snapshot at every turn and reach the snapshot logical volume address table of all time point snapshots before when finishing snapshot;
D, read snapshot, snapshot reads snapshot data after setting up and accomplishing from the snapshot logical volume;
E, deletion snapshot, gain quick return according to the shared storage resources and the source logical volume of maintenance is the normal data state.
Wherein, the said snapshot of setting up may further comprise the steps:
A1, distribute the snapshot logical volume for setting up snapshot, for this snapshot logical volume distributes corresponding auxiliary storage structure, the auxiliary storage structure comprises: data field, amendment record bitmap, modified address concordance list, snapshot address reference table;
A2, initialization amendment record bitmap are labeled as 0 with all positions in the bitmap;
A3, initialization modified address concordance list are set up an empty table;
A4, initial snapshot address reference table, all data block address point to the source logical volume.
Here several nouns are made an explanation: when being not activated snapshot functions; Normal address is logical volume; After starting snapshot, in order to distinguish former logical volume and to need newly-increased logical volume because start snapshot, so logical volume is called source logical volume and snapshot logical volume respectively.
Wherein, the said snapshot of writing may further comprise the steps:
B1, according to the minimum unit of handling with deblocking;
B2, get first data block of need handling;
B3, check the value of this data block of mark in the amendment record bitmap, judge whether the content of wanting the write data piece on the logical volume of source is modified,, change step b7 if data are modified; Otherwise, carry out next step;
B4, with on the logical volume of source with the copying data that is capped to the snapshot logical volume;
B5, in the concordance list of modified address, set up the index of depositing the old data block address in source logical volume data block address and the snapshot logical volume;
B6, in the amendment record bitmap, will be labeled as 1 to modification that should data block;
B7, new data block is write the source logical volume;
B8, handle next data block, change step b3, all data blocks in handling write operation.
Wherein, said end snapshot may further comprise the steps:
D1, get all time point amendment record bitmaps; For example, the time point of creating snapshot is 9 points, 10 points, ten one points, and present time point is ten two points.Get all time point amendment record bitmaps here and be meant the amendment record bitmap in 9 points, and ten one the snapshot logical volumes at 10.
D2, check this time point amendment record bitmap, find the data block address of first modification, and get this data block storage addresses in the snapshot logical volume;
The address that this data block in the snapshot address reference table of revising the bitmap time point is handled in d3, renewal at present is this time point snapshot logical volume old data block storage addresses;
D4, check that present processing revises this data block of last time point of bitmap time point and whether be modified,, change steps d 6 if this data block is revised, otherwise, next step carried out;
D5, commentaries on classics steps d 3 are revised the snapshot that the bitmap time point does not have previous time point up to present processing;
D6, the data block that finds the next one to revise are changeed steps d 3, all handle up to the data block of this time point all modifications.
Wherein, the said snapshot of reading may further comprise the steps:
C1, get the snapshot address reference table of this time point;
C2, find the logical volume at data places according to the address in the snapshot address reference table, then according to the address read block;
C3, repeating step c2 are up to running through all data.
Wherein, said deletion snapshot may further comprise the steps:
The snapshot relation of e1, deletion source logical volume and snapshot logical volume;
E2, deletion snapshot logical volume and snapshot auxiliary space discharge resource.
The present invention has following beneficial effect: the cascade snapshot is created in fast photographic system support of the present invention; The method of use address reference table reads the data of snapshot logical volume; Can once read the snapshot of each time point; Reduce the number of times of reading of data, and shorten the time of each reading of data, improved the performance that reads snapshot logical volume data in the cascade snapshot; Fast photographic system of the present invention also supports to have only the snapshot of one-level.
Description of drawings
Fig. 1 is the data processing figure that sets up in the prior art behind the snapshot;
Fig. 2 is that the snapshot of each time point is formed;
Fig. 3 is a snapshot logical volume structural drawing of the present invention;
Fig. 4 is the process flow diagram that the present invention sets up snapshot;
Fig. 5 is the process flow diagram that the present invention writes snapshot;
Fig. 6 is the process flow diagram that the present invention reads snapshot;
Fig. 7 is the process flow diagram that the present invention finishes snapshot;
Fig. 8 is the process flow diagram that the present invention deletes snapshot.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:
In the cascade fast photographic system, each data block contents is data or the former data that first revision is preserved behind the snapshot time point in the snapshot, and is as shown in Figure 2.The present invention is directed to these characteristics in the cascade fast photographic system,, preserve the corresponding address of each data block in this snapshot, and after the back time point has been set up snapshot, revise the snapshot address reference table of front time point for each snapshot adds a snapshot address reference table.Use this allocation index can disposablely read required content, needn't need the extra snapshot that reads other time point for the snapshot that reads a time point, improve the performance of system.
Carry out detailed introduction in the face of the snapshot address reference table down.
Can find out that from Fig. 2 and Fig. 1 the 101B among Fig. 2 A is 101 among Figure 1B, i.e. data in 9 the snapshot logical volume data field.101C is 101 among Fig. 1 C, i.e. data in 10 the snapshot logical volume data field.101D is 101 among Fig. 1 D, i.e. data in ten one the snapshot logical volume data field.When Fig. 2 A is at ten two, finish ten one snapshot after, 9 snapshot address reference table.Obtain Fig. 2 A through Figure 1B, Fig. 1 C and Fig. 1 D.
101C among Fig. 2 B is 101 among Fig. 1 C, i.e. data in 10 the snapshot logical volume data field.101D is 101 among Fig. 1 D, i.e. data in ten one the snapshot logical volume data field.When Fig. 2 B is at ten two, finish ten one snapshot after, 10 snapshot address reference table.Obtain Fig. 2 B through Fig. 1 C and Fig. 1 D.
101D among Fig. 2 C is 101 among Fig. 1 D, i.e. data in ten one the snapshot logical volume data field.When Fig. 2 C is at ten two, finish ten one snapshot after, ten one snapshot address reference table.Obtain Fig. 2 C through Fig. 1 D.
Relevant because of the snapshot address reference table with the modified address concordance list, introduce the modified address concordance list earlier.The content of access is the logical volume address that is modified and is capped the address that content is kept at data field in the snapshot logical volume in this table; (all addresses in the explanation are since 0 addressing; Modification content among Figure 1B is preserved the address use 101B to represent, logical volume address, source uses 100B to represent; Modification content among Fig. 1 C is preserved the address use 101C to represent, logical volume address, source uses 100C to represent; Modification content among Fig. 1 D is preserved the address use 101D to represent, use 100D to represent logical volume address in source among Fig. 1 D)
In Figure 1B, 9 modified address concordance list:
The logical volume address that is modified Revise content and preserve the address
2(100) 0(101B)
3(100) 1(101B)
5(100) 2(101B)
9(100) 3(101B)
9 amendment record bitmap:
The logical volume address Bitmap values
0 0
1 0
2 1
3 1
4 0
5 1
6 0
7 0
8 0
9 1
In Fig. 1 C, 10 modified address concordance list:
The logical volume address that is modified Revise content and preserve the address
0(100) 0(101C)
2(100) 1(101C)
6(100) 2(101C)
8(100) 3(101C)
9(100) 4(101C)
10 amendment record bitmap:
The logical volume address Bitmap values
0 1
1 0
2 1
3 0
4 0
5 0
6 1
7 0
8 1
9 1
In Fig. 1 D, ten one modified address concordance list:
The logical volume ground rubbish that is modified Revise content and preserve the address
1(100) 0(101D)
2(100) 1(101D)
5(100) 2(101D)
Ten one amendment record bitmap:
The logical volume address Bitmap values
0 0
1 1
2 1
3 0
4 0
5 1
6 0
7 0
8 0
9 0
According to 9 address reference tables, 10 address reference table and ten one s' address reference table and 9 s' amendment record bitmap, the snapshot address reference table that 10 amendment record bitmap and ten one s' amendment record bitmap can obtain each time point among Fig. 2 A, Fig. 2 B and Fig. 2 C.
9 snapshot address reference table is among Fig. 2 A:
The logical volume address 9 snapshot data storage address
0 0(101C)
1 0(101D)
2 0(101B)
3 1(101B)
4 4(100D)
5 2(101B)
6 2(101C)
7 7(100D)
8 3(101C)
9 3(101B)
10 snapshot address reference table is among Fig. 2 B:
The logical volume address 10 snapshot data storage address
0 0(101C)
1 0(101D)
2 1(101C)
3 3(100D)
4 4(100D)
5 1(101D)
6 2(101C)
?7 7(100D)
?8 3(101C)
?9 4(101C)
Ten one snapshot address reference table is among Fig. 2 C:
Figure GSB00000786579500121
As shown in Figure 3, the snapshot logical volume in the cascade fast photographic system of the present invention comprises: data field 300, amendment record bitmap 301, modified address concordance list 302 and snapshot address reference table 303.
Data field 300 is used for depositing the legacy data that snapshot is modified the zone.
Amendment record bitmap 301 is used for writing down the modification situation that this time point begins to set up each data block of snapshot opisthogenesis logical volume, is initialized as 0.If data are modified, new data can directly be write the source logical volume; Otherwise need copy legacy data to the snapshot logical volume, again new data write the source logical volume, and revise the corresponding bitmap of this data block.
Modified address concordance list 302 is used for preserving the source logical volume and is modified the address in zone and the address that this zone legacy data is stored in data field in the snapshot logical volume.
Snapshot address reference table 303 is preserved the address that each data block is stored in logical volume address, source and this time point snapshot.When reading snapshot,, can directly obtain snapshot contents according to snapshot data piece storage address read block.
The course of work of this fast photographic system is at first to create snapshot; Set up behind the snapshot when receiving write operation; If this part data is modified in the logical volume of source; Then directly data are write the source logical volume, otherwise legacy data is copied to the snapshot logical volume and sets up modification data address concordance list, and then new data is write the source logical volume.When snapshot finishes, upgrade the snapshot address reference table according to revising the data address concordance list.When reading snapshot, direct address read fetching snapshot data according to the snapshot address reference table.
Be presented in below in " end snapshot " step, how the index in " the snapshot address reference table " of modification time point (for example 10 points) time point (for example 9 points) before.
It among Fig. 2 A 9 snapshot address reference table.Behind 9 snapshot, obtain 9 snapshot address reference table, 10 snapshot finishes the back to be upgraded according to the snapshot address reference table of the step that finishes snapshot to 9, and obtains 10 snapshot address reference table.Ten one snapshot finishes the back to be upgraded 9 snapshot address reference table and 10 snapshot address reference table according to the step that finishes snapshot, and obtains ten one snapshot address reference table.Obtain the result of Fig. 2 A, Fig. 2 B and Fig. 2 C at last.
Result of calculation with Fig. 2 A describes below.
In the time of 10, finish the snapshot of 9 startups, uses 9 amendment record bitmap, 9 modified address concordance list according to the step (original text) of end snapshot, the new snapshot address reference table that obtains at 9 is:
The logical volume address 9 snapshot data storage address
0 0(100B)
1 1(100B)
2 0(101B)
3 1(101B)
4 4(100B)
5 2(101B)
6 6(100B)
7 7(100B)
8 8(100B)
9 3(101B)
In the time of ten one, finish the snapshot of 10 startups, get 9 amendment record bitmap, 10 amendment record bitmap, 10 modified address concordance list and 9 snapshot address reference table.
9 amendment record bitmap:
6
The logical volume address Bitmap values
0 0
1 0
2 1
3 1
4 0
5 1
6 0
7 0
8 0
9 1
10 modified address concordance list:
The logical volume address that is modified Revise content and preserve the address
0(100) 0(101C)
2(100) 1(101C)
6(100) 2(101C)
8(100) 3(101C)
9(100) 4(101C)
10 amendment record bitmap:
The logical volume address Bitmap values
0 1
1 0
2 1
3 0
4 0
5 0
6 1
7 0
8 1
9 1
Finishing the processing procedure of snapshot gives an example:
D2 gets first data block that be modified, and the address is 0, and storage addresses is 0 (101C) in the snapshot logical volume,
D3 upgrades 10 snapshot address reference table this moment, and its address is that 0 snapshot data storage address is 0 (101C),
D4 checks 9 modification bitmap, judges the address is whether 0 data block is modified, because this data block is not modified, so carry out next step
D5 forwards the snapshot address reference table that d3 revises at 9 to, and its its address is that 0 snapshot data storage address is 0 (101C), because do not have snapshot before 9, does not handle.
D6 gets the data block that the next one is modified, and the address is 2, and storage addresses is 1 (101C) in the snapshot logical volume,
D3 upgrades 10 snapshot address reference table this moment, and its address is that 2 snapshot data storage address is 1 (101C),
D4 checks 9 modification bitmap, judges the address is whether 2 data block is modified, because this data block is modified, thus carry out d6,
All data blocks that are modified in handling 10 snapshot.
The new snapshot address reference table that obtains at last at 9 does
The logical volume address 9 snapshot data storage address
0 0(101C)
1 1(100C)
2 0(101B)
3 1(101B)
4 4(100C)
5 2(101B)
6 1(101C)
7 7(100C)
8 3(101C)
9 3(101B)
In the time of ten two, finish the snapshot of 10 startups; Use 9 amendment record bitmap, 10 amendment record bitmap, ten one amendment record bitmap and ten one modified address concordance list and 9 snapshot address reference table; According to the step (original text) that finishes snapshot, the new snapshot address reference table that obtains at 9 is:
The logical volume address 9 snapshot data storage address
0 0(101C)
1 0(101D)
2 0(101B)
3 1(101B)
4 4(100D)
5 2(101B)
6 2(101C)
7 7(100D)
8 3(101C)
9 3(101B)
In the present invention, the disposal route in the snapshot is provided also, has comprised:
1) setting up the step of snapshot, is an establishing logical volume snapshot;
2) write the snapshot step, in snapshot processes to the step of source logical volume write data;
3) read the snapshot step, read the step of snapshot data after snapshot is set up and accomplished;
4) step of end snapshot is upgraded this snapshot at every turn and is reached the snapshot logical volume address table of all time point snapshots before when finishing snapshot;
5) step of deletion snapshot, the deletion snapshot, gain quick return according to shared storage resources and the source of maintenance logical volume is the normal data state.
Set up the snapshot of this time point for a logical volume in the fast photographic system, this logical volume is called the source logical volume, and the snapshot of foundation representes that this source logical volume is in the data mode of setting up the snapshot time point.
As shown in Figure 4, the method for setting up snapshot comprises:
Step 11, be the snapshot logical volume, and distribute the storage space of assisting for snapshot for snapshot distributes a logical volume.The auxiliary storage space comprises amendment record bitmap, modified address concordance list and snapshot address reference table.
Step 12, initialization amendment record bitmap are made as 0 with the modification mark of all data blocks.
Step 13, initialization modified address concordance list, it is an empty table that the modified address concordance list is emptied.
Step 14, initial snapshot address reference table, data block storage address in the logical volume of source is pointed in the snapshot address of all data blocks in the concordance list.
After having set up snapshot, the user writable data can receive the influence of snapshot.The user writable data comprise to source logical volume write data, read source logical volume data and read snapshot data.When wherein reading source logical volume data, can directly read, not receive the influence of snapshot.To source logical volume write data with read the influence that snapshot data will receive snapshot.
As shown in Figure 5, comprise to the operating process of source logical volume write data:
Step 21, will receive the deblocking in the write operation, be divided into accessible unit.
Step 22, get first data block.
Step 23, check in the amendment record bitmap this data block judges with the modification mark of cover data piece whether this data block is modified in the logical volume of source,, change step 27, otherwise change next step if data block is modified.
Step 24, with the data block copy in the logical volume of source to the snapshot logical volume.
Step 25, set up allocation index, comprise old data block storage addresses in address and the snapshot logical volume of old data block in the logical volume of source for the old data block of copy.
Step 26, data block is modified in the logical volume of mark source in the amendment record bitmap.
Step 27, new data is written to the source logical volume.
Step 28, judge whether all data blocks in this time write operation are handled, if handle, execution in step 30, otherwise carry out next step.
Step 29, take off a data block, change step 23.
Step 30, accomplish this time write operation.
Through above-mentioned steps, after the source logical volume write data, the old data block that is modified was stored in the snapshot logical volume, will read to the snapshot logical volume when reading snapshot data.Therefore when setting up the snapshot end, the snapshot address reference table is made amendment, so that can directly directly read snapshot data according to the snapshot address reference table.If in the write data process, revise the snapshot address reference table, with the performance that has influence on system, and normally snapshot just has the modification of reading snapshot after setting up completion, therefore when snapshot finishes, revises the snapshot address reference table.
As shown in Figure 7, the operating process that finishes snapshot comprises:
Step 41, get the amendment record bitmap of all time points, be used to upgrade the snapshot address reference table.
Step 42, get the amendment record bitmap of this time point, find first data block that is modified, and in the modified address concordance list of this time point, get this data block legacy data storage addresses in the snapshot logical volume.
The former data block storage address of this data block in the snapshot address reference table of handling amendment record bitmap time point is at present upgraded in the address of getting in step 43, the use modified address concordance list.
Step 44, judgement are handled modification bitmap time point at present and whether are had the snapshot of previous time point, if do not exist, change step 46, otherwise, change next step.
Step 45, check the amendment record bitmap of the previous snapshot time point of present processing amendment record bitmap time point, judge whether be modified,, change step 43 if be not modified in this data block of previous time point, otherwise, next step changeed.
Step 46, judge whether to handle the data block of this time point all modifications,, change step 48 if finish dealing with, otherwise, next step carried out.
Step 47, get in this time point amendment record bitmap the next data block that is modified, and in the modified address concordance list of this time point, get this data block legacy data storage addresses in the snapshot logical volume, change step 43.
Snapshot address reference table to each time point before this time point when snapshot finishes upgrades, and can arrive the snapshot address reference table of this time point at every turn when reading the snapshot of each time point and get the address, according to the direct reading of data in address.
As shown in Figure 6, the operating process that reads snapshot data comprises:
Step 31, get the snapshot address reference table that reads the snapshot time point.
Step 32, from the snapshot address reference table, get the corresponding present storage address of old data block of source logical volume data block address successively, then according to the old data block storage address read block that obtains.
Step 33, judge whether to have read all corresponding data blocks of source logical volume,, change step 32, otherwise change next step if do not read.
Snapshot operation is read in step 34, completion.
When the user no longer needs snapshot, can delete the snapshot of establishment.As shown in Figure 9, the operating process of deletion snapshot comprises:
The snapshot relation of step 51, deletion source logical volume and snapshot logical volume.
Step 52, deletion snapshot logical volume and set up the auxiliary space that snapshot uses.
Step 53, completion snapshot deletion action.
After the snapshot relation of deletion source logical volume and snapshot logical volume, the logical volume write data no longer is affected to the source.
In sum, the present invention realizes when finishing snapshot, the snapshot address reference table being upgraded a kind of fast photographic system of cascade snapshot through the method for setting up address reference table at every turn.No matter read the snapshot of nearest time point or read the snapshot of time point early, all can improve the performance that reads snapshot directly according to address read fetching snapshot data in the snapshot address reference table.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. a fast photographic system of supporting the cascade snapshot comprises source logical volume and snapshot logical volume, it is characterized in that the structure of said snapshot logical volume comprises: data field, amendment record bitmap, modified address concordance list, snapshot address reference table;
The data field is used to leave in the legacy data that source logical volume during the snapshot is modified the zone;
Whether the amendment record bitmap is used for record and creates the snapshot time point and begin to set up each data block of snapshot opisthogenesis logical volume and be modified;
The modified address concordance list is used for preserving the address that the source logical volume is modified the zone and is modified the ground rubbish that regional legacy data is stored in said data field with this;
The snapshot address reference table is used for preserving the address that logical volume address, source and said each data block of establishment snapshot time point snapshot are stored.
The time point that said cascade snapshot refers to create snapshot is continuous, and the snapshot of earliest time point depends on and comprises the snapshot logical volume of said earliest time point at interior follow-up all time points.
2. the fast photographic system of support cascade snapshot as claimed in claim 1; It is characterized in that; The list item of stored address reference table is two data block address in the concordance list of said modified address; The first column data block address is a source logical volume data block address, and the secondary series data block address is old data block storage addresses in the snapshot logical volume.
3. the fast photographic system of support cascade snapshot as claimed in claim 1 is characterized in that, the list item of stored address reference table is two data block address in the said snapshot address reference table, and what the first column data piece was deposited is source logical volume data block address; What the secondary series data block was deposited is the stored address of snapshot data, can be that the address in the logical volume of source also can be the address in the snapshot logical volume.
4. a snap processing method of supporting the fast photographic system of cascade snapshot is characterized in that, may further comprise the steps:
A, setting up snapshot, is an establishing logical volume snapshot;
B, write snapshot, in snapshot processes to source logical volume write data;
C, end snapshot upgrade this snapshot at every turn and reach the snapshot logical volume address table of all time point snapshots before when finishing snapshot;
D, read snapshot, snapshot reads snapshot data after setting up and accomplishing from the snapshot logical volume;
E, deletion snapshot, gain quick return according to the shared storage resources and the source logical volume of maintenance is the normal data state.
5. like the snap processing method of the fast photographic system of the said support cascade of claim 4 snapshot, it is characterized in that the said snapshot of setting up may further comprise the steps:
A1, distribute the snapshot logical volume for setting up snapshot, for this snapshot logical volume distributes corresponding auxiliary storage structure, the auxiliary storage structure comprises: data field, amendment record bitmap, modified address concordance list, snapshot address reference table;
A2, initialization amendment record bitmap are labeled as 0 with all positions in the bitmap;
A3, initialization modified address concordance list are set up an empty table;
A4, initial snapshot address reference table, all data block address point to the source logical volume.
6. like the snap processing method of the fast photographic system of the said support cascade of claim 4 snapshot, it is characterized in that the said snapshot of writing may further comprise the steps:
B1, according to the minimum unit of handling with deblocking;
B2, get first data block of need handling;
B3, check the value of this data block of mark in the amendment record bitmap, judge whether the content of wanting the write data piece on the logical volume of source is modified,, change step b7 if data are modified; Otherwise, carry out next step;
B4, with on the logical volume of source with the copying data that is capped to the snapshot logical volume;
B5, in the concordance list of modified address, set up the index of depositing the old data block address in source logical volume data block address and the snapshot logical volume;
B6, in the amendment record bitmap, will be labeled as 1 to modification that should data block;
B7, new data block is write the source logical volume;
B8, handle next data block, change step b3, all data blocks in handling write operation.
7. like the snap processing method of the fast photographic system of the said support cascade of claim 4 snapshot, it is characterized in that the said snapshot of reading may further comprise the steps:
C1, get the snapshot address reference table of this time point;
C2, find the logical volume at data places according to the address in the snapshot address reference table, then according to the address read block;
C3, repeating step c2 are up to running through all data.
8. like the snap processing method of the fast photographic system of the said support cascade of claim 4 snapshot, it is characterized in that said end snapshot may further comprise the steps:
D1, get all time point amendment record bitmaps;
D2, check this time point amendment record bitmap, find the data block address of first modification, and get this data block storage addresses in the snapshot logical volume;
The address that this data block in the snapshot address reference table of revising the bitmap time point is handled in d3, renewal at present is this time point snapshot logical volume old data block storage addresses;
D4, check that present processing revises this data block of last time point of bitmap time point and whether be modified,, change steps d 6 if this data block is revised, otherwise, next step carried out;
D5, commentaries on classics steps d 3 are revised the snapshot that the bitmap time point does not have previous time point up to present processing;
D6, the data block that finds the next one to revise are changeed steps d 3, all handle up to the data block of this time point all modifications.
9. like the snap processing method of the fast photographic system of the said support cascade of claim 4 snapshot, it is characterized in that said deletion snapshot may further comprise the steps:
The snapshot relation of e1, deletion source logical volume and snapshot logical volume;
E2, deletion snapshot logical volume and snapshot auxiliary space discharge resource.
CN200710074386A 2007-05-21 2007-05-21 Snapshot system supporting cascades snapshot and snapshot processing method thereof Active CN101140536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710074386A CN101140536B (en) 2007-05-21 2007-05-21 Snapshot system supporting cascades snapshot and snapshot processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710074386A CN101140536B (en) 2007-05-21 2007-05-21 Snapshot system supporting cascades snapshot and snapshot processing method thereof

Publications (2)

Publication Number Publication Date
CN101140536A CN101140536A (en) 2008-03-12
CN101140536B true CN101140536B (en) 2012-09-05

Family

ID=39192495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710074386A Active CN101140536B (en) 2007-05-21 2007-05-21 Snapshot system supporting cascades snapshot and snapshot processing method thereof

Country Status (1)

Country Link
CN (1) CN101140536B (en)

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887750A (en) * 2009-05-15 2010-11-17 康佳集团股份有限公司 Method for storing dynamic data by using Flash memory
CN101661415B (en) * 2009-09-21 2012-07-11 中兴通讯股份有限公司 Method for memorizing snapshot data and system for memorizing snapshot
CN101840362B (en) * 2009-10-28 2012-05-30 创新科存储技术有限公司 Method and device for achieving copy-on-write snapshot
US8788770B2 (en) * 2010-05-25 2014-07-22 International Business Machines Corporation Multiple cascaded backup process
CN102184140A (en) * 2011-04-01 2011-09-14 航天恒星科技有限公司 Real-time database-orientated table file space distribution method
EP2569921B1 (en) * 2011-07-01 2017-11-08 Huawei Technologies Co., Ltd. System and method for providing reliable storage
US9026849B2 (en) 2011-08-23 2015-05-05 Futurewei Technologies, Inc. System and method for providing reliable storage
US9335931B2 (en) 2011-07-01 2016-05-10 Futurewei Technologies, Inc. System and method for making snapshots of storage devices
CN103365742B (en) * 2012-03-30 2017-06-23 伊姆西公司 Accelerate method, equipment and computer program that snapshot service goes up linear velocity again
CN103077099B (en) * 2013-01-08 2015-09-30 中国科学院计算技术研究所 A kind of piece of level fast photographic system and the user writable method based on this system
CN104050200B (en) * 2013-03-15 2017-12-08 伊姆西公司 Method and apparatus for data copy
CN103838647B (en) * 2014-02-17 2018-02-06 中国科学院计算技术研究所 A kind of method and system of the data mode conversion remapped based on snapshot
CN105988723A (en) * 2015-02-12 2016-10-05 中兴通讯股份有限公司 Snapshot processing method and device
CN105138330B (en) * 2015-08-25 2018-11-13 浪潮(北京)电子信息产业有限公司 The processing method and processing unit of dygraphs Drawing Objects
US9940041B2 (en) * 2015-09-21 2018-04-10 International Business Machines Corporation Copy-redirect on write
CN105677252B (en) * 2016-01-06 2019-06-07 华为技术有限公司 Read method, data processing method and the associated storage device of data
CN106951375B (en) * 2016-01-06 2021-11-30 北京忆恒创源科技股份有限公司 Method and device for deleting snapshot volume in storage system
CN107179964A (en) * 2016-03-11 2017-09-19 中兴通讯股份有限公司 The reading/writing method and device of snapshot
CN106569738B (en) 2016-09-30 2019-11-29 华为技术有限公司 A kind of method and device for deleting cascade snapshot
CN106844644B (en) * 2017-01-19 2020-03-31 郑州云海信息技术有限公司 Snapshot data storage management method and device
US10083087B1 (en) 2017-07-14 2018-09-25 International Business Machines Corporation Managing backup copies in cascaded data volumes
CN107423165A (en) * 2017-08-01 2017-12-01 郑州云海信息技术有限公司 A kind of data snapshot head writes copy method and device
CN109408278B (en) * 2017-08-15 2021-06-15 李剑春 Data processing method and device
CN107562578B (en) * 2017-09-25 2021-06-29 郑州云海信息技术有限公司 Snapshot creating method, device, equipment and storage medium for stored data
CN109508255B (en) * 2018-07-26 2021-10-29 郑州云海信息技术有限公司 Data processing method and device
CN109117308A (en) * 2018-07-27 2019-01-01 华为技术有限公司 The method and apparatus of snapshot processing
CN109324929B (en) * 2018-09-17 2021-11-09 郑州云海信息技术有限公司 Snapshot creating method, device and equipment and readable storage medium
CN110032475A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of cloning process of logical volume, device and equipment
CN111124756A (en) * 2019-12-18 2020-05-08 浪潮(北京)电子信息产业有限公司 Snapshot relationship display method, device, equipment and medium
CN113468103B (en) * 2020-03-30 2024-03-08 阿里巴巴集团控股有限公司 Method and device used in snapshot migration
CN112347037A (en) * 2020-10-13 2021-02-09 北京天融信网络安全技术有限公司 Snapshot processing method, device, medium and electronic equipment for storage volume
CN112416860B (en) * 2020-11-16 2024-04-26 平安科技(深圳)有限公司 Data rollback updating method, device, computer equipment and storage medium
CN113342741B (en) * 2021-07-30 2021-10-12 联想凌拓科技有限公司 Snapshot implementation method and device, electronic equipment and computer readable storage medium
CN117311911B (en) * 2023-11-29 2024-02-23 苏州元脑智能科技有限公司 Virtual machine snapshot method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704904A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot handling method for memory system
EP1653359A2 (en) * 2004-11-02 2006-05-03 Hewlett-Packard Development Company, L.P. Data duplication operations in storage networks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704904A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot handling method for memory system
EP1653359A2 (en) * 2004-11-02 2006-05-03 Hewlett-Packard Development Company, L.P. Data duplication operations in storage networks

Also Published As

Publication number Publication date
CN101140536A (en) 2008-03-12

Similar Documents

Publication Publication Date Title
CN101140536B (en) Snapshot system supporting cascades snapshot and snapshot processing method thereof
CN101169751B (en) System with flash memory device and data recovery method thereof
US7587433B2 (en) Method and system for in-place updating content stored in a storage device
US6651075B1 (en) Support for multiple temporal snapshots of same volume
CN102012852B (en) Method for implementing incremental snapshots-on-write
US6587915B1 (en) Flash memory having data blocks, spare blocks, a map block and a header block and a method for controlling the same
CN101300554B (en) Recovering from a non-volatile memory failure
CN101840362B (en) Method and device for achieving copy-on-write snapshot
CN100412823C (en) Method and system for managing atomic updates on metadata tracks in a storage system
AU722146B2 (en) A device driver for accessing computer files
JP3524428B2 (en) Storage device, storage system, memory management method, and recording medium
CN101331444A (en) Online storage volume shrink
CN102707900A (en) Virtual disk storage techniques
US8555023B2 (en) Method and system for managing large write-once tables in shadow page databases
CN100501868C (en) Method for realizing memory file system based on NAND Flash
US7698319B2 (en) Database system management method, database system, database device, and backup program
US20040260919A1 (en) Computer system and method therefor to bootup the system quickly after initialization
US20130024644A1 (en) Methods for optimizing data movement in solid state devices
US20110213954A1 (en) Method and apparatus for generating minimum boot image
CN107943414A (en) The file partition of built-in Linux and data read-write method
CN105988723A (en) Snapshot processing method and device
US9146928B1 (en) Techniques for storing metadata of a filesystem in persistent memory
CN107239526A (en) File system implementation method, scrap cleaning method, operating position localization method
CN101510332B (en) Method and apparatus for managing memory space of smart card
CN101878472A (en) Memory management

Legal Events

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