CN113468103B - Method and device used in snapshot migration - Google Patents

Method and device used in snapshot migration Download PDF

Info

Publication number
CN113468103B
CN113468103B CN202010238575.2A CN202010238575A CN113468103B CN 113468103 B CN113468103 B CN 113468103B CN 202010238575 A CN202010238575 A CN 202010238575A CN 113468103 B CN113468103 B CN 113468103B
Authority
CN
China
Prior art keywords
snapshot
metadata
version
data
sharing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010238575.2A
Other languages
Chinese (zh)
Other versions
CN113468103A (en
Inventor
张军伟
刘振军
陈森
王利虎
陈枝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202010238575.2A priority Critical patent/CN113468103B/en
Publication of CN113468103A publication Critical patent/CN113468103A/en
Application granted granted Critical
Publication of CN113468103B publication Critical patent/CN113468103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • 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
    • 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/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files

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

Embodiments of the present disclosure provide a method and an apparatus for use in snapshot migration, where the method for use in snapshot migration includes: under the condition that a second snapshot of the second metadata description is migrated to a target end, searching a sharing identification bit of the second metadata; wherein, the second metadata is the metadata of the snapshot having inheritance relation with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not; judging whether a second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata; if not, constructing a sharing relation of the first snapshot described by the first metadata and the second snapshot on the target side; and if so, migrating the data of the first snapshot described by the first metadata to the target end.

Description

Method and device used in snapshot migration
Technical Field
The embodiment of the specification relates to the technical field of snapshots, in particular to a method used in snapshot migration. One or more embodiments of the present specification also relate to an apparatus, a computing device, and a computer-readable storage medium for use in snapshot migration.
Background
The snapshot is the mirror image of the consistent data of the system at a certain moment, and is widely used for data backup and recovery after abnormal faults. When the system is damaged due to an anomaly, the system can be rolled back to be restored to the consistency point of one snapshot. In order to guarantee system availability, snapshot migration is required in case of damage or uneven load of a snapshot copy.
In snapshot migration, how to migrate can improve migration efficiency becomes a concern.
Disclosure of Invention
In view of this, the present description embodiments provide a method for use in snapshot migration. One or more embodiments of the present specification also relate to an apparatus for use in snapshot migration, a computing device, and a computer-readable storage medium that address the technical deficiencies in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a method for use in snapshot migration, comprising: under the condition that a second snapshot of the second metadata description is migrated to a target end, searching a sharing identification bit of the second metadata; wherein, the second metadata is the metadata of the snapshot having inheritance relation with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not; judging whether a second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata; if not, constructing a sharing relation of the first snapshot described by the first metadata and the second snapshot on the target side; and if so, migrating the data of the first snapshot described by the first metadata to the target end.
Optionally, the method is applied to a source end, and the first snapshot is a snapshot of a read-only version; if not, constructing a sharing relationship of the data between the first snapshot and the second snapshot of the first metadata description at the target end includes: and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end, so that the target end responds to the received request to acquire the sharing identification bit of the second metadata, judging whether the second snapshot described by the second metadata is modified or not, if not, constructing the sharing relation of the data between the first snapshot and the second snapshot according to the request by the target end, and if so, sending a request for retransmitting the data of the first snapshot to the source end by the target end.
Optionally, the method is applied to the source end, the first snapshot is a read-only version snapshot, and the second snapshot is a read-only version snapshot; if not, constructing a sharing relationship of the data between the first snapshot and the second snapshot of the first metadata description at the target end includes: and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end, so that the target end responds to the received request to construct the sharing relation of the data between the first snapshot and the second snapshot.
Optionally, the method is applied to a target end; the migrating the data of the first snapshot of the first metadata description to the target side if modified includes: and if so, sending a request for retransmitting the data of the first snapshot to the source end, so that the source end can migrate the data of the first snapshot described by the first metadata to the target end in response to receiving the request.
Optionally, before searching the shared identification bit of the second metadata, the method further includes: creating a snapshot of the second version by copying metadata of the snapshot of the second version from metadata of the snapshot of the first version; wherein the first metadata belongs to any one of metadata of a first version, and the second metadata belongs to metadata inherited by the first metadata in a second version; setting sharing identification bits for each metadata of the second version respectively; initializing the record of the shared identification bit as a snapshot of the second version is unmodified.
Optionally, the method further comprises: receiving a write access to a third snapshot of the second version if the second version is a writable version; searching a sharing identification bit of third metadata of a third snapshot of the second version; judging whether a third snapshot described by the third metadata is modified or not according to the sharing identification bit of the third metadata; if the third snapshot is not modified, newly allocating data resources to complete write access to the third snapshot and updating the record of the shared identification bit to be modified by the third snapshot; and if the third snapshot is modified, directly performing write access on the data resource of the third snapshot.
Optionally, the method further comprises: preferentially migrating the snapshot of the writable version relative to the snapshot of the read-only version; the snapshot of the writable version is a snapshot of the last version from the early to the late according to the version creation time in the snapshots of a plurality of versions; the first snapshot is a read-only version snapshot of the plurality of versions of snapshots; the migration sequence of the snapshots of the multiple versions is as follows: migration occurs from late to early as version creation time.
Optionally, the method further comprises: when creating a snapshot, generating or updating a snapshot version chain, wherein each link point in the snapshot version chain corresponds to each snapshot version one by one and points to a metadata string of the corresponding snapshot version, and the ranks of any two metadata with inheritance relations in the metadata strings pointed by the respective link points are the same. When the first snapshot of the first metadata description needs to be migrated from the source end to the target end and the second snapshot of the second metadata description is migrated to the target end, the searching for the sharing identification bit of the second metadata includes: when a first snapshot of a first metadata description needs to be migrated from a source end to a target end and a second snapshot of a second metadata description is migrated to the target end, searching the second metadata in the snapshot version chain according to the arrangement of the first metadata in the snapshot version chain; and obtaining the sharing identification bit of the second metadata according to the searched second metadata.
According to a second aspect of embodiments of the present specification, there is provided an apparatus for use in snapshot migration, comprising: the identification bit searching module is configured to find out the sharing identification bit of the second metadata under the condition that the second snapshot described by the second metadata is migrated to the target end; the second metadata is metadata of a snapshot having an inheritance relationship with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not. And the identification bit judging module is configured to judge whether the second snapshot described by the second metadata is modified according to the shared identification bit of the second metadata. And the sharing construction module is configured to construct a sharing relation of the data between the first snapshot and the second snapshot described by the first metadata at the target end if the identification bit judging module judges that the first snapshot is unmodified. And the data migration module is configured to migrate the data of the first snapshot described by the first metadata to the target end if the identification bit judgment module judges that the data is modified.
Optionally, the device is configured at a source end, and the first snapshot is a read-only version snapshot. The sharing construction module is configured to send a request for constructing a sharing relation between the first snapshot and the second snapshot to the target end if the identification bit judgment module judges that the second snapshot is unmodified, so that the target end can acquire the sharing identification bit of the second metadata in response to receiving the request, judge whether the second snapshot described by the second metadata is modified or not, if not, the target end constructs the sharing relation between the first snapshot and the second snapshot according to the request, and if so, the target end sends a request for retransmitting the data of the first snapshot to the source end.
Optionally, the device is configured at a source end, the first snapshot is a read-only version snapshot, and the second snapshot is a read-only version snapshot. The sharing construction module is configured to send a request for constructing a sharing relation of data between the first snapshot and the second snapshot to the target end if the identification bit judging module judges that the identification bit judging module is unmodified, so that the target end responds to the request to construct the sharing relation of data between the first snapshot and the second snapshot.
Optionally, the device is configured at the target end. The data migration module is configured to send a request for retransmitting the data of the first snapshot to the source end if the identification bit judging module judges that the data of the first snapshot is modified, so that the source end migrates the data of the first snapshot described by the first metadata to the target end in response to receiving the request.
Optionally, the method further comprises: a snapshot creation module configured to create a snapshot of a second version by copying metadata of the snapshot of the second version from metadata of the snapshot of the first version; wherein the first metadata belongs to any one of the metadata of the first version, and the second metadata belongs to metadata inherited by the first metadata in the second version. And the identification bit setting module is configured to set sharing identification bits for the metadata of the second version respectively. And the identification bit initializing module is configured to initialize the record of the shared identification bit as the snapshot of the second version is unmodified. And a write access receiving module configured to receive a write access to a third snapshot of the second version if the second version is a writable version. And the write access searching module is configured to find out the sharing identification bit of the third metadata of the third snapshot of the second version. And the write access judging module is configured to judge whether the third snapshot described by the third metadata is modified according to the sharing identification bit of the third metadata. And the resource allocation module is configured to allocate data resources newly to complete the write access to the third snapshot and update the record of the shared identification bit to the modified third snapshot if the write access judgment module judges that the third snapshot is not modified. And the write access executing module is configured to directly perform write access on the data resource of the third snapshot if the write access judging module judges that the third snapshot is modified.
According to a third aspect of embodiments of the present specification, there is provided a computing device comprising: a memory and a processor; the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions: under the condition that a second snapshot of the second metadata description is migrated to a target end, searching a sharing identification bit of the second metadata; wherein, the second metadata is the metadata of the snapshot having inheritance relation with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not; judging whether a second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata; if not, constructing a sharing relation of the first snapshot described by the first metadata and the second snapshot on the target side; and if so, migrating the data of the first snapshot described by the first metadata to the target end.
According to a fourth aspect of embodiments of the present specification, there is provided a computer readable storage medium storing computer executable instructions which, when executed by a processor, implement the steps of a method for use in snapshot migration as described in any embodiment of the present specification.
One embodiment of the present disclosure provides a method for use in snapshot migration, where the second metadata is metadata of a snapshot having an inheritance relationship with the first metadata, and the metadata is used to describe a location of data of the snapshot, so, in an unmodified condition of the second snapshot, the data of the first snapshot described by the first metadata is the same as the location of the data of the second snapshot described by the second metadata, and is the same data. In addition, the method sets a sharing identification bit for the second metadata, and when the second snapshot is a writable snapshot, the second snapshot can be modified by any node, and the modification can be recorded in the sharing identification bit. Therefore, in the case that the second snapshot described by the second metadata has been migrated to the target end, the sharing identification bit of the second metadata can be searched, and whether the second snapshot has been modified or not is determined through the sharing identification bit. Under the condition of no modification, the sharing relation of the data between the two is built at the target end to complete the migration of the first snapshot, the same data does not need to be repeatedly copied to the target end, under the condition of modification, the data of the first snapshot is migrated to the target end, and errors caused by building sharing under the condition of the modified data are avoided. Therefore, the method provided by the embodiment of the specification enables the snapshots of the multiple versions to share the data at the target end under the condition of no modification by sharing the identification bits, does not need to repeatedly migrate the same data, reduces the migrated data volume and the storage resource occupation of the target end, reduces the complexity of mutual exclusion between data modification and shared relation construction, and effectively improves the migration efficiency of the snapshots.
Drawings
FIG. 1 is a flow chart of a method for use in snapshot migration provided in one embodiment of the present disclosure;
FIG. 2 is a diagram of description chunk metadata provided by one embodiment of the present disclosure;
FIG. 3a is a snapshot version chain diagram provided by one embodiment of the present description;
FIG. 3b is a snapshot version chain diagram provided by another embodiment of the present disclosure;
FIG. 4a is a schematic diagram of ROW write data provided in one embodiment of the present disclosure;
FIG. 4b is a schematic diagram of a COW write data according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a multi-copy snapshot metadata structure provided by one embodiment of the present disclosure;
FIG. 6 is a schematic diagram of message interaction between a source and a destination according to one embodiment of the present disclosure;
fig. 7 is a schematic message interaction diagram of a source end and a destination end according to another embodiment of the present disclosure;
fig. 8 is a schematic message interaction diagram of a source end and a destination end according to another embodiment of the present disclosure;
FIG. 9 is a schematic diagram of an apparatus for use in snapshot migration according to one embodiment of the present disclosure;
FIG. 10 is a schematic diagram of an apparatus for use in snapshot migration according to another embodiment of the present disclosure;
FIG. 11 is a block diagram of a computing device provided in one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present specification will be explained.
Metadata is data describing data, and mainly comprises description block metadata describing the position of the data.
In this specification, a method for use in snapshot migration is provided, and this specification relates to an apparatus, a computing device, and a computer-readable storage medium for use in snapshot migration, which are described in detail in the following embodiments.
FIG. 1 shows a flowchart of a method for use in snapshot migration, including steps 102 through 108, provided in accordance with one embodiment of the present description.
Step 102: and under the condition that the second snapshot of the second metadata description is migrated to the target end, searching the sharing identification bit of the second metadata.
The second metadata is metadata of a snapshot having an inheritance relationship with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not.
For example, in the case that the first snapshot described by the first metadata needs to be migrated from the source end to the target end, and the second snapshot described by the second metadata has been migrated to the target end, the sharing identification bit possessed by the second metadata may be found.
For example, a bit may be added to the metadata describing the block as the shared identification bit. For example, the shared flag bit "inheret_bit" in the block metadata diagram is described as shown in fig. 2. "Inheret_bit" is "0" indicating that the snapshot of the metadata description has been modified, "Inheret_bit" is "1" indicating that the snapshot of the metadata description has not been modified and that the data block of the metadata description is shared with the subsequent version of the snapshot with which the inheritance relationship exists. "BlkNo" in the description block metadata schematic shown in FIG. 2 indicates where the snapshot of the metadata description is located. For example, "BlkNo" is "31", indicating that the data of the snapshot described by the metadata is at the data block "31". It should be noted that, the setting manner of the sharing identification bit shown in fig. 2 is only an alternative implementation manner of the embodiment of the present disclosure, and in practical application, the sharing identification bit may be set for metadata in any manner. For example: a bitmap of shared identification bits, one for each metadata, may be set separately.
Step 104: and judging whether the second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata.
Step 106: if not, constructing a sharing relation of the data between the first snapshot described by the first metadata and the second snapshot at the target end.
Step 108: and if so, migrating the data of the first snapshot described by the first metadata to the target end.
Therefore, the method provided by the embodiment of the specification enables the snapshots of the multiple versions to share the data at the target end under the condition of no modification by sharing the identification bits, does not need to repeatedly migrate the same data, reduces the migrated data volume and the storage resource occupation of the target end, reduces the complexity of mutual exclusion between data modification and shared relation construction, and effectively improves the migration efficiency of the snapshots.
In one or more embodiments of the present disclosure, to facilitate searching for a sharing identifier of a snapshot metadata of a later version, when creating a snapshot, a snapshot version chain is further generated or updated, and metadata of the snapshot of the later version having an inheritance relationship with the snapshot version chain and its sharing identifier are searched for through the snapshot version chain. The snapshot version chain is shown in fig. 3a, and each link point corresponds to each snapshot version one by one and points to the metadata string corresponding to the snapshot version. Wherein, the ranks of the metadata with inheritance relation in the metadata strings pointed by the respective chain nodes are the same. Therefore, according to the snapshot version chain provided by the embodiment, when a first snapshot of a first metadata description needs to be migrated from a source end to a target end and a second snapshot of a second metadata description has been migrated to the target end, the second metadata can be found out from the snapshot version chain according to the arrangement of the first metadata in the snapshot version chain; and obtaining the sharing identification bit of the second metadata according to the searched second metadata. According to the embodiment, the sharing identification bit of the snapshot metadata of the later version can be quickly searched according to the snapshot version chain, so that the migration efficiency of the snapshot is further improved.
For example, as shown in fig. 3a, "snap100", "snap101", "snap102", "RW" respectively represent snapshot versions of each of the respective chain nodes, the snapshot versions being incremented by the sequence numbers from early to late at the version creation time, the larger the sequence number, the later the snapshot version. For example, "RW" may represent a writable version, and the remaining "Snap …" represent a read-only version. "Meta Data" corresponds to each metadata in the metadata string. Assuming that the first metadata of the first snapshot is located at the fourth location of the metadata string of the read-only version "snap102", i.e. at 302 as shown in fig. 3a, then the second metadata of the second snapshot is located at the fourth location of the metadata string pointed to by the writable version "RW", i.e. at 304 as shown in fig. 3a, according to the organization of the snapshot version chain.
In one or more embodiments of the present description, the sharing identification bit may be set for metadata accordingly when a snapshot is created by copying the metadata. It can be understood that the metadata of the snapshot of one version can realize the creation of the snapshot of the later version by copying the metadata of the snapshot of the later version, the snapshot creation time is short, and the data copy of the snapshot is not needed. For example, in one or more embodiments of the present description, a snapshot of a second version may be created by copying metadata of the snapshot of the second version from metadata of the snapshot of the first version. It will be appreciated that in the embodiments of the present disclosure, the first metadata belongs to any one of the metadata in the first version, and the second metadata belongs to metadata inherited by the first metadata in the second version. Setting sharing identification bits for each metadata of the second version respectively; initializing the record of the shared identification bit as a snapshot of the second version is unmodified. By the embodiment, the sharing identification bit can be correspondingly set when the snapshot is created, so that whether the second snapshot is modified or not can be recorded in time, and errors caused by constructing sharing under the condition that data are modified are avoided.
For example, in connection with the snapshot version chain shown in FIG. 3a, a snapshot "snap103" in the snapshot version chain schematic shown in FIG. 3b may be created by: and the new link node copies the metadata string pointed by the RW and stores the metadata string pointed by the new link node, sets the sharing identification bit ' Inheret_bit ' in each metadata in the metadata string pointed by the new link node as ' 1 ', updates the metadata string pointed by the RW as the metadata of the snap103 ', and identifies the new link node as the RW. After the new snapshot is created, the writable version 'RW' and the read-only version 'snap 103' share all data blocks, and a sharing identification bit 'index_bit' of each metadata used for describing the position of the data block in the 'RW' version is 1, which indicates that the snapshot is inherited from the 'snap 103' version.
Next, the updating of the shared flag record after creating the snapshot will be described in detail. In one or more embodiments of the present disclosure, where the second version is a writable version, write access to a third snapshot of the second version is received; searching a sharing identification bit of third metadata of a third snapshot of the second version; judging whether a third snapshot described by the third metadata is modified or not according to the sharing identification bit of the third metadata; if the third snapshot is not modified, newly allocating data resources to complete write access to the third snapshot and updating the record of the shared identification bit to be modified by the third snapshot; and if the third snapshot is modified, directly performing write access on the data resource of the third snapshot. It is to be appreciated that the third snapshot may be any snapshot in the second version, for example, the second snapshot described in the embodiments of the present specification. By the embodiment, the information of the sharing identification bit can be updated in time, for example, when the data of the third snapshot is changed, the third snapshot is updated in time in the sharing identification bit, and errors caused by constructing sharing under the condition that the data is modified are avoided.
The process of newly allocating data resources to complete Write access to the third snapshot in the above embodiment is described in detail below in conjunction with two modes, namely, redirect On Write (ROW) and Copy On Write (COW), which are commonly adopted by file system snapshots:
in the ROW mode, as shown in the ROW write data schematic diagram in fig. 4a, when data needs to be written, (1) writing new write data into newly allocated data resources such as newly allocated data blocks, (2) updating data location information such as data block numbers in metadata of a third snapshot targeted by write access into location information of the newly allocated data resources, thereby ensuring that data of a snapshot of a read-only version is not modified.
For example: assuming that the data block number of the third snapshot for which the write access is directed is "31", the data block "AA" is newly allocated. And writing the newly written data into a data block 'AA', updating the data block number in the metadata of the third snapshot into 'AA', and reserving a data block number '31' in the metadata of the corresponding snapshot of the read-only version, so that the data block '31' can be used by the snapshot of the read-only version.
In the COW mode, as shown in fig. 4b, when writing data, (1) copying the data of the third snapshot to the newly allocated data resource (such as the newly allocated data block), (2) updating the original position information in the metadata of the corresponding snapshot of the read-only version to the position information of the newly allocated data resource, and (3) writing the newly written data into the original data resource of the third snapshot, thereby ensuring that the snapshot data of the read-only version is not modified.
For example: assuming that the data block number of the third snapshot for which the write access is directed is "31", the data block "AA" is newly allocated. Unlike the ROW method, in the COW method, data in the original data block "31" of the third snapshot is copied to the data block "AA", the data block number in the snapshot corresponding to the read-only version of the third snapshot is updated from "31" to "AA", and the newly written data is written into the data block "31". Since the data block "31" may be used by a plurality of read-only snapshots before being modified, when the data block number in the metadata of the snapshot of the corresponding read-only version of the third snapshot is updated from "31" to "AA", the data block number in the metadata of the corresponding plurality of read-only snapshots needs to be updated from "31" to "AA".
It should be noted that, the method used in snapshot migration provided in the embodiments of the present disclosure may be applied to any storage system supporting copies, for snapshot migration between the copies. For example, the method used in snapshot migration provided in the embodiments of the present disclosure may be applied to migration of a snapshot of a file system. A file system snapshot is a mirror image of the consistent data of the retained file system at a certain point in time. In the distributed file system, the availability of the system can be ensured by adopting a multi-copy mode, and the snapshot among the copies is consistent. For example, referring to the multi-copy snapshot metadata structure diagram shown in FIG. 5, when copy 501 is corrupted, snapshots can be migrated from other copies, such as copy 503, to newly joined target copy 505, thereby preserving the number of copies. In addition, when the problem of uneven load and the like occurs, the copy can be migrated to another node. To ensure multi-copy data consistency, data writing is considered successful when more than half of the copies are written successfully.
In order to enable the system to stably provide data write access, in one or more embodiments of the present disclosure, a snapshot of a writable version is preferentially migrated to a target, then a snapshot of a previous read-only version of the writable version is migrated to the target, then a snapshot of a previous read-only version is migrated to the target one by one, and so on, and migration of the version by one is performed until all read-only snapshots of the copy are migrated. In the version-by-version migration process, the metadata and the sharing identification bit need to be updated and maintained. For example, if the source terminal and the target terminal are required to judge the sharing identification bit, the metadata of the source terminal and the metadata of the target terminal are required to be kept consistent, and if the target terminal is required to judge the sharing identification bit, the metadata of the target terminal and the sharing identification bit are required to be updated and maintained.
Specifically, the method provided in the embodiment of the present specification may further include: preferentially migrating the snapshot of the writable version relative to the snapshot of the read-only version; the snapshot of the writable version is a snapshot of the last version from the early to the late according to the version creation time in the snapshots of a plurality of versions; the first snapshot is a read-only version snapshot of the plurality of versions of snapshots; the migration sequence of the snapshots of the multiple versions is as follows: migration occurs from late to early as version creation time.
In the embodiment, when the writable version is migrated to the target end or is being migrated, the data write request can be received, and the data can be modified, so that the copy number of the writable version can be preferentially ensured, the system can stably provide data write access, and when the snapshot to be migrated currently shares the same data with the snapshot of the later version, the snapshot to be migrated can be migrated through the sharing relation construction, thereby reducing the data quantity of the migration and the storage resource occupation of the target end.
In one or more embodiments of the present description, the migration process of the snapshot of the writable version may include, for example: for the snapshot of the writable version, judging whether the target end has the data block of the snapshot or not one by one; if the target end has the data block of the snapshot and the sharing identification bit of the metadata of the snapshot records that the snapshot is modified, the snapshot does not need to migrate the data; if the target end has the data block of the snapshot and the sharing identification bit of the metadata of the snapshot records that the snapshot is unmodified, the snapshot is successfully migrated without repeated migration; if the target does not have the data block of the snapshot, the target allocates a new data block, and the data of the snapshot is migrated from the source to the newly allocated data block of the target.
In the following, in one or more embodiments of the present disclosure, several migration manners of the snapshot of the read-only version are respectively illustrated:
for example, referring to fig. 6, a schematic message interaction diagram between a source peer and a destination peer according to an embodiment of the present disclosure is shown. The method provided by the embodiment can be applied to a source end and can be used for migrating any read-only version snapshot. The second snapshot may be a writable version of the snapshot or a read-only version of the snapshot. As shown in fig. 6, the method includes: steps 602 through 614.
Step 602: and under the condition that the second snapshot of the second metadata description is migrated to the target end, the source end searches the sharing identification bit of the second metadata.
Step 604: and the source terminal judges whether the second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata.
Step 606: and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end.
Step 608: and the target end responds to the received request to acquire the sharing identification bit of the second metadata and judges whether the second snapshot described by the second metadata is modified or not.
Step 610: if not, the target end builds the sharing relation of the data between the first snapshot and the second snapshot according to the request.
Step 612: if so, the target end sends a request for retransmitting the data of the first snapshot to the source end.
Step 614: if the source determines in step 604 that the shared identification bit records a request for retransmission that has been modified or received from the target, then the data of the first snapshot described by the first metadata is directly migrated to the target.
In this embodiment, the source end performs initial judgment on the shared identification bit and then the target end performs continuous judgment, so that the data of the first snapshot can be directly migrated to the target end when the source end judges that the shared identification bit records the modified shared identification bit, the interaction of messages between the source end and the target end is reduced, migration is completed as soon as possible, and migration efficiency is improved.
For another example, referring to fig. 7, a schematic diagram of message interaction between a source peer and a destination peer according to another embodiment of the present disclosure is provided. The method provided by this embodiment can be applied to the source end. The first snapshot is a read-only version snapshot and the second snapshot is a read-only version snapshot. As shown in fig. 7, the method includes: steps 702 to 710.
Step 702: and under the condition that the second snapshot of the second metadata description is migrated to the target end, the source end searches the sharing identification bit of the second metadata.
Step 704: and the source terminal judges whether the second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata.
Step 706: and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end.
Step 708: the target end responds to the received request to construct a sharing relation of the data between the first snapshot and the second snapshot.
Step 710: if the source determines in step 704 that the shared identification bit records that it has been modified, then the data of the first snapshot described by the first metadata is directly migrated to the target.
In this embodiment, since the second snapshot is a read-only snapshot, the second snapshot is not modified after the source end sends a request for building the sharing relationship, and the target end does not need to judge again, and can directly build the sharing relationship on the target end according to the request for building the sharing relationship, thereby completing migration as soon as possible and improving migration efficiency.
For another example, referring to fig. 8, a schematic message interaction diagram of a source peer and a destination peer according to another embodiment of the present disclosure is provided. The method provided by the embodiment can be applied to the target end, and the second snapshot can be a snapshot of a read-only version or a snapshot of a writable version. As shown in fig. 8, the method includes:
step 802: and under the condition that the second snapshot described by the second metadata is migrated to the target end, the source end sends a migration request of the first snapshot to the target end.
Step 804: and the target end responds to the received migration request and searches the sharing identification bit of the second metadata.
Step 806: and the target terminal judges whether the second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata.
Step 808: if not, the target end builds a sharing relation of the data between the first snapshot and the second snapshot.
Step 810: if so, the target end sends a request for retransmitting the data of the first snapshot to the source end.
Step 812: and if the source terminal receives a retransmission request from the target terminal, migrating the data of the first snapshot described by the first metadata to the target terminal.
In this embodiment, the source end is responsible for sending the migration request, and the target end determines the shared identifier bit, so that the processing steps of the source end are reduced.
It can be appreciated that each embodiment of the foregoing migration process for the snapshot of the read-only version can improve migration efficiency to a certain extent, and specifically, the foregoing embodiment of the present disclosure may be implemented by selecting a corresponding manner according to a scene requirement, which is not limited to this embodiment.
Corresponding to the above method embodiments, the present disclosure further provides an embodiment of an apparatus for use in snapshot migration, and fig. 9 shows a schematic structural diagram of an apparatus for use in snapshot migration provided in one embodiment of the present disclosure. As shown in fig. 9, the apparatus includes: an identification bit lookup module 902, an identification bit determination module 904, a sharing construction module 906, and a data migration module 908.
The identifier bit searching module 902 may be configured to find out a shared identifier bit of the second metadata if the second snapshot described by the second metadata has been migrated to the target end; the second metadata is metadata of a snapshot having an inheritance relationship with the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not.
The flag judging module 904 may be configured to judge whether the second snapshot described by the second metadata has been modified according to the shared flag that the second metadata has.
The sharing construction module 906 may be configured to construct a sharing relationship between the first snapshot and the second snapshot of the first metadata description at the target end if the identification bit determination module 904 determines that the first snapshot is unmodified.
The data migration module 908 may be configured to migrate the data of the first snapshot described by the first metadata to the target side if the identification bit determination module 904 determines that the data has been modified.
Therefore, the device provided by the embodiment of the specification enables the snapshots of the multiple versions to share the data at the target end under the condition of no modification by sharing the identification bits, does not need to repeatedly migrate the same data, reduces the migrated data volume and the storage resource occupation of the target end, reduces the complexity of mutual exclusion between data modification and shared relation construction, and effectively improves the migration efficiency of the snapshots.
In one or more embodiments of the present disclosure, the apparatus may be configured at a source. The first snapshot is a read-only version of the snapshot. The sharing construction module 906 may be configured to send, if the identification bit determination module 904 determines that the request is not modified, a request for constructing a sharing relationship between the first snapshot and the second snapshot to the target end, so that the target end obtains, in response to receiving the request, a sharing identification bit of the second metadata, determines whether the second snapshot described by the second metadata has been modified, if not, the target end constructs, according to the request, the sharing relationship between the first snapshot and the second snapshot, and if so, the target end sends, to the source end, a request for retransmitting the data of the first snapshot.
In this embodiment, the source end performs initial judgment on the shared identification bit and then the target end performs continuous judgment, so that the data of the first snapshot can be directly migrated to the target end when the source end judges that the shared identification bit records the modified shared identification bit, the interaction of messages between the source end and the target end is reduced, migration is completed as soon as possible, and migration efficiency is improved.
In another or more embodiments of the present disclosure, the apparatus may be configured at a source. The first snapshot is a read-only version snapshot and the second snapshot is a read-only version snapshot. The sharing construction module 906 may be configured to send a request to the target terminal to construct a sharing relationship between the first snapshot and the second snapshot if the identification bit determination module 904 determines that the data is unmodified, so that the target terminal constructs the sharing relationship between the first snapshot and the second snapshot in response to receiving the request.
In this embodiment, since the second snapshot is a read-only snapshot, the second snapshot is not modified after the source end sends a request for building the sharing relationship, and the target end does not need to judge again, and can directly build the sharing relationship on the target end according to the request for building the sharing relationship, thereby completing migration as soon as possible and improving migration efficiency.
In yet another or more embodiments of the present disclosure, the apparatus may be configured at a target end. The data migration module 908 may be configured to send a request to the source to retransmit the data of the first snapshot if the identification bit determination module 904 determines that it has been modified, so that the source migrates the data of the first snapshot described by the first metadata to the target in response to receiving the request.
In this embodiment, the source end is responsible for sending the migration request, and the target end determines the shared identifier bit, so that the processing steps of the source end are reduced.
It can be appreciated that each embodiment of the foregoing migration process for the snapshot of the read-only version can improve migration efficiency to a certain extent, and specifically, the foregoing embodiment of the present disclosure may be implemented by selecting a corresponding manner according to a scene requirement, which is not limited to this embodiment.
In one or more embodiments of the present description, the sharing identification bit may be set for metadata accordingly when a snapshot is created by copying the metadata. It can be understood that the metadata of the snapshot of one version can realize the creation of the snapshot of the later version by copying the metadata of the snapshot of the later version, the snapshot creation time is short, and the data copy of the snapshot is not needed. For example, fig. 10 shows a schematic structural diagram of an apparatus for use in snapshot migration according to another embodiment of the present disclosure. As shown in fig. 10, the apparatus may further include: a snapshot creation module 910, an identification bit setting module 912, and an identification bit initialization module 914.
The snapshot creation module 910 may be configured to create a second version of the snapshot by copying metadata of the second version of the snapshot from metadata of the first version of the snapshot; wherein the first metadata belongs to any one of the metadata of the first version, and the second metadata belongs to metadata inherited by the first metadata in the second version.
The identification bit setting module 912 may be configured to set a shared identification bit for each metadata of the second version, respectively.
The identification bit initialization module 914 may be configured to initialize the record of the shared identification bit as a snapshot of the second version unmodified.
By the embodiment, the sharing identification bit can be correspondingly set when the snapshot is created, so that whether the second snapshot is modified or not can be recorded in time, and errors caused by constructing sharing under the condition that data are modified are avoided.
Next, the updating of the shared flag record after creating the snapshot will be described in detail. For example, in one or more embodiments of the present disclosure, as shown in fig. 10, the apparatus may further include: a write access receiving module 916, a write access lookup module 918, a write access judging module 920, a resource allocation module 922, and a write access executing module 924.
The write access receiving module 916 may be configured to receive a write access to a third snapshot of the second version if the second version is a writable version.
The write access lookup module 918 may be configured to find the shared identification bit of the third metadata of the third snapshot of the second version.
The write access determination module 920 may be configured to determine whether the third snapshot described by the third metadata has been modified according to the shared identification bit of the third metadata.
The resource allocation module 922 may be configured to, if the write access determination module determines that the third snapshot is unmodified, newly allocate data resources to complete write access to the third snapshot and update the record of the shared identification bit to the third snapshot modified.
The write access execution module 924 may be configured to directly write access to the data resource of the third snapshot if the write access determination module determines that the third snapshot has been modified.
By the embodiment, the information of the sharing identification bit can be updated in time, for example, when the data of the third snapshot is changed, the third snapshot is updated in time in the sharing identification bit, and errors caused by constructing sharing under the condition that the data is modified are avoided.
In order to enable the system to stably provide data write access, in one or more embodiments of the present disclosure, a snapshot of a writable version is preferentially migrated to a target, then a snapshot of a previous read-only version of the writable version is migrated to the target, then a snapshot of a previous read-only version is migrated to the target one by one, and so on, and migration of the version by one is performed until all read-only snapshots are migrated. For example, in one or more embodiments of the present disclosure, as shown in fig. 10, the apparatus may further include: the writable snapshot migration module 926 may be configured to preferentially migrate snapshots of a writable version over snapshots of a read-only version. The snapshot of the writable version is a snapshot of the last version from the early to the late according to the version creation time in the snapshots of a plurality of versions; the first snapshot is a read-only version of the plurality of versions of snapshots. The migration sequence of the snapshots of the multiple versions is as follows: migration occurs from late to early as version creation time.
In the embodiment, when the writable version is migrated to the target end or is being migrated, the data write request can be received, and the data can be modified, so that the copy number of the writable version can be preferentially ensured, the system can stably provide data write access, and when the snapshot to be migrated currently shares the same data with the snapshot of the later version, the snapshot to be migrated can be migrated through the sharing relation construction, thereby reducing the data quantity of the migration and the storage resource occupation of the target end.
In one or more embodiments of the present disclosure, as shown in fig. 10, the apparatus may further include: version chain processing module 928 may be configured to generate or update a snapshot version chain when creating a snapshot, where each link point in the snapshot version chain corresponds to each snapshot version one by one and points to a metadata string of the corresponding snapshot version, and where any two metadata with inheritance relationships have the same rank in the metadata string pointed to by the respective link node. Accordingly, the identification bit lookup module 902 may include: metadata lookup sub-module 9022 and identification bit lookup sub-module 9024.
The metadata searching submodule 9022 may be configured to, when a first snapshot of a first metadata description needs to be migrated from a source end to a target end and a second snapshot of a second metadata description has been migrated to the target end, search the second metadata in the snapshot version chain according to a rank of the first metadata in the snapshot version chain.
The identification bit searching submodule 9024 may be configured to obtain the shared identification bit of the second metadata according to the searched second metadata.
According to the embodiment, the sharing identification bit of the snapshot metadata of the later version can be quickly searched according to the snapshot version chain, so that the migration efficiency of the snapshot is further improved.
The above is a schematic scheme of an apparatus used in migration of the present embodiment. It should be noted that, the technical solution of the apparatus used in the migration and the technical solution of the method used in the migration described above belong to the same concept, and details of the technical solution of the apparatus used in the migration not described in detail may be referred to the description of the technical solution of the method used in the migration described above.
Fig. 11 illustrates a block diagram of a computing device 1100 provided according to one embodiment of the present description. The components of computing device 1100 include, but are not limited to, a memory 1110 and a processor 1120. Processor 1120 is coupled to memory 1110 via bus 1130, and database 1150 is used to hold data.
The computing device 1100 also includes an access device 1140, the access device 1140 enabling the computing device 1100 to communicate via one or more networks 1160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 1140 may comprise one or more of any type of network interface, wired or wireless (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above components of computing device 1100, as well as other components not shown in FIG. 11, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 11 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 1100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 1100 may also be a mobile or stationary server.
Wherein the processor 1120 may be configured to execute computer-executable instructions to implement the steps of the method for use in snapshot migration as described in any of the embodiments above. Specific steps may refer to the descriptions in the foregoing method embodiments, and are not repeated here.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the method used in snapshot migration described above belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the method used in snapshot migration described above.
An embodiment of the present disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, perform the steps of a method for use in snapshot migration as in any one of the embodiments above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the method used in snapshot migration described above belong to the same concept, and details of the technical solution of the storage medium that are not described in detail may be referred to the description of the technical solution of the method used in snapshot migration described above.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the embodiments are not limited by the order of actions described, as some steps may be performed in other order or simultaneously according to the embodiments of the present disclosure. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the embodiments described in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the teaching of the embodiments. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (15)

1. A method for use in snapshot migration, comprising:
under the condition that a second snapshot of the second metadata description is migrated to a target end, searching a sharing identification bit of the second metadata;
the second metadata is metadata of a snapshot with inheritance relation with a snapshot described by the first metadata, the snapshot described by the second metadata is inherited from the snapshot described by the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not;
Judging whether a second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata;
if not, constructing a sharing relation of the first snapshot described by the first metadata and the second snapshot on the target side;
and if so, migrating the data of the first snapshot described by the first metadata to the target end.
2. The method of claim 1, the method being applied to a source, the first snapshot being a read-only version of the snapshot;
if not, constructing a sharing relationship of the data between the first snapshot and the second snapshot of the first metadata description at the target end includes:
and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end, so that the target end responds to the received request to acquire the sharing identification bit of the second metadata, judging whether the second snapshot described by the second metadata is modified or not, if not, constructing the sharing relation of the data between the first snapshot and the second snapshot according to the request by the target end, and if so, sending a request for retransmitting the data of the first snapshot to the source end by the target end.
3. The method of claim 1, applied to a source, wherein the first snapshot is a read-only version of the snapshot and the second snapshot is a read-only version of the snapshot;
if not, constructing a sharing relationship of the data between the first snapshot and the second snapshot of the first metadata description at the target end includes:
and if not, sending a request for constructing the sharing relation of the data between the first snapshot and the second snapshot to the target end, so that the target end responds to the received request to construct the sharing relation of the data between the first snapshot and the second snapshot.
4. The method of claim 1, applied to a target;
the migrating the data of the first snapshot of the first metadata description to the target side if modified includes:
and if so, sending a request for retransmitting the data of the first snapshot to a source end so that the source end can migrate the data of the first snapshot described by the first metadata to the target end in response to receiving the request.
5. The method of claim 1, further comprising, prior to the locating the shared identification bit that the second metadata has:
Creating a snapshot of the second version by copying metadata of the snapshot of the second version from metadata of the snapshot of the first version;
wherein the first metadata belongs to any one of metadata of a first version, and the second metadata belongs to metadata inherited by the first metadata in a second version;
setting sharing identification bits for each metadata of the second version respectively;
initializing the record of the shared identification bit as a snapshot of the second version is unmodified.
6. The method of claim 5, the method further comprising:
receiving a write access to a third snapshot of the second version if the second version is a writable version;
searching a sharing identification bit of third metadata of a third snapshot of the second version;
judging whether a third snapshot described by the third metadata is modified or not according to the sharing identification bit of the third metadata;
if the third snapshot is not modified, newly allocating data resources to complete write access to the third snapshot and updating the record of the shared identification bit to be modified by the third snapshot;
and if the third snapshot is modified, directly performing write access on the data resource of the third snapshot.
7. The method of claim 1, further comprising:
preferentially migrating the snapshot of the writable version relative to the snapshot of the read-only version;
the snapshot of the writable version is a snapshot of the last version from the early to the late according to the version creation time in the snapshots of a plurality of versions;
the first snapshot is a read-only version snapshot of the plurality of versions of snapshots;
the migration sequence of the snapshots of the multiple versions is as follows: migration occurs from late to early as version creation time.
8. The method of claim 1, further comprising:
when creating a snapshot, generating or updating a snapshot version chain, wherein each link point in the snapshot version chain corresponds to each snapshot version one by one and points to a metadata string of the corresponding snapshot version, and the ranks of any two metadata with inheritance relations in the metadata strings pointed by the respective link points are the same;
and under the condition that the second snapshot described by the second metadata is migrated to the target end, searching the sharing identification bit of the second metadata comprises the following steps:
when a first snapshot of a first metadata description needs to be migrated from a source end to a target end and a second snapshot of a second metadata description is migrated to the target end, searching the second metadata in the snapshot version chain according to the arrangement of the first metadata in the snapshot version chain;
And obtaining the sharing identification bit of the second metadata according to the searched second metadata.
9. An apparatus for use in snapshot migration, comprising:
the identification bit searching module is configured to find out the sharing identification bit of the second metadata under the condition that the second snapshot described by the second metadata is migrated to the target end; the second metadata is metadata of a snapshot with inheritance relation with a snapshot described by the first metadata, the snapshot described by the second metadata is inherited from the snapshot described by the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not;
the identification bit judging module is configured to judge whether the second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata;
the sharing construction module is configured to construct a sharing relation of data between the first snapshot and the second snapshot described by the first metadata at the target end if the identification bit judging module judges that the first snapshot is unmodified;
and the data migration module is configured to migrate the data of the first snapshot described by the first metadata to the target end if the identification bit judgment module judges that the data is modified.
10. The apparatus of claim 9, the apparatus configured at a source, the first snapshot being a read-only version of the snapshot;
the sharing construction module is configured to send a request for constructing a sharing relation between the first snapshot and the second snapshot to the target end if the identification bit judgment module judges that the second snapshot is unmodified, so that the target end can acquire the sharing identification bit of the second metadata in response to receiving the request, judge whether the second snapshot described by the second metadata is modified or not, if not, the target end constructs the sharing relation between the first snapshot and the second snapshot according to the request, and if so, the target end sends a request for retransmitting the data of the first snapshot to the source end.
11. The apparatus of claim 9, the apparatus configured at a source, the first snapshot being a read-only version of the snapshot, the second snapshot being a read-only version of the snapshot;
the sharing construction module is configured to send a request for constructing a sharing relation of data between the first snapshot and the second snapshot to the target end if the identification bit judging module judges that the identification bit judging module is unmodified, so that the target end responds to the request to construct the sharing relation of data between the first snapshot and the second snapshot.
12. The apparatus of claim 9, the apparatus being configured at a target end;
the data migration module is configured to send a request for retransmitting the data of the first snapshot to a source end if the identification bit judging module judges that the data is modified, so that the source end migrates the data of the first snapshot described by the first metadata to the target end in response to receiving the request.
13. The apparatus of claim 9, further comprising:
a snapshot creation module configured to create a snapshot of a second version by copying metadata of the snapshot of the second version from metadata of the snapshot of the first version; wherein the first metadata belongs to any one of metadata of a first version, and the second metadata belongs to metadata inherited by the first metadata in a second version;
the identification bit setting module is configured to set sharing identification bits for each metadata of the second version respectively;
an identification bit initialization module configured to initialize a record of the shared identification bit as a snapshot of the second version unmodified;
a write access receiving module configured to receive a write access to a third snapshot of the second version if the second version is a writable version;
The write access searching module is configured to find out the sharing identification bit of the third metadata of the third snapshot of the second version;
the write access judging module is configured to judge whether the third snapshot described by the third metadata is modified according to the sharing identification bit of the third metadata;
a resource allocation module configured to, if the write access determination module determines that the third snapshot is unmodified, newly allocate data resources to complete write access to the third snapshot and update the record of the shared identification bit to be modified for the third snapshot;
and the write access executing module is configured to directly perform write access on the data resource of the third snapshot if the write access judging module judges that the third snapshot is modified.
14. A computing device, comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions:
under the condition that a second snapshot of the second metadata description is migrated to a target end, searching a sharing identification bit of the second metadata;
the second metadata is metadata of a snapshot with inheritance relation with a snapshot described by the first metadata, the snapshot described by the second metadata is inherited from the snapshot described by the first metadata, and the sharing identification bit is used for recording whether the second snapshot is modified or not;
Judging whether a second snapshot described by the second metadata is modified according to the sharing identification bit of the second metadata;
if not, constructing a sharing relation of the first snapshot described by the first metadata and the second snapshot on the target side;
and if so, migrating the data of the first snapshot described by the first metadata to the target end.
15. A computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the method for use in snapshot migration of any of claims 1 to 8.
CN202010238575.2A 2020-03-30 2020-03-30 Method and device used in snapshot migration Active CN113468103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010238575.2A CN113468103B (en) 2020-03-30 2020-03-30 Method and device used in snapshot migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010238575.2A CN113468103B (en) 2020-03-30 2020-03-30 Method and device used in snapshot migration

Publications (2)

Publication Number Publication Date
CN113468103A CN113468103A (en) 2021-10-01
CN113468103B true CN113468103B (en) 2024-03-08

Family

ID=77864987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010238575.2A Active CN113468103B (en) 2020-03-30 2020-03-30 Method and device used in snapshot migration

Country Status (1)

Country Link
CN (1) CN113468103B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140536A (en) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 Snapshot system supporting cascades snapshot and snapshot processing method thereof
CN104536852A (en) * 2014-12-31 2015-04-22 华为技术有限公司 Data recovery method and device
CN105868396A (en) * 2016-04-19 2016-08-17 上海交通大学 Multi-version control method of memory file system
CN110032541A (en) * 2019-04-12 2019-07-19 苏州浪潮智能科技有限公司 A kind of writeable snapshot implementing method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8799222B2 (en) * 2010-12-17 2014-08-05 Symantec Corporation Host based software block level replication using metadata indicating changed data objects at source and secondary nodes
US8601473B1 (en) * 2011-08-10 2013-12-03 Nutanix, Inc. Architecture for managing I/O and storage for a virtualization environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140536A (en) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 Snapshot system supporting cascades snapshot and snapshot processing method thereof
CN104536852A (en) * 2014-12-31 2015-04-22 华为技术有限公司 Data recovery method and device
CN105868396A (en) * 2016-04-19 2016-08-17 上海交通大学 Multi-version control method of memory file system
CN110032541A (en) * 2019-04-12 2019-07-19 苏州浪潮智能科技有限公司 A kind of writeable snapshot implementing method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种新的基于SAN的SNAPSHOT设计与实现;徐渐;舒继武;温冬婵;;小型微型计算机系统(06);全文 *
一种远程备份数据虚拟重构方法;张也;刘晓洁;邓健;;四川大学学报(自然科学版)(05);全文 *

Also Published As

Publication number Publication date
CN113468103A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN110018983B (en) Metadata query method and device
US9170892B2 (en) Server failure recovery
US11935015B2 (en) Data processing method and apparatus, computer device, and storage medium
US9678678B2 (en) Storage network data retrieval
US11080143B2 (en) Systems and processes for data backup and recovery
US20180089297A1 (en) Data Copy Method and Device
JP7469524B2 (en) Method, device, storage medium, and electronic device for migrating virtual machines between cloud platforms
CN109189327B (en) Compression processing method and device for block chain data
CN112099908A (en) Virtual machine live migration method and device and computer equipment
WO2021259188A1 (en) Method for routing read request, method for feeding back message and respective apparatuses, and database
CN113596010B (en) Data processing method, device, node equipment and computer storage medium
CN113468103B (en) Method and device used in snapshot migration
CN111752892B (en) Distributed file system and implementation method, management system, equipment and medium thereof
CN111722909A (en) Virtual machine migration method, system, equipment and storage medium
CN110119389B (en) Writing operation method of virtual machine block equipment, snapshot creation method and device
CN114415977B (en) Method for accessing storage pool and distributed storage system
CN109992447B (en) Data copying method, device and storage medium
CN113886350A (en) Data processing method and system
CN115509440A (en) Storage system and data processing method
CN112527561B (en) Data backup method and device based on Internet of things cloud storage
CN108874592B (en) Data cold standby method and system for Log-structured storage engine
CN113422739A (en) Data transmission method, sending end and data transmission system
CN114443598A (en) Data writing method and device, computer equipment and storage medium
US9880904B2 (en) Supporting multiple backup applications using a single change tracker
CN114363640B (en) Data storage method, device 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40063931

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant