A kind of snapshot rollback method and device

文档序号:1741661 发布日期:2019-11-26 浏览:13次 中文

阅读说明:本技术 一种快照回滚方法及装置 (A kind of snapshot rollback method and device ) 是由 严小林 于 2019-07-09 设计创作,主要内容包括:一种快照回滚方法及装置,用以提供一种在线快照回滚方式。该方法包括:存储客户端接收主机发送的针对第一逻辑卷的第一快照回滚请求后,会生成第二逻辑卷以及存储客户端用于识别该第二逻辑卷的标识,并建立存储系统的主机用于识别第一逻辑卷的标识以及存储客户端用于识别第二逻辑卷的标识的映射关系,这样,在进行快照回滚处理后,即使主机用于识别第一逻辑卷的标识不发生变化,存储客户端也能够通过该映射关系,访问到正确的逻辑卷,从而可以实现在线快照回滚,进而可以不用中断对逻辑卷的访问,应用程序的业务不会受到影响。(A kind of snapshot rollback method and device, to provide a kind of online snapshot rollback mode.This method comprises: after the first snapshot rollback request for the first logical volume that storage client receiving host is sent, the second logical volume can be generated and store the mark of client second logical volume for identification, and establish the mapping relations of the host of the storage system mark of the first logical volume and storage the client mark of the second logical volume for identification for identification, in this way, after carrying out snapshot rollback processing, even if the mark of host the first logical volume for identification does not change, storage client can also pass through the mapping relations, correct logical volume is accessed, so as to realize online snapshot rollback, and then it can not have to interrupt the access to logical volume, the business of application program is unaffected.)

1. a kind of snapshot rollback method, within the storage system, the storage system includes host and the master for the method application The storage client of machine communication and the storage equipment connecting with the storage client, the storage equipment is for storing number According to characterized by comprising

The storage client receives the first snapshot rollback request that the host is sent, and wraps in the first snapshot rollback request Include the first identifier of the first logical volume in the storage equipment and the mark of the first snapshot, the first snapshot rollback request Data for recording the data rewind in first logical volume to first snapshot, the host pass through described first Mark identifies first logical volume;

The storage client generates the second logical volume, and creates the semantic pass of second logical volume and first snapshot System, it is corresponding with data access request that the semantic relation is used to indicate the reading from second logical volume or first snapshot Data, include the first identifier in the data access request;

The storage client generates second identifier corresponding with second logical volume, and create the first identifier with it is described The mapping relations of second identifier, so that the host can be according to the first identifier and mapping relations access described the Two logical volumes.

2. the method according to claim 1, wherein the storage client generates and second logical volume pair The second identifier answered, comprising:

The storage client according to the semantic relation of first logical volume and first snapshot, and, described second patrols The semantic relation of volume with first snapshot is collected, being formed includes first logical volume, first snapshot and described second The tree structure of logical volume;

The storage client generates the second identifier according to the tree structure, and the second identifier is used to indicate described Position of second logical volume in the tree structure.

3. according to the method described in claim 2, the triple includes it is characterized in that, the second identifier is triple The mark and second logic of the branch of the mark of the tree structure, second logical volume in the tree structure Roll up the mark of the position in the branch.

4. method according to any one of claim 1-3, which is characterized in that in storage client creation described the Before the semantic relation of two logical volumes and first snapshot, the method also includes:

The storage client receives the first data access request, includes first mark in first data access request Know, first data access request is that the storage client is received after receiving the first snapshot rollback request;

The storage client carries out suspension processing to first data access request;

The storage client receives feedback message corresponding with the second data access request, in second data access request Including the first identifier, second data access request is that the storage client is asked in reception the first snapshot rollback It is received before asking.

5. method according to any of claims 1-4, which is characterized in that in storage client creation described the After the mapping relations of one mark and the second identifier, the method also includes:

The storage client releases the suspension to first data access request and handles;

The storage client is obtained from second logical volume or first snapshot according to first data access request Access evidence, or, data will be written to second logical volume.

6. a kind of snapshot rollback device, which is characterized in that including communication interface and processor, in which:

The communication interface, the first snapshot rollback that receiving host is sent are requested, and include depositing in the first snapshot rollback request Store up the first identifier of the first logical volume in equipment and the mark of the first snapshot, the first snapshot rollback request is for by institute The data that the data rewind in the first logical volume is recorded to first snapshot are stated, the host is identified by the first identifier First logical volume, the storage system include the host and the storage equipment, and the storage equipment is for storing number According to;

The processor generates the second logical volume, and creates the semantic relation of second logical volume Yu first snapshot, institute It states semantic relation and is used to indicate the reading number corresponding with data access request from second logical volume or first snapshot According to including the first identifier in the data access request;And

Second identifier corresponding with second logical volume is generated, and creates the mapping of the first identifier Yu the second identifier Relationship, so that the host can access second logical volume according to the first identifier and the mapping relations.

7. device according to claim 6, which is characterized in that the processor is specifically used for:

According to the semantic relation of first logical volume and first snapshot, and, second logical volume and described first The semantic relation of snapshot forms the tree-like knot including first logical volume, first snapshot and second logical volume Structure;

According to the tree structure, the second identifier is generated, the second identifier is used to indicate second logical volume in institute State the position in tree structure.

8. device according to claim 7, which is characterized in that the second identifier is triple, and the triple includes The mark and second logic of the branch of the mark of the tree structure, second logical volume in the tree structure Roll up the mark of the position in the branch.

9. device a method according to any one of claims 6-8, which is characterized in that

The communication interface is also used to: being received the first data access request, is included described the in first data access request One mark, first data access request are that the storage client receives after receiving the first snapshot rollback request 's;

The processor is also used to: carrying out suspension processing to first data access request;

The communication interface is also used to: receiving feedback message corresponding with the second data access request, second data access It include the first identifier in request, second data access request is that the storage client is receiving first snapshot It is received before rollback request.

10. the device according to any one of claim 6-9, which is characterized in that the processor is also used to:

The suspension to first data access request is released to handle;

Data are obtained from second logical volume or first snapshot according to first data access request, or, will be to Data are written in second logical volume.

11. a kind of computer storage medium, which is characterized in that the computer storage medium is stored with instruction, works as described instruction When running on computers, so that the computer executes the method according to claim 1 to 5.

12. a kind of computer program product, which is characterized in that the computer program product is stored with instruction, works as described instruction When running on computers, so that the computer executes the method according to claim 1 to 5.

Technical field

This application involves technical field of memory more particularly to a kind of snapshot rollback methods and device.

Background technique

With the surge of Internet user and various sexual development of business, more and more data are (for example, number of users According to, business configuration data etc.) it needs to be stored using storage system, to be used to analyze and service guidance.

A kind of common storage system is distributed block storage system.Referring to FIG. 1, being the frame of distributed block storage system Composition.As shown in Figure 1, distributed block storage system 100 includes block storage 110,3 block storage service ends 120 of client (difference For block storage service end 1~block storage service end 3), each piece of storage service end 120 includes hard disc apparatus (not shown). Block storage service end 120, which is passed through, the processing such as is sliced, breaks up, and hard disc apparatus is divided into multiple logical volumes (volume, Vol), so Afterwards by storage client 110, multiple logical volumes of division are mapped to host 130 and are used, thus, the operation system of host 130 System can then identify multiple logical volume.After the operating system of host 130 carries out carry processing to multiple logical volume, host Each application program in 130 then can directly be written and read the data in multiple logical volume.Wherein, block storage clothes Business end 120 can be server.

