CN110442476A - Data snapshot method, device, equipment and storage medium - Google Patents

Data snapshot method, device, equipment and storage medium Download PDF

Info

Publication number
CN110442476A
CN110442476A CN201910553410.1A CN201910553410A CN110442476A CN 110442476 A CN110442476 A CN 110442476A CN 201910553410 A CN201910553410 A CN 201910553410A CN 110442476 A CN110442476 A CN 110442476A
Authority
CN
China
Prior art keywords
data
snapshot
volume
written
target
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.)
Pending
Application number
CN201910553410.1A
Other languages
Chinese (zh)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910553410.1A priority Critical patent/CN110442476A/en
Publication of CN110442476A publication Critical patent/CN110442476A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Abstract

This application involves data processing fields, specifically used server is realized to storage system data backup, and disclose a kind of data snapshot method, device, equipment and storage medium, this method comprises: receiving the snapshot request that the host is sent, the snapshot request includes the original identification information of the corresponding target of target original volume, and the target original volume is located in the storage system;According to the original identification information of the target, obtain in the corresponding target original volume of the original identification information of the target to snapshot data;According to, to snapshot data, creating the corresponding snapped volume of the target original volume in the target original volume;If the target original volume successfully creates corresponding snapped volume, snapshot completion notice is generated, and the snapshot completion notice is sent to the host, so that the host acknowledgement snapshot is completed, to improve the consistency of different storage system snapshots.

Description

Data snapshot method, device, equipment and storage medium
Technical field
This application involves data processing field more particularly to a kind of data snapshot method, device, equipment and storage mediums.
Background technique
Snapshot is the effective ways that a kind of Online storage device prevents loss of data.One function of snapshot be can to Line number evidence is backed up and is restored on demand.It is extensive that rapid data can be carried out when storing equipment and application failure or file corruption occurring It is multiple, restore data to the state of some pot life point.Another function of snapshot is to provide one for storage user Data access channel, when former data carry out application on site processing, the accessible snapshot data of user.
In virtualization usage scenario, a virtual machine may dock a variety of storage systems, such as local storage system, Strange land storage system.However, data are usually carried out snapshot in storage system, due to different storages by existing snap shot The snapshot service principle that system provides is different, for some data being distributed in different storage systems, cannot achieve snapshot The consistency of data consistency, snapshot is poor.Different storage systems are thus directed to, the consistent of different storage system snapshots how is improved Property becomes urgent problem to be solved.
Summary of the invention
This application provides a kind of data snapshot method, device, equipment and storage mediums, fast to improve different storage systems According to consistency.
In a first aspect, being used for server, the server and storage system this application provides a kind of data snapshot method Communication connection, the server are connect with main-machine communication, which comprises
The snapshot request that the host is sent is received, the snapshot request includes the original mark of the corresponding target of target original volume Know information, the target original volume is located in the storage system;
According to the original identification information of the target, obtain in the corresponding target original volume of the original identification information of the target To snapshot data;
According to, to snapshot data, creating the corresponding snapped volume of the target original volume in the target original volume;
If the target original volume successfully creates corresponding snapped volume, snapshot completion notice is generated, and the snapshot is complete It is sent to the host at notice, so that the host acknowledgement snapshot is completed.
Second aspect, present invention also provides a kind of data snapshot devices, are used for server, and the server and storage are System communication connection, the server are connect with main-machine communication, and described device includes:
Request reception unit, the snapshot request sent for receiving the host, the snapshot request includes that target is original The corresponding original identification information of target is rolled up, the target original volume is located in the storage system;
Data capture unit, for obtaining the original identification information pair of the target according to the original identification information of the target In the target original volume answered to snapshot data;
Snapshot creating unit, for according to, to snapshot data, creating the target original volume in the target original volume Corresponding snapped volume;
It notifies transmission unit, if successfully creating corresponding snapped volume for the target original volume, generates snapshot and complete to lead to Know, and the snapshot completion notice is sent to the host, so that the host acknowledgement snapshot is completed.
The third aspect, present invention also provides a kind of computer equipment, the computer equipment includes memory and processing Device;The memory is for storing computer program;The processor, for executing the computer program and described in the execution Such as above-mentioned data snapshot method is realized when computer program.
Fourth aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium It is stored with computer program, the computer program makes the processor realize such as above-mentioned data snapshot when being executed by processor Method.
This application discloses a kind of data snapshot method, device, equipment and storage medium, data provided by the above embodiment Snapshot Method, the snapshot request sent by server receiving host;Server in storage system target original volume to fast Snapshot processing is carried out according to data, so as to carry out snapshot service to each storage system, and can be realized and be to different storages System carries out consistency snapshot operation, improves the consistency of different storage system snapshots.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of data snapshot method provided by the embodiments of the present application;
Fig. 2 is a kind of schematic flow diagram for data snapshot method that embodiments herein provides;
Fig. 3 is a kind of schematic flow diagram for data snapshot method that another embodiment of the application provides;
Fig. 4 is a kind of schematic flow diagram for data snapshot method that embodiments herein provides;
Fig. 5 is a kind of step schematic flow diagram for data snapshot method that the application another embodiment provides;
Fig. 6 is a kind of step schematic flow diagram for data snapshot method that the another embodiment of the application provides;
Fig. 7 is the sub-step schematic flow diagram of the data snapshot method in Fig. 5;
Fig. 8 is the sub-step schematic flow diagram of the data snapshot method in Fig. 5;
Fig. 9 is a kind of schematic block diagram of data snapshot device provided by the embodiments of the present application;
Figure 10 is a kind of schematic block diagram for data snapshot device that another embodiment of the application provides;
Figure 11 is the schematic block diagram of the subelement of data snapshot device in Figure 10;
Figure 12 is a kind of structural representation block diagram for computer equipment that one embodiment of the application provides.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall in the protection scope of this application.
Flow chart shown in the drawings only illustrates, it is not necessary to including all content and operation/step, also not It is that must be executed by described sequence.For example, some operation/steps can also decompose, combine or partially merge, therefore practical The sequence of execution is possible to change according to the actual situation.
Embodiments herein provides a kind of data snapshot method, device, computer equipment and storage medium.Data are fast It can be used for server according to method, to improve the consistency of different storage system snapshots.
With reference to the accompanying drawing, it elaborates to some embodiments of the application.In the absence of conflict, following Feature in embodiment and embodiment can be combined with each other.
Referring to Fig. 1, Fig. 1 is the application scenarios schematic diagram of data snapshot method provided by the embodiments of the present application.The implementation The data snapshot method of example can be applied to storage environment.
As shown in Figure 1, in one embodiment, storage environment may include host layer, middleware layer and storage system layer.It is main It is communicated to connect between machine layer and middleware layer, middleware layer and storage system layer communication connection.
Specifically, host layer may include multiple main frames, any one in multiple hosts includes at least one Host application.The host application can issue operational order to middleware layer, and receive the result that the middleware layer returns.
Middleware layer may include server, execute the operational order that host is sent, and provide to the storage in storage system Source is managed collectively.
Storage system layer includes multiple storage systems, and multiple storage system applications are in storing data.Multiple storage systems System can be identical structure, be also possible to different structures.In one embodiment, as shown in Figure 1, storage system includes three, Respectively storage system 1, storage system 2 and storage system 3.Storage system 1, storage system 2 and storage system 3 are to be mutually isolated Two storage systems, storage system 1 manage memory space, storage system 2 manage memory space and storage system 3 manage Memory space right angle it is mutually indepedent.In other embodiments, the quantity of storage system may be set to be other suitable numbers, Such as 2,4 or more.
Specifically, virtual storage volume can be created in storage system.Virtual storage volume is created within the storage system, can be passed through Command line mode or graphical interfaces mode are realized.When creating virtual storage volume, title, the storage of specified virtual storage volume are at least needed The original identification information of volume.The original identification information of storage volume and the title of storage volume correspond.In logic, storage volume is one The continuous memory space of sector address, is alternatively referred to as original volume.
In virtual platform, host can be virtual machine.In physics machine platform, host can be server.Below It is illustrated by virtual machine instance of host.
In above-mentioned storage environment, the realization of consistency snapshot can be realized independent of storage system by server.Such as This, server can be managed collectively the storage resource of all storage systems, snapshot operation can be carried out to each storage system, And it can guarantee the consistency of storing data snapshot in different storage systems.
Referring to Fig. 2, Fig. 2 is a kind of step schematic flow diagram of data snapshot method provided by the embodiments of the present application.It should Data snapshot method can be applied to server, and server and storage system communicate to connect, and server is connect with main-machine communication.
As shown in Fig. 2, the data snapshot method, specifically includes: step S201 to step S204.
S201, the snapshot request that the host is sent is received.
Specifically, the snapshot request includes the original identification information of the corresponding target of target original volume, target original volume position In storage system.It should be understood that each storage system includes multiple original volumes for storing data.Original mark letter For breath for identifying original volume, each original volume has a unique original identification information, i.e., original identification information and original volume It corresponds.Illustratively, original identification information may include identity (Identification, referred to as " ID "), root An original volume can be uniquely determined according to the identity of original volume.
Wherein, target original volume is that host needs to establish the original of snapshot to some in storage system or certain original volumes Volume.The original identification information of target is the original identification information of target original volume.
Host can send snapshot request to server according to preset snapshot policy.What server receiving host was sent Snapshot request, according to the snapshot request, server can establish snapshot for the target original volume of storage system.Preset snapshot Strategy can be configured according to practical application, for example, be set as every 10 minutes to server send a snapshot request or Continuously snapshot request etc. is sent to server.
S202, according to the original identification information of the target, it is original to obtain the corresponding target of the original identification information of the target In volume to snapshot data.
Since original identification information and original volume correspond, thus according to the original identification information of target in snapshot request An original volume corresponding with the original identification information of the target can be uniquely determined, identified original volume is original as target Volume.Server obtains target original volume corresponding with the original identification information of target after the snapshot request for receiving host transmission It is corresponding to snapshot data, to create snapped volume corresponding with target original volume on the server.
In one embodiment, described according to the original identification information of the target, obtain the original identification information pair of the target In the target original volume answered to snapshot data, comprising:
According to the original identification information of the target, the original identification information of original volume in the storage system is traversed;If institute It states and there is original identification information identical with the original identification information of the target in storage system, it will be with the original mark of the target The corresponding original volume of the identical original identification information of information is as target original volume;If in the storage system there is no with it is described The identical original identification information of the original identification information of target generates prompt information, and the prompt information is sent to the master Machine.
Specifically, the prompt information is for prompting host to be not present within the storage system and the original mark of the target The identical original identification information of information is known, to prompt host to retransmit new snapshot request, until depositing in the storage system In original identification information identical with the original identification information of the target.Illustratively, prompt information can be for " identification information is not In the presence of ".
In one embodiment, described according to the original identification information of the target, obtain the original identification information pair of the target In the target original volume answered to snapshot data before, further includes: asked if receiving the snapshot that at least two hosts are sent It asks, con current control is carried out at least two host, the con current control is for only allowing server according to a host The snapshot request of transmission carries out snapshot processing to the data stored in target original volume.It is described to be believed according to the original mark of the target Breath, obtain in the corresponding target original volume of the original identification information of the target to snapshot data, specifically include: according to concurrently controlling Result processed and the original identification information of the target, obtain in the corresponding target original volume of the original identification information of the target to fast According to data.Purpose using above-mentioned concurrent mutual exclusion control is to cause business in order to avoid occurring going out active to the update of data The problem of disorder.
S203, according to, to snapshot data, creating the corresponding snapped volume of the target original volume in the target original volume.
Specifically, obtain in target original volume after snapshot data, in target original volume to snapshot data into Row snapshot, thus creation snapped volume corresponding with target original volume.
If S204, the target original volume successfully create corresponding snapped volume, snapshot completion notice is generated, and will be described fast It is sent to the host according to completion notice, so that the host acknowledgement snapshot is completed.
Specifically, the executive condition of snapshot can be monitored by the oracle listener in server, it is former listening to the target Begin in volume after the completion of the execution of snapshot data snapshot, generate snapshot completion notice, and the snapshot completion notice be sent to master Machine.Host can determine that the snapshot work of the server is completed after receiving snapshot completion notice.
Data snapshot method provided by the above embodiment, the snapshot request sent by server receiving host;Server To in storage system target original volume to snapshot data carry out snapshot processing, so as to each storage system carry out snapshot Service, and can be realized and consistency snapshot operation is carried out to different storage systems, improve the consistent of different storage system snapshots Property.
Referring to Fig. 3, Fig. 3 is a kind of step exemplary flow for data snapshot method that another embodiment of the application provides Figure.The data snapshot method can be applied to server, and server and storage system communicate to connect, and server and main-machine communication connect It connects.
As shown in figure 3, the data snapshot method, further includes:
S301, receive the snapshot instruction that the storage system is sent, the snapshot instruction be the storage system in response to What the write data requests of the host were sent.
Specifically, the snapshot instruction includes the original identification information to snapped volume.Write data requests are by host according to mesh The original identification information of mark write-in volume and data to be written generate.Wherein, is for data to be written to be written in target write-in volume Original volume.The original identification information of target write-in volume is for identifying target write-in volume.According to the original mark of target write-in volume Information can uniquely determine an original volume, which is written as target and is rolled up.
Specifically, storage system receiving host send write data requests, write data request by the host according to The original identification information of target write-in volume and data to be written generate.Storage system receives the write data requests of host transmission Afterwards, snapshot is sent in response to the write data requests to instruct to server.Wherein, snapshot instruction includes the original mark to snapped volume Information.Correspondingly, server can receive snapshot instruction, snapshot is carried out to treat snapped volume.
It should be understood that referring to that storage equipment after the write data requests for receiving host transmission, needs to take after snapped volume Business device carries out the original volume of snapshot processing.It in one embodiment, can be target write-in volume to snapped volume.
S302, according to the original identification information to snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
Specifically, according to snapshot instruct in the original identification information to snapped volume can uniquely determine one with should to fast According to the corresponding original volume of original identification information of volume, using identified original volume as to snapped volume.Server is deposited receiving After storing up the snapshot instruction that equipment is sent, according to the original identification information to snapped volume, creation with it is described corresponding to snapped volume Snapped volume.
Referring to Fig. 4, in one embodiment, original identification information of the basis to snapped volume, creation is with described to fast According to rolling up in corresponding snapped volume, including sub-step S3021 and sub-step S3022.
S3021, the original identification information according to snapped volume are obtained described to the target snapshot number in snapped volume According to.
Specifically, according to the original identification information to snapped volume, the original of original volume in the storage system is traversed Identification information;If there is original identification information identical with the original identification information to snapped volume in the storage system, Original volume that original identification information identical with the original identification information to snapped volume is corresponding is as to snapped volume.
S3022, according to described to the target snapshot data in snapped volume, creation is with described to the corresponding snapshot of snapped volume Volume.
Specifically, snapshot is carried out to the target snapshot data after obtaining the target snapshot data after snapshot with regard in, thus Creation is with described to the corresponding snapped volume of snapped volume.
In one embodiment, after step S3022, further includes:
If described successfully create corresponding snapped volume to snapped volume, snapshot success notification is generated, and the snapshot is successful Notice is sent to the storage equipment, so that storage equipment confirmation snapshot is completed.
The data snapshot method of above-described embodiment, when storage system receives the write data requests of host transmission, storage System can respond write data requests transmission snapshot and instruct to server, and server receives snapshot instruction, and according to described fast Snapshot is carried out to the data being newly written in storage system according to instruction, to improve the efficiency of snapshot operation, is avoided to a large amount of numbers Occurs Caton when according to progress snapshot or temporarily without response phenomenon.
Referring to Fig. 5, Fig. 5 is a kind of step exemplary flow for data snapshot method that the application another embodiment provides Figure.The data snapshot method is used for storage system.The storage system is connect with server communication, the storage system and host Communication connection.
As shown in figure 5, the data snapshot method, comprising: step S401 to S403.
S401, the write data requests that the host is sent are received.
Specifically, write data request includes the original identification information of data to be written and volume to be written.Each storage System includes multiple original volumes for storing data.For identifying original volume, each original volume has original identification information One unique original identification information, i.e., original identification information and original volume correspond.Illustratively, original identification information can To include identity (Identification, referred to as " ID "), one can be uniquely determined according to the identity of original volume A original volume.
Wherein, volume to be written is the original volume for needing to be written into data write-in in storage system.Volume to be written it is original Identification information is the original identification information of volume to be written.
S402, according to the original identification information of the volume to be written, the volume to be written is written into the data to be written In.
Illustratively, the original identification information of volume to be written is " 102D ", and storage equipment can determine only according to " 102D " A original volume corresponding with " 102D " one by one, using " 102D " the corresponding original volume as volume to be written, and will be described to be written Data are written in the volume to be written.
Referring to Fig. 6, in one embodiment, the original identification information according to the volume to be written will be described to be written It further include step S101 and S102 before entering in the data write-in volume to be written.
S101, the processing of block cutting label is carried out for storing the storage region of data in the volume to be written, to obtain Storage region and corresponding area identification.
Specifically, the area identification of each storage region label is different.The area identification of storage region label can be volume Number, or other attributes, but must be unique.In one embodiment, the storage region size divided is all identical, the size Area-size can be denoted as.It should be understood that in other embodiments, the storage region size divided can also be different.
S102, according to the storage region and corresponding area identification, create bitmap table.
Specifically, bitmap table is bitmap table.
Referring to Fig. 6, in one embodiment, the original identification information according to the volume to be written will be described After data to be written are written in the volume to be written, further includes:
If the type of step S103, the described data to be written is file content data, determine that the data to be written are to have Imitate data;If the type of step S104, the described data to be written is filesystem information, determine that the data to be written have to be non- Imitate data;Step S105, record whether the data to be written are valid data in the bitmap table.
Specifically, the type of data to be written includes file content data and filesystem information.Write data request It may include the type for having data to be written.It is of course also possible to be parsed to data to be written, to judge data to be written Type.
Specifically, recording the memory block in bitmap table when data are written in the storage region into volume to be written every time Whether domain houses valid data.
For example, bitmap table can be divided into several grids, each grid records whether a storage region is stored Valid data.Such as 0 indicate valid data, 1 indicate non-effective data.Wherein, non-effective data includes idle data or nothing Imitate data.
Illustratively, an idle grid is found in bitmap table, and the area of the storage region is recorded in the grid Domain identifier, when not storing valid data in the storage region in volume to be written, which is identified as " 1 ".It is written into number According to the storage region being written in the volume to be written, if the data to be written are valid data, it is right in the bitmap table to update The data area mark answered, i.e., be revised as " 0 " for the mark of the grid.Depositing in the volume to be written is written when being written into data When storage area domain and the data to be written are non-effective data, corresponding data area mark is remained unchanged in the bitmap table.
As shown in fig. 7, in one embodiment, write data request includes that target area identifies.It is described according to The volume to be written is written, in the bitmap table described in record in the data to be written by the original identification information that volume is written Whether data to be written are valid data, comprising: sub-step S4021 to S4023.
S4021, it is identified according to the target area, determines target storage domain.
Specifically, each storage region is corresponding with only one area identification.It is marked by the target area of write data requests Know, can determine target storage domain.
If S4022, the size of data to be written are not more than the free area in the target storage domain, will be described to be written Enter data and the target storage domain is written.
Illustratively, if the size of data to be written is less than or equal to the free area size in target storage domain, then it represents that Target storage domain has the storage capacity for storing data to be written, is written into data write-in target storage domain at this time.
If S4023, the size of data to be written are greater than the free area in the target storage domain, will be described to be written Other idle memory regions of the volume to be written are written in data.
Specifically, if the size of data to be written is greater than the free area size in the target storage domain, to be written Enter and find an idle memory region in volume, the size of the idle memory region is not less than the size of data to be written.By institute It states data to be written and the idle memory region is written.
S403, in response to write data request, send snapshot instruct to the server so that the server according to The original identification information to snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
Specifically, the snapshot instruction includes the original identification information to snapped volume.Specifically, when user needs storing When data being written in system, write data requests can be sent to storage system by host.Storage system receives this and writes data After request, responds write data requests transmission snapshot and instruct to the server.Server receives the fast of storage system transmission After instruction, according to the original identification information to snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
As shown in figure 8, in one embodiment, being requested in response to write data, sends snapshot and instructs to the server, So that the server is according to the original identification information to snapped volume, creation with described to the corresponding snapped volume of snapped volume, It specifically includes: sub-step S4031 and S4033.
S4031, judge whether the data to be written are valid data.
Specifically, judging that the whether effective judging result of the data to be written includes two kinds: the data to be written are Valid data;The data to be written are non-effective data.Illustratively, can according to the type of data to be written, judge to Be written whether data are valid data.If the type of the data to be written is file content data, the number to be written is determined According to for valid data;If the type of the data to be written is filesystem information, determine that the data to be written are non-effective Data.
S4032, if it is determined that the data to be written be valid data, in response to write data request, send snapshot refer to It enables to the server, so that the server creates and described to snapshot according to the original identification information to snapped volume Roll up corresponding snapped volume.
Specifically, in order to avoid the meaningless data of snapshot server, when storage system determines that the data to be written are It when valid data, is requested in response to write data, sends snapshot and instruct to the server, so that the server is according to institute State the original identification information to snapped volume, creation with described to the corresponding snapped volume of snapped volume, to improve snapshot server number According to when resource utilization.
S4033, if it is determined that the data to be written be non-effective data, refuse to respond in write data request.
When storage system determines the data to be written for valid data, refuses to respond and requested in write data, this When, server will not send snapshot and instruct to the server.Thus the server will not carry out snapshot to the data to be written, Avoid the data that snapshot is nonsensical.
The data snapshot method of above-described embodiment, when storage system receives the write data requests of host transmission, storage System can respond write data requests transmission snapshot and instruct to server, and server receives snapshot instruction, and according to described fast Snapshot is carried out to the data being newly written in storage system according to instruction, to improve the efficiency of snapshot operation, is avoided to a large amount of numbers Occurs Caton when according to progress snapshot or temporarily without response phenomenon.In addition, the data snapshot method, when the number to be written that host is sent When according to for valid data, storage equipment requests in response to write data and sends snapshot and instruct to the server, the clothes Device be engaged according to the original identification information to snapped volume, creates with described to the corresponding snapped volume of snapped volume, to avoid taking The business meaningless data of device snapshot, improve resource utilization when snapshot server data, while can be improved the clothes of server Business response speed.
Referring to Fig. 9, Fig. 9 is that embodiments herein also provides a kind of schematic block diagram of data snapshot device, the number According to fast photographing device for executing any one of aforementioned data snapshot method.Wherein, which can be configured at server In.Wherein, server can be independent server, or server cluster.
As shown in figure 9, data snapshot device 500 includes: request reception unit 501, data capture unit 502, snapshot wound Build unit 503 and notice transmission unit 504.
Request reception unit 501, the snapshot request sent for receiving the host, the snapshot request include target original Begin to roll up the corresponding original identification information of target, the target original volume is located in the storage system;
Data capture unit 502, for obtaining the original identification information of the target according to the original identification information of the target In corresponding target original volume to snapshot data;
Original snapshot unit 503, for according to, to snapshot data, it is original creating the target in the target original volume Roll up corresponding snapped volume;
It notifies transmission unit 504, if successfully creating corresponding snapped volume for the target original volume, generates snapshot and complete Notice, and the snapshot completion notice is sent to the host, so that the host acknowledgement snapshot is completed.
In one embodiment, data snapshot device 500 further includes instruction receiving unit 505 and snapshot creating unit 506.
Instruction receiving unit 505, the snapshot instruction sent for receiving the storage system, the snapshot instruction include to The original identification information of snapped volume, the snapshot instruction are that the storage system is sent in response to the write data requests of the host 's;
Snapshot creating unit 506, for according to original identification information to snapped volume, creation with it is described corresponding to snapped volume Snapped volume.
In one embodiment, snapshot creating unit 506 includes data acquisition subelement 5061 and data snapshot subelement 5062。
Data acquisition subelement 5061, for obtaining described to snapshot according to the original identification information to snapped volume Target snapshot data in volume.
Data snapshot subelement 5062, for according to described to the target snapshot data in snapped volume, creation with it is described to The corresponding snapped volume of snapped volume.
Referring to Fig. 10, Figure 10 is that another embodiment of the application provides a kind of schematic block diagram of data snapshot device, it should Data snapshot device is for executing any one of aforementioned data snapshot method.Wherein, which, which can be configured at, is used for Storage system, the storage system are connect with server communication, and the storage system is connect with main-machine communication.
As shown in Figure 10, data snapshot device 600 includes: data receipt unit 601, data write unit 602 and instruction Transmission unit 603.
Data receipt unit 601, the write data requests sent for receiving the host, write data request include to The original identification information of data and volume to be written is written;
Data write unit 602 writes the data to be written for the original identification information according to the volume to be written Enter in the volume to be written;
Instruction sending unit 603 sends snapshot and instructs to the server, institute for requesting in response to write data Stating snapshot instruction includes the original identification information to snapped volume, so that the server is according to the original mark to snapped volume Information, creation is with described to the corresponding snapped volume of snapped volume.
Referring to Fig. 10, in one embodiment, data snapshot device 600 further includes zone marker unit 610 and bitmap wound Build unit 620.
Zone marker unit 610, for carrying out cutting mark for storing the region of data in the volume to be written Reason, to obtain storage region and area identification corresponding with the storage region.
Bitmap creating unit 620, for creating bitmap table according to the storage region and corresponding area identification.
Referring to Figure 10, in one embodiment, data snapshot device 600 further includes the first determination unit 630, second Determination unit 640 and data record unit 650.
First determination unit 630 determines described to be written if the type for the data to be written is file content data Entering data is valid data.
Second determination unit 640 determines described to be written if the type for the data to be written is filesystem information Entering data is non-effective data;
Data record unit 650, for recording whether the data to be written are valid data in the bitmap table.
Such as Figure 11, in one embodiment, write data request includes that target area identifies.Data write unit 602 wraps It includes region and determines that subelement 6022 and the second write-in subelement 6023 is written in subelement 6021, first.
Region determines subelement 6021, for identifying according to the target area, determines target storage domain;
First write-in subelement 6022, if being not more than the sky in the target storage domain for the size of data to be written The target storage domain is written in the data to be written by not busy region;
Second write-in subelement 6023, if being greater than the free time in the target storage domain for the size of data to be written Other idle memory regions of the volume to be written are written in the data to be written by region.
It should be noted that it is apparent to those skilled in the art that, for convenience of description and succinctly, The data snapshot device of foregoing description and the specific work process of each unit, can be with reference in aforementioned data Snapshot Method embodiment Corresponding process, details are not described herein.
Above-mentioned data snapshot device can be implemented as a kind of form of computer program, which can be such as It is run in computer equipment shown in Figure 12.
Figure 12 is please referred to, Figure 12 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The calculating Machine equipment can be server or terminal.
Refering to fig. 12, which includes processor, memory and the network interface connected by system bus, In, memory may include non-volatile memory medium and built-in storage.
Non-volatile memory medium can storage program area and computer program.The computer program includes program instruction, The program instruction is performed, and processor may make to execute a kind of data snapshot method.
Processor supports the operation of entire computer equipment for providing calculating and control ability.
Built-in storage provides environment for the operation of the computer program in non-volatile memory medium, the computer program quilt When processor executes, processor may make to execute a kind of data snapshot method.
The network interface such as sends the task dispatching of distribution for carrying out network communication.It will be understood by those skilled in the art that Structure shown in Figure 12, only the block diagram of part-structure relevant to application scheme, is not constituted to application scheme The restriction for the computer equipment being applied thereon, specific computer equipment may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
It should be understood that processor can be central processing unit (Central Processing Unit, CPU), it should Processor can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specially With integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor are patrolled Collect device, discrete hardware components etc..Wherein, general processor can be microprocessor or the processor be also possible to it is any often The processor etc. of rule.
Wherein, the processor is for running computer program stored in memory, to realize following steps:
The snapshot request that the host is sent is received, the snapshot request includes the original mark of the corresponding target of target original volume Know information, the target original volume is located in the storage system;According to the original identification information of the target, the target is obtained In the corresponding target original volume of original identification information to snapshot data;According in the target original volume to snapshot data, Create the corresponding snapped volume of the target original volume;If the target original volume successfully creates corresponding snapped volume, snapshot is generated Completion notice, and the snapshot completion notice is sent to the host, so that the host acknowledgement snapshot is completed.
In one embodiment, the processor is also used to realize:
The snapshot instruction that the storage system is sent is received, the snapshot instruction includes the original mark letter to snapped volume Breath, the snapshot instruction are that the storage system is sent in response to the write data requests of the host;According to snapped volume Original identification information, creation is with described to the corresponding snapped volume of snapped volume.
In one embodiment, the processor is being realized according to original identification information to snapped volume, creation with it is described When snapped volume corresponding snapped volume, for realizing:
According to the original identification information to snapped volume, obtain described to the target snapshot data in snapped volume;According to The target snapshot data in snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
In one embodiment, the processor is also used to realize:
The write data requests that the host is sent are received, write data request includes data to be written and volume to be written Original identification information;According to the original identification information of the volume to be written, the volume to be written is written into the data to be written In;It is requested in response to write data, sends snapshot and instruct to the server, the snapshot instruction includes the original to snapped volume Beginning identification information, so that the server creates and described to snapped volume pair according to the original identification information to snapped volume The snapped volume answered.
In one embodiment, the processor is realizing the original identification information according to the volume to be written, will Before the data to be written are written in the volume to be written, it is also used to realize:
To in the volume to be written for store data region carry out the processing of cutting label, with obtain storage region and with The corresponding area identification of the storage region;According to the storage region and corresponding area identification, bitmap table is created.
In one embodiment, the processor is realizing the original identification information according to the volume to be written, will After the data to be written are written in the volume to be written, it is also used to realize:
If the type of the data to be written is file content data, determine that the data to be written are valid data;If The type of the data to be written is filesystem information, determines that the data to be written are non-effective data;In the bitmap Record whether the data to be written are valid data in table.
In one embodiment, write data request includes that target area identifies;The processor is realizing described According to the original identification information of the volume to be written, when the data to be written are written in the volume to be written, for realizing:
It is identified according to the target area, determines target storage domain;If the size of data to be written is no more than described The target storage domain is written in the data to be written by the free area in target storage domain;If the data to be written Size is greater than the free area in the target storage domain, and the data to be written are written to other free time of the volume to be written Storage region.
A kind of computer readable storage medium is also provided in embodiments herein, the computer readable storage medium is deposited Computer program is contained, includes program instruction in the computer program, the processor executes described program instruction, realizes this Apply for any one data snapshot method that embodiment provides.
Wherein, the computer readable storage medium can be the storage inside of computer equipment described in previous embodiment Unit, such as the hard disk or memory of the computer equipment.The computer readable storage medium is also possible to the computer The plug-in type hard disk being equipped on the External memory equipment of equipment, such as the computer equipment, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any Those familiar with the art within the technical scope of the present application, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should all cover within the scope of protection of this application.Therefore, the protection scope of the application should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of data snapshot method is used for server, which is characterized in that the server and storage system communicate to connect, institute Server is stated to connect with main-machine communication, which comprises
The snapshot request that the host is sent is received, the snapshot request includes the original mark letter of the corresponding target of target original volume Breath, the target original volume are located in the storage system;
According to the original identification information of the target, obtain in the corresponding target original volume of the original identification information of the target to fast According to data;
According to, to snapshot data, creating the corresponding snapped volume of the target original volume in the target original volume;
If the target original volume successfully creates corresponding snapped volume, snapshot completion notice is generated, and the snapshot is completed to lead to Know and be sent to the host, so that the host acknowledgement snapshot is completed.
2. data snapshot method according to claim 1, which is characterized in that the method also includes:
The snapshot instruction that the storage system is sent is received, the snapshot instruction includes the original identification information to snapped volume, institute Stating snapshot instruction is that the storage system is sent in response to the write data requests of the host;
According to the original identification information to snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
3. data snapshot method according to claim 2, which is characterized in that according to the original identification information to snapped volume, Creation is with described to the corresponding snapped volume of snapped volume, comprising:
According to the original identification information to snapped volume, obtain described to the target snapshot data in snapped volume;
According to the target snapshot data in snapped volume, creation is with described to the corresponding snapped volume of snapped volume.
4. a kind of data snapshot method is used for storage system, which is characterized in that the storage system is connect with server communication, The storage system is connect with main-machine communication, which comprises
Receive the write data requests that the host is sent, write data request includes the original of data to be written and volume to be written Identification information;
According to the original identification information of the volume to be written, the data to be written are written in the volume to be written;
It is requested in response to write data, sends snapshot and instruct to the server, the snapshot instruction includes to snapped volume Original identification information, so that the server creates and described to snapped volume according to the original identification information to snapped volume Corresponding snapped volume.
5. data snapshot method according to claim 4, which is characterized in that the original mark according to the volume to be written Information is known, before the data to be written are written in the volume to be written, further includes:
To in the volume to be written for store data region carry out the processing of cutting label, with obtain storage region and with it is described The corresponding area identification of storage region;
According to the storage region and corresponding area identification, bitmap table is created.
6. data snapshot method according to claim 5, which is characterized in that the original mark according to the volume to be written Information is known, after the data to be written are written in the volume to be written, further includes:
If the type of the data to be written is file content data, determine that the data to be written are valid data;
If the type of the data to be written is filesystem information, determine that the data to be written are non-effective data;
Record whether the data to be written are valid data in the bitmap table.
7. data snapshot method according to claim 5, which is characterized in that write data request includes that target area is marked Know;The original identification information according to the volume to be written the data to be written is written in the volume to be written, packet It includes:
It is identified according to the target area, determines target storage domain;
If the size of data to be written is not more than the free area in the target storage domain, the data to be written are written The target storage domain;
If the size of data to be written is greater than the free area in the target storage domain, institute is written into the data to be written State other idle memory regions of volume to be written.
8. a kind of data snapshot device is used for server, which is characterized in that the server and storage system communicate to connect, institute It states server to connect with main-machine communication, described device includes:
Request reception unit, the snapshot request sent for receiving the host, the snapshot request includes target original volume pair The original identification information of the target answered, the target original volume are located in the storage system;
Data capture unit, for it is corresponding to obtain the original identification information of the target according to the original identification information of the target In target original volume to snapshot data;
Snapshot creating unit, for according to snapshot data, it is corresponding to create the target original volume in the target original volume Snapped volume;
It notifies transmission unit, if successfully creating corresponding snapped volume for the target original volume, generates snapshot completion notice, and The snapshot completion notice is sent to the host, so that the host acknowledgement snapshot is completed.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor;
The memory is for storing computer program;
The processor, for executing the computer program and realization such as claim 1 when executing the computer program To data snapshot method described in any one of 7.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program make the processor realize the number as described in any one of claims 1 to 7 when being executed by processor According to Snapshot Method.
CN201910553410.1A 2019-06-25 2019-06-25 Data snapshot method, device, equipment and storage medium Pending CN110442476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910553410.1A CN110442476A (en) 2019-06-25 2019-06-25 Data snapshot method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910553410.1A CN110442476A (en) 2019-06-25 2019-06-25 Data snapshot method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110442476A true CN110442476A (en) 2019-11-12

Family

ID=68428265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910553410.1A Pending CN110442476A (en) 2019-06-25 2019-06-25 Data snapshot method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110442476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981574A (en) * 2023-03-10 2023-04-18 阿里巴巴(中国)有限公司 Snapshot storage method, system, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704903A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot backup method
CN106776147A (en) * 2016-12-29 2017-05-31 华为技术有限公司 A kind of variance data backup method and variance data back-up device
CN107562578A (en) * 2017-09-25 2018-01-09 郑州云海信息技术有限公司 A kind of snapshot creation method of data storage, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704903A (en) * 2004-06-03 2005-12-07 华为技术有限公司 Snapshot backup method
CN106776147A (en) * 2016-12-29 2017-05-31 华为技术有限公司 A kind of variance data backup method and variance data back-up device
WO2018120844A1 (en) * 2016-12-29 2018-07-05 华为技术有限公司 Differential data backup method and differential data backup device
CN107562578A (en) * 2017-09-25 2018-01-09 郑州云海信息技术有限公司 A kind of snapshot creation method of data storage, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115981574A (en) * 2023-03-10 2023-04-18 阿里巴巴(中国)有限公司 Snapshot storage method, system, equipment and storage medium
CN115981574B (en) * 2023-03-10 2023-08-04 阿里巴巴(中国)有限公司 Snapshot storage method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11340672B2 (en) Persistent reservations for virtual disk using multiple targets
US9229950B2 (en) Method and device for processing files of distributed file system
US9361034B2 (en) Transferring storage resources between snapshot storage pools and volume storage pools in a distributed network
AU2015410318B2 (en) Data write method, apparatus, and system
CN106126374B (en) Method for writing data, method for reading data and device
US10191958B1 (en) Storage provisioning in a data storage environment
US20120185645A1 (en) Storage system and management method thereof
CN110096220B (en) Distributed storage system, data processing method and storage node
US20210397351A1 (en) Synchronous discovery logs in a fabric storage system
CN108319618B (en) Data distribution control method, system and device of distributed storage system
US20200401458A1 (en) Adaptive Work Distribution in Distributed Systems
US11461156B2 (en) Block-storage service supporting multi-attach and health check failover mechanism
US11182096B1 (en) Data storage system with configurable durability
CN109582213A (en) Data reconstruction method and device, data-storage system
CN113448502B (en) Distributed storage system and storage control method
WO2021082465A1 (en) Method for ensuring data consistency and related device
CN109992373B (en) Resource scheduling method, information management method and device and task deployment system
US10929041B1 (en) Block-storage service supporting multi-attach
CN110442476A (en) Data snapshot method, device, equipment and storage medium
CN113190384A (en) Data recovery control method, device, equipment and medium based on erasure codes
US20160320977A1 (en) Storage control device, method and storage system
WO2023184907A1 (en) Multi-control storage system io processing method and system, and related component
CN111736754A (en) Data migration method and device
CN109960474A (en) Data-updating method, device, equipment and medium based on automatic simplify configuration
CN115987974A (en) Lightweight FTP service method and system

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