CN110032541A - A kind of writeable snapshot implementing method and system - Google Patents

A kind of writeable snapshot implementing method and system Download PDF

Info

Publication number
CN110032541A
CN110032541A CN201910294470.6A CN201910294470A CN110032541A CN 110032541 A CN110032541 A CN 110032541A CN 201910294470 A CN201910294470 A CN 201910294470A CN 110032541 A CN110032541 A CN 110032541A
Authority
CN
China
Prior art keywords
snapshot
modification
target
creation information
request
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
CN201910294470.6A
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology 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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910294470.6A priority Critical patent/CN110032541A/en
Publication of CN110032541A publication Critical patent/CN110032541A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

This application discloses a kind of writeable snapshot implementing method and systems, comprising: when receiving the request to create of snapshot document, the creation information of presently described request to create is recorded using meta data server;After receiving the first modification request to snapshot document, the first object snapshot title in the first modification request is obtained, and utilize corresponding creation information in first object snapshot name acquiring meta data server;First modification request, first object snapshot title and creation information are issued to server, so that server according to first object snapshot title and creation information determine first object modify object, and after replicate target modification object according to first modification request to duplication after first object modify object modify.The application only record the information currently created when snapshot creates, really need modify to snapshot edition data when, then target modification object is replicated, the modification of realization File Snapshot version while greatly reduces disk space and occupies.

Description

A kind of writeable snapshot implementing method and system
Technical field
This application involves field of computer technology, more specifically to a kind of writeable snapshot implementing method and system.
Background technique
Common distributed file system framework is by DOS (distributed objects storage system), MDS (the first number positioned at bottom According to service) and CA (Client Agent) three parts composition, wherein DOS is made of multiple servers equipment, is responsible for data are reliable It is distributed in these equipment, it externally provides object-based data access interface;MDS provides Metadata Service, wherein first number It, can also be with separate storage according to DOS is possibly stored to;CA is interacted with MDS and DOS simultaneously, externally realizes file access interface;File Data be cut into a certain size data block, each piece as an object storage into DOS.
Snapshot is that a kind of efficient Data Protection Technologies, user, can after modifying to file data in file system File can be rolled back to the snapshot later if file data is abnormal damage to create a snapshot, reach data guarantor The purpose of shield.
After snapshot creation, file can divide into multiple versions, i.e. current version, the corresponding snapshot version of each snapshot. Form the object version of current version, referred to as the #HEAD version of object, abbreviation #HEAD object;Form the object version of snapshot version Sheet, referred to as the #SNAP version of object, abbreviation #SNAP object.
In generic-document system, only documentary current version can continue to modify, and snapshot version cannot be modified again, Cause not to be able to satisfy business demand.
Summary of the invention
The application's is designed to provide a kind of writeable snapshot implementing method and system, can be realized the modification of snapshot.
To achieve the above object, this application provides a kind of writeable snapshot implementing methods, are applied to client, comprising:
When receiving the request to create of snapshot document, the creation of presently described request to create is recorded using meta data server Information;
After receiving the first modification request to the snapshot document, the first mesh in the first modification request is obtained Snapshot title is marked, and is believed using the creation corresponding in meta data server described in the first object snapshot name acquiring Breath;
The first modification request, the first object snapshot title and the creation information are issued to server, with The server is set to determine that first object modifies object according to the first object snapshot title and the creation information, and multiple It is modified according to the first modification request to first object modification object after duplication after making the target modification object.
Optionally, further includes:
After receiving the read requests to original document or the snapshot document, institute in the meta data server is obtained State the corresponding creation information of read requests;
The read requests and the creation information are issued to the server, so that the server is according to the reading It takes request and the creation information to determine target reading object, and the target reading object is executed according to the read requests Corresponding operation.
Optionally, further includes:
After receiving the second modification request to the original document, obtain second described in the meta data server The corresponding creation information is requested in modification;
The second modification request and the creation information are issued to server, so that the server is according to described the Two modification requests and the creation information determine the second target modification object, and the root after replicating the second target modification object It modifies according to modification request to the second target modification object.
To achieve the above object, this application provides a kind of writeable snapshot implementing methods, are applied to server, comprising:
Obtain the first modification request, first object snapshot title and the creation information to snapshot document that client is sent; Wherein, the entitled client of the first object snapshot receives the information acquired after the first modification request, The creation information is the information of the snapshot creation operation of meta data server record;
Determine that first object modifies object according to the first object snapshot title and the creation information;
Duplication operation is executed to first object modification object, and according to the first modification request to after duplication first Target modification object is modified.
Optionally, described that first object modification pair is determined according to the first object snapshot title and the creation information As, comprising:
According to the first object snapshot name acquiring first object snapshot object, and judge whether there is and described first The corresponding real object of target snapshot object;Wherein, the real object is the practical object for occupying memory space;
If it is not, then the corresponding original version object of the first object snapshot object and its affiliated partner are obtained, according to The creation information and the affiliated partner determine the first object modification object.
Optionally, further includes:
Obtain the read requests to original document or the snapshot document and the corresponding creation that client is sent Information;
Target reading object is determined according to the read requests and the creation information, and according to the read requests to institute It states target reading object and executes corresponding read operation.
Optionally, described according to the reading when the read requests are the first read requests to the original document Request and the creation information is taken to determine target reading object, comprising:
The first object obtained in first read requests reads title;
The corresponding original version object of original document described in name acquiring and its association pair are read using the first object As;
It is newest by being updated for the last time in the primary object and all affiliated partners using the creation information Object is determined as first object reading object.
Optionally, described according to the reading when the read requests are the second read requests to the snapshot document Request and the creation information is taken to determine target reading object, comprising:
The second target obtained in second read requests reads title;
The corresponding snapshot version objects of snapshot document described in name acquiring are read using second target;
Judge whether the snapshot version objects are real object;
If it is, the snapshot version objects are determined as the second target reading object;
If it is not, then obtaining the original version object and its affiliated partner of the snapshot document, and according to the original version This object and the affiliated partner determine the second target reading object.
Optionally, further includes:
Obtain the second modification request, the second target modification title and the wound to the original document that client is sent Build information;Wherein, the entitled client of second target modification acquires after receiving the second modification request Information;
The second target modification object is determined according to the second target modification title and the creation information;
Duplication operation is executed to the second target modification object, and according to the first modification request to after duplication second Target modification object is modified.
Optionally, described that second target modification pair is determined according to the second target modification title and the creation information As, comprising:
It is closed using the target original version object and its target of file destination described in the second target modification name acquiring Join object;
Determine the newest object updated for the last time in the target original version object and the target association object, and The latest snapshot version objects are determined as the second modification object.
To achieve the above object, this application provides a kind of writeable snapshots to realize system, comprising:
Aforementioned disclosed client, aforementioned disclosed server and meta data server.
To achieve the above object, this application provides a kind of electronic equipment, comprising:
Memory, for storing computer program;
Processor realizes the step such as above-mentioned any writeable snapshot implementing method when for executing the computer program Suddenly.
To achieve the above object, this application provides a kind of computer readable storage medium, the computer-readable storages Computer program is stored on medium, realized when the computer program is executed by processor as it is above-mentioned it is any it is writeable it is fast according to the facts The step of existing method.
By above scheme it is found that a kind of writeable snapshot implementing method provided by the present application, comprising: receive snapshot document Request to create when, the creation information of presently described request to create is recorded using meta data server;When receiving to described fast After the first modification request of file, the first object snapshot title in the first modification request is obtained, and utilize described the The corresponding creation information in meta data server described in one target snapshot name acquiring;By the first modification request, institute It states first object snapshot title and the creation information is issued to server, so that the server is fast according to the first object Determine that first object modifies object according to title and the creation information, and according to described the after replicating the target modification object One modification request modifies to first object modification object after duplication.The application only records current creation when snapshot creates Information, really need modify to snapshot edition data when, then target modification object is replicated, realizes that file is fast According to version modification while greatly reduce disk space occupy.
Disclosed herein as well is a kind of writeable snapshots to realize system, is equally able to achieve above-mentioned technical effect.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of writeable snapshot implementing method disclosed in the embodiment of the present application;
Fig. 2 is the flow chart of the writeable snapshot implementing method of another kind disclosed in the embodiment of the present application;
Fig. 3 is the flow chart of the writeable snapshot implementing method of another kind disclosed in the embodiment of the present application;
Fig. 4 is the flow chart of the writeable snapshot implementing method of another kind disclosed in the embodiment of the present application;
Fig. 5 is the flow chart of the writeable snapshot implementing method of another kind disclosed in the embodiment of the present application;
Fig. 6-Fig. 9 is a kind for the treatment of process signal of writeable snapshot implementing method specific example disclosed in the embodiment of the present application Figure;
Figure 10 is a kind of flow chart of specific writeable snapshot implementing method disclosed in the embodiment of the present application;
Figure 11 is the process that original version file is modified in a kind of writeable snapshot implementing method disclosed in the embodiment of the present application Flow chart;
Figure 12 is a kind of structure chart of writeable snapshot realization system disclosed in the embodiment of the present application.
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 embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
In general existing file system, only documentary current version can continue to modify, snapshot version cannot again by Modification, causes not to be able to satisfy business demand.The embodiment of the present application discloses a kind of writeable snapshot implementing method, can be realized to fast According to modification, and reduce the occupancy of disk space.
Referring to Fig. 1, a kind of flow chart of writeable snapshot implementing method disclosed in the embodiment of the present application, as shown in Figure 1, packet It includes:
S101: when receiving the request to create of snapshot document, presently described request to create is recorded using meta data server Creation information;
In the present embodiment, when client receives the snapshot request to create of user's transmission, by the letter of current creation operation Breath is issued to meta data server, to record creation information using meta data server.Wherein, creation information specifically can wrap Path, title, the creation time etc. of file are included, uniquely incremental mark can also be added for current creation operation.Specifically, first Data server can generate tree structure according to the mark in creation operation information, more intuitive can indicate each file Between association or replication relation, be conducive to retrieval.
S102: it after receiving the first modification request to the snapshot document, obtains in the first modification request First object snapshot title, and utilize the corresponding wound in meta data server described in the first object snapshot name acquiring Build information;
Further, when the modification to snapshot document that client receives user's transmission is requested, analytic modification request, First object snapshot title in being requested, and obtain creation letter corresponding with first object snapshot title in Metadata Service Breath.
S103: the first modification request, the first object snapshot title and the creation information are issued to service Device, so that the server determines that first object modifies object according to the first object snapshot title and the creation information, And first object modification object is repaired after being requested according to first modification to duplication after replicating the target modification object Change.
In the present embodiment, the first modification request, first object snapshot title and creation information are issued to service by client Device, server will determine that first object modifies object using above- mentioned information, and replicate first object modification object, further basis First modification request modifies to first object modification object after duplication.
As it can be seen that a kind of writeable snapshot implementing method provided by the present application, comprising: receive the request to create of snapshot document When, the creation information of presently described request to create is recorded using meta data server;When receiving to the snapshot document After one modification request, the first object snapshot title in the first modification request is obtained, and utilize the first object snapshot The corresponding creation information in meta data server described in name acquiring;By the first modification request, the first object Snapshot title and the creation information are issued to server, so that the server is according to the first object snapshot title and institute It states creation information and determines that first object modifies object, and requested after replicating the target modification object according to first modification It modifies to first object modification object after duplication.The application only records the information currently created, true when snapshot creates When just needing to modify to snapshot edition data, then target modification object is replicated, greatly reduces disk space It occupies.
On the basis of the above embodiments, shown in Figure 2, writeable snapshot implementing method provided by the present application can also be into One step includes:
S201: after receiving the read requests to original document or the snapshot document, the Metadata Service is obtained The corresponding creation information of read requests described in device;
S202: being issued to the server for the read requests and the creation information so that the server according to The read requests and the creation information determine target reading object, and according to the read requests to target reading pair As executing corresponding operation.
Specifically, client gets the request of user's transmission being read out to the original version or snapshot version of file When, read requests are parsed, to utilize corresponding creation information in the acquisition of information meta data server of read requests.Further will Creation information and read requests are sent to server, so that the information of server by utilizing read requests and creation information determine target Reading object, to read target object according to read requests.
On the basis of the above embodiments, shown in Figure 3, writeable snapshot implementing method provided by the present application can also be into One step includes:
S301: after receiving the second modification request to the original document, institute in the meta data server is obtained It states the second modification and requests the corresponding creation information;
S302: by it is described second modification request and the creation information be issued to server so that the server according to The second modification request and the creation information determine the second target modification object, and are replicating second target modification pair It is modified according to modification request to the second target modification object as rear.
It is understood that the present embodiment can also obtain that Client-initiated modifies to the original version of file Two modification requests.
This application provides a kind of writeable snapshot implementing methods, are applied to server.
Referring to fig. 4, the flow chart of the writeable snapshot implementing method of another kind disclosed in the embodiment of the present application, as shown in figure 4, packet It includes:
S401: the first modification request, first object snapshot title and the creation to snapshot document that client is sent are obtained Information;Wherein, the first object snapshot entitled client acquires after receiving the first modification request Information, the creation information are the information of the snapshot creation operation of meta data server record;
In the present embodiment, server obtains the in the first modification request and the first modification request that client is sent One target snapshot title and corresponding creation information, the first modification request is the request modified to File Snapshot version.Tool Body, after client receives the first modification request, by parsing to the first modification request, obtain first object snapshot Title, and utilize the corresponding creation information of first object snapshot name acquiring.
S402: determine that first object modifies object according to the first object snapshot title and the creation information;
S403: duplication operation is executed to first object modification object, and according to the first modification request to duplication First object modification object is modified afterwards.
It is understood that server determines correct target modification pair first with target snapshot title and creation information As, and target modification object is replicated, further execute modification operation.
Another writeable snapshot implementing method is present embodiments provided, it is shown in Figure 5, comprising:
S501: the first modification request, first object snapshot title and the creation to snapshot document that client is sent are obtained Information;Wherein, the first object snapshot entitled client acquires after receiving the first modification request Information, the creation information are the information of the snapshot creation operation of meta data server record;
S502: it according to the first object snapshot name acquiring first object snapshot object, and judges whether there is and institute State the corresponding real object of first object snapshot object;Wherein, the real object is the practical object for occupying memory space;
In the present embodiment, the corresponding target snapshot object of snapshot document is obtained, and judge whether there is and target snapshot pair As corresponding real object.
S503: if it is not, then the corresponding original version object of the first object snapshot object and its affiliated partner are obtained, According to the creation information and the affiliated partner, the first object modification object is determined;
Real object corresponding with target snapshot object if it does not exist, then further obtain the corresponding file of target snapshot object Original version object and original version object affiliated partner, and according to creation information, from original version object and association Determine that first object modifies object in object.In addition, the present embodiment can if there is real object corresponding with target snapshot object Directly to modify to current real object, without duplication.
S504: duplication operation is executed to first object modification object, and according to the first modification request to duplication First object modification object is modified afterwards.
After determining first object modification object, the present embodiment replicates first object modification object, thus according to modification The content of request executes modification operation to object after duplication.
On the basis of the above embodiments, writeable snapshot implementing method provided by the present application can further include:
Obtain the read requests to original document or the snapshot document and the corresponding creation that client is sent Information;
Target reading object is determined according to the read requests and the creation information, and according to the read requests to institute It states target reading object and executes corresponding read operation.
It is understood that the available client of server send by Client-initiated to file original version or fast According to the creation information corresponding with information in read requests stored in the read requests and meta data server of version, into one Step determines target reading object according to above- mentioned information, grasps to execute corresponding read to target reading object according to read requests Make.
For the writeable snapshot implementing method that above-described embodiment is mentioned, when the read requests are to the original document When the first read requests, the present embodiment determines target reading pair further directed to according to the read requests and the creation information The process of elephant is further elaborated, comprising:
The first object obtained in first read requests reads title;
The corresponding original version object of original document described in name acquiring and its association pair are read using the first object As;
It is newest by being updated for the last time in the primary object and all affiliated partners using the creation information Object is determined as first object reading object.
In the present embodiment, title is read according to the first object in the first read requests obtained after parsing, obtains and corresponds to Original version object and the corresponding affiliated partner of original version object.According to creation information, obtain original version object and The object updated for the last time in affiliated partner determines it as first object reading object, thus further to first object Reading object is read out.Specifically, newest object can be determined according to the creation time in creation information, it can also be according to pre- The mark being first uniquely incremented by for each creation operation addition, to determine newest object according to mark.
For the writeable snapshot implementing method that above-described embodiment is mentioned, when the read requests are to the snapshot document When the second read requests, the present embodiment determines target reading pair further directed to according to the read requests and the creation information The process of elephant is further elaborated, comprising:
The second target obtained in second read requests reads title;
The corresponding snapshot version objects of snapshot document described in name acquiring are read using second target;
Judge whether the snapshot version objects are real object;
If it is, the snapshot version objects are determined as the second target reading object;
If it is not, then obtaining the original version object and its affiliated partner of the snapshot document, and according to the original version This object and the affiliated partner determine the second target reading object.
Specifically, server reads the corresponding snapshot document of name acquiring according to the second target in the second read requests, And the corresponding snapshot version objects of snapshot document, further judge whether snapshot version objects are real object.If recent snapshot Version objects are real object, then real object are determined as the second target reading object, can be directly to the second target reading object It is read out.
In addition, if snapshot version objects are virtual pair as needing to obtain the original version object of snapshot document and original The affiliated partner of version objects further therefrom determines the second target reading object.
On the basis of the above embodiments, writeable snapshot implementing method provided by the present application can further include:
Obtain the second modification request, the second target modification title and the wound to the original document that client is sent Build information;Wherein, the entitled client of second target modification acquires after receiving the second modification request Information;
The second target modification object is determined according to the second target modification title and the creation information;
Duplication operation is executed to the second target modification object, and according to the first modification request to after duplication second Target modification object is modified.
In the present embodiment, server obtains the user that client is sent and modifies request, mesh to the second of file original version Mark modification title and creation information, and further determine that the second target modification object, thus the second target modification object of duplication, and Modification operation is executed to object after duplication according to modification request.
For the writeable snapshot implementing method that above-described embodiment is mentioned, the present embodiment is further directed to according to second mesh Mark modification title and the creation information determine that the process of the second target modification object is further elaborated, comprising:
It is closed using the target original version object and its target of file destination described in the second target modification name acquiring Join object;
In the present embodiment, the original version object and original version of the second target modification name acquiring file destination are utilized The target association object of this object.
Determine the newest object updated for the last time in the target original version object and the target association object, and The newest object is determined as the second target modification object.
Specifically, the updated newest object of last time in target primary object and target association object is determined as the Two target modification objects.
In a specific embodiment, the association of the original version object and original version object of file destination is obtained After object, wherein newest object is determined according to creation information, can specifically be added according to creation time, or in advance in Object Creation The uniquely incremental mark that adds determines.Newest object is further determined as the second target modification object, thus to the second mesh Mark modification object executes duplication operation, and modification operation.
In another embodiment specific implementation mode, after determining newest object, also further judge that newest object whether there is Affiliated partner.If it is, indicating to create new snapshot after the object generates, newest object is determined as the second target at this time Modify object;If it is not, then cannot directly judge whether to create new snapshot, need further to obtain in addition to newest object it The second upgating object updated for the last time in outer original version objects and affiliated partner, and obtain the association of the second upgating object Object.Further, it is determined that the latest snapshot version objects that last time updates, judge whether it belongs to the second upgating object Newest object is determined as second if it is not, then determining to create new snapshot after the object generates by any of affiliated partner Target modification object, so that server replicates the second target modification object, and modify to object is modified after duplication;In addition, If latest snapshot version objects are any of the affiliated partners of the second upgating object, indicate not creating newly after newest object generates Snapshot object can directly modify to newest object, without executing duplication operation.
Further, writeable snapshot implementing method provided by the invention is further elaborated using specific example.Tool Body, the present invention uses a globally unique and incremental snapid, and each snapshot for identity user creates operation.It introduces One globally unique and incremental cowid, for identifying internal system to cow (the copy on write, when writing of each object Duplication) operation.Snapid is used in internal system, and user is when accessing snapshot document, the system snapshot to be accessed according to user Version file obtains corresponding snapid;Cowid is only in the DOS of system (distributed object storage, distribution The storage of formula object) subsystem internal use.
As shown in fig. 6, the original version of #HEAD object respective file, #snap object correspond to snapshot version.It is shown in figure 3 snapshots of document creation, corresponding snapid is snap1, snap2, snap4 respectively.When snapshot creates, system is only in file SNAPSHOT INFO is had recorded in MDS (meta data server, meta data server), was not carried out data manipulation, at this time DOS It is only existed in subsystem #HEAD object (real object), occupies practical disk space;There is no the objects such as #snap1 (virtual pair as), It is not take up disk space.It is non-genuine exist, be not take up disk space object be known as virtual pair as.
As shown in fig. 7, user modifies file original version after snapshot creation, DOS generation at this time one is globally unique and passs The cowid of increasing, and #HEAD object is copied into #HEAD#cowid object, while recording the associated snapshot id range of #HEAD, i.e., [snap1, snap4], the association snapshot id range of newly-generated #HEAD#cowid object are sky.#HEAD object and #HEAD# Cowid object is known as affiliated partner.The process inside DOS by completing, and system other parts do not perceive, and MDS does not also change.
User is original version document creation snapshot snap8 again, and referring to Fig. 8, the logical relation of each object is as schemed at this time. Ibid, which only records SNAPSHOT INFO in MDS, and DOS is not perceived.When subsequent user accesses these objects, need DOS according to " the associated snapshot id range " of SNAPSHOT INFO and above #HEAD object finds suitable real object and executes access.
As shown in figure 9, user modifies the snapshot snap2 of file, i.e. #snap2 object.System discovery user will modify #snap2 object be virtual pair as being closed by analyzing these objects in the information for being to look for #HEAD and its all affiliated partners The snapshot id range of connection finds snap2 within the association range of #HEAD object, and then replicating #HEAD object is #snap2 pairs As then modifying #snap2 object.If subsequent modify #snap2 object again, the object has been real object, system at this time Directly modify.
Figure 10 is a kind of flow chart of specific writeable snapshot implementing method provided in this embodiment, and user creates snapshot When, relevant information is handed down to MDS by CA (client agent, Client Agent);MDS distributes snapshot id, and is saved in first number In.When user's reading and writing of files original version, first from CA to MDS application open file, MDS return file metadata, HEAD, The relevant snapshot id list of file;CA calculates the object of access according to the offset of user's file to be accessed, obtains object Name.
For the read operation of original version, the information that CA issues object name to DOS and gets from MDS, i.e. (object Name, HEAD, snapshot id list);DOS obtains HEAD object and its all affiliated partners according to object name, and DOS is read wherein The maximum object of cowid, the object are objects where file latest data.
Modification operation for original version, the information that CA issues object name to DOS and gets from MDS, i.e. (object Name, #HEAD, snapshot id list);The treatment process of DOS is referring to Figure 11.Such as figure, first the #HEAD object of acquisition file and its pass Join object, takes the association snapid range of the wherein maximum object of cowid (it is assumed that #HEAD#cowidX).If association range Non-empty shows to create new snapshot after the object generates, then generates new cowid, it is assumed that be cowidY, replicate #HEAD# CowidX be #HEAD@cowidY, update #HEAD#cowidX association snapshot id range (its maximum value be updated to snapshot id column Maximum value in table), the incidence relation of #HEAD@cowidY and other #HEAD objects are recorded, #HEAD@cowidY object is modified, Processing terminate;If it is sky, not can determine that whether created new snapshot after the object generates, need to continue to judge, specifically, Obtain the association snapid range of second largest object of cowid and maximum snapid (the i.e. last time in snapshot list The snapid of snapshot);If maximum snapid illustrates #HEAD#cowidX pairs within the scope of the association snapid of the second blob As not generating new snapshot after generating, then #HEAD#cowidX object is directly modified, processing terminate;If maximum snapid Be not belonging to the association snapid range of the second blob, then it is identical when treatment process is with aforementioned association range non-empty, it replicates newest Object is simultaneously further processed.
When user's reading and writing of files snapshot version, snapshot document is opened from CA to MDS application first, MDS returns to file member number According to, snapid, the relevant snapshot id list of file;CA is calculated according to the offset of user's file to be accessed by pair of access As obtaining object name.
For the read operation of snapshot version, the information that CA issues object name to DOS and gets from MDS, i.e. (object Name, snapid, snapshot id list);DOS judges whether there is the corresponding real object of snapid, if there is directly reading;If It is not present, then obtains file #HEAD object and its associated object information, according to snapid and #HEAD and its affiliated partner Snapid range information finds proper object reading.
Modification operation for snapshot version, the information that CA issues object name to DOS and gets from MDS, i.e. (object Name, snapid, snapshot id list);DOS judges whether there is the corresponding real object of snapid, if there is directly modification;If It is not present, takes the treatment process as above-mentioned reading process, find proper object from #HEAD and its affiliated partner, it is multiple Making the object is #snapid object, then modifies #snapid contents of object.
Present invention also provides a kind of writeable snapshots to realize system, specifically includes aforementioned disclosed server, aforementioned disclosure Client and meta data server.
Present invention also provides a kind of electronic equipment, referring to Figure 12, a kind of electronic equipment provided by the embodiments of the present application Structure chart, as shown in figure 12, comprising:
Memory 100, for storing computer program;
Writeable snapshot provided by above-described embodiment may be implemented in processor 200 when for executing the computer program The step of implementation method.
Specifically, memory 100 includes non-volatile memory medium, built-in storage.Non-volatile memory medium storage There are operating system and computer-readable instruction, which is that the operating system and computer in non-volatile memory medium can The operation of reading instruction provides environment.Processor 200 can be a central processing unit (Central in some embodiments Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, mentioned for electronic equipment For calculating and control ability.
Present invention also provides a kind of computer readable storage medium, the storage medium may include: USB flash disk, mobile hard disk, Read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic The various media that can store program code such as dish or CD.Computer program, the calculating are stored on the storage medium Machine program realizes aforementioned disclosed writeable snapshot implementing method when being executed by processor.
The application only records the information currently created when snapshot creates, and carries out really needing to snapshot edition data When modification, then target modification object is replicated, greatly reduces disk space occupancy.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For system disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.It should be pointed out that for those skilled in the art, under the premise of not departing from the application principle, also Can to the application, some improvement and modification can also be carried out, these improvement and modification also fall into the protection scope of the claim of this application It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (11)

1. a kind of writeable snapshot implementing method, which is characterized in that be applied to client, comprising:
When receiving the request to create of snapshot document, believed using the creation that meta data server records presently described request to create Breath;
After receiving the first modification request to the snapshot document, the first object obtained in the first modification request is fast According to title, and utilize the corresponding creation information in meta data server described in the first object snapshot name acquiring;
The first modification request, the first object snapshot title and the creation information are issued to server, so that institute It states server and determines that first object modifies object according to the first object snapshot title and the creation information, and in duplication institute It is modified according to the first modification request to first object modification object after duplication after stating target modification object.
2. writeable snapshot implementing method according to claim 1, which is characterized in that further include:
After receiving the read requests to original document or the snapshot document, reading described in the meta data server is obtained Take the corresponding creation information of request;
The read requests and the creation information are issued to the server, so that the server is asked according to the reading The creation information of summing determines target reading object, and is executed accordingly according to the read requests to the target reading object Operation.
3. writeable snapshot implementing method according to claim 1 or 2, which is characterized in that further include:
After receiving the second modification request to the original document, the second modification described in the meta data server is obtained Request the corresponding creation information;
The second modification request and the creation information are issued to server, so that the server is repaired according to described second Change request and the creation information determines the second target modification object, and according to institute after replicating the second target modification object Modification request is stated to modify to the second target modification object.
4. a kind of writeable snapshot implementing method, which is characterized in that be applied to server, comprising:
Obtain the first modification request, first object snapshot title and the creation information to snapshot document that client is sent;Wherein, The entitled client of first object snapshot receives the information acquired after the first modification request, the wound Build the information for the snapshot creation operation that information is meta data server record;
Determine that first object modifies object according to the first object snapshot title and the creation information;
Duplication operation is executed to first object modification object, and according to the first modification request to first object after duplication Modification object is modified.
5. writeable snapshot implementing method according to claim 4, which is characterized in that described according to the first object snapshot Title and the creation information determine that first object modifies object, comprising:
According to the first object snapshot name acquiring first object snapshot object, and judge whether there is and the first object The corresponding real object of snapshot object;Wherein, the real object is the practical object for occupying memory space;
If it is not, then the corresponding original version object of the first object snapshot object and its affiliated partner are obtained, according to described Information and the affiliated partner are created, determines the first object modification object.
6. writeable snapshot implementing method according to claim 4, which is characterized in that further include:
Obtain the read requests to original document or the snapshot document and the corresponding creation information that client is sent;
Target reading object is determined according to the read requests and the creation information, and according to the read requests to the mesh It marks reading object and executes corresponding read operation.
7. writeable snapshot implementing method according to claim 6, which is characterized in that when the read requests are to the original It is described to determine target reading object according to the read requests and the creation information when the first read requests of beginning file, packet It includes:
The first object obtained in first read requests reads title;
The corresponding original version object of original document and its affiliated partner described in name acquiring are read using the first object;
Using the creation information, the newest object that will be updated for the last time in the primary object and all affiliated partners It is determined as first object reading object.
8. writeable snapshot implementing method according to claim 6, which is characterized in that when the read requests are to described fast According to file the second read requests when, it is described to determine target reading object according to the read requests and the creation information, packet It includes:
The second target obtained in second read requests reads title;
The corresponding snapshot version objects of snapshot document described in name acquiring are read using second target;
Judge whether the snapshot version objects are real object;
If it is, the snapshot version objects are determined as the second target reading object;
If it is not, then obtaining the original version object and its affiliated partner of the snapshot document, and according to the original version pair As determining the second target reading object with the affiliated partner.
9. according to the described in any item writeable snapshot implementing methods of claim 4 to 8, which is characterized in that further include:
Obtain the second modification request, the second target modification title and the creation letter to the original document that client is sent Breath;Wherein, the entitled client of second target modification receives the letter acquired after the second modification request Breath;
The second target modification object is determined according to the second target modification title and the creation information;
Duplication operation is executed to the second target modification object, and according to the first modification request to the second target after duplication Modification object is modified.
10. writeable snapshot implementing method according to claim 9, which is characterized in that described to be repaired according to second target Title and the creation information of renaming determine the second target modification object, comprising:
Utilize the target original version object and its target association pair of file destination described in the second target modification name acquiring As;
Determine the newest object updated for the last time in the target original version object and the target association object, and by institute It states newest object and is determined as the second modification object.
11. a kind of writeable snapshot realizes system characterized by comprising client as described in any one of claims 1 to 3, Such as the described in any item servers of claim 4 to 10 and meta data server.
CN201910294470.6A 2019-04-12 2019-04-12 A kind of writeable snapshot implementing method and system Pending CN110032541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910294470.6A CN110032541A (en) 2019-04-12 2019-04-12 A kind of writeable snapshot implementing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910294470.6A CN110032541A (en) 2019-04-12 2019-04-12 A kind of writeable snapshot implementing method and system

Publications (1)

Publication Number Publication Date
CN110032541A true CN110032541A (en) 2019-07-19

Family

ID=67238348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910294470.6A Pending CN110032541A (en) 2019-04-12 2019-04-12 A kind of writeable snapshot implementing method and system

Country Status (1)

Country Link
CN (1) CN110032541A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143126A (en) * 2019-12-20 2020-05-12 浪潮电子信息产业股份有限公司 Data copying method, system and related components of distributed file system
CN111158860A (en) * 2019-12-30 2020-05-15 咪咕文化科技有限公司 Data operation method, electronic device and storage medium
CN111382011A (en) * 2020-02-28 2020-07-07 苏州浪潮智能科技有限公司 File data access method and device and computer readable storage medium
CN111813742A (en) * 2020-06-29 2020-10-23 北京百度网讯科技有限公司 File management method, device, equipment and medium
CN113468103A (en) * 2020-03-30 2021-10-01 阿里巴巴集团控股有限公司 Method and device used in snapshot migration
WO2023071043A1 (en) * 2021-10-29 2023-05-04 苏州浪潮智能科技有限公司 File aggregation compatibility method and apparatus, computer device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040267835A1 (en) * 2003-06-30 2004-12-30 Microsoft Corporation Database data recovery system and method
CN101201774A (en) * 2006-12-15 2008-06-18 英业达股份有限公司 Method for snapshot of magnetic disc
CN104216792A (en) * 2013-05-29 2014-12-17 华为软件技术有限公司 Data backup method and memory database storage engine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040267835A1 (en) * 2003-06-30 2004-12-30 Microsoft Corporation Database data recovery system and method
CN101201774A (en) * 2006-12-15 2008-06-18 英业达股份有限公司 Method for snapshot of magnetic disc
CN104216792A (en) * 2013-05-29 2014-12-17 华为软件技术有限公司 Data backup method and memory database storage engine

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143126A (en) * 2019-12-20 2020-05-12 浪潮电子信息产业股份有限公司 Data copying method, system and related components of distributed file system
CN111158860A (en) * 2019-12-30 2020-05-15 咪咕文化科技有限公司 Data operation method, electronic device and storage medium
CN111158860B (en) * 2019-12-30 2024-02-23 咪咕文化科技有限公司 Data operation method, electronic device and storage medium
CN111382011A (en) * 2020-02-28 2020-07-07 苏州浪潮智能科技有限公司 File data access method and device and computer readable storage medium
CN111382011B (en) * 2020-02-28 2022-11-29 苏州浪潮智能科技有限公司 File data access method and device and computer readable storage medium
US11899542B2 (en) 2020-02-28 2024-02-13 Inspur Suzhou Intelligent Technology Co., Ltd. File data access method, apparatus, and computer-readable storage medium
CN113468103A (en) * 2020-03-30 2021-10-01 阿里巴巴集团控股有限公司 Method and device used in snapshot migration
CN113468103B (en) * 2020-03-30 2024-03-08 阿里巴巴集团控股有限公司 Method and device used in snapshot migration
CN111813742A (en) * 2020-06-29 2020-10-23 北京百度网讯科技有限公司 File management method, device, equipment and medium
CN111813742B (en) * 2020-06-29 2023-08-04 北京百度网讯科技有限公司 File management method, device, equipment and medium
WO2023071043A1 (en) * 2021-10-29 2023-05-04 苏州浪潮智能科技有限公司 File aggregation compatibility method and apparatus, computer device and storage medium

Similar Documents

Publication Publication Date Title
CN110032541A (en) A kind of writeable snapshot implementing method and system
CN104618482B (en) Access method, server, conventional memory device, the system of cloud data
JP5081631B2 (en) Method and apparatus for managing data deletion
JP6309103B2 (en) Snapshot and clone replication
US9087008B1 (en) Replicating a volume using snapshots
US20050273474A1 (en) Method and system for data processing with data replication for the same
EP2615566A2 (en) Unified local storage supporting file and cloud object access
US9996421B2 (en) Data storage method, data storage apparatus, and storage device
CN101777017B (en) Rapid recovery method of continuous data protection system
JP2008527571A5 (en)
CN105069048A (en) Small file storage method, query method and device
JP2006268829A (en) Method and apparatus for mirroring object between storage systems
CN109144416B (en) Method and device for querying data
CN113220729B (en) Data storage method and device, electronic equipment and computer readable storage medium
JP2007183763A (en) System, server device, and format conversion method for snapshot
CN110008197A (en) A kind of data processing method, system and electronic equipment and storage medium
US11113235B1 (en) Methods and apparatus for managing objects in a storage environment
WO2021169163A1 (en) File data access method and apparatus, and computer-readable storage medium
US10380141B1 (en) Fast incremental backup method and system
CN111007990B (en) Positioning method for quickly positioning data block references in snapshot system
US7194486B2 (en) Method and system for data processing with data replication for the same
CN106709014B (en) File system conversion method and device
CN101201774A (en) Method for snapshot of magnetic disc
CN112800007B (en) Directory entry expansion method and system suitable for FAT32 file system
US9135016B1 (en) Methods and apparatus for managing replication of objects in a storage environment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190719

RJ01 Rejection of invention patent application after publication