In order to which the data to host 130 are protected, can at different times, for some establishing logical volume snapshot, Wherein, the snapshot of a logical volume can be understood as having recorded the data stored in the sometime logical volume and (or can manage Solution is copy of the logical volume in the data sometime stored).In this way, if subsequent since business needs or the system failure is led When causing loss of data, then it can restore the data that the logical volume stores at the moment by snapshot rollback technology.

Currently, snapshot rollback technology is offline snapshot rollback mode, that is to say, that before carrying out snapshot rolling back action, It is unloaded firstly the need of the logical volume that will carry out snapshot rollback from operating system, after the completion of unloading, it is accordingly fast just to can be carried out carry According to the logical volume at moment, snapshot rollback is realized, in this way, host 130 could access the logical volume of the corresponding snapshot time of carry.It can See, snapshot rollback mode in the prior art will lead to host service access interrupt.

Summary of the invention

The embodiment of the present application provides a kind of snapshot rollback method and device, to provide a kind of online snapshot rollback mode.

In a first aspect, providing a kind of snapshot rollback method, within the storage system, which includes master for this method application Machine, with the storage client of the main-machine communication and the storage equipment being connect with the storage client, the storage equipment is for depositing Data are stored up, when carrying out snapshot rollback, host is first to storage client transmission for by the data rewind in the first logical volume First snapshot rollback of the data recorded to the first snapshot is requested, and carries the host for identification in the first snapshot rollback request The mark of the first identifier of first logical volume and first snapshot, first logical volume can be any in storage equipment One logical volume.After storage client receives the first snapshot rollback request, then the second logical volume is generated, and creates this and second patrol The semantic relation of volume with first snapshot is collected, which is used to indicate reads from second logical volume or first snapshot With include the corresponding data of the data access request of the first identifier, and store client and can also generate and second logical volume pair The second identifier answered, and the mapping relations of the first identifier Yu the second identifier are created, in this way, when host is sent out to depositor's client When sending the request for accessing the first logical volume, storage client can be accessed according to the first identifier and the mapping relations Second logical volume.

In the above-mentioned technical solutions, which can be understood as storage client second logical volume for identification Mark establishes the mark of host logical volume for identification since storage client is when carrying out snapshot rollback processing to logical volume Know and the mapping relations of the storage client mark of logical volume for identification, in this way, after carrying out snapshot rollback processing, even if The mark of host logical volume for identification does not change, and storage client can be also accessed correct by the mapping relations Logical volume, so as to realize online snapshot rollback, and then can not have to interrupt the access to logical volume, business not will receive It influences.

Further, since online snapshot rollback may be implemented, in this way, not having to first unload before carrying out snapshot rollback processing Volume, and carry is rolled up again after carrying out snapshot rollback processing, so as to simplify treatment process when snapshot rollback, is reduced fast According to duration needed for rollback processing.

In a kind of possible design, storage client can be closed according to first logical volume and the semantic of first snapshot System, and, the semantic relation of second logical volume and first snapshot, formed including first logical volume, first snapshot with And the tree structure of second logical volume, so that it is tree-like at this that generation is used to indicate second logical volume according to the tree structure The second identifier of position in structure.

In a kind of possible design, which is triple, which includes the mark of the tree structure, is somebody's turn to do The mark of branch of second logical volume in the tree structure and the mark of the position of the second logical volume in this branch.

In the above-mentioned technical solutions, storage client produces the second identifier by simple mode, can protect It demonstrate,proves in the case that the snapshot rollback method smoothly executes, reduces the operand of storage client as far as possible.

In a kind of possible design, certain handling duration is needed since storage client carries out snapshot rollback processing, Therefore, if storage client is after receiving the first snapshot rollback request and is creating second logical volume and first snapshot Semantic relation before, receive the storage client and receive the first data access request including the first identifier, then Storage client can carry out suspension processing to first data access request;Alternatively,

If storing client before receiving the first snapshot rollback request, the second number including the first identifier is received According to access request, then feedback message corresponding with second data access request can first be waited by storing client, then be created again Build the semantic relation of second logical volume and first snapshot.

In a kind of possible design, when storage client create the first identifier and the second identifier mapping relations it Afterwards, storage client then releases the suspension to first data access request handle, and according to first data access request from Data are obtained in second logical volume or first snapshot, or, data will be written to second logical volume.

In the above-mentioned technical solutions, by be suspended on snapshot rollback request after data access request, can to avoid by The problem of needing certain handling duration in online snapshot rollback processing, and leading to the data of access errors.

Second aspect provides a kind of snapshot rollback device, which can be storage client, is also possible to Store the device in client.The snapshot rollback device includes processor, for realizing the method for above-mentioned first aspect description.It should Snapshot rollback device can also include memory, for storing program instruction and data.The memory is coupled with the processor, should Processor can call and execute the program instruction stored in the memory, in the method for realizing the description of above-mentioned first aspect Any one method.The snapshot rollback device can also include communication interface, which is used for the snapshot rollback device It is communicated with other equipment.Illustratively, which is the host or storage equipment in storage system.

In a kind of possible design, the snapshot rollback de-vice processor and communication interface, in which:

The communication interface, the first snapshot rollback that receiving host is sent are requested, and include depositing in the first snapshot rollback request Store up the first identifier of the first logical volume in equipment and the mark of the first snapshot, the first snapshot rollback request for by this The data that data rewind in one logical volume is recorded to first snapshot, the host identify first logic by the first identifier Volume, which includes the host and the storage equipment, and the storage equipment is for storing data;

The processor generates the second logical volume, and creates the semantic relation of second logical volume and first snapshot, the language Adopted relationship, which is used to indicate from second logical volume or first snapshot, reads data corresponding with data access request, the data It include the first identifier in access request;And

Second identifier corresponding with second logical volume is generated, and the mapping for creating the first identifier and the second identifier is closed System, so that the host can access second logical volume according to the first identifier and the mapping relations.

In a kind of possible design, which is specifically used for:

According to the semantic relation of first logical volume and first snapshot, and, second logical volume and first snapshot Semantic relation, formed include first logical volume, first snapshot and second logical volume tree structure;

According to the tree structure, the second identifier is generated, it is tree-like at this which is used to indicate second logical volume Position in structure.

In a kind of possible design, which is triple, which includes the mark of the tree structure, is somebody's turn to do The mark of branch of second logical volume in the tree structure and the mark of the position of the second logical volume in this branch.

In a kind of possible design, which is also used to: receiving the first data access request, which visits Ask to include the first identifier in request, which, which is the storage client, asks receiving the first snapshot rollback It is received after asking;

The processor is also used to: carrying out suspension processing to first data access request;

The communication interface is also used to: receiving feedback message corresponding with the second data access request, second data access It include the first identifier in request, which is that the storage client is receiving the first snapshot rollback request It is before received.

In a kind of possible design, which is also used to:

The suspension to first data access request is released to handle;

Data are obtained from second logical volume or first snapshot according to first data access request, or, will be to this Data are written in second logical volume.

The third aspect provides a kind of snapshot rollback device, which can be storage client, is also possible to The device in client is stored, which may include processing module and obtain module, these modules can execute Performed corresponding function in the above-mentioned any design example of first aspect, specific:

Module is obtained, for the first snapshot rollback request that receiving host is sent, is wrapped in the first snapshot rollback request The first identifier of the first logical volume in storage equipment and the mark of the first snapshot are included, the first snapshot rollback request is used for The data that data rewind in first logical volume is recorded to first snapshot, the host pass through the first identifier Identify first logical volume, the storage system includes the host and the storage equipment, and the storage equipment is for depositing Store up data;

Processing module for generating the second logical volume, and creates the semanteme of second logical volume Yu first snapshot Relationship, the semantic relation is used to indicate to be read and data access request pair from second logical volume or first snapshot The data answered include the first identifier in the data access request;And

Second identifier corresponding with second logical volume is generated, and creates the first identifier and the second identifier Mapping relations, so that the host can access second logical volume according to the first identifier and the mapping relations.

Fourth aspect also provides a kind of computer readable storage medium, including instruction in the embodiment of the present application, when it is being counted When being run on calculation machine, so that the method that computer executes first aspect.

In terms of 5th, a kind of computer program product, including instruction are also provided in the embodiment of the present application, when it is in computer When upper operation, so that the method that computer executes first aspect.

6th aspect, the embodiment of the present application provide a kind of chip system, which includes processor, can also be wrapped Memory is included, for realizing the method for first aspect.The chip system can be made of chip, also may include chip and other Discrete device.

7th aspect, the embodiment of the present application provides a kind of storage system, which includes storage equipment and the Storage client described in one side, alternatively, the storage system includes storage client described in storage equipment and second aspect End.

The beneficial effect of above-mentioned second aspect to the 6th aspect and its implementation can be in the method for reference pair first aspect And its description of the beneficial effect of implementation.

Detailed description of the invention

Fig. 1 is a kind of exemplary architecture diagram of distributed block storage system;

Fig. 2 is a kind of exemplary schematic diagram for using ROW technology to create snapshot for VolA in the prior art;

Fig. 3 is the flow chart that application program reads data from block storage service end in the prior art;

Fig. 4 is the schematic diagram of the SCSI model of linux system;

Fig. 5 is the flow chart of offline snapshot rollback mode in the prior art;

Fig. 6 is the exemplary architecture diagram of another kind of the distributed block storage system provided in the embodiment of the present application;

Fig. 7 is a kind of a kind of exemplary flow chart of snapshot rollback method provided by the embodiments of the present application;

Snapshot and progress of the Fig. 8 for logical volume, logical volume before progress snapshot rolling back action in the embodiment of the present application A kind of exemplary schematic diagram of the corresponding relationship between logical volume after snapshot rolling back action;

Fig. 9 is a kind of exemplary flow chart of another kind of snapshot rollback method provided by the embodiments of the present application;

Figure 10 is a kind of a kind of exemplary structure chart of snapshot rollback device provided by the embodiments of the present application;

Figure 11 is a kind of exemplary structure chart of another kind of snapshot rollback device provided by the embodiments of the present application.

Specific embodiment

In order to keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with Figure of description And specific embodiment technical solutions in the embodiments of the present application is described in detail.

Technical solution in the embodiment of the present application for ease of understanding, below solves technical term involved in the application It releases.

1) using the process for redirecting (redirect on write, ROW) technology creation snapshot when writing.

For convenience of description, by taking a logical volume (VolA) in distributed block storage system 100 shown in FIG. 1 as an example.Please With reference to Fig. 2, to use ROW technology for the schematic diagram of VolA creation snapshot.As shown in Fig. 2, the memory space of VolA is (labeled as the One memory space) 9 data blocks of middle storage, difference 1~data block of storing data block 9.At the first moment, block stores client 110 create snapshot for VolA, and as VolA redistributes a new memory space (labeled as the second memory space), this second Memory space also includes 9 data blocks, and the first memory space of VolA is changed to the snapshot of VolA (labeled as snap A1) Memory space.Then, block storage client 110 creates the snapshot semantic relation of VolA and snap A1, the snapshot semantic relation It can be with are as follows: when receiving the read request for reading the data in VolA, if the memory space (i.e. the second memory space) of VolA is no There are data to be read, then the data to be read are read from the memory space of snap A1, and, it is receiving to VolA When the write request of new data is written, by the memory space (i.e. the second memory space) of new data write-in VolA.In this way, second Moment, then according to preset snapshot semantic relation, is written into when block storage client 110 receives the write request to VolA Data are written in the second memory space of VolA, for example, in preceding 3 LUN of the second memory space storing data block 11~ Data block 13.

2) process of the snapshot rollback based on ROW technology.

Continue to use example shown in Fig. 2.When block storage client 110 detects the snapshot rollback for VolA at the third moment Request when, it is (empty labeled as third storage that block storage client 110 redistributes a new memory space first for VolA Between), then create the new memory space of VolA and the snapshot semantic relation of snap A1, the snapshot semantic relation are as follows: receiving When reading the read request of the data in VolA, if number to be read is not present in the memory space (i.e. third memory space) of VolA According to, then the data to be read are read from the memory space of snap A1, and, receiving writing to VolA write-in new data When request, by the new memory space (i.e. third memory space) of new data write-in VolA.In this way, working as block at the 4th moment When storing write request of the reception of client 110 to VolA, then according to preset snapshot semantic relation, it is written into data and is written to In the third memory space of VolA, when block storage client 110 receives the read request to VolA, then according to preset snapshot language Adopted relationship first determines in the third memory space whether include data to be read, empty from the storage of snap A1 if not Between middle reading data to be read.

3) operating system can be windows operating system, unix operating system, linux operating system, solaris behaviour Make system etc., in the embodiment of the present application with no restriction.

4) application program can be the application program based on ICP/IP protocol, for example, providing hypertext transfer protocol The application program of (hyperText transfer protocol, HTTP) service provides File Transfer Protocol (file Transfer protocol, FTP) service application program, for testing characteristics of network (for example, shake, delay, packet loss Deng) iperf application program etc., in the embodiment of the present application with no restriction.

Wherein, operating system and application program may operate in host.

5) in distributed block storage system application program data access process.

Data access, it can be understood as, it is written from reading data in block storage service end and into block storage service end Data.Data instance is read from block storage service end below with application program to be illustrated.Referring to FIG. 3, being application program The flow chart of data is read from block storage service end, which is described as follows:

S31, application program send read request to operating system, and operating system receives the read request.

It include the mark (for example, title or number etc. of logical volume) of the logical volume where data in the read request.

S32, operating system determine and the corresponding hard disc apparatus of the read request and four-tuple corresponding with the hard disc apparatus.

In distributed block storage system, as an example, operating system is by four-tuple come each piece of unique identification The logical volume that storage service end includes.The concrete form of the four-tuple can be stored according to used by distributed block storage system Framework is corresponding, for example, if distributed block storage system uses storage area network (storage area network, SAN) frame Structure, four-tuple, that is, small computer system interface (small computer system interface, the SCSI) four-tuple, Then the four-tuple can be (host adapter (host): channel (channel): destination node (target): logic storage unit (logic unit number, LUN)).In the embodiment of the present application, LUN can be understood as logical volume above-mentioned.Work as distribution When block storage system uses other storage architectures, the content of four-tuple corresponding can change, and details are not described herein.At this Apply in embodiment, block storage system is illustrated for using SAN framework in a distributed manner.

Before introducing the content in four-tuple, the SCSI model in operating system is introduced first.Following In introduction, it is illustrated so that operating system is linux system as an example.Referring to FIG. 4, being showing for the SCSI model of linux system It is intended to.In Fig. 4, a host can have one or more host adapters, and one end of each host adapter connects host Input and output (input/output, I/O) bus is (for example, Peripheral Component Interconnect standard (peripheral component Interconnect, PCI) bus), the other end then passes through channel (channel) connection storage IO bus (for example, SCSI is total Line).It include 2 channels, respectively channel 1 and channel 2 in a host adapter in Fig. 4.One host adapter can be with One or more SCSI bus is controlled, every SCSI bus is connect with a channel in host adapter, every SCSI bus It can connect the hard disc apparatus (being referred to as scsi disk) in multiple distributed block storage systems.In Fig. 4, with channel 1 The SCSI hard disk of connection has 2, respectively SCSI hard disk 0 and SCSI hard disk 1.Each hard disc apparatus may include multiple LUN.Example Such as, include LUN0 and LUN1 in SCSI hard disk 0, include LUN0 in SCSI hard disk 1.

Host in SCSI four-tuple is used to indicate the host adapter in SCSI model shown in Fig. 4, only wraps in Fig. 4 A host adapter (labeled as host1) is included, when in host including multiple main frames adapter, can be adapted to for each host Device is numbered, which is then the number of host adapter.Channel in SCSI four-tuple is used to indicate described in Fig. 4 The channel connecting in host adapter with SCSI bus, the channel can also indicate that the number in channel.In SCSI four-tuple Target is used to indicate the SCSI hard disk connecting in SCSI model as shown in Figure 4 with SCSI bus.

As an example, which can be in carry logical volume, be sent to operation system by block storage client System;Alternatively, being also possible to operating system when needing to access logical volume, inquiry request is sent to block storage client and is obtained , this is not restricted.For example, operating system determines that the SCSI four-tuple of the logic storage unit that application program to be accessed is (1:1:0:0)。

S33, operating system send read data request to block storage client, and block storage client, which receives the reading data, asks It asks.

It include the mark of hard disc apparatus that operating system determines in the read data request and corresponding with the hard disc apparatus Four-tuple.Block stores client according to the four-tuple and distributed hashtable (distributed hash table, DHT), really Determine the logical volume that operating system needs to access, and reads target data from corresponding logical volume.

S34, block storage client will send the response message for carrying the target data to operating system, and operating system receives The response message.

The target data is then sent to using journey by S35, operating system after obtaining the target data in the response message Sequence.

6) in the description of the present application, " multiple " refer to two or more, " multiple " can also be interpreted as " at least Two "."at least one", it will be appreciated that it is one or more, such as is interpreted as one, two or more, including at least one, Refer to including one, two or more, and do not limit that include is which, it may for example comprise at least one in A, B and C It is a, then include can be A, B, C, A and B, A and C, B and C or A and B and C."and/or" describes the association of affiliated partner Relationship indicates may exist three kinds of relationships, for example, A and/or B, can indicate: individualism A, individualism B exist simultaneously A With these three situations of B.In addition, character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or" unless otherwise specified.

Unless indicated to the contrary, refer to the ordinal numbers such as " first ", " second " for carrying out to multiple objects in the application It distinguishes, is not used in sequence, timing, priority or the significance level for limiting multiple objects.

In the following, to this application involves technical characteristic be illustrated.

By the introduction of the aforementioned process to the snapshot rollback based on ROW technology it is found that carrying out snapshot to some logical volume After rollback, the corresponding memory space of the logical volume is changed, it can be understood as logical volume physical bit in hard disc apparatus It sets and is changed.But new snapshot semantic relation is only created during the snapshot rollback based on ROW technology, at this It is natural if operating system uses the four-tuple carried out before snapshot rollback to the logical volume to access the logical volume in the case of kind Mistake can occur.Therefore, the application program in distributed block storage system can only use offline snapshot when carrying out snapshot rollback Rollback mode.

Referring to FIG. 5, being the flow chart of offline snapshot rollback mode, which is described as follows:

S51, application program send unloading volume request to block storage client, and block storage client receives unloading volume and asks It asks.

It include the mark for needing the logical volume unloaded in unloading volume request, for example, it is desired to which the logical volume of unloading is VolA.

S52, block store client and determine the logical volume for needing to unload from unloading volume request, and unload this from host and patrol Volume is collected, for example, unloading VolA.

S53, block store client and feed back unloading volume as a result, application program receives the unloading clove hitch fruit to application program.

S54, application program send snapshot rollback volume request, and block storage client receives snapshot rollback volume request.

It include needing to carry out the mark of the logical volume of snapshot rolling back action and corresponding fast in snapshot rollback volume request According to mark, for example, it is desired to carry out snapshot rolling back action logical volume be VolA, and, by the data rewind in the logical volume The data stored into the snapshot at the first moment.

S55, block storage client be need the logical volume for carrying out snapshot rolling back action to redistribute new memory space, and The snapshot semantic relation for establishing the memory space of the new memory space and the snapshot of the logical volume, the snapshot for completing logical volume return Roll across journey.

The snapshot semantic relation to 2) in it is similar, details are not described herein.

S56, block store client and feed back snapshot rollback volume as a result, application program receives snapshot rollback volume to application program As a result.

S57, application program send carry volume request, and block storage client receives carry volume request.

It include the mark for needing the logical volume of carry in unloading volume request, for example, it is desired to which the logical volume of carry is VolA.

S58, block store client and determine the logical volume for needing carry from carry volume request, and the logical volume carry is existed In host.

S59, block store client to application program feedback carry volume as a result, application program receives the carry clove hitch fruit.

It should be noted that step S53, step S56 and step S59 are optional step, that is, it is not required execution. For example, after block storage client unloads logical volume, application program will not show the logical volume by taking step S53 as an example, from And application program can with according to whether show the logical volume determine unloading clove hitch fruit.It is represented by dotted lines in Fig. 5.

As shown in Figure 5, the process of snapshot rollback in the prior art, before carrying out snapshot rolling back action, it is necessary first to The logical volume for carrying out snapshot rollback is unloaded from operating system, after the completion of unloading, just can be carried out the corresponding snapshot time of carry Logical volume realizes snapshot rollback, to will lead to host service access interrupt.

In consideration of it, the embodiment of the present application provides a kind of snapshot rollback method, to provide a kind of online snapshot rollback mode.

It should be noted that the method in the embodiment of the present application can be applied to distributed block storage system as shown in Figure 1 It in system, can also apply in other distributed memory systems, for example, distributed file storage system or distributed objects system The combination of system or above-mentioned storage system.Alternatively, can also apply in centralised storage system, this is not restricted.

In addition, a host is only connect with a block storage client in distributed block storage system described in Fig. 1, In the embodiment of the present application, a host can also be connect with multiple pieces of storage clients, as shown in fig. 6, including block storage visitor Family end 1 and block store client 2.Each piece of storage client is connect at least one block storage service end.

It should be noted that in actual use, the corresponding memory space of a logical volume is distributed across entire block storage On server-side cluster, that is to say, that the corresponding memory space of a logical volume can be distributed across multiple pieces of storage service ends On, or can be distributed on all block storage service ends, this is not restricted.

In addition, it is necessary to which explanation, needs the storage system for carrying out snapshot rolling back action to be not limited to as shown in Fig. 1 or Fig. 6 Distributed block storage system, the embodiment of the present application description distributed block storage system be to more clearly illustrate this Shen Please embodiment technical solution, do not constitute the restriction for technical solution provided by the embodiments of the present application, the common skill in this field Art personnel it is found that with memory technology and storage system framework differentiation, technical solution provided by the embodiments of the present application is for class As technical problem, it is equally applicable.

In the following, by distributed block storage system as shown in Figure 1 is applied to technical solution provided by the embodiments of the present application For.

Referring to FIG. 7, being a kind of flow chart of snapshot rollback method provided by the embodiments of the present application, which is described such as Under:

S701, application program sending logic roll up request to create, and operating system receives establishing logical volume request.

Application program (can operate depending on the user's operation for example, creating) or use demand, sends to operating system Establishing logical volume is requested, and may include the title for needing the logical volume created in establishing logical volume request, need to create patrols Collect the information such as the size of volume.For example, the establishing logical volume request for create the first logical volume, the first logical volume it is entitled The size of Vol A, the Vol A are 10 Mbytes (megabytes, MB) or can be used for storing 9 data blocks.

Establishing logical volume request is sent to block storage client by S702, operating system, and block stores client reception should Establishing logical volume request.

S703, block storage client create first volume metadata corresponding with first logical volume and the first memory space.

In the embodiment of the present application, first volume metadata corresponding with first logical volume can be used for describing this and first patrol Volume is collected in the information such as the position at block storage service end and the size of first logical volume, with first logical volume corresponding first Memory space is used to store the data of first logical volume.

As an example, when block storage client receive the establishing logical volume request after, can according to default rule, For first memory space of establishing logical volume.As an example, which can be is sequentially allocated in sequence.Example Such as, distributed block storage system as shown in Figure 1 is depositing for 500 gigabytes (gigabyte, the GB) that block stores that client provides Store up space, wherein the data of 30M byte have been stored in block storage client.Due to need create logical volume it is big Small is 10MB, then block storage client gives the corresponding memory allocation of 31MB~40MB to the logical volume.31MB~the 40MB Corresponding memory space can be located in the block storage service end 1 in distributed block storage system shown in FIG. 1, or can also be with It is distributed across in multiple pieces of storage service ends (such as block storage service end 1 and block storage service end 2), this is not restricted.

As another example, which, which can be, is randomly assigned.For example, distributed block as shown in Figure 1 is deposited Storage system is the memory space that block stores 500 gigabytes (gigabyte, GB) that client provides, wherein the block stores client The data of 30M byte have been stored in end.Since the size of logical volume for needing to create is 10MB, then block store client from The memory allocation of 10MB is randomly choosed in remaining memory space to the logical volume, for example, 50MB~60MB is corresponding Memory allocation gives the logical volume.

For convenience of description, hereinafter with block storage client be the corresponding first volume metadata of the first establishing logical volume and First memory space is located at for block storage service end 1.

Specifically, when block storage client determines that first volume metadata and first for creating first logical volume are deposited After storage is spatially located at block storage service end 1, then control instruction is sent to the block storage service end 1.Block storage service end 1 executes should Control instruction, to be the corresponding first volume metadata of first establishing logical volume and first in the block storage service end 1 Memory space.For example, being the memory space that first logical volume distributes 10M at block storage service end 1, as first logical volume The first memory space.

S704, block store client and send creation as a result, operating system receives the creation result to operating system.

Include the first identifier of first logical volume in the creation result, the first identifier for operating system identify this One logical volume.

In the embodiment of the present application, which is four-tuple, and the four-tuple is identical as the four-tuple in step S32, For example, the four-tuple is (host:channel:target:LUN), details are not described herein.For example, distributed block shown in Fig. 1 In storage system, which can be expressed as (0:0:1:0).

Certainly, it should be noted that when this method be applied to other storage systems in, for example, centralised storage system or When person uses the storage system of other communication protocol communications, which is also possible to the content different from step S32, or Person, the first identifier may not be four-tuple, for example, not carrying out herein to first identifier for triple or five-tuple etc. Limitation.

S705, block storage client generate third mark corresponding with first logical volume.

Third mark identifies first logical volume for client, it can be understood as, block storage client can identify Third mark, but operating system can not identify that the third identifies, alternatively, it is to be understood that third mark is to operating system It is unknown.

In the embodiment of the present application, the method that block storage client generates third mark can include but is not limited to as follows Two ways:

The first generating mode:

In order to guarantee the reliability of data, logical volume in use, may will create the snapshot of the logical volume, so as to It is subsequent that snapshot rollback processing can be carried out to the logical volume according to use demand (such as after having carried out maloperation to data), from And restore the data that the logical volume is stored when creating snapshot.By the process of aforementioned creation snapshot and the process of snapshot rollback processing It is found that block storage client will create snapshot and patrolling before carrying out snapshot rollback processing before carrying out snapshot rollback processing Collect the semantic relation between volume (content of semantic relation is identical as foregoing teachings);After carrying out snapshot rollback processing, block is deposited Storage client will create snapshot and carry out the semantic relation between the logical volume after snapshot rollback processing.Come from this angle See, the snapshot of logical volume, carry out snapshot rollback processing before logical volume and carry out logical volume after snapshot rollback processing Tree structure as shown in Figure 8 can be formed.In fig. 8, it using the snapshot of logical volume as host node, carries out snapshot rollback and handles it Logical volume after preceding logical volume and progress snapshot rollback processing is respectively the branch node of the host node.

Based on the above principles, it when block storage client is after creating first logical volume, then first can be patrolled according to this The position in volume tree structure shown in Fig. 8 is collected, third mark corresponding with first logical volume is generated.Show as one kind Example, third mark can indicate that the triple includes the mark of the tree structure where first logical volume by triple Know, the mark and the mark of the first logical volume in this branch of the branch of first logical volume in the tree structure.

Channel in the four-tuple of first logical volume can be mapped as this by the first example, block storage client The mark of tree structure where first logical volume.With the channel in the information of the corresponding four-tuple of the first logical volume for 0 For, then tree structure where first logical volume is identified as 0.First logical volume is located in the tree structure where it First branch in, for example, identify first branch with 0, and first logical volume is first in first branch A node, therefore, the triple of first logical volume can be expressed as (0:0:1).

Target in the four-tuple of first logical volume can be mapped as this by second of example, block storage client The mark of tree structure where first logical volume.In this case, block storage client generates the process and the of third mark A kind of example is similar, and details are not described herein.

It should be noted that when block storage client generates the ternary according to the information in the four-tuple of first logical volume When group, the mapping mode between the four-tuple and triple is not limited in the embodiment of the present application.

The third example, block store client can also according to the sequence of the first establishing logical volume or at random for this first The mark of tree structure distribution tree structure where logical volume.If first logical volume is the of block storage client creation N logical volume, then the tree structure where first logical volume is identified as n, the tree as where first logical volume is it First node of first branch in shape structure, therefore, the triple of first logical volume can be expressed as (n:0:1).

Second of generating mode:

When block storage client after create first logical volume, can according to preset rules be first logical volume give birth to It is identified at the third.

As an example, which, which can be, generates third mark, the binary group according to preset binary group The number of creation time and logical volume including logical volume.For example, the creation time of logical volume can be divided into two kinds, respectively The logical volume after logical volume and progress snapshot rollback processing before progress snapshot rollback processing.The creation time of logical volume can To indicate by 0 and 1, for example, 0 indicates to carry out the logical volume before snapshot rollback processing, 1 indicates that carrying out snapshot rollback handles it Logical volume afterwards.If the number of the first logical volume is n, block stores the third corresponding with first logical volume that client generates It is identified as (0:n).

The mapping that S706, block storage client create between the first identifier of first logical volume and third mark is closed System.

In the embodiment of the present application, the mapping relations between the first identifier and third mark, it is understood that for this One mark, third mark and the mapping relations between the first memory space of first logical volume.

It generates in block storage client with after third mark, then block storage client can create the mapping relations.By It is that each logical volume is identified by four-tuple in operating system, to (read data when operating system needs to access or write number According to) first logical volume when, first logical volume can be carried in the access request (read data request or write data requests) Four-tuple, in this way, after it includes the access request of four-tuple of the first logical volume that block storage client, which receives, then it can be according to this First mapping relations determine the first memory space corresponding with first logical volume, to read from first memory space Data are written into the first memory space in data.It determines and is somebody's turn to do according to four-tuple and DHT algorithm in compared to the prior art The mode of corresponding first memory space of first logical volume, it is possible to reduce the operand of block storage client.

S707, application program send the first snapshot request to create, and operating system receives the first snapshot request to create.

The first snapshot request to create is used to indicate the snapshot of the first logical volume of creation, takes in the first snapshot request to create Title with first logical volume, such as Vol A.

It should be noted that application program can be created at the time of multiple and different it is corresponding with the first logical volume multiple fast According to for convenience of description, in the embodiment of the present application, being only illustrated for creating a snapshot (i.e. the first snapshot).

S708, operating system send the second snapshot request to create to block storage client, block storage client receive this Two snapshot requests to create.

Operating system determines according to the title of first logical volume carried in the first snapshot request to create and needs to create The snapshot of first logical volume then generates the second snapshot request to create, carries first logical volume in the second snapshot request to create Four-tuple.Then, which is sent to client.

S709, block storage client create the snapshot of the first logical volume.

In the embodiment of the present application, block storage client can create the snapshot of first logical volume using ROW technology.Tool Body creation process please refers to the description in 1), and details are not described herein.

S710, application program send the second snapshot rollback request, and operating system receives the second snapshot rollback request.

Second snapshot rollback request, which is used to indicate, carries out snapshot rollback processing, the second snapshot rollback to the first logical volume The title (for example, Vol A) of first logical volume is carried in request, and, the mark for the snapshot for needing to roll back to, such as using Snapshot of the program to first establishing logical volume in different moments, for example, the snapshot at the first moment (can mark and be 1), the snapshot at the second moment (can mark is 2), then the fast of different moments will be carried in the second snapshot rollback request According to mark, the mark of the snapshot can be the number of snapshot, for example, snapshot 1 or snapshot 2, alternatively, the mark of the snapshot can also At the time of to be creation snapshot, for example, the first moment or the second moment, this is not restricted.

S711, operating system send the first snapshot rollback request to block storage client, block storage client receive this One snapshot rollback request.

Operating system is determined and is needed according to the title of first logical volume carried in the second snapshot rollback request to create Snapshot rollback processing is carried out to the first logical volume, then generates the first snapshot rollback request, is carried in the first snapshot rollback request The mark (such as mark of the first snapshot) for the snapshot that the four-tuple and needs of first logical volume roll back to.Then, by this First snapshot rollback request is sent to client.

S712, application program send the second data access request, and operating system receives second data access request.

In second data access request include the title of first logical volume, for example, being Vol A.Implement in the application In example, which, which can be, is written new data into first logical volume, alternatively, can be from the first logic Data are read in the memory space of volume.

S713, operating system send the first data access request, and block storage client receives first data access request.

When operating system determine second data access request for access the first logical volume, then operating system according to this Two data access requests generate first data access request, carry first logical volume in first data access request First identifier, the i.e. four-tuple of the first logical volume.

S714, block storage client hang first data access request.

The regular hour is needed since block storage client carries out snapshot rollback processing to the first logical volume, if block Client is stored during carrying out snapshot rollback processing to first logical volume, receives and the data access of the first logical volume is asked When asking, data access request can be carried out suspension processing by block storage client, and block storage client completion is waited to patrol first The snapshot rollback processing of volume volume and then according to the data access request, from carrying out snapshot rollback treated the first logical volume Memory space or the first logical volume snapshot memory space in read data, alternatively, write data into carry out snapshot return In the memory space of rolling treated the first logical volume.

S715, block storage client carry out snapshot rollback processing to the first logical volume.

In the embodiment of the present application, client can use the snapshot rollback mode based on ROW technology, to first logic Volume carries out snapshot rollback processing, the as new volume metadata of first establishing logical volume and new memory space, for example, be this The new metadata of one establishing logical volume and new memory space, the new metadata and new memory space are located at block storage service In end 1.Then the semantic relation of the new memory space and the first logic volume shadow copy is established, client involves in first logic Row snapshot rollback processing process to it is aforementioned 2) in process it is similar, details are not described herein.

It should be noted that carrying out snapshot rollback treated the first logical volume has new volume metadata and new storage Space, it can be understood as, client creates a new logical volume, be labeled as the second logical volume, second logical volume with should First logical volume is (it is to be understood that the four-tuple of the second logical volume and the first logical volume is identical) of the same name.For purposes of illustration only, hereafter It is middle to carry out snapshot rollback treated that the first logical volume is known as the second logical volume is illustrated.

In addition, it is necessary to explanation, if client determines before carrying out snapshot rollback processing to the first logical volume that there are also not The second data access request for the first logical volume completed, then client can wait second data access request to complete And then snapshot rollback processing is carried out to first logical volume.

S716, block storage client generate second identifier corresponding with the second logical volume, and update first mapping relations.

Similar to the third mark in step S705, which identifies second logic for block storage client Volume, and block storage client can identify the second identifier, but operating system can not identify the second identifier (alternatively, this second Mark is unknown to operating system).

In the embodiment of the present application, block storage client generates the process of second identifier and block storage client generates third The process of mark is similar.That is, block storage client can generate second mark according to tree structure as shown in Figure 8 Know, alternatively, block storage client can also generate the second identifier according to preset rules.It should be noted that block stores client The mode that end generates the mode of third mark and block storage client generates the second identifier can be identical, for example, if block is deposited Client is stored up in step S705, using the first generating mode, generates third mark, then block storage client can then adopt The second identifier is generated with the first generating mode, client can be stored in order to block in this way to third mark and the second mark The management of knowledge.

The process for generating the second identifier based on two kinds of generating modes to block storage client below is illustrated.

The first generating mode:

When block storage client after creating second logical volume, then can be shown in Fig. 8 according to second logical volume Tree structure in position, generate corresponding with second logical volume second identifier.

As an example, the triple of first logical volume can be expressed as (0:0:1), due to second logical volume with First logical volume belongs to the same tree structure, and therefore, tree structure where second logical volume is identified as 0, and should Second logical volume is located at first node in second branch in the tree structure where it, therefore, second logical volume Triple can be expressed as (0:1:1).

Second of generating mode:

When block storage client after create second logical volume, can according to preset binary group be second logic Volume generates the second identifier.

As an example, which includes the creation time of logical volume and the number of logical volume.It patrols due to second Collecting volume is the logical volume carried out after snapshot rollback processing, and second logical volume is that the n-th+k that block storage client creates is a Logical volume, then the second identifier corresponding with second logical volume that block storage client generates is (1:n+k).

After block storage client generates second identifier corresponding with second logical volume, block stores client, and then basis should The memory space of second identifier and second logical volume updates the mapping relations.That is, the third in the mapping relations is identified It is updated to the second identifier, the first memory space in the mapping relations is updated to the memory space of the second logical volume.In this way, Operating system can continue to use the first identifier of the first logical volume, also be able to access that the logic carried out after snapshot rollback processing The memory space of volume, so as to realize online snapshot rollback, without interrupted application program to the access function at storage service end.

S717, block store the first data access request of client executing.

After block storage client, which completes the snapshot rollback to first logical volume, to be handled, client is then released to first The suspension of data access request is handled, and according to the memory space of the memory space of the second logical volume and the snapshot of the first logical volume Semantic relation, execute first data access request.

If block stores the subsequent data access request being received again by the first logical volume of client, for example, to the first logic Volume write-in new data, then the new data can be written in the memory space of the second logical volume by block storage client.

S718, block storage client delete data and metadata in the first memory space of first logical volume.

After block storage client is completed to the rolling back action of the first logical volume, block storage client can delete first and patrol Data in the volume metadata and the first memory space of volume volume, in order to which the memory allocation that occupies the first logical volume is to it He uses logical volume, and the utilization rate of the memory space at memory block storage service end can be improved.

It should be noted that in the embodiment of the present application, conditioning step S718 does not execute sequence, for example, step S718 It can be and executed after step S717, be also possible to execute after step S716, or can also be with step S717 simultaneously It executes.In Fig. 7, by taking step S718 is executed after step S717 as an example.

In the above-mentioned technical solutions, since block storage client establishes host, the mark of logical volume, block are deposited for identification The mapping relations for storing up the client memory space of the mark and logical volume of logical volume for identification, in this way, being involved in logic After row snapshot rollback processing, only the mark of logical volume and corresponding memory space have occurred block storage client for identification Change, and even if the mark of host logical volume for identification does not change, storage client also can by the mapping relations, Correct logical volume is accessed, so as to realize online snapshot rollback, and then interrupted application program can not had to logical volume Access, the business of application program is unaffected, and can be adapted for more application programs and more application scenarios.

Further, since online snapshot rollback may be implemented, in this way, application program can not have to carrying out at snapshot rollback First unloading volume, and the carry volume again after carrying out snapshot rollback processing, is carrying out before reason so as to simplify application program Treatment process when snapshot rollback, duration needed for reducing snapshot rollback processing.

In the embodiment shown in fig. 7, it as long as block storage client creates a logical volume, can all be generated for the logical volume The mark (such as triple of the logical volume) of the logical volume is identified for block storage client.In another embodiment, block Storing client can also be only when carrying out snapshot rollback processing, and just generation is corresponding with logical volume knows for block storage client The not mark of the logical volume.

Referring to FIG. 9, for the exemplary flow chart of another kind of snapshot rollback method provided by the embodiments of the present application, the process Figure is described as follows:

S901, application program sending logic roll up request to create, and operating system receives establishing logical volume request.

Establishing logical volume request is sent to block storage client by S902, operating system, and block stores client reception should Establishing logical volume request.

S903, block storage client create first volume metadata corresponding with first logical volume and the first memory space.

S904, block store client and send creation as a result, operating system receives the creation result to operating system.

S905, application program send the first snapshot request to create, and operating system receives the first snapshot request to create.

S906, operating system send the second snapshot request to create to block storage client, block storage client receive this Two snapshot requests to create.

S907, block storage client create the snapshot of the first logical volume.

S908, application program send the second snapshot rollback request, and operating system receives the second snapshot rollback request.

S909, operating system send the first snapshot rollback request to client, and block storage client receives first snapshot Rollback request.

S910, application program send the second data access request, and operating system receives second data access request.

S911, operating system send the first data access request, and block storage client receives first data access request.

S912, block storage client hang first data access request.

S913, block storage client carry out snapshot rollback processing to the first logical volume.

It should be noted that step S901~step S913 and step S701~step S704, step S707~step S715 is similar, and details are not described herein.

S914, block storage client generate and the second identifier that carries out snapshot rollback treated the first logical volume.

Step S914 is similar to the corresponding contents in step S716, and details are not described herein.Hereinafter, snapshot rollback will be carried out Treated, and the first logical volume is known as the second logical volume.

S915, block storage client create first identifier, the second identifier and second logical volume of the first logical volume Memory space the first mapping relations.

It generates in block storage client with after the second identifier, then block storage client can create the mapping relations.By It is each logical volume to be identified by first identifier (i.e. four-tuple), and carry out snapshot rollback treated first in operating system The volume metadata and memory space of logical volume (i.e. the second logical volume) are changed, and therefore, block storage client can be created The mapping for building the memory space of the first identifier of first logical volume, the second identifier of the second logical volume and the second logical volume is closed System, in this way, block storage client can determine that second patrols according to the mapping relations when operating system access second logical volume Collect the memory space of volume.

S916, block store the first data access request of client executing.

S917, block storage client delete data and metadata in the first memory space of first logical volume.

Step S916~step S917 is similar to step S717~step S718, and details are not described herein.

In the above-mentioned technical solutions, due to block storage client only carry out snapshot rollback processing when, just generation and logic It rolls up the corresponding block storage client that is used for and identifies the mark of the logical volume, this way it is not necessary to carry out the logic of snapshot rollback processing Volume can then not have to generate the mark for identifying the logical volume for client, it is possible to reduce identify that this is patrolled for block storage client Collect the occupied memory space of mark of volume.

In addition, it is necessary to which explanation is to come for block storage system in a distributed manner in Fig. 7 or embodiment shown in Fig. 9 The explanation that snapshot rollback method provided by the present application is carried out.When the snapshot rollback method is applied in other storage systems, example Such as, it applies in centralised storage system, client may not be stored by block in the centralised storage system, in such case Under, the block storage client should replace with can be realized in centralised storage system as block storage client function device or Equipment, for example, block storage client can be distal end starter in centralised storage system etc..Specific implementation, can be Array control unit in storage array.

In above-mentioned embodiment provided by the present application, method provided by the embodiments of the present application is carried out from the angle for calculating equipment It introduces.In order to realize each function in above-mentioned method provided by the embodiments of the present application, calculating equipment may include hardware configuration And/or software module, above-mentioned each function is realized in the form of hardware configuration, software module or hardware configuration add software module. Some function in above-mentioned each function executes in such a way that hardware configuration, software module or hardware configuration add software module, Specific application and design constraint depending on technical solution.

Figure 10 shows a kind of structural schematic diagram of snapshot rollback device 1000.Wherein, snapshot rollback device 1000 can be with It is storage client, can be realized the function of storing client in method provided by the embodiments of the present application;Snapshot rollback device 1000 are also possible to that storage client can be supported to realize the function of storing client in method provided by the embodiments of the present application Device.Snapshot rollback device 1000 can be hardware configuration, software module or hardware configuration and add software module.Snapshot rollback dress Setting 1000 can be realized by chip system.In the embodiment of the present application, chip system can be made of chip, also may include chip With other discrete devices.

Snapshot rollback device 1000 may include processing module 1001 and acquisition module 1002.

Processing module 1001 can be used for executing step S703, step S705, step in embodiment shown in Fig. 7 S706, step S709 and step S714~step S718, or for executing the step S903 in embodiment shown in Fig. 9, step Rapid S907 and step S912~step S917, and/or other processes for supporting techniques described herein.

Obtaining module 1002 can be used for executing step S702, step S704, step in embodiment shown in Fig. 7 S708, step S711 and step S713, or for executing the step S902 in embodiment shown in Fig. 9, step S904, step S906, step S909 and step S911, and/or other processes for supporting techniques described herein.Obtain module 1002 are communicated for snapshot rollback device 1000 and other modules, can be circuit, device, interface, bus, software mould Block, transceiver or other devices that communication arbitrarily may be implemented.

Wherein, all related contents for each step that above method embodiment is related to can quote corresponding function module Function description, details are not described herein.

It is schematical, only a kind of logical function partition to the division of module in embodiment shown in Fig. 10, it is practical There may be another division manner when realization, in addition, each functional module in each embodiment of the application can integrate one In a processor, it is also possible to physically exist alone, can also be integrated in two or more modules in a module.It is above-mentioned Integrated module both can take the form of hardware realization, can also be realized in the form of software function module.

It is as shown in figure 11 snapshot rollback device 1100 provided by the embodiments of the present application, wherein snapshot rollback device 1100 It can be storage client, can be realized the function of storing client in method provided by the embodiments of the present application;Snapshot rollback dress 1100 are set to be also possible to that storage client can be supported to realize the function of storing client in method provided by the embodiments of the present application Device.Wherein, which can be chip system.In the embodiment of the present application, chip system can be by core Piece is constituted, and also may include chip and other discrete devices.

Snapshot rollback device 1100 includes at least one processor 1120, for realizing or for support snapshot rollback device 1100 realize the function that client is stored in method provided by the embodiments of the present application.Illustratively, processor 1120 can be generated Second logical volume, and the semantic relation of second logical volume and the first snapshot is created, referring specifically to retouching in method example in detail It states, is not repeated herein.

Snapshot rollback device 1100 can also include at least one processor 1130, for storing program instruction and/or number According to.Memory 1130 and processor 1120 couple.Coupling in the embodiment of the present application is indirect between device, unit or module Coupling or communication connection can be electrical property, mechanical or other forms, for the information exchange between device, unit or module. Processor 1120 may be with 1130 cooperating of memory.Processor 1120 may execute the program stored in memory 1130 and refer to It enables.At least one of described at least one processor may include in processor.

Snapshot rollback device 1100 can also include communication interface 1110, for being carried out by transmission medium and other equipment Communication, for snapshot rollback device 1100 can be communicated with other equipment.Illustratively, which can be Host or storage equipment.Processor 1120 can use 1110 sending and receiving data of communication interface.

The tool between above-mentioned communication interface 1110, processor 1120 and memory 1130 is not limited in the embodiment of the present application Body connects medium.The embodiment of the present application in Figure 11 between memory 1130, processor 1120 and communication interface 1110 lead to The connection of bus 1140 is crossed, bus indicates that the connection type between other components is only schematically to be said in Figure 11 with thick line It is bright, do not regard it as and is limited.The bus can be divided into address bus, data/address bus, control bus etc..For convenient for expression, Figure 11 In only indicated with a thick line, it is not intended that an only bus or a type of bus.

In the embodiment of the present application, processor 1120 can be general processor, digital signal processor, dedicated integrated electricity Road, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware group Part may be implemented or execute disclosed each method, step and logic diagram in the embodiment of the present application.General processor can be with It is microprocessor or any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present application, can direct body Now executes completion for hardware processor, or in processor hardware and software module combine and execute completion.

In the embodiment of the present application, memory 1130 can be nonvolatile memory, such as hard disk (hard disk Drive, HDD) or solid state hard disk (solid-state drive, SSD) etc., it can also be volatile memory (volatile ), such as random access memory (random-access memory, RAM) memory.Memory can be used for carrying or deposit Store up the desired program code with instruction or data structure form and can be by any other medium of computer access, but not It is limited to this.Memory in the embodiment of the present application can also be circuit or other devices that arbitrarily can be realized store function, For storing program instruction and/or data.

A kind of computer readable storage medium, including instruction are also provided in the embodiment of the present application, when it is transported on computers When row, so that computer executes the method for storing client executing in Fig. 7 or embodiment shown in Fig. 9.

A kind of computer program product, including instruction are also provided in the embodiment of the present application, when run on a computer, So that computer executes the method for storing client executing in Fig. 7 or embodiment shown in Fig. 9.

Carry, unloading and the operation of snapshot rollback that can be rolled up in the embodiment of the present invention with host direct execution logic, The embodiment of the present invention is not construed as limiting this.In addition the embodiment of the present invention can be used for the logical volume in distributed file system Operation.

The embodiment of the present application provides a kind of chip system, which includes processor, can also include memory, For realizing the function of storing client in preceding method.The chip system can be made of chip, also may include chip and Other discrete devices.

The embodiment of the present application provides a kind of storage system, which includes shown in storage equipment and Fig. 7 or Fig. 9 Embodiment in store client.

It, can be wholly or partly by software, hardware, firmware or it is any in method provided by the embodiments of the present application Combination is to realize.When implemented in software, it can entirely or partly realize in the form of a computer program product.The meter Calculation machine program product includes one or more computer instructions.Load and execute on computers the computer program instructions When, it entirely or partly generates according to process or function described in the embodiment of the present invention.The computer can be general-purpose computations Machine, special purpose computer, computer network, the network equipment, user equipment or other programmable devices.The computer instruction can To store in a computer-readable storage medium, or computer-readable deposit from a computer readable storage medium to another Storage media transmission, for example, the computer instruction can pass through from a web-site, computer, server or data center It is wired (such as coaxial cable, optical fiber, Digital Subscriber Line (digital subscriber line, abbreviation DSL) or it is wireless (such as Infrared, wireless, microwave etc.) mode transmitted to another web-site, computer, server or data center.The meter Calculation machine readable storage medium storing program for executing can be any usable medium that computer can access or include that one or more can use Jie The data storage devices such as matter integrated server, data center.The usable medium can be magnetic medium (for example, floppy disk, hard Disk, tape), optical medium (for example, digital video disk (digital video disc, abbreviation DVD)) or semiconductor medium (for example, SSD) etc..

Obviously, those skilled in the art can carry out various modification and variations without departing from the model of the application to the application It encloses.In this way, if these modifications and variations of the application belong within the scope of the claim of this application and its equivalent technologies, then The application is also intended to include these modifications and variations.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于数据库读写性能的数据存储方法与装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类