CN110018988A - Snapshot delet method, processing method, apparatus and system - Google Patents

Snapshot delet method, processing method, apparatus and system Download PDF

Info

Publication number
CN110018988A
CN110018988A CN201711093506.1A CN201711093506A CN110018988A CN 110018988 A CN110018988 A CN 110018988A CN 201711093506 A CN201711093506 A CN 201711093506A CN 110018988 A CN110018988 A CN 110018988A
Authority
CN
China
Prior art keywords
data block
snapshot
data
block
section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711093506.1A
Other languages
Chinese (zh)
Other versions
CN110018988B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711093506.1A priority Critical patent/CN110018988B/en
Publication of CN110018988A publication Critical patent/CN110018988A/en
Application granted granted Critical
Publication of CN110018988B publication Critical patent/CN110018988B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present application provides a kind of snapshot delet method, processing method, apparatus and system.In the embodiment of the present application, for the data space for needing to carry out snapshot deletion, according to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, the continuous data block in relative position that the normal snapshot of the data space includes is divided into a data block section;And then the information of all data blocks in the data block section is replaced in the ID of relative position, termination data block in relative position and affiliated snapshot in affiliated snapshot in affiliated snapshot using the initial data block in data block section, hash block is identified from the snapshot to be deleted of the data space and is deleted, it is not the information using data block each in data block section during identifying hash block, reduce the data volume relied on during identification hash block, advantageously reduces memory consumption.

Description

Snapshot delet method, processing method, apparatus and system
Technical field
This application involves technical field of memory more particularly to a kind of snapshot delet methods, processing method, apparatus and system.
Background technique
With the raising of storage demand, snapping technique is used by more and more storage systems.Snapshot is actually to close A completely available copy of data in storage system, the copy include that the data in storage system are copying start time Image.
After creating snapshot, need to store snapshot.In this way, when application failure or file corruption occur for storage system When, the data in storage system can be reverted to the state of snapshot generation time point in time.
With the use of storage system, the quantity of snapshot can be increasing, and in order to save memory space, can be deleted Useless snapshot, to discharge memory space.It is to compare the operation for expending memory that snapshot, which is deleted, in the situation that memory source is limited Under, it needs to compress memory source consumed by snapshot delete operation as far as possible, preferentially to meet the memory requirements of other key businesses. And how to reduce snapshot delete operation is problem to be solved to the consumption of memory source.
Summary of the invention
The many aspects of the application provide a kind of snapshot delet method, processing method, apparatus and system, to reduce snapshot Consumption of the delete operation to memory source.
The embodiment of the present application provides a kind of snapshot delet method, comprising: obtains the data storage for needing to carry out snapshot deletion The normal snapshot of at least one of space, the normal snapshot of each of at least one described normal snapshot include data block;According to number According to relative position of the ID and data block of the affiliated snapshot of block in affiliated snapshot, include by least one described normal snapshot Data block is assigned at least one data block section, and each data block section at least one described data block section indicates one A discontinuous data block in relative position or the continuous data block in multiple relative positions;According at least one described data block section Initial data block in affiliated snapshot relative position, terminate relative position of the data block in affiliated snapshot and affiliated fast According to ID, identify hash block from the snapshot to be deleted of the data space;Delete the hash block.
The embodiment of the present application also provides a kind of snapshot deletion device, comprising: obtains module, needs to carry out snapshot for obtaining The normal snapshot of at least one of the data space of deletion, the normal snapshot of each of at least one described normal snapshot include Data block;Division module will for the relative position according to the ID and data block of the affiliated snapshot of data block in affiliated snapshot The data block that at least one described normal snapshot includes is assigned at least one data block section, at least one described data block area Between in each data block section indicate the discontinuous data block in a relative position or the continuous data block in multiple relative positions; Identification module, for according to relative position of the initial data block at least one data block section in affiliated snapshot, end The only ID of relative position and affiliated snapshot of the data block in affiliated snapshot, from the snapshot to be deleted of the data space In identify hash block;Removing module, for deleting the hash block.
The embodiment of the present application also provides a kind of electronic equipment, comprising: memory and processor;
The memory, for storing program;
The processor is coupled with the memory, for executing described program to be used for:
Obtain at least one the normal snapshot for needing to carry out the data space of snapshot deletion, described at least one is normal The normal snapshot of each of snapshot includes data block;According to the ID of the affiliated snapshot of data block and data block in affiliated snapshot The data block that at least one described normal snapshot includes is assigned at least one data block section by relative position, it is described at least Each data block section in one data block section indicates the discontinuous data block in a relative position or multiple relative positions Continuous data block;According to relative position of the initial data block at least one data block section in affiliated snapshot, end The only ID of relative position and affiliated snapshot of the data block in affiliated snapshot, from the snapshot to be deleted of the data space In identify hash block;Delete the hash block.
The embodiment of the present application also provides a kind of computer readable storage medium for being stored with computer program, the computer It can be realized the step in above-mentioned snapshot delet method when program is computer-executed.
The present embodiment also provides a kind of storage system, comprising: at least one storage equipment and snapshot management equipment;
At least one storage equipment, for providing data space, and needle to the user of the storage system Snapshot storage space is provided to the data space, the snapshot storage space is stored with each of the data space Snapshot, the data space include at least one partition holding;
The snapshot management equipment is coupled at least one storage equipment, is used for: obtaining the data space At least one normal snapshot, the normal snapshot of each of at least one described normal snapshot include and it is described at least one storage The one-to-one data block of subregion;According to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, The data block that at least one described normal snapshot includes is assigned at least one data block section, at least one described data block Each data block section in section indicates the discontinuous data block in a relative position or the continuous data in multiple relative positions Block;According to relative position of the initial data block at least one data block section in affiliated snapshot, terminates data block and exist The ID of relative position and affiliated snapshot in affiliated snapshot, identifies nothing from the snapshot to be deleted of the data space Use data block;Delete the hash block.
The embodiment of the present application also provides a kind of snap processing method, comprising:
Obtain at least one data block for belonging to same snapshot;According at least one described data block in the snapshot Relative position identifies that data block segment present at least one described data block, the data block segment include one opposite The continuous data block of the discontinuous data block in position or multiple relative positions;Existed according to initial data block in the data block segment The ID of the offset address and the snapshot of offset address, termination data block in the snapshot in the snapshot, generates and uses In the data block section for indicating the data block segment.
The embodiment of the present application also provides a kind of electronic equipment, comprising: memory and processor;
The memory, for storing program;
The processor is coupled to the memory, for executing described program to be used for:
Obtain at least one data block for belonging to same snapshot;According at least one described data block in the snapshot Relative position identifies that data block segment present at least one described data block, the data block segment include one opposite The continuous data block of the discontinuous data block in position or multiple relative positions;Existed according to initial data block in the data block segment The ID of the offset address and the snapshot of offset address, termination data block in the snapshot in the snapshot, generates institute State the corresponding data block section of data block segment.
The embodiment of the present application also provides a kind of storage system, comprising: at least one storage equipment and snapshot management equipment;
At least one storage equipment, for providing data space, and needle to the user of the storage system Snapshot storage space is provided to the data space, the snapshot storage space is stored with each of the data space Snapshot, the data space include at least one partition holding;
The snapshot management equipment, be coupled at least one storage equipment, be used for: acquisition belongs to same snapshot extremely A few data block;According to relative position of at least one the described data block in the snapshot, at least one described number of identification According to data block segment present in block, the data block segment includes the discontinuous data block in a relative position or multiple opposite The continuous data block in position;According to offset address, termination number of the initial data block in the data block segment in the snapshot According to the ID of offset address and the snapshot of the block in the snapshot, the corresponding data block area of the data block segment is generated Between.
The embodiment of the present application also provides a kind of computer readable storage medium for being stored with computer program, the computer It can be realized the step in above-mentioned snap processing method when program is computer-executed.
In the embodiment of the present application, fast according to belonging to data block for the data space for needing to carry out snapshot deletion According to the relative position in affiliated snapshot ID and data block, the opposite position for including by the normal snapshot of the data space It sets continuous data block and is divided into a data block section;And then using the initial data block in data block section in affiliated snapshot Relative position, terminate data block relative position and affiliated snapshot in affiliated snapshot ID replace the data block section in The information of all data blocks identifies hash block and is deleted from the snapshot to be deleted of the data space, identified It is not to reduce identification hash block mistake using the information of data block each in data block section during hash block The data volume relied in journey, advantageously reduces memory consumption.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the structural schematic diagram for the exemplary memory system that one exemplary embodiment of the application provides;
Fig. 2 a is the exemplary knot that partition holding is divided to data space that one exemplary embodiment of the application provides Fruit schematic diagram;
The storage pattern schematic diagram of snapshot in the snapshot storage space that Fig. 2 b provides for one exemplary embodiment of the application;
Fig. 3 a is the flow diagram for the snapshot delet method that the application another exemplary embodiment provides;
Fig. 3 b is that the snapshot for a cloud disk that the application another exemplary embodiment provides deletes flow diagram;
Fig. 3 c is the flow diagram for the snap processing method that the application another exemplary embodiment provides;
Fig. 4 a is the structural schematic diagram that the snapshot that the application another exemplary embodiment provides deletes device;
Fig. 4 b is the structural schematic diagram for a kind of electronic equipment that the application another exemplary embodiment provides;
Fig. 5 a is the structural schematic diagram for the snapshot processing unit that the application another exemplary embodiment provides;
Fig. 5 b is the structural schematic diagram for another electronic equipment that the application another exemplary embodiment provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Aiming at the problem that snapshot delete operation of the existing technology compares and expends memory, the embodiment of the present application provides one kind Solution, cardinal principle are: for the data space for needing to carry out snapshot deletion, according to the ID of the affiliated snapshot of data block And relative position of the data block in affiliated snapshot, the relative position for including by the normal snapshot of the data space are continuous Data block be divided into a data block section;And then using the initial data block in the data block section marked off in affiliated snapshot In relative position, terminate data block relative position and affiliated snapshot in affiliated snapshot ID replace data block section in The information of each data block identifies hash block and is deleted from the snapshot to be deleted of the data space, in identification nothing With not being to reduce identification hash block mistake using the information of data block each in data block section during data block The data volume relied in journey, reduces memory consumption.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Fig. 1 is the structural schematic diagram for the exemplary memory system 10 that one exemplary embodiment of the application provides.Such as Fig. 1 institute Show, which includes: at least one storage equipment 11 and snapshot management equipment 12.
At least one storage equipment 11, for providing data space to the user of storage system 10, and for number Corresponding snapshot storage space is provided according to memory space, each fast of the data space is stored in the snapshot storage space According to.
Wherein, for different users, at least one storage equipment 11 can provide the data space of same size And snapshot storage space, different size of data space and snapshot storage space can also be provided.In addition, in the application In each embodiment, the size of data space and snapshot storage space is not limited.For example, data space can be One block size is the memory space of 500MB, 800MB or 50GB.It is 500MB, 200MB that snapshot storage space, which can be a block size, Or the memory space of 1GB.
For storage system 10, it includes at least one storage equipment 11 can be the storage equipment of same type, It is also possible to different types of storage equipment.For any storage equipment 11, any setting with store function can be It is standby, such as can be server, desktop computer, personal computer, mobile phone, tablet computer, database etc..Server can be General Server, Cloud Server, cloud host, virtual center etc..Every storage equipment 11 realization structure may include processor, At least one piece of physical storage medium such as system bus and hard disk, memory.
For any storage equipment 11, it includes at least one piece of physical storage medium can be the physics of same type Storage medium is also possible to different types of physical storage medium.For any physical storage medium, such as phase can be selected Become memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random Access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, Any one in read-only disc read only memory (CD-ROM) (CD-ROM), digital versatile disc (DVD) and magnetic tape cassette etc..
It is above-mentioned to store the data space that the user that equipment 11 is storage system 10 provides by least one, it is main to use It in storage data relevant to the user of storage system 10, such as may include user data, system data, types of applications number According to etc..For the user of storage system 10, data can be written into the data space, can also be deposited from the data Storage reads data in space.Wherein, the user of storage system 10, which can be, has access and/or the right to use to storage system 10 Computer, virtual machine, types of applications, terminal device and user of limit etc..The user of storage system 10 can have one or It is multiple.
In an example implementations, it is empty that storage system 10 provides data storage to its user in a manner of cloud disk Between.The cloud disk that storage system 10 provides is built upon the disk example at least one storage equipment 11.Cloud disk and meter Calculation machine disk is similar, and user can be written and read it.Cloud disk needs are mapped at least one storage equipment 11 Physical storage medium on, such as disk, ROM etc..It is worth noting that storage system 10 provides data storage to its user The mode in space is not limited to a kind of this mode of cloud disk.For example, storage system 10 can also be used with database mode to it Person provides data space.
In storage system 10, snapshot management equipment 12 mainly realizes the snapshot functions of storage system 10, to be to storage Data carry out backup and disaster tolerance in system 10.Wherein, snapshot management equipment 12 is coupled at least one storage equipment 11, main negative Duty is data space creation, maintenance and the pipe that at least one storage equipment 11 is provided towards the user of storage system 10 Manage snapshot.
On deployment is realized, snapshot management equipment 12 can individually dispose, such as Fig. 1 independently of at least one storage equipment 11 It is shown.When snapshot management equipment 12 individually implemented by deployment, snapshot management equipment 12 can be any with certain processing capacity Equipment, such as server, desktop computer, personal computer, mobile phone, tablet computer etc..
Other than individually disposing implementation, snapshot management equipment 12 can also be deployed in one or more storage equipment 11 It realizes.The storage equipment 11 of snapshot management equipment 12 is deployed with other than with storage capacity, also there is creation, maintenance and pipe Manage the ability of the snapshot in storage system 10.
During 10 use of storage system, snapshot management equipment 12 can be in different time points at least one storage Equipment 11 creates several snapshots towards the data space that the user of storage system 10 provides, and becomes a snapshot chain.Often The snapshot at one time point can be regarded as the data space when at corresponding time point institute's storing data a copy or Duplicate.These snapshots are stored in the snapshot storage space that at least one storage equipment 11 provides.When storage system 10 is sent out When the loss of data stored in raw failure or storage system 10, data rewind can be carried out according to snapshot, by data space In data be restored to the data mode that some snapshot on snapshot chain records.
In view of the data stored in data space are divided into cold and hot, many data for a long time can just be changed.Therefore, exist Often only have low volume data to have any different in each snapshot of data space.In order to save space, snapshot management equipment 12 exists Duplicate removal memory technology is used when storing snapshot.
In a kind of embodiment of duplicate removal memory technology, at least one in storage system 10 is stored according to address offset Equipment 11 is divided at least one partition holding towards the data space that the user of storage system 20 provides.Partition holding Size can be divided according to the factors adaptability such as size of data space, such as the storage region of every 2MB, 10MB or 20MB It can be used as a partition holding.Wherein, the data stored in a partition holding or the data stored in a partition holding Snapshot (snapshot data of i.e. one partition holding) be known as a data block.In this way fast for data space creation every time According to when, only need to check each partition holding, be deposited if corresponding to this in the current data block of the partition holding and existing snapshot before The data block for storing up subregion is identical, then has the data block in snapshot before continuing to use in new snapshot, is not repeated that storage should Data block;If the current data block of the partition holding and having correspond to the data block of the partition holding not phase in snapshot before Together, then the current data block of the partition holding is stored again in new snapshot.
As shown in Figure 2 a, it is assumed that the data storage that at least one storage equipment 11 is provided towards the user of storage system 20 Space is split as 4 partition holdings, is denoted as partition holding Q1-Q4.The partition holding in conjunction with shown in Fig. 2 a is data space Creation snapshot process include:
For the first time it is that data space creates snapshot, is denoted as snapshot A, snapshot A is stored at least one storage equipment 11 In the snapshot storage space of offer.Storage pattern of the snapshot A in snapshot storage space is as shown in Figure 2 b, including data block 1-A, Data block 2-A, data block 3-A and data block 4-A.
After creating snapshot A, it is assumed that the data in partition holding Q1 and Q3 are changed, other partition holdings Data are not changed.
After above-mentioned change, second is data space creation snapshot, is denoted as snapshot B, snapshot B is stored in snapshot In memory space.Wherein, storage pattern of the snapshot B in snapshot storage space is as shown in Figure 2 b, comprising: data block 1-B and Data block 3-B.In snapshot B, the data block 2-A and data block 4-A in snapshot A are continued to use, without storing data block again 2-A and data block 4-A need to only record the title of the data block in the existing snapshot used in the list of meta data of snapshot B, To read respective data blocks from the memory space of snapshot A.Here to create two snapshot (snapshot A for data space It is illustrated with for snapshot B), more snapshots can be created in practical application for data space.Wherein, snapshot A and fast A snapshot chain of data space can be formed according to B.
For the snapshot chain of data space, there is a snapshot list, record has the snapshot chain each of to include The title of snapshot.For each snapshot, with the list of meta data of oneself, being sequentially recorded the snapshot in list of meta data makes The title for each data block used.For example, successively record has the title of data block: 1-A, 2- in the list of meta data of snapshot A A, 3-A and 4-A;Successively record has the title of data block: 1-B, 2-A, 3-B and 4-A in the list of meta data of snapshot B.
Only need storage primary it is found that identical block is in snapshot storage space by Fig. 2 b, in other words snapshot storage space Middle storage is all different data block, can save a large amount of memory spaces in this way.
Snapshot management equipment 12 can also be managed the snapshot created other than it can create snapshot.It is described Management includes but is not limited to: backup, storage, deletion and recycling snapshot space etc..
In an exemplary application, snapshot management equipment 12 embodies the management of snapshot are as follows: to the fast of data memory space Shine into row delete operation.It is alternatively possible to which setting snapshot deletes the period, in order to periodically carry out snapshot delete operation.Base In this, when the snapshot of setting, which deletes the period, to be reached, it can trigger snapshot management equipment 12 for data space and execute snapshot Delete operation.Alternatively, can also set snapshot deletes trigger event, when the snapshot of setting, which deletes trigger event, to arrive, can touch It sends out snapshot management equipment 12 and executes snapshot delete operation for data space.
Wherein, snapshot deletion is carried out to data space, can be and is identified from the snapshot of the data space The hash block that can be deleted, the process that these hash blocks are deleted.In general the number not used by any snapshot It can be used as hash block according to block to be deleted.
In the use process of storage system 10, which user can determine to need to delete fastly according to their own needs According to.For example, for some snapshots that will not be reused, or the snapshot for some creation times earlier than setting time boundary, User can require snapshot management equipment 12 to delete these snapshots.For example, user can send out to snapshot management equipment 12 Snapshot removal request is sent, the ID of the snapshot of deletion in need is carried in the request.Or user can be directly fast for these Label is deleted according to addition.Based on this, snapshot management equipment 12 deletes logic in the snapshot according to oneself and executes snapshot delete operation When, snapshot to be deleted and normal snapshot can be identified from the snapshot of data space.Here normal snapshot is mainly Refer to other snapshots except snapshot to be deleted.Data block in normal snapshot belongs to normal data block, cannot be deleted;And to The data block deleted in snapshot is potentially possible deleted data block.Wherein, normal snapshot can be at least one;Accordingly Ground, snapshot to be deleted are also possible at least one.
Next, snapshot management equipment 12 can be using normal snapshot as foundation, identifying from snapshot to be deleted can be deleted The hash block removed.Wherein, snapshot management equipment 12 can use various ways, and identifying from snapshot to be deleted can be deleted The hash block removed.The performance of different modes generally will be different.
For example, in a kind of mode, it can be by the data block that normal snapshot includes and the data block that snapshot to be deleted includes It compares one by one, to obtain the data block not used by any normal snapshot in snapshot to be deleted as hash block.Generally For, in order to guarantee that the efficiency of snapshot delete operation, the data block information that snapshot delete operation is related to need to be loaded onto caching, If the data block information that all normal snapshots include is loaded onto memory, this can consume more memory source.Assuming that In an exemplary application scene, the quantity for the data block that the normal snapshot of data space 20 includes is 1,000,000,000, it is assumed that every A data block information needs the space of at least 10-20 byte, then the information of 1,000,000,000 data blocks need to occupy the memory of 10GB, this Memory consumption is very big.
In the present embodiment, based on being divided at least one partition holding by data space 20, such conduct The snapshot of data space 20, need include and at least one one-to-one data block of at least one partition holding.Also It is to say, each snapshot needs that data space could be constituted at a time comprising data block corresponding with each partition holding Image.Moreover, the relative position in each snapshot is all the same, also for the data block of the same partition holding of correspondence It is relative position of the corresponding partition holding in data space 20.It, can be described in the creation and for a data block It is stored at the respective offsets address of first snapshot of data block, then in subsequent snapshot, at corresponding same offset address Have the data block in snapshot before continuing to use or stores new data block again.For a data block, only A snapshot can be belonged to, that is, create the snapshot of the data block.It means that any data block can pass through its affiliated snapshot Unique identification is carried out in ID and its relative position in affiliated snapshot.
Based on above-mentioned, when needing to carry out snapshot deletion to data space 20, snapshot management equipment 12 can obtain number According to the normal snapshot of memory space 20, the quantity of normal snapshot is at least one;According to the ID and number of the affiliated snapshot of data block According to relative position of the block in affiliated snapshot, the data block that at least one normal snapshot includes is assigned at least one data block Section, each data block section at least one described data block section indicate the discontinuous data block in a relative position or Multiple continuous data blocks in relative position;It is opposite in affiliated snapshot according to the initial data block at least one data block section Position, the ID for terminating relative position and affiliated snapshot of the data block in affiliated snapshot, from the to be deleted of data space Hash block is identified in snapshot;Delete hash block." data block section " in the embodiment of the present application is mathematical concept On section, be the collection of the number of some range, generally with aggregate form, the not equivalent to amount of physical memory of data block.
In the present embodiment, the relative position by the ID and data block of the affiliated snapshot of data block in affiliated snapshot come Indicate each data block.In addition, the relative position according to the ID and data block of the affiliated snapshot of data block in affiliated snapshot, Same normal snapshot will be belonged to and continuous data block is assigned to a data block section, utilize the initial data in data block section ID of the block in the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot in affiliated snapshot is replaced The information of all data blocks in the data block section identifies hash block from snapshot to be deleted, in identification hash block During be not using the information of data block each in data block section, reduce identification hash block during relied on Data volume, advantageously reduce memory consumption.
For example, it is assumed that data space 20 is divided into 500 partition holdings, each snapshot of data space 20 Include 500 data blocks, it is assumed that there are 300 data blocks in 500 data blocks that a normal snapshot C1 includes is to belong to this normally Snapshot, relative position of 300 data blocks in normal snapshot C1 is 201-500.Based on this, this 300 data blocks can quilt Be divided in a data block section, and the data block section can by relative position of the initial data block in normal snapshot C1, The ID of relative position and normal snapshot C1 of the data block in normal snapshot C1 is terminated to indicate, such as be represented by [C1, 201,500], or be expressed as [201,500, C1] etc..It can be seen that using three information in data block section instead of 300 The information of a data block considerably reduces the data volume relied in hash block identification process, is conducive to save memory Resource.
It is worth noting that according to practical situations it is found that being updated to the data in data space 20 When, in more situations it is that the data in the multiple Coutinuous store subregions for including to data space 20 simultaneously are updated, but Being not precluded in special circumstances may be updated the data in some or certain several discontinuous partition holdings.It is right based on this In snapshot, the discontinuous individual data block in relative position is also divided in a data block section.It means that the present embodiment Data block section is perhaps including the discontinuous data block in a relative position or including the continuous data in multiple relative positions Block.Wherein, most data block section includes the continuous data block in multiple relative positions.
In above-described embodiment or following embodiments, snapshot management equipment 12 is needed the normal fast of data space 20 At least one data block section is assigned to according to the data block for being included.Optionally, snapshot management equipment 12 can be according to data block Relative position of the ID and data block of affiliated snapshot in affiliated snapshot, the data for including by least one normal snapshot respectively The data block for belonging to same snapshot in block is assigned to several data block sections at least one data block section.Wherein, until In the data block that a few normal snapshot includes other than belonging to the data block of normal snapshot, it may will also include and belong to wait delete Except the data block in snapshot, such as certain normal snapshots may lead and use some for belonging to snapshot to be deleted or certain data blocks. It means that same snapshot involved in the data block that at least one above-mentioned normal snapshot includes may be a normal snapshot, It may be a snapshot to be deleted.For each snapshot involved in the data block that at least one normal snapshot includes, look after fastly Reason equipment 12 can adopt in a like fashion, and the data block for belonging to each snapshot is assigned to several data block sections.
By taking the first snapshot in above-mentioned same snapshot as an example, snapshot management equipment 12 can be according to the affiliated snapshot of data block The relative position of ID and data block in affiliated snapshot, it is fast by belonging to first in data block that at least one normal snapshot includes According to data block be assigned to several data block sections.First snapshot can be the data block institute that at least one normal snapshot includes Any snapshot in each snapshot being related to.Wherein, if the data block for belonging to the first snapshot is assigned to by snapshot management equipment 12 The process in dry data block section includes:
According to the ID for the affiliated snapshot of data block that the ID of the first snapshot and the first snapshot include, the number for including from the first snapshot According to identifying the data block for belonging to the first snapshot in block;According to belonging to opposite position of the data block of the first snapshot in the first snapshot It sets, the data block for belonging to the first snapshot is divided to several data block sections.
Wherein, it there may be the data block for belonging to the first snapshot in the data block that the first snapshot includes, it is also possible to deposit In the data block for being not belonging to the first snapshot, such as the data block of other snapshots cited in the first snapshot.Based on this, snapshot management Equipment 12 includes from the first snapshot in addition to the ID of the affiliated snapshot of data block for including of the ID and the first snapshot according to the first snapshot It identifies and belongs to except the data block of the first snapshot in data block, it is also possible to can include according to the ID and the first snapshot of the first snapshot The affiliated snapshot of data block ID, identified from the data block that the first snapshot includes and be not belonging to the first snapshot but to belong to second fast According to data block;And then it can be according to being not belonging to the first snapshot but belong to opposite position of the data block of the second snapshot in the second snapshot It sets, will not belong to the first snapshot but the data block for belonging to the second snapshot is divided to several numbers at least one data block section According to block section.Wherein, snapshot management equipment 12 will not belong to the first snapshot but belong to the second snapshot data block be divided to it is several The process in a data block section can refer to snapshot management equipment 12 for the data block for belonging to the first snapshot and be divided to several data The process in block section, referring specifically to subsequent embodiment.
Still optionally further, the data block institute that snapshot management equipment 12 includes in the ID and the first snapshot according to the first snapshot The ID for belonging to snapshot can be obtained in advance from being identified before belonging to the data block of the first snapshot in the data block that the first snapshot includes The ID of the affiliated snapshot of the data block for taking the first snapshot to include and the relative position in affiliated snapshot, in order to fast according to first According to ID and the first snapshot affiliated snapshot of data block that includes ID, identified from the data block that the first snapshot includes and belong to The data block of one snapshot.
In one exemplary embodiment, relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot It can be embodied by the title of data block, but it is not limited to this.
By taking Fig. 2 b as an example, the title for each data block that snapshot A includes, such as 1-A, 2-A, 3-A and 4-A and snapshot B The title for each data block for including, such as 1-B, 2-A, 3-B and 4-A, wherein the digital representation data block in title is in snapshot Relative position in A or snapshot B, A or B in title indicate snapshot A or B as the ID of snapshot A or B.Wherein, belong to snapshot The data block of A includes the data block that 1-A, 2-A, 3-A and 4-A are identified, and the data block for belonging to snapshot B includes 1-B and 3-B institute The data block of mark.It is worth noting that other names mode can also be used other than the naming method shown in Fig. 2 b, it is all It is that can reflect the naming method of the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot to be applicable in In the embodiment of the present application.
By taking recent snapshot as an example, the data block in recent snapshot at a certain position may be to belong to the data of recent snapshot Block, it is also possible to the data block of other snapshots (such as father's snapshot or father father's snapshot) before quoting recent snapshot.Based on above-mentioned The naming method of data block, to the data block at any position in recent snapshot, can be determined by the title of the data block should Data block is to belong to recent snapshot to still fall within other snapshots, and can determine opposite position of the data block in affiliated snapshot It sets.
Based on above-mentioned naming method, snapshot management equipment 12 obtains the affiliated snapshot of data block that the first snapshot includes in advance ID and the relative position in affiliated snapshot process include: the data block for including from the first snapshot title in, parse The ID of the affiliated snapshot of the data block that first snapshot includes and the relative position in affiliated snapshot.
It is worth noting that in above-described embodiment, for the first snapshot, can according to it includes data block title To judge whether data block belongs to the first snapshot.Optionally, the data block for the ease of more rapidly including from the first snapshot In identify the data block for belonging to the first snapshot, can be other cited in the first snapshot during creating the first snapshot A special marking, such as 0 is arranged in the data block of snapshot, for showing that the data block is to quote the data block of other snapshots.Base In this, for the first snapshot, it can identify that the data block in the first snapshot without special marking is fast as belonging to first According to data block;Correspondingly, identify the data block in the first snapshot with special marking as the data for belonging to other snapshots Block.
After being identified in the data block that the first snapshot includes and belonging to the data block of the first snapshot, snapshot management equipment 12 need to draw the data block for belonging to the first snapshot according to relative position of the data block of the first snapshot in the first snapshot is belonged to Divide to several data block sections.
In one exemplary embodiment, snapshot management equipment 12 can traverse the data block for belonging to the first snapshot, will traverse To each data block be divided in a certain data block section.Wherein, snapshot management equipment 12 can use identical processing side Formula will traverse each data block and be divided in a certain data block section.For this purpose, being to illustrate fastly with the data block currently traversed The treatment process that management equipment 12 will traverse data block and be divided in a certain data block section.For ease of description and distinguish, The data block currently traversed is denoted as the first data block.
To the first data block, snapshot management equipment 12 can according to relative position of first data block in the first snapshot, Judge whether the first data block has been positioned in the first snapshot corresponding data with existing block section.If judging result be there is no, Illustrate that the first data block is not yet present in the first snapshot corresponding data with existing block section, has number from the first snapshot is corresponding According to the data with existing block section adjacent with the first data block determining in block section;According to the first data block and with the first data block Adjacent data with existing block section marks off new data block section for the first snapshot.If judging result is to exist, illustrate the first number It is already present in some corresponding data with existing block section of the first snapshot according to block, then terminates the processing to the first data block.
In one exemplary embodiment, snapshot management equipment 12 can be by opposite position of first data block in the first snapshot It sets, respectively relative position and termination of the initial data block in data with existing block section corresponding with the first snapshot in affiliated snapshot Relative position of the data block in affiliated snapshot is compared.If there is no the in the first snapshot corresponding data with existing block section Three data with existing block sections determine that the first data block is not located in the first snapshot corresponding data with existing block section.Correspondingly, if There are third data with existing block section in first snapshot corresponding data with existing block section, determines that the first data block is located at and determine Data with existing block section in.Wherein, third data with existing block section is relative position of the initial data block in affiliated snapshot In the relative position in the first snapshot and relative position of the data block in affiliated snapshot is terminated less than or equal to the first data block More than or equal to the data with existing block section of relative position of first data block in the first snapshot.For example, it is assumed that the first snapshot ID be D1, and include 500 data blocks, and belong to relative position of the first data block of the first snapshot in the first snapshot and be 200, if there is no relative position of the initial data block in the first snapshot to be less than or equal to 200 in data with existing block section, And terminate the data with existing block section that relative position of the data block in the first snapshot is greater than or equal to 200, it is determined that the first number It is not located in the first snapshot corresponding data with existing block section according to block.
Further, in the case where determining that the first data block is not located in the first snapshot corresponding data with existing block section, Snapshot management equipment 12 can determine first adjacent with the first data block from the first snapshot corresponding data with existing block section Data with existing block section and/or the second data with existing block section.
Wherein, the first data with existing block section is the relative position and the first data block for terminating data block in affiliated snapshot Has number in the minimum and relative position less than the first data block in the first snapshot of the relative position difference in the first snapshot According to block section, i.e., the data with existing block section adjacent with the first data block before the first data block.It still is exemplified as example with above-mentioned, Then the first data with existing block section refers to that terminating relative position of the data block in the first snapshot differs minimum with 200 and be less than 200 data with existing block section, such as data block section [D1,120,180] etc..
Second data with existing block section is relative position of the initial data block in affiliated snapshot and the first data block the Relative position difference in one snapshot is minimum and is greater than the data with existing block of relative position of first data block in the first snapshot Section, i.e., the data with existing block section adjacent with the first data block after the first data block.Still be exemplified as example with above-mentioned, then Two data with existing block sections refer to that relative position of the initial data block in the first snapshot differs minimum and greater than 200 with 200 Data with existing block section, such as data block section [D1,202,300] etc..Starting number in data block section [D1,202,300] It is the data block that relative position is 202 in the first snapshot according to block, terminating data block is the number that relative position is 300 in the first snapshot According to block.
It is worth noting that may be only included in the first snapshot corresponding data with existing block section adjacent with the first data block The first data with existing block section, or the second data with existing block section adjacent with the first data block may be only included, can also It can simultaneously include the first data with existing block section and second data with existing block section adjacent with the first data block.
In one exemplary embodiment, the first data with existing block section adjacent with the first data block and/or the are being determined During two data with existing block sections, in order to improve efficiency, snapshot management equipment 12 can use dichotomy, from the first snapshot In corresponding data with existing block section, the first data with existing block section and/or the second data with existing block section are determined.Wherein, it closes In dichotomy reference can be made to the prior art, details are not described herein.
Further, the first data with existing block section and/or second data with existing block adjacent with the first data block are being determined After section, snapshot management equipment 12 is existing according to the first data with existing block section adjacent with the first data block and/or second Data block section, marking off new data block section for the first snapshot includes following several situations:
The first situation: the termination of relative position of first data block in the first snapshot and the first data with existing block section Relative position of the data block in affiliated snapshot is adjacent, and with the initial data block in the second data with existing block section in affiliated snapshot In relative position it is adjacent.Assuming that relative position of first data block in the first snapshot is n, then the first data with existing block section Relative position of the termination data block in affiliated snapshot be adjacent to n-1, the initial data block in the second data with existing block section exists Relative position in affiliated snapshot is n+1, it means that the first data block can be by the first data with existing block section and second There is data block section to connect.Thus it is possible to by the first data block, the first data with existing block section and the second data with existing A new data block section is merged into block section;The initial data block in new data block section is the starting in the first data with existing block section Data block, the termination data block in new data block section are the termination data block in the second data with existing block section.
Second situation: the termination of relative position of first data block in the first snapshot and the first data with existing block section Relative position of the data block in affiliated snapshot is adjacent, but not with the initial data block in the second data with existing block section affiliated fast Relative position according in is adjacent.Assuming that relative position of first data block in the first snapshot is n, then the first data with existing block area Between relative position of the termination data block in affiliated snapshot be adjacent to n-1, the initial data block in the second data with existing block section Relative position in affiliated snapshot is greater than other numerical value, such as n+2 or n+5 of n+1 etc., it means that the first data block can To merge with the first data with existing block section.Thus it is possible to which the first data block and the first data with existing block section are merged into one New data block section, the initial data block in new data block section are the initial data block in the first data with existing block section, new data The termination data block in block section is the first data block.
The third situation: relative position of first data block in the first snapshot not end with the first data with existing block section Only relative position of the data block in affiliated snapshot is adjacent, but with the initial data block in the second data with existing block section affiliated fast Relative position according in is adjacent.Assuming that relative position of first data block in the first snapshot is n, then the first data with existing block area Between relative position of the termination data block in affiliated snapshot be adjacent to other numerical value, such as n-2 or n-3 etc. less than n-1, Relative position of the initial data block in two data with existing block sections in affiliated snapshot is n+1, it means that the first data block can The second data with existing block section and the second data with existing block section to be connected.Thus it is possible to by the first data block and A new data block section is merged into two data with existing block sections, and the initial data block in new data block section is the first data block, newly The termination data block in data block section is the termination data block in the second data with existing block section.
4th kind of situation: relative position of first data block in the first snapshot not end with the first data with existing block section Only relative position of the data block in affiliated snapshot is adjacent, and not the initial data block with the second data with existing block section affiliated Relative position in snapshot is adjacent.Assuming that relative position of first data block in the first snapshot is n, then the first data with existing block Relative position of the termination data block in section in affiliated snapshot is adjacent to other numerical value, such as n-2 or n-3 etc. less than n-1, Relative position of the initial data block in the second data with existing block section in affiliated snapshot is greater than other numerical value of n+1, such as n + 2 or n+5 etc., it means that the first data block cannot merge with the first data with existing block section and the second data with existing block section. Thus it is possible to which the first data block is divided to a new data block section, the initial data block in new data block section is the first data Block, the termination data block in new data block section are the first data block.
It is worth noting that the n in the example above can be positive integer, value can be right depending on concrete application scene This is without limitation.
In above-described embodiment or following embodiments, different data block area is divided in the data block for including by normal snapshot Between after, snapshot management equipment 12 need it is opposite in affiliated snapshot according to the initial data block at least one data block section Position, the ID for terminating relative position and affiliated snapshot of the data block in affiliated snapshot, from the to be deleted of data space Hash block is identified in snapshot.
In one exemplary embodiment, snapshot management equipment 12 identifies that the process of hash block includes: according to be deleted The ID of the affiliated snapshot of the data block that snapshot includes and the relative position in affiliated snapshot and at least one data block section Initial data block in affiliated snapshot relative position, terminate relative position of the data block in affiliated snapshot and affiliated fast According to ID, from the data block that snapshot to be deleted includes obtain be not present in any data block area at least one data block section Between in data block.Wherein, any number at least one data block section is not present in the data block that snapshot to be deleted includes It is the data block not used by any normal snapshot according to the data block in block section, therefore can be used as hash block and be deleted.
For example, snapshot management equipment 12 can traverse the data block that snapshot to be deleted includes, the every number traversed is judged Whether it is not present in any data block section according to block.Wherein, snapshot management equipment 12 can use identical processing mode, sentence Whether the disconnected each data block traversed is not present in any data block section.For this purpose, being with the data block currently traversed Example illustrates that snapshot management equipment 12 judges whether each data block traversed is not present in the processing in any data block section Process.It for ease of description and distinguishes, the data block in the snapshot to be deleted currently traversed is denoted as the second data block.
To the second data block, snapshot management equipment 12 can be by the ID of the affiliated snapshot of the second data block and at least one data The ID of the affiliated snapshot in block section is compared.If the ID and the second data of affiliated snapshot are not present at least one data block section The identical data block section of block illustrates that the second data block does not include by any normal snapshot, it is determined that the second data block is nothing Use data block.If there are the ID of affiliated snapshot data block identical with the second data block section at least one data block section, Illustrate that some or certain data blocks in the affiliated snapshot of the second data block include by some or certain normal snapshots, it is therefore desirable to There are the corresponding data block sections of the affiliated snapshot of the second data block.But whether the second data block is fast belonging to the second data block According to middle by some or data block that certain normal snapshots are included, further progress is needed to judge.
Then, snapshot management equipment 12 further the relative position by the second data block in affiliated snapshot respectively with it is affiliated Relative position and termination of the initial data block in the ID of snapshot data block identical with the second data block section in affiliated snapshot Relative position of the data block in affiliated snapshot is compared, with judge the second data block whether fall into belonging to snapshot ID and the In the identical data block section of two data blocks.If relative position of second data block in affiliated snapshot falls into the ID of affiliated snapshot Relative position and termination data block of the initial data block in data block identical with the second data block section in affiliated snapshot exist Between relative position in affiliated snapshot, it is determined that the second data block falls into the ID number identical with the second data block of affiliated snapshot According in block section, it is meant that the second data block can also be used by normal snapshot, therefore can not be deleted.If the second data block is in institute Belong to the initial data block that the relative position in snapshot does not fall within ID data block identical with the second data block section of affiliated snapshot In the relative position in affiliated snapshot and data block is terminated between the relative position in affiliated snapshot, it is determined that the second data block ID data block identical with the second data block section of snapshot belonging to not falling within, it is meant that the second data block is no longer by any normal Snapshot is used, therefore can be using the second data block as hash block.
During above-mentioned identification hash block, mainly using the initial data block in each data block section affiliated fast The ID of the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot according in, therefore, only needing will be each The initial data block in data block section is in the relative position of relative position, termination data block in affiliated snapshot in affiliated snapshot And the ID of affiliated snapshot is loaded onto memory, and compared with the information for loading each data block that each data block section includes, data It measures much smaller, has saved memory source.In addition, the data volume as needed for identification hash block reduces, operation is compared Number is also reduced, and improves the efficiency of identification hash block, therefore the whole effect of snapshot delete operation to a certain extent Rate also increases.
Fig. 3 a is the flow diagram for the snapshot delet method that the application another exemplary embodiment provides.Such as Fig. 3 a institute Show, this method comprises:
30a, acquisition need to carry out at least one normal snapshot of the data space of snapshot deletion, at least one is normal The normal snapshot of each of snapshot includes data block.
30b, the relative position according to the ID and data block of the affiliated snapshot of data block in affiliated snapshot, by least one The data block that normal snapshot includes is assigned at least one data block section;Wherein, each of at least one data block section Data block section indicates the discontinuous data block in a relative position or the continuous data block in multiple relative positions.
30c, according to relative position of the initial data block at least one data block section in affiliated snapshot, terminate data The ID of relative position and affiliated snapshot of the block in affiliated snapshot, identifies nothing from the snapshot to be deleted of data space Use data block.
30d, the above-mentioned hash block identified is deleted.
In the present embodiment, the data space for carrying out snapshot deletion is needed to can be a cloud disk, but not limited to this.
For example, can determine when the snapshot of setting is deleted the period and reached and need to carry out snapshot to data space to delete It removes.Alternatively, can determine when the snapshot of setting deletes trigger event generation and need to carry out snapshot to data space to delete It removes.The user that snapshot deletion trigger event can be data space issues snapshot deletion for the data space and refers to The event of order, or it is also possible to the event etc. that the snapshot label that user is data space deletes label.
In the present embodiment, data space includes at least one partition holding, and the snapshot of data space includes With at least one one-to-one data block of at least one partition holding.Moreover, the data block to the same partition holding of correspondence is come It says, the relative position in each snapshot is all the same, that is, corresponding relative position of the partition holding in data space. And for a data block, it can be stored at the respective offsets address of first snapshot for creating the data block, so Afterwards in subsequent snapshot, data block at corresponding same offset address or before continuing to use in existing snapshot or again Store new data block.For a data block, it only can belong to a snapshot, that is, create the snapshot of the data block.This meaning , any data block can be by the ID and its relative position in affiliated snapshot of its affiliated snapshot come unique identification.
In relative position of the ID and data block by the affiliated snapshot of data block in affiliated snapshot come unique identification number In the case where according to block, when need to data space carry out snapshot deletion when, can according to the ID of the affiliated snapshot of data block with And relative position of the data block in affiliated snapshot, the relative position for including by the normal snapshot of the data space are continuous Data block is divided into a data block section;And then according to the initial data block in the data block section marked off in affiliated snapshot Relative position, terminate data block relative position and affiliated snapshot in affiliated snapshot ID replace the data block section in The information of all data blocks identifies hash block and is deleted from the snapshot to be deleted of the data space, identified It is not to reduce identification hash block mistake using the information of data block each in data block section during hash block The data volume relied in journey, advantageously reduces memory consumption.
In one exemplary embodiment, the embodiment of above-mentioned steps 30b can be with are as follows: according to the ID of the affiliated snapshot of data block And relative position of the data block in affiliated snapshot, it will belong in data block that at least one normal snapshot includes respectively same The data block of snapshot is assigned to several data block sections at least one data block section.
Wherein, for the first snapshot involved in the data block that at least one normal snapshot includes in same snapshot, The then relative position according to the ID and data block of the affiliated snapshot of data block in affiliated snapshot, by least one normal snapshot packet The data block for belonging to the first snapshot in the data block contained is assigned to several data block sections at least one data block section Process include:
According to the ID for the affiliated snapshot of data block that the ID of the first snapshot and the first snapshot include, the number for including from the first snapshot According to identifying the data block for belonging to the first snapshot in block;
According to relative position of the data block of the first snapshot in the first snapshot is belonged to, the data block of the first snapshot will be belonged to It is divided to several data block sections at least one data block section.
Further, fast from first in the ID of the affiliated snapshot of data block for including of the ID and the first snapshot according to the first snapshot According to comprising data block in identify before belonging to the data block of the first snapshot, the data that the first snapshot includes can be obtained in advance The ID of the affiliated snapshot of block and the relative position in affiliated snapshot, in order to include according to the ID of the first snapshot and the first snapshot The affiliated snapshot of data block ID, the data block for belonging to the first snapshot is identified from the data block that the first snapshot includes.
In one exemplary embodiment, relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot It can be embodied by the title of data block, but it is not limited to this.Based on this, the title for the data block that can include from the first snapshot In, the ID for parsing the affiliated snapshot of data block that the first snapshot includes and the relative position in affiliated snapshot.
In one exemplary embodiment, above-mentioned basis belongs to opposite position of the data block of the first snapshot in the first snapshot It sets, the data block for belonging to the first snapshot is divided to the embodiment party in several data block sections at least one data block section Formula, comprising:
Traversal belongs to the data block of the first snapshot, to the first data block currently traversed, according to the first data block the Relative position in one snapshot, judges whether the first data block has been positioned in the first snapshot corresponding data with existing block section;
If judging result is that there is no determine and the first data block phase from the first snapshot corresponding data with existing block section Adjacent data with existing block section;
According to the first data block and the data with existing block section adjacent with the first data block, marked off newly for the first snapshot Data block section.
In one exemplary embodiment, the above-mentioned relative position according to the first data block in the first snapshot, judges first Whether data block has been positioned at the embodiment in the first snapshot corresponding data with existing block section, comprising:
By relative position of first data block in the first snapshot data with existing block section corresponding with the first snapshot respectively Initial data block in the relative position in affiliated snapshot and terminate relative position of the data block in affiliated snapshot and be compared;
If opposite position of the initial data block in affiliated snapshot is not present in the first snapshot corresponding data with existing block section It sets and is less than or equal to the first data block in the relative position in the first snapshot and terminates opposite position of the data block in affiliated snapshot The data with existing block section more than or equal to relative position of first data block in the first snapshot is set, determines the first data block not In the first snapshot corresponding data with existing block section.
Correspondingly, the data with existing adjacent with the first data block is determined from the first snapshot corresponding data with existing block section Block section, comprising: from the first snapshot corresponding data with existing block section, determine that first adjacent with the first data block has number According to block section and/or the second data with existing block section.
Wherein, the first data with existing block section is the relative position and the first data block for terminating data block in affiliated snapshot Has number in the minimum and relative position less than the first data block in the first snapshot of the relative position difference in the first snapshot According to block section.
Second data with existing block section is relative position of the initial data block in affiliated snapshot and the first data block the Relative position difference in one snapshot is minimum and is greater than the data with existing block of relative position of first data block in the first snapshot Section.
Still optionally further, first can be determined from the first snapshot corresponding data with existing block section using dichotomy Data with existing block section and/or the second data with existing block section.
In one exemplary embodiment, it is based on above-mentioned first data with existing block section and/or the second data with existing block section, It is above-mentioned according to the first data block and the data with existing block section adjacent with the first data block, mark off new data for the first snapshot The embodiment in block section, comprising:
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, and opposite in affiliated snapshot with the initial data block in the second data with existing block section Position is adjacent, then a new number is merged into the first data block, the first data with existing block section and the second data with existing block section According to block section, the initial data block in new data block section is the initial data block in the first data with existing block section, new data block area Between termination data block be the second data with existing block section termination data block;
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, but the not phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then the first data block and the first data with existing block section are merged into a new data block section, new data block area Between initial data block be the first data with existing block section initial data block, the termination data block in new data block section is first Data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, but the phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then the first data block and the second data with existing block section are merged into a new data block section, new data block area Between initial data block be the first data block, the terminations data block in new data block section for the second data with existing block section termination Data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, and not the initial data block with the second data with existing block section in affiliated snapshot Relative position is adjacent, then the first data block is divided to a new data block section, and the initial data block in new data block section is the One data block, the termination data block in new data block section are the first data block.
In one exemplary embodiment, in addition to can be according to belonging to the data block that the ID of the first snapshot and the first snapshot include The ID of snapshot, identified from the data block that the first snapshot includes belong to the first snapshot but belong to the second snapshot data block it Outside, if including the data block of other snapshots of the first snapshot reference in the data block that the first snapshot includes, by taking the second snapshot as an example, Then can also be according to the ID of the ID and the first snapshot of the first snapshot affiliated snapshot of data block for including, the number for including from the first snapshot According to identifying the data block for being not belonging to the first snapshot but belonging to the second snapshot in block;According to being not belonging to the first snapshot but belong to second Relative position of the data block of snapshot in the second snapshot, will not belong to the first snapshot but the data block for belonging to the second snapshot divides Several data block sections at least one data block section.
In one exemplary embodiment, above-mentioned steps 30c exists according to the initial data block at least one data block section The ID of the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot in affiliated snapshot, from data The embodiment of hash block is identified in the snapshot to be deleted of memory space, comprising:
The ID of the affiliated snapshot of data block and the relative position in affiliated snapshot that include according to snapshot to be deleted and The initial data block at least one data block section in affiliated snapshot relative position, terminate data block in affiliated snapshot The ID of relative position and affiliated snapshot is obtained from the data block that snapshot to be deleted includes and is not present at least one data block Data block in section in any data block section, as hash block.
Further, it is possible to the data block that snapshot to be deleted includes be traversed, to the second data block currently traversed, by second The ID of the affiliated snapshot of data block is compared with the ID of at least one affiliated snapshot in data block section;If at least one data block area Between in be not present affiliated snapshot ID data block identical with the second data block section, it is determined that the second data block be hash Block;If there are the ID of affiliated snapshot data block identical with the second data block sections at least one data block section, by Relative position of two data blocks in affiliated snapshot respectively with the ID of affiliated snapshot data block identical with the second data block section Initial data block in the relative position in affiliated snapshot and terminate relative position of the data block in affiliated snapshot and be compared, To judge whether second data block falls into the data block section identical with second data block ID of affiliated snapshot;If Second data block does not fall within ID data block identical with the second data block section of affiliated snapshot, determines that the second data block is useless Data block.
During above-mentioned identification hash block, mainly using the initial data block in each data block section affiliated fast The ID of the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot according in, therefore, only needing will be each The initial data block in data block section is in the relative position of relative position, termination data block in affiliated snapshot in affiliated snapshot And the ID of affiliated snapshot is loaded onto memory, and compared with the information for loading each data block that each data block section includes, data It measures much smaller, has saved memory source.In addition, the data volume as needed for identification hash block reduces, operation is compared Number is also reduced, and improves the efficiency of identification hash block, therefore the whole effect of snapshot delete operation to a certain extent Rate also increases.
In an exemplary application scene, snapshot deletion is carried out for a cloud disk, which includes M storage point Area, M are positive integers, and each snapshot of cloud disk is needed comprising M data block.For each snapshot, it includes M data Block can be divided into the data block of other snapshots of the data block for belonging to the snapshot and snapshot reference again.It is with the snapshot B in Fig. 2 b Example, snapshot B need to include data block that 1-B, 2-A, 3-B and 4-A are identified, wherein the data block that 1-B and 3-B are identified For the data block for belonging to snapshot B, and the data block that 2-A and 4-A are identified is the data block of the snapshot A of snapshot B reference.Such as Fig. 3 b It is shown, for cloud disk snapshot delete process the following steps are included:
301, a data block statistics set is created for cloud disk, is initialized as empty set, which is used for Store the hash block of cloud disk.
302, normal snapshot list is obtained from the snapshot chain of cloud disk, and loaded each normal fast in normal snapshot list According to list of meta data into memory.
303, the normal snapshot currently traversed is denoted as snapshot F, and created for snapshot F by the normal snapshot for traversing cloud disk A block information set f is built, which is used to record the information in the corresponding data block section snapshot F.
304, the data block that traversal snapshot F includes, and the data block currently traversed is denoted as data block x.
305, from the ID and data block x for parsing the affiliated snapshot of data block x in the title of data block x in affiliated snapshot Relative position.
306, the ID of the affiliated snapshot of data block x is compared with the ID of snapshot F;If the two is identical, it is meant that data block x Belong to snapshot F, executes step 307;If the two is not identical, it is meant that data block x is not belonging to snapshot F, thens follow the steps 314.
307, the relative position according to data block x in snapshot F judges that data block x whether there is in block information set f In the data block section of middle record;If judging result be it is no, then follow the steps 308;If judging result be it is no, then follow the steps 315。
Wherein it is possible to the data block area recorded in the relative position by data block x in snapshot F, with block information set f Between initial data block in the relative position in snapshot F and terminate relative position of the data block in snapshot F and be compared, with Judge that data block x whether there is in the data block section recorded in block information set f.
If the relative position in the data block section recorded in block information set f there are initial data block in snapshot F Less than or equal to relative position of the data block x in snapshot F, and terminates relative position of the data block in snapshot F and be greater than or wait In the data block section of relative position of the data block x in snapshot F, it is determined that data block x is located in the data block section.
If opposite position of the initial data block in snapshot F is not present in the data block section recorded in block information set f Set and be less than or equal to relative position of the data block x in snapshot F, and terminate relative position of the data block in snapshot F be greater than or Equal to the data block section of relative position of the data block x in snapshot F, it is determined that data block x does not exist in block information set f In any data block section of middle record.
308, from any data block section recorded in block information set f, the data block adjacent with data block x is determined Section L1 and data block section L2.
Wherein, data block section L1 is relative position of the termination data block in snapshot F present in block information set f Data block that is minimum and being less than relative position of the data block x in snapshot F is differed in the relative position in snapshot F with data block x Section.Data block section L2 is relative position and data block of the initial data block in snapshot F present in block information set f X is minimum in the relative position difference in snapshot F and is greater than the data block section of relative position of the data block x in snapshot F.
It, may there is only data block section L1 in application scenes.It, may be there is only in other application scenarios The fast section L2 of data.The present embodiment is illustrated for existing simultaneously data block section L1 and data block section L2.
309, judge relative position of the data block x in snapshot F whether with the termination data block of data block section L1 fast It is adjacent according to relative position of the initial data block in snapshot F of relative position and data block section L2 in F;
If data block x is opposite in snapshot F with the termination data block of data block section L1 in the relative position in snapshot F Position is adjacent, executes step 310.
If data block x is opposite in snapshot F with the initial data block of data block section L2 in the relative position in snapshot F Position is adjacent, executes step 311.
If data block x is opposite in snapshot F with the termination data block of data block section L1 in the relative position in snapshot F Relative position of the initial data block of position and data block section L2 in snapshot F is adjacent, executes step 312.
If data block x is opposite in snapshot F with the termination data block of data block section L1 in the relative position in snapshot F Relative position of the initial data block of position and data block section L2 in snapshot F is non-conterminous, executes step 313.
310, data block x and data block section L1 are merged into a new data block section, the starting number in new data block section The initial data block for being data block section L1 according to block, termination data block is data block x, and enters step 315.
311, data block x and data block section L2 are merged into a new data block section, the starting number in new data block section It is data block x according to block, terminates data block and be the termination data block of data block section L2, and enter step 315.
312, data block x, data block section L1 and data block section L2 are merged into a new data block section, new data block The initial data block in section is the initial data block of data block section L1, terminates the termination data that data block is data block section L2 Block, and enter step 315.
313, data block x being divided to a new data block section, the initial data block in new data block section is data block x, Termination data block is data block x, and enter step 315.
314, into the process flow of the affiliated snapshot of data block x, and after data block x to be divided to a data block section, Execute step 315.
315, judge with the presence or absence of the data block that not yet traverses in snapshot F, if the determination result is YES, then return step 304; If judging result is no, execution step 316.
316, judge in the normal snapshot of cloud disk with the presence or absence of the normal snapshot not yet traversed;If the determination result is YES, Then return to step 303;If judging result is no, execution step 317.
317, the snapshot to be deleted of cloud disk is traversed, and the snapshot to be deleted currently traversed is denoted as snapshot H.
318, the data block of snapshot H is traversed, and the data block currently traversed is denoted as data block y.
319, from parsing the ID and data block y of the affiliated snapshot of data block y in the title of data block y in affiliated snapshot Relative position.
320, the relative position according to the ID and data block y of the affiliated snapshot of data block y in affiliated snapshot, judges data block Whether y is located in a certain data block section;If judging result be it is no, enter step 321;If the determination result is YES, it enters step 322。
321, data block statistics set is added in data block y, and enters step 322.
322, judge with the presence or absence of the data block that not yet traverses in snapshot H, if the determination result is YES, then return step 318; If judging result is no, execution step 323.
323, judge in the snapshot to be deleted of cloud disk with the presence or absence of the snapshot to be deleted not yet traversed;If judging result is It is then to return to step 317;If judging result is no, execution step 324.
324, the data block in data block statistics set is deleted, and terminates this delete operation.
It is worth noting that is stored in above-mentioned list of meta data is the title of data block, therefore real in above process Border is handled the title of data block, and not data block itself.
In the present embodiment, when needing to carry out snapshot deletion to cloud disk, by including by the normal snapshot of cloud disk The continuous data block in relative position be divided into different data block sections;And then existed using the initial data block in data block section The ID of the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot in affiliated snapshot replaces the number According to the information of all data blocks in block section, hash block is identified from snapshot to be deleted and is deleted, identifying useless number It is not to reduce institute during identification hash block using the information of data block each in data block section during according to block The data volume of dependence, it is meant that needing to be loaded onto the data volume in memory reduces, therefore advantageously reduces memory consumption.
The some embodiments of the application also provide a kind of storage system, and the storage system is including at least one storage equipment and fastly Management equipment.Storage system provided in this embodiment is similar with storage system shown in Fig. 1 on realizing structure, can refer to figure Storage system shown in 1.
In the present embodiment, at least one storage equipment is mainly used for providing data storage sky to the user of storage system Between, and corresponding snapshot storage space is provided for data space, the data, which are stored with, in the snapshot storage space deposits Store up each snapshot in space.In the way of realization and detailed functions, with storage system shown in Fig. 1 for storing equipment in the present embodiment Storage equipment is similar, reference can be made to the associated description in embodiment illustrated in fig. 1, details are not described herein.
In the present embodiment, snapshot management equipment mainly realizes the snapshot functions of storage system, to number in storage system According to carry out backup and disaster tolerance, such as be mainly responsible for be data space provided by least one storage equipment creation, safeguard And management snapshot.The management includes but is not limited to: backup, storage, deletion and recycling snapshot space etc..
In the present embodiment, during carrying out maintenance management to snapshot, snapshot management equipment is available to be belonged to together At least one data block of one snapshot identifies at least one according to the relative position of at least one data block in the snapshot Data block segment present in a data block, the data block segment include the discontinuous data block in a relative position or multiple phases To the continuous data block in position;Then the offset address according to initial data block in the data block segment in the snapshot, termination The ID of offset address and the snapshot of the data block in the snapshot generates the data block area for indicating the data block segment Between.
For example, it is assumed that a snapshot D1 includes 500 data blocks, having 300 data blocks in this 500 data blocks is to belong to this Snapshot D1's, remaining 200 data block is the other snapshots of reference.Then snapshot management equipment, which can identify, belongs to snapshot D1 300 data blocks, it is assumed that relative position of 300 data blocks in snapshot D1 be 201-400 and 500-600, then relatively The data block that position is 201-400 forms a data block segment, and relative position is that the data block of 500-600 forms another data block Segment.To relative position be 201-400 data block formed a data block segment, can be generated data block section [201,400, D1];To relative position be 500-600 data block form another data block segment, can be generated data block section [500,600, D1].It can be seen that considerably reducing maintenance instead of the information of 300 data blocks using three information in data block section The data volume handled needed for snapshot is conducive to save calculating and storage resource, and can provide convenience for the processing of rear snapshot.
It, can be when creating snapshot, certainly using each new creation snapshot of data block section maintenance in application scenes Oneself data block.Based on this, whenever creating snapshot, data block that snapshot management equipment can be included from newly created snapshot In, identify the data block for belonging to the newly created snapshot oneself;In turn, according to these data blocks in newly created snapshot Data block segment present in these data blocks is identified in relative position;Then, according to initial data in each data block segment Block in the newly created snapshot offset address, terminate offset address of the data block in the newly created snapshot and this is new The ID of the snapshot of creation generates corresponding data block section for each data block segment respectively.
In other application scenarios, need to carry out various processing, example to some or all of data space snapshot Such as carry out snapshot deletion, duplicate removal, backup processing.Some or all of data space snapshot is handled in order to improve Efficiency, some or all of available data space snapshot forms snapshot set, and by the way of data block section pair Snapshot in the snapshot set carries out maintenance management.Based on this, can from the data block that each snapshot includes in the snapshot set, Obtain the data block for belonging to different snapshots;To each snapshot, identifies and belong to data block piece present in the data block of the snapshot Section, according to initial data block in each data block segment in the snapshot offset address, terminate data block in the snapshot The ID of offset address and the snapshot generates the data block section for indicating each data block segment.For each snapshot, The data block that oneself can be indicated by one or more data block sections, compared with the information content of numerous data blocks, data The information content in block section is much smaller, is conducive to save memory source.
It is worth noting that the snapshot management equipment in the present embodiment is in addition to that can use aforesaid way to tie up snapshot Except pillar reason, snapshot can also be created, be deleted, back up etc. and operated.Wherein, about other function of snapshot management equipment The description in embodiment illustrated in fig. 1 can be used, details are not described herein.
Based on above-mentioned storage system, the application another exemplary embodiment also provides a kind of snap processing method, such as Fig. 3 b It is shown, this method comprises:
31a, acquisition belong at least one data block of same snapshot.
31b, the relative position according at least one data block in snapshot identify number present at least one data block According to block piece section, wherein data block segment includes that the discontinuous data block in a relative position or multiple relative positions continuously count According to block.
31c, according to offset address of the initial data block in data block segment in snapshot, terminate data block in snapshot The ID of offset address and snapshot generates the data block section for indicating data block segment.
In the present embodiment, the data block for belonging to same snapshot can be identified, and use data block area according to application demand Between indicate the data block for belonging to same snapshot.Wherein, a data block section includes offset of the initial data block in snapshot Address, tri- information of ID for terminating offset address and snapshot of the data block in snapshot, the information content phase with numerous data blocks Than the information content in data block section is much smaller, is conducive to save calculating and storage resource, and can mention for the processing of rear snapshot For convenience.
It should be noted that the executing subject of each step of above-described embodiment institute providing method may each be same equipment, Alternatively, this method is also by distinct device as executing subject.For example, the executing subject of step 30a to step 30d can be equipment A;For another example, the executing subject of step 30a and 30b can be able to be to set for the executing subject of equipment A, step 30c and step 30d Standby B;Etc..
In addition, containing in some processes of the description in above-described embodiment and attached drawing according to particular order appearance Multiple operations, but it should be clearly understood that these operations can not execute or parallel according to its sequence what appears in this article It executes, the serial number of operation such as 30a, 30b, 301,302 etc. are only used for distinguishing each different operation, and serial number itself is no It represents and any executes sequence.In addition, these processes may include more or fewer operations, and these operations can be by suitable Sequence executes or parallel execution.It should be noted that the description such as " first " herein, " second ", is for distinguishing different disappear Breath, equipment, module etc. do not represent sequencing, also do not limit " first " and " second " and are different type.
Fig. 4 a is the structural schematic diagram that the snapshot that the application another exemplary embodiment provides deletes device.Such as Fig. 4 a institute Show, snapshot deletes device and includes:
Division module 41, for opposite position of the ID and data block according to the affiliated snapshot of data block in affiliated snapshot It sets, the data block that at least one normal snapshot includes is assigned at least one data block section, at least one data block area Between in each data block section indicate the discontinuous data block in a relative position or the continuous data block in multiple relative positions;
Identification module 42, for opposite position of the initial data block according at least one data block section in affiliated snapshot The ID for setting, terminating relative position and affiliated snapshot of the data block in affiliated snapshot, from the to be deleted fast of data space Hash block is identified according in;
Removing module 43, for deleting the hash block identified.
In an optional embodiment, division module 41 is assigned at least in the data for including by least one normal snapshot When one data block section, it is specifically used for: opposite in affiliated snapshot according to the ID of the affiliated snapshot of data block and data block The data block for belonging to same snapshot in data block that at least one normal snapshot includes is assigned at least one number respectively by position According to several data block sections in block section.
Wherein, identification module 42 identifies the data block of each snapshot at least one normal snapshot, identification Process is identical.By taking the first snapshot of at least one normal snapshot as an example, identification module 42 is by least one normal snapshot The data block for belonging to same snapshot in the data block for including is assigned to several data block areas at least one data block section Between when, be specifically used for: according to the ID for the affiliated snapshot of data block that the ID of the first snapshot and the first snapshot include, from the first snapshot packet The data block for belonging to first snapshot is identified in the data block contained;According to belonging to the data block of the first snapshot in the first snapshot In relative position, the data block for belonging to the first snapshot is divided to several data block areas at least one data block section Between.
In an optional embodiment, identification module 42 belongs to first identifying from the data block that the first snapshot includes It before the data block of snapshot, is also used to: in the title for the data block for including from the first snapshot, parsing the number that the first snapshot includes ID according to the affiliated snapshot of block and the relative position in affiliated snapshot.
Further, the data block for belonging to the first snapshot is being divided at least one data block section by identification module 42 When several data block sections, be specifically used for: traversal belongs to the data block of the first snapshot, to the first data currently traversed Block judges whether the first data block has been positioned at the first snapshot pair according to relative position of first data block in the first snapshot In the data with existing block section answered;If judging result is that there is no determine from the first snapshot corresponding data with existing block section The data with existing block section adjacent with the first data block;According to the first data block and the data with existing adjacent with the first data block Block section marks off new data block section for the first snapshot.
Further, identification module 42 is judging whether the first data block has been positioned at the corresponding data with existing block of the first snapshot When in section, it is specifically used for: relative position of first data block in the first snapshot is corresponding with the first snapshot existing respectively The initial data block in data block section is in the relative position in affiliated snapshot and terminates opposite position of the data block in affiliated snapshot It sets and is compared;If there is no initial data block is opposite in affiliated snapshot in the first snapshot corresponding data with existing block section Position be less than or equal to the first data block the relative position in the first snapshot and terminate data block it is opposite in affiliated snapshot Position is greater than or equal to the data with existing block section of relative position of first data block in the first snapshot, determines the first data block It is not located in the first snapshot corresponding data with existing block section.
In an optional embodiment, it is based on above-mentioned first snapshot corresponding data with existing block section, identification module 42 has Body is used for: from the first snapshot corresponding data with existing block section, determining that first adjacent with first data block has number According to block section and/or the second data with existing block section;Wherein, the first data with existing block section is to terminate data block in affiliated snapshot In relative position differ minimum with relative position of first data block in the first snapshot and less than the first data block first The data with existing block section of relative position in snapshot;Second data with existing block section is initial data block in affiliated snapshot Relative position differs minimum with relative position of first data block in the first snapshot and is greater than the first data block in the first snapshot In relative position data with existing block section.
Further, identification module 42 is determining the first data with existing block section and/or second adjacent with the first data block When data with existing block section, it is specifically used for: using dichotomy, from the first snapshot corresponding data with existing block section, determines the One data with existing block section and/or the second data with existing block section.
Optionally, identification module 42 is according to the first data block and the data with existing block section adjacent with the first data block When marking off new data block section for the first snapshot, it is specifically used for:
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, and opposite in affiliated snapshot with the initial data block in the second data with existing block section Position is adjacent, then it is new first data block, the first data with existing block section and the second data with existing block section to be merged into one Data block section, the initial data block in the new data block section are the initial data block in the first data with existing block section, the new number Termination data block according to block section is the termination data block in the second data with existing block section;
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, but the not phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then first data block and the first data with existing block section are merged into a new data block section, the new data The initial data block in block section is the initial data block in the first data with existing block section, the termination data block in the new data block section For first data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, but the phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then first data block and the second data with existing block section are merged into a new data block section, the new data The initial data block in block section is the first data block, and the termination data block in the new data block section is the second data with existing block section Termination data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, and not the initial data block with the second data with existing block section in affiliated snapshot Relative position is adjacent, then first data block is divided to a new data block section, the initial data block in the new data block section For the first data block, the termination data block in the new data block section is the first data block.
In an optional embodiment, identification module 42 is also used to:
According to the ID for the affiliated snapshot of data block that the ID of the first snapshot and the first snapshot include, the number for including from the first snapshot According to identifying the data block for being not belonging to the first snapshot but belonging to the second snapshot in block;
According to being not belonging to the first snapshot but belong to relative position of the data block of the second snapshot in the second snapshot, will not belong to In the first snapshot but the data block that belongs to the second snapshot is divided to several data blocks at least one described data block section Section.
In an optional embodiment, identification module 42 identifies useless in the snapshot to be deleted from data space When data block, it is specifically used for:
The ID of the affiliated snapshot of data block and the relative position in affiliated snapshot that include according to snapshot to be deleted and The initial data block at least one data block section in affiliated snapshot relative position, terminate data block in affiliated snapshot The ID of relative position and affiliated snapshot is obtained from the data block that snapshot to be deleted includes and is not present at least one data block Data block in section in any data block section, as hash block.
Further, identification module 42 is specifically used for when identifying hash block:
The data block that snapshot to be deleted includes is traversed, it, will be belonging to the second data block to the second data block currently traversed The ID of snapshot is compared with the ID of at least one affiliated snapshot in data block section;
If ID data block identical with the second data block section of affiliated snapshot is not present at least one data block section, Then determine that the second data block is the hash block;
If there are the ID of affiliated snapshot data block identical with the second data block section at least one data block section, By relative position of second data block in affiliated snapshot data block identical with the second data block with the ID of affiliated snapshot respectively The initial data block in section is in the relative position in affiliated snapshot and terminates relative position progress of the data block in affiliated snapshot Compare, to judge whether the second data block falls into ID data block identical with the second data block section of affiliated snapshot;
If the second data block does not fall within ID data block identical with the second data block section of affiliated snapshot, the second number is determined It is hash block according to block.
Snapshot provided in this embodiment deletes device, can be used for executing the process in above-mentioned snapshot delet method embodiment, Its working principle repeats no more, and is detailed in the description of embodiment of the method.
Snapshot provided in this embodiment deletes device, for the data space for needing to carry out snapshot deletion, according to number According to relative position of the ID and data block of the affiliated snapshot of block in affiliated snapshot, by the normal snapshot packet of the data space The continuous data block in the relative position contained is divided into a data block section;And then existed using the initial data block in data block section The ID of the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot in affiliated snapshot replaces the number According to the information of all data blocks in block section, hash block is identified from the snapshot to be deleted of the data space and is deleted It removes, is not to reduce identification nothing using the information of data block each in data block section during identifying hash block With the data volume relied on during data block, memory consumption is advantageously reduced.
The foregoing describe built-in functions and structure that snapshot deletes device, and as shown in Figure 4 b, in practice, which deletes dress Setting can be achieved as electronic equipment, comprising: memory 400 and processor 401.
Memory 400, for storing program;
Processor 401 is coupled to memory 400, for executing described program to be used for:
Obtain at least one the normal snapshot for needing to carry out the data space of snapshot deletion, this at least one it is normal fast According to each of normal snapshot include data block;According to the phase of the ID and data block of the affiliated snapshot of data block in affiliated snapshot To position, the data block that at least one normal snapshot includes is assigned at least one data block section, at least one data Each data block section in block section indicates that the discontinuous data block in a relative position or multiple relative positions continuously count According to block;According to relative position of the initial data block at least one data block section in affiliated snapshot, data block is terminated in institute Belong to the relative position in snapshot and the ID of affiliated snapshot, identifies hash from the snapshot to be deleted of data space Block;Delete the hash block identified.
In an optional embodiment, processor 401 is specifically used for when dividing an at least data block section: according to At least one normal snapshot is included by relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot respectively Data block in belong to the data block of same snapshot and be assigned to several data block sections at least one data block section.
Correspondingly, processor 401 is for identifying the data block of each snapshot at least one normal snapshot.With For first snapshot of at least one normal snapshot, the data block for belonging to the first snapshot is being assigned to several by processor 401 When data block section, it is specifically used for: according to the ID for the affiliated snapshot of data block that the ID of the first snapshot and the first snapshot include, from The data block for belonging to the first snapshot is identified in the data block that one snapshot includes;According to belonging to the data block of the first snapshot first The data block for belonging to the first snapshot is divided to several data at least one data block section by the relative position in snapshot Block section.
Further, processor 401 is when being divided to several data block sections for the data block for belonging to the first snapshot, specifically For: traversal belongs to the data block of the first snapshot, fast first according to the first data block to the first data block currently traversed Relative position according in, judges whether the first data block has been positioned in the first snapshot corresponding data with existing block section;If sentencing Disconnected result is that there is no determine the data with existing adjacent with the first data block from the first snapshot corresponding data with existing block section Block section;According to the first data block and the data with existing block section adjacent with the first data block, marked off newly for the first snapshot Data block section.
Further, processor 401 is judging whether the first data block has been positioned at the corresponding data with existing block of the first snapshot When in section, it is specifically used for: relative position of first data block in the first snapshot is corresponding with the first snapshot existing respectively The initial data block in data block section is in the relative position in affiliated snapshot and terminates opposite position of the data block in affiliated snapshot It sets and is compared;If there is no initial data block is opposite in affiliated snapshot in the first snapshot corresponding data with existing block section Position be less than or equal to the first data block the relative position in the first snapshot and terminate data block it is opposite in affiliated snapshot Position is greater than or equal to the data with existing block section of relative position of first data block in the first snapshot, determines the first data block It is not located in the first snapshot corresponding data with existing block section.
In an optional embodiment, it is based on above-mentioned first snapshot corresponding data with existing block section, processor 401 is specific For:
From the first snapshot corresponding data with existing block section, determine that first adjacent with first data block has number According to block section and/or the second data with existing block section;
Wherein, the first data with existing block section is the relative position and the first data block for terminating data block in affiliated snapshot Has number in the minimum and relative position less than the first data block in the first snapshot of the relative position difference in the first snapshot According to block section;
Second data with existing block section is relative position of the initial data block in affiliated snapshot and the first data block the Relative position difference in one snapshot is minimum and is greater than the data with existing block of relative position of first data block in the first snapshot Section.
Further, processor 401 is determining the first data with existing block section and/or second adjacent with the first data block When having data block section, it is specifically used for: determines first from the first snapshot corresponding data with existing block section using dichotomy Data with existing block section and/or the second data with existing block section.
Optionally, processor 401 is according to the first data block and the data with existing block section adjacent with the first data block When marking off new data block section for the first snapshot, it is specifically used for:
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, and opposite in affiliated snapshot with the initial data block in the second data with existing block section Position is adjacent, then it is new first data block, the first data with existing block section and the second data with existing block section to be merged into one Data block section, the initial data block in the new data block section are the initial data block in the first data with existing block section, the new number Termination data block according to block section is the termination data block in the second data with existing block section;
If the termination data block in relative position of first data block in the first snapshot and the first data with existing block section exists Relative position in affiliated snapshot is adjacent, but the not phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then first data block and the first data with existing block section are merged into a new data block section, the new data The initial data block in block section is the initial data block in the first data with existing block section, the termination data block in the new data block section For first data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, but the phase with the initial data block in the second data with existing block section in affiliated snapshot It is adjacent to position, then first data block and the second data with existing block section are merged into a new data block section, the new data The initial data block in block section is the first data block, and the termination data block in the new data block section is the second data with existing block section Termination data block;
If relative position of first data block in the first snapshot not termination data block with the first data with existing block section Relative position in affiliated snapshot is adjacent, and not the initial data block with the second data with existing block section in affiliated snapshot Relative position is adjacent, then first data block is divided to a new data block section, the initial data block in the new data block section For the first data block, the termination data block in the new data block section is the first data block.
In an optional embodiment, processor 401 is also used to: the number for including according to the ID of the first snapshot and the first snapshot According to the ID of the affiliated snapshot of block, is identified from the data block that the first snapshot includes and be not belonging to the first snapshot but belong to the second snapshot Data block;According to being not belonging to the first snapshot but belong to relative position of the data block of the second snapshot in the second snapshot, will not belong to In the first snapshot but the data block that belongs to the second snapshot is divided to several data blocks at least one described data block section Section.
In an optional embodiment, processor 401 identifies useless in the snapshot to be deleted from data space When data block, it is specifically used for: the ID for the affiliated snapshot of data block for including according to snapshot to be deleted and the phase in affiliated snapshot To relative position in affiliated snapshot of the initial data block of position and at least one data block section, data block is terminated in institute Belong to the relative position in snapshot and the ID of affiliated snapshot, obtains and be not present at least from the data block that snapshot to be deleted includes Data block in one data block section in any data block section, as hash block.
Further, processor 401 is specifically used for when identifying hash block: traversing the data that snapshot to be deleted includes Block will be belonging to the ID of the affiliated snapshot of the second data block and at least one data block section to the second data block currently traversed The ID of snapshot is compared;If the ID number identical with the second data block of affiliated snapshot is not present at least one data block section According to block section, it is determined that the second data block is the hash block;If at least one data block section, there are affiliated snapshots ID data block identical with the second data block section, then the relative position by the second data block in affiliated snapshot respectively with institute Belong to relative position and end of the initial data block in ID data block identical with the second data block section of snapshot in affiliated snapshot Only relative position of the data block in affiliated snapshot is compared, with judge the second data block whether fall into belonging to snapshot ID with In the identical data block section of second data block;If the ID that the second data block does not fall within affiliated snapshot is identical with the second data block Data block section determines that the second data block is hash block.
Further, as shown in Figure 4 b, electronic equipment further include: communication component 402, display 403, power supply module 404, sound Other components such as frequency component 405.Members are only schematically provided in Fig. 4 b, are not meant to that electronic equipment only includes Fig. 4 b institute Show component.
Electronic equipment provided in this embodiment is mainly used for snapshot deletion, i.e., for the data for needing to carry out snapshot deletion Memory space stores the data according to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot The continuous data block in relative position that the normal snapshot in space includes is divided into a data block section;And then utilize data block area Between initial data block in affiliated snapshot relative position, terminate relative position of the data block in affiliated snapshot and affiliated The ID of snapshot replaces the information of all data blocks in the data block section, identifies from the snapshot to be deleted of the data space It hash block and deletes out, is not the letter using data block each in data block section during identifying hash block Breath reduces the data volume relied on during identification hash block, advantageously reduces memory consumption.
Correspondingly, the embodiment of the present application also provides a kind of computer readable storage medium for being stored with computer program, institute Stating when computer program is computer-executed can be realized:
Obtain at least one the normal snapshot for needing to carry out the data space of snapshot deletion, this at least one it is normal fast According to each of normal snapshot include data block;According to the phase of the ID and data block of the affiliated snapshot of data block in affiliated snapshot To position, the data block that at least one normal snapshot includes is assigned at least one data block section, at least one data block Each data block section in section indicates the discontinuous data block in a relative position or the continuous data in multiple relative positions Block;According to relative position of the initial data block at least one data block section in affiliated snapshot, data block is terminated affiliated The ID of relative position and affiliated snapshot in snapshot, identifies hash from the snapshot to be deleted of data space Block;Delete the hash block identified.
Above-mentioned computer program is performed, and other than above-mentioned steps may be implemented, can also realize its aforementioned snapshot Other steps in delet method embodiment, specifically repeat no more.
Fig. 5 a is the structural schematic diagram for the snapshot processing unit that the application another exemplary embodiment provides.Such as Fig. 5 a institute Show, which includes: to obtain module 51, identification module 52 and generation module 53.
Module 51 is obtained, for obtaining at least one data block for belonging to same snapshot.Identification module 52, for according to extremely Few relative position of the data block in the snapshot, identifies data block segment, data block present at least one data block Segment includes the discontinuous data block in a relative position or the continuous data block in multiple relative positions.Generation module 53, is used for According to initial data block in data block segment in the offset address of offset address, termination data block in the snapshot in the snapshot And the ID of the snapshot, generate the data block section for indicating data block segment.
Snapshot processing unit provided in this embodiment can be used for executing the process in above-mentioned snap processing method embodiment, Its working principle repeats no more, and is detailed in the description of embodiment of the method.
The foregoing describe the built-in function of snapshot processing unit and structures, as shown in Figure 5 b, in practice, snapshot processing dress Setting can be achieved as electronic equipment, comprising: memory 500 and processor 501.
Memory 500, for storing program;
Processor 501 is coupled to memory 500, for executing described program to be used for: acquisition belongs to same snapshot extremely A few data block;According to relative position of at least one data block in the snapshot, identifies and exist at least one data block Data block segment, data block segment include the discontinuous data block in a relative position or the continuous data in multiple relative positions Block;According to initial data block in data block segment in the offset of offset address, termination data block in the snapshot in the snapshot The ID of address and the snapshot generates the corresponding data block section of data block segment.
Further, as shown in Figure 5 b, electronic equipment further include: communication component 502, display 503, power supply module 505, sound Other components such as frequency component 505.Members are only schematically provided in Fig. 5 b, are not meant to that electronic equipment only includes Fig. 5 b institute Show component.
Correspondingly, the embodiment of the present application also provides a kind of computer readable storage medium for being stored with computer program, institute State the step that can be realized in above-mentioned snap processing method embodiment when computer program is computer-executed.Particular content can join See the description of preceding method embodiment, details are not described herein.
Communication component in Fig. 4 b and Fig. 5 b can be configured to convenient between communication component corresponding device and other equipment The communication of wired or wireless way.Communication component corresponding device can access the wireless network based on communication standard, such as WiFi, 2G Or 3G or their combination.In one exemplary embodiment, communication component receives via broadcast channel and comes from external broadcasting pipe The broadcast singal or broadcast related information of reason system.In one exemplary embodiment, the communication component further includes that near field is logical (NFC) module is believed, to promote short range communication.For example, radio frequency identification (RFID) technology, infrared data association can be based in NFC module Meeting (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
Display in Fig. 4 b and Fig. 5 b, may include screen, and screen may include liquid crystal display (LCD) and touching Touch panel (TP).If screen includes touch panel, screen may be implemented as touch screen, to receive input letter from the user Number.Touch panel includes one or more touch sensors to sense the gesture on touch, slide, and touch panel.The touch Sensor can not only sense the boundary of a touch or slide action, but also detect associated with the touch or slide operation hold Continuous time and pressure.
Power supply module in Fig. 4 b and Fig. 5 b, the various assemblies for power supply module corresponding device provide electric power.Power supply group Part may include power-supply management system, one or more power supplys and other with for power supply module corresponding device generate, management and point With the associated component of electric power.
Audio component in Fig. 4 b and Fig. 5 b, is configured as output and/or input audio signal.For example, audio component Including a microphone (MIC), when audio component corresponding device is in operation mode, such as call model, logging mode and voice When recognition mode, microphone is configured as receiving external audio signal.The received audio signal can be further stored in Memory is sent via communication component.In some embodiments, audio component further includes a loudspeaker, for exporting audio Signal.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (20)

1. a kind of snapshot delet method characterized by comprising
Obtain at least one the normal snapshot for needing to carry out the data space of snapshot deletion, at least one described normal snapshot Each of normal snapshot include data block;
According to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, at least one is normal by described in The data block that snapshot includes is assigned at least one data block section, each data block at least one described data block section Section indicates the discontinuous data block in a relative position or the continuous data block in multiple relative positions;
According to relative position of the initial data block at least one data block section in affiliated snapshot, terminates data block and exist The ID of relative position and affiliated snapshot in affiliated snapshot, identifies nothing from the snapshot to be deleted of the data space Use data block;
Delete the hash block.
2. the method according to claim 1, wherein the ID and data block according to the affiliated snapshot of data block The data block that at least one described normal snapshot includes is assigned at least one data block by the relative position in affiliated snapshot Section, comprising:
According to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, respectively will it is described at least one If the data block for belonging to same snapshot in the data block that normal snapshot includes is assigned at least one described data block section Dry data block section.
3. according to the method described in claim 2, it is characterized in that, to the first snapshot in the same snapshot, according to data Relative position of the ID and data block of the affiliated snapshot of block in affiliated snapshot, the number for including by least one described normal snapshot Several data block areas at least one described data block section are assigned to according to the data block for belonging to first snapshot in block Between, comprising:
According to the ID for the affiliated snapshot of data block that the ID of first snapshot and first snapshot include, from first snapshot The data block for belonging to first snapshot is identified in the data block for including;
According to relative position of the data block of first snapshot in first snapshot is belonged to, first snapshot will be belonged to Data block be divided to several data block sections at least one described data block section.
4. according to the method described in claim 3, it is characterized in that, in the ID and first snapshot according to first snapshot The ID of the affiliated snapshot of the data block for including is identified from the data block that first snapshot includes and is belonged to first snapshot Before data block, the method also includes:
In the title for the data block for including from first snapshot, the affiliated snapshot of data block that first snapshot includes is parsed ID and the relative position in affiliated snapshot.
5. according to the method described in claim 3, it is characterized in that, the basis belongs to the data block of first snapshot in institute The relative position in the first snapshot is stated, the data block for belonging to first snapshot is divided at least one described data block section In several data block sections, comprising:
Traversal belongs to the data block of first snapshot, to the first data block currently traversed, according to first data block It is corresponding to judge whether first data block has been positioned at first snapshot for relative position in first snapshot Have in data block section;
If judging result is that there is no determining and first data from the first snapshot corresponding data with existing block section The adjacent data with existing block section of block;
It is first snapshot according to first data block and the data with existing block section adjacent with first data block Mark off new data block section.
6. according to the method described in claim 5, it is characterized in that, it is described according to first data block in first snapshot In relative position, judge whether first data block has been positioned at the first snapshot corresponding data with existing block section In, comprising:
Has number for relative position of first data block in first snapshot is corresponding with first snapshot respectively In the relative position in affiliated snapshot and relative position of the data block in affiliated snapshot is terminated according to the initial data block in block section It is compared;
If opposite position of the initial data block in affiliated snapshot is not present in the first snapshot corresponding data with existing block section It sets the relative position being less than or equal to first data block in first snapshot and terminates data block in affiliated snapshot Relative position be greater than or equal to relative position of first data block in first snapshot data with existing block section, Determine that first data block is not located in the first snapshot corresponding data with existing block section.
7. according to the method described in claim 6, it is characterized in that, described from the first snapshot corresponding data with existing block area Between the middle determination data with existing block section adjacent with first data block, comprising:
From the first snapshot corresponding data with existing block section, determine that first adjacent with first data block has number According to block section and/or the second data with existing block section;
Wherein, the first data with existing block section is the relative position and first data block for terminating data block in affiliated snapshot It is minimum and opposite in first snapshot less than first data block in the relative position difference in first snapshot The data with existing block section of position;
The second data with existing block section is relative position of the initial data block in affiliated snapshot and first data block It is minimum and opposite in first snapshot greater than first data block in the relative position difference in first snapshot The data with existing block section of position.
8. the method according to the description of claim 7 is characterized in that described from the first snapshot corresponding data with existing block area Between in, determine the first data with existing block section and/or second data with existing block section adjacent with first data block, wrap It includes:
Using dichotomy, from the first snapshot corresponding data with existing block section, the first data with existing block area is determined Between and/or the second data with existing block section.
9. according to the method described in claim 8, it is characterized in that, described according to first data block and with described first The adjacent data with existing block section of data block marks off new data block section for first snapshot, comprising:
If the termination of relative position of first data block in first snapshot and the first data with existing block section Relative position of the data block in affiliated snapshot is adjacent, and with the initial data block in the second data with existing block section affiliated Relative position in snapshot is adjacent, then by first data block, the first data with existing block section and described second There is data block section to merge into a new data block section, the initial data block in the new data block section has number for described first According to the initial data block in block section, the termination data block in the new data block section is the end in the second data with existing block section Only data block;
If the termination of relative position of first data block in first snapshot and the first data with existing block section Relative position of the data block in affiliated snapshot is adjacent, but not the initial data block with the second data with existing block section in institute The relative position belonged in snapshot is adjacent, then first data block and the first data with existing block section is merged into a new number According to block section, the initial data block in the new data block section is the initial data block in the first data with existing block section, institute The termination data block for stating new data block section is first data block;
If relative position of first data block in first snapshot not end with the first data with existing block section Only relative position of the data block in affiliated snapshot is adjacent, but with the initial data block in the second data with existing block section in institute The relative position belonged in snapshot is adjacent, then first data block and the second data with existing block section is merged into a new number According to block section, the initial data block in the new data block section is first data block, the termination in the new data block section Data block is the termination data block in the second data with existing block section;
If relative position of first data block in first snapshot not end with the first data with existing block section Only relative position of the data block in affiliated snapshot is adjacent, and the initial data block with the second data with existing block section does not exist Relative position in affiliated snapshot is adjacent, then first data block is divided to a new data block section, the new data block The initial data block in section is first data block, and the termination data block in the new data block section is first data Block.
10. according to the method described in claim 3, it is characterized by further comprising:
According to the ID for the affiliated snapshot of data block that the ID of first snapshot and first snapshot include, from first snapshot The data block for being not belonging to first snapshot but belonging to the second snapshot is identified in the data block for including;
It, will according to being not belonging to first snapshot but belong to relative position of the data block of the second snapshot in second snapshot Be not belonging to first snapshot but belong to the second snapshot data block be divided to it is several at least one described data block section A data block section.
11. -10 described in any item methods according to claim 1, which is characterized in that described at least one data block according to The initial data block in section is in the relative position and institute of relative position, termination data block in affiliated snapshot in affiliated snapshot The ID for belonging to snapshot, identifies hash block from the snapshot to be deleted of the data space, comprising:
The ID of the affiliated snapshot of data block and the relative position in affiliated snapshot that include according to the snapshot to be deleted and Relative position of the initial data block at least one data block section in affiliated snapshot terminates data block in affiliated snapshot In relative position and affiliated snapshot ID, obtain in the data block for including from the snapshot to be deleted be not present in it is described to Data block in a few data block section in any data block section, as the hash block.
12. according to the method for claim 11, which is characterized in that the data block for including according to the snapshot to be deleted The ID of affiliated snapshot and the initial data block of relative position and at least one data block section in affiliated snapshot ID in the relative position and affiliated snapshot of relative position, termination data block in affiliated snapshot in affiliated snapshot, from institute It states to obtain in the data block that snapshot to be deleted includes and is not present in any data block section at least one described data block section In data block, as the hash block, comprising:
The data block that the snapshot to be deleted includes is traversed, to the second data block currently traversed, by second data block The ID of affiliated snapshot is compared with the ID of at least one affiliated snapshot in data block section;
If the ID data block identical with second data block of affiliated snapshot is not present at least one described data block section Section, it is determined that second data block is the hash block;
If there are the data block areas identical with second data block the ID of affiliated snapshot at least one described data block section Between, then the relative position by second data block in affiliated snapshot respectively with the ID of affiliated snapshot and second data block The initial data block in identical data block section is in the relative position in affiliated snapshot and terminates data block in affiliated snapshot Relative position is compared, with judge second data block whether fall into belonging to snapshot ID it is identical as second data block Data block section in;
If second data block does not fall within the data block section identical with second data block ID of affiliated snapshot, institute is determined Stating the second data block is the hash block.
13. a kind of snapshot deletes device characterized by comprising
Obtain module, for obtaining at least one the normal snapshot for the data space for needing to carry out snapshot deletion, it is described extremely The normal snapshot of each of a few normal snapshot includes data block;
Division module, for the relative position according to the ID and data block of the affiliated snapshot of data block in affiliated snapshot, by institute It states the data block that at least one normal snapshot includes and is assigned at least one data block section, at least one described data block section In each data block section indicate the discontinuous data block in a relative position or the continuous data block in multiple relative positions;
Identification module, for the opposite position according to the initial data block at least one data block section in affiliated snapshot The ID for setting, terminating relative position and affiliated snapshot of the data block in affiliated snapshot, from the data space wait delete Except identifying hash block in snapshot;
Removing module, for deleting the hash block.
14. a kind of electronic equipment characterized by comprising memory and processor;
The memory, for storing program;
The processor is coupled to the memory, for executing described program to be used for:
Obtain at least one the normal snapshot for needing to carry out the data space of snapshot deletion, at least one described normal snapshot Each of normal snapshot include data block;
According to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, at least one is normal by described in The data block that snapshot includes is assigned at least one data block section, each data block at least one described data block section Section indicates the discontinuous data block in a relative position or the continuous data block in multiple relative positions;
According to relative position of the initial data block at least one data block section in affiliated snapshot, terminates data block and exist The ID of relative position and affiliated snapshot in affiliated snapshot, identifies nothing from the snapshot to be deleted of the data space Use data block;
Delete the hash block.
15. a kind of computer readable storage medium for being stored with computer program, which is characterized in that the computer program is counted Calculation machine can be realized the step in any one of claim 1-12 the method when executing.
16. a kind of storage system characterized by comprising at least one storage equipment and snapshot management equipment;
At least one storage equipment for providing data space to the user of the storage system, and is directed to institute It states data space and snapshot storage space is provided, the snapshot storage space is stored with each fast of the data space According to the data space includes at least one partition holding;
The snapshot management equipment is coupled at least one storage equipment, is used for:
At least one normal snapshot of the data space is obtained, each of at least one described normal snapshot is normal fast According to comprising with the one-to-one data block of at least one partition holding;
According to the relative position of the ID and data block of the affiliated snapshot of data block in affiliated snapshot, at least one is normal by described in The data block that snapshot includes is assigned at least one data block section, each data block at least one described data block section Section indicates the discontinuous data block in a relative position or the continuous data block in multiple relative positions;
According to relative position of the initial data block at least one data block section in affiliated snapshot, terminates data block and exist The ID of relative position and affiliated snapshot in affiliated snapshot, identifies nothing from the snapshot to be deleted of the data space Use data block;
Delete the hash block.
17. a kind of snap processing method characterized by comprising
Obtain at least one data block for belonging to same snapshot;
According to relative position of at least one the described data block in the snapshot, identifies and exist at least one described data block Data block segment, the data block segment include the discontinuous data block in a relative position or multiple relative positions it is continuous Data block;
According to offset address of the initial data block in the data block segment in the snapshot, data block is terminated in the snapshot In offset address and the snapshot ID, generate the data block section for indicating the data block segment.
18. a kind of electronic equipment characterized by comprising memory and processor;
The memory, for storing program;
The processor is coupled to the memory, for executing described program to be used for:
Obtain at least one data block for belonging to same snapshot;
According to relative position of at least one the described data block in the snapshot, identifies and exist at least one described data block Data block segment, the data block segment include the discontinuous data block in a relative position or multiple relative positions it is continuous Data block;
According to offset address of the initial data block in the data block segment in the snapshot, data block is terminated in the snapshot In offset address and the snapshot ID, generate the corresponding data block section of the data block segment.
19. a kind of storage system characterized by comprising at least one storage equipment and snapshot management equipment;
At least one storage equipment for providing data space to the user of the storage system, and is directed to institute It states data space and snapshot storage space is provided, the snapshot storage space is stored with each fast of the data space According to the data space includes at least one partition holding;
The snapshot management equipment is coupled at least one storage equipment, is used for:
Obtain at least one data block for belonging to same snapshot;
According to relative position of at least one the described data block in the snapshot, identifies and exist at least one described data block Data block segment, the data block segment include the discontinuous data block in a relative position or multiple relative positions it is continuous Data block;
According to offset address of the initial data block in the data block segment in the snapshot, data block is terminated in the snapshot In offset address and the snapshot ID, generate the corresponding data block section of the data block segment.
20. a kind of computer readable storage medium for being stored with computer program, which is characterized in that the computer program is counted Calculation machine can be realized the step in claim 17 the method when executing.
CN201711093506.1A 2017-11-08 2017-11-08 Snapshot deleting method, processing method, device and system Active CN110018988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711093506.1A CN110018988B (en) 2017-11-08 2017-11-08 Snapshot deleting method, processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711093506.1A CN110018988B (en) 2017-11-08 2017-11-08 Snapshot deleting method, processing method, device and system

Publications (2)

Publication Number Publication Date
CN110018988A true CN110018988A (en) 2019-07-16
CN110018988B CN110018988B (en) 2023-04-04

Family

ID=67185949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711093506.1A Active CN110018988B (en) 2017-11-08 2017-11-08 Snapshot deleting method, processing method, device and system

Country Status (1)

Country Link
CN (1) CN110018988B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553339A (en) * 2003-06-05 2004-12-08 联想(北京)有限公司 Fine granule quick camera carry-out method
US7849057B1 (en) * 2007-03-30 2010-12-07 Netapp, Inc. Identifying snapshot membership for blocks based on snapid
CN104598293A (en) * 2015-01-06 2015-05-06 杭州华三通信技术有限公司 Online snapshot method and equipment
CN105373349A (en) * 2015-10-30 2016-03-02 江苏翰诺信息科技发展有限公司 Mass data storage system capable of deleting repetitive data
CN105677903A (en) * 2016-02-05 2016-06-15 华为技术有限公司 Data acquisition method and device as well as computer device
US20160210302A1 (en) * 2014-09-26 2016-07-21 Huawei Technologies Co., Ltd. File migration method and apparatus, and storage device
CN106951375A (en) * 2016-01-06 2017-07-14 北京忆恒创源科技有限公司 The method and device of snapped volume is deleted within the storage system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1553339A (en) * 2003-06-05 2004-12-08 联想(北京)有限公司 Fine granule quick camera carry-out method
US7849057B1 (en) * 2007-03-30 2010-12-07 Netapp, Inc. Identifying snapshot membership for blocks based on snapid
US20160210302A1 (en) * 2014-09-26 2016-07-21 Huawei Technologies Co., Ltd. File migration method and apparatus, and storage device
CN104598293A (en) * 2015-01-06 2015-05-06 杭州华三通信技术有限公司 Online snapshot method and equipment
CN105373349A (en) * 2015-10-30 2016-03-02 江苏翰诺信息科技发展有限公司 Mass data storage system capable of deleting repetitive data
CN106951375A (en) * 2016-01-06 2017-07-14 北京忆恒创源科技有限公司 The method and device of snapped volume is deleted within the storage system
CN105677903A (en) * 2016-02-05 2016-06-15 华为技术有限公司 Data acquisition method and device as well as computer device

Also Published As

Publication number Publication date
CN110018988B (en) 2023-04-04

Similar Documents

Publication Publication Date Title
CN103336849B (en) A kind of database retrieval system improves the method and device of retrieval rate
CN103186535B (en) A kind of mobile terminal picture management method and equipment
CN104011717A (en) Data selection for data storage backup
CN109962710A (en) Data compression method, electronic equipment and computer readable storage medium
CN109753379A (en) Snapshot data backup, delet method, apparatus and system
CN109240607B (en) File reading method and device
CN114138193B (en) Data writing method, device and equipment for partition naming space solid state disk
CN103198027A (en) Method and device for storing and providing files
CN104281528A (en) Data storage method and device
CN107885616A (en) A kind of mass small documents back-up restoring method based on file system parsing
CN103714013A (en) Method and device for allocating storage space of file system
CN101400169A (en) Mobile terminal, method for mobile resource management
CN103412825A (en) Internal storage releasing method and device
CN107590144A (en) A kind of file memory method and terminal
CN106341485A (en) Cloud storage method and device
CN105493080A (en) Method and apparatus for context aware based data de-duplication
CN104063377B (en) Information processing method and use its electronic equipment
CN107148612A (en) A kind of method and apparatus of extending user subregion
US11662907B2 (en) Data migration of storage system
CN110018988A (en) Snapshot delet method, processing method, apparatus and system
CN109753380A (en) Snapshot data backup method, apparatus and system
CN105528302B (en) A kind of method and system of the dynamic hyperdisk of logic-based volume
CN110018986A (en) Abnormal snapshot recognition methods and device
CN110018985A (en) Snapshot delet method, apparatus and system
CN102932513B (en) A kind of business card maintaining method, device and equipment

Legal Events

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