WO2020029748A1 - Methods for snapshot management and difference bitmap generation in distributed storage system, and product - Google Patents

Methods for snapshot management and difference bitmap generation in distributed storage system, and product Download PDF

Info

Publication number
WO2020029748A1
WO2020029748A1 PCT/CN2019/095901 CN2019095901W WO2020029748A1 WO 2020029748 A1 WO2020029748 A1 WO 2020029748A1 CN 2019095901 W CN2019095901 W CN 2019095901W WO 2020029748 A1 WO2020029748 A1 WO 2020029748A1
Authority
WO
WIPO (PCT)
Prior art keywords
record
storage node
lun
snapshot
storage
Prior art date
Application number
PCT/CN2019/095901
Other languages
French (fr)
Chinese (zh)
Inventor
张航
张良翔
尹青云
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020029748A1 publication Critical patent/WO2020029748A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Definitions

  • the present invention relates to the field of distributed storage technology, and in particular, to a method and product for generating a management snapshot and a difference bitmap in a distributed storage system.
  • a distributed storage system usually adopts the architecture shown in FIG. 1A, including a storage node cluster.
  • the user controls the storage node cluster through the client, such as triggering the storage node cluster to create a snapshot for a logical unit number (LUN), create a difference bitmap, and perform read and write operations.
  • the backup storage system is used to back up the data of the LUNs in the storage node cluster.
  • the client triggers the storage node cluster to create a snapshot of the LUN, or the distributed storage system creates a snapshot of the LUN at a predetermined interval. For example, the first snapshot with version number 0 is created.
  • the backup storage system copies all the data of the LUNs in the storage node cluster. Therefore, all the data of the snapshot created this time is copied to the backup storage system. Later, you can use snapshots to back up the incremental data of the LUNs in the storage node cluster to the backup storage system.
  • the structure of a storage node cluster can be as shown in Figure 1B, including N storage nodes, where N is an integer greater than or equal to 2, and each storage node contains a hard disk.
  • Block modification tracking also called difference bitmap
  • a LUN is distributed across multiple storage nodes.
  • a distributed storage system contains multiple partitions, and a storage node provides storage space for multiple partitions.
  • LBA logical block address
  • a client accesses a logical block address (LBA) in a LUN, it first determines the partition where the LBA is located, and then queries the partition mapping table to determine the storage node corresponding to the partition. The client accesses the corresponding storage. node. The storage node provides storage space corresponding to the LBA.
  • LBA logical block address
  • a storage node provides storage space for multiple partitions
  • LBAs for multiple LUNs are distributed on the same partition.
  • the storage node when a snapshot operation is performed on a certain LUN, the storage node usually records the snapshot data on the storage node with partition as the granularity. For example, if partition A of storage node A contains LBAs with multiple LUNs, then storage node A records all snapshot data on partition A.
  • the distributed storage system needs to query all snapshot data of partition A recorded by storage node A to query the snapshot data of LBA distributed to partition A of storage node A.
  • the LBA of a LUN is distributed on multiple storage nodes. Therefore, the snapshot incremental data collection takes a long time in a distributed storage system scenario.
  • Embodiments of the present invention provide a management snapshot and a differential bitmap generation method and product in a distributed storage system, which are used to improve the acquisition efficiency of the differential bitmap.
  • an embodiment of the present invention provides a method for managing snapshots in a distributed storage system.
  • the distributed storage system includes N storage nodes, and the N storage nodes are configured to provide a first logical unit number LUN.
  • Storage space; the method includes:
  • the storage node Ni generates a first record; the first record is only used to record an update address corresponding to the logical address of the first LUN distributed at the storage node Ni at a first snapshot time; wherein the first LUN is distributed
  • the logical address of the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is each value from 1 to N;
  • the storage node Ni generates a second record, and the second record is only used to record an updated address corresponding to a logical address where the first LUN is distributed on the storage node Ni at a second snapshot time; wherein the first The snapshot time and the second snapshot time are adjacent snapshot times.
  • each record in the embodiment of the present invention separately records the logic corresponding to the data block in which the data changes when the data is written according to the received write input instruction between the current snapshot and the previous previous snapshot.
  • Address sequence For example, the second record records a logical address sequence corresponding to a data block in which data changes when the data is written according to the write input instruction between the first snapshot time and the second snapshot time.
  • the write input instruction usually carries the data to be written, the identifier of the LUN to be written, and the offset of the data block corresponding to the write address in the LUN to be written. Which storage node is it? After each snapshot, the storage node Ni generates an empty record for the first LUN.
  • the difference bitmap data is collected at the granularity of the storage node, and the storage node manages the records corresponding to the difference data according to the LUN granularity.
  • the client only needs to establish N connections with N storage nodes.
  • an embodiment of the present invention Compared to the prior art, which collects the difference bitmap with partition granularity, and the storage node manages the index corresponding to the difference data according to the partition granularity, an embodiment of the present invention
  • the number of communication connections between the client and the storage node cluster is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
  • the storage node Ni provides the client with the first record and the second record.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • an embodiment of the present invention provides a method for generating a difference bitmap in a distributed storage system, where the distributed storage system includes N storage nodes, and the N storage nodes are used for a first logical unit number.
  • LUN provides storage space;
  • the client obtains the first record and the second record from the storage node Ni; wherein the first record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the first snapshot time
  • the logical address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition
  • N is an integer not less than 2
  • i is 1 to Each value of N
  • the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first snapshot time and The second snapshot moment is an adjacent snapshot moment;
  • the client generates a different position of the first LUN on the storage node Ni according to the first record and the second record.
  • the client sends a first snapshot instruction to the storage node Ni at the first snapshot moment; the client sends the storage node Ni to the storage node Ni at the second snapshot moment Sending a second snapshot instruction; the first snapshot instruction and the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • an embodiment of the present invention provides a storage node in a distributed storage system, where the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for And providing storage space for a first logical unit number LUN, the storage node includes:
  • a first processing unit configured to generate a first record; the first record is only used to record an update address corresponding to a logical address of the first LUN distributed on the storage node at a first snapshot time; A logical address of a LUN distributed on the storage node and a logical address of a second LUN distributed on the storage node belong to the same partition, and N is an integer not less than 2;
  • a second processing unit configured to generate a second record, where the second record is only used to record an update address corresponding to a logical address where the first LUN is distributed on the storage node at a second snapshot moment;
  • a snapshot time and the second snapshot time are adjacent snapshot times.
  • the storage node further includes:
  • a providing unit is configured to provide the client with the first record and the second record.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • an embodiment of the present invention provides a client in a distributed storage system.
  • the distributed storage system includes N storage nodes, and the N storage nodes are configured to provide storage for a first logical unit number LUN.
  • Space; the client includes:
  • An obtaining unit configured to obtain a first record and a second record from the storage node Ni; wherein the first record is only used to record a logical address corresponding to the first LUN distributed on the storage node Ni at a first snapshot time
  • the updated address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i For each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first record The snapshot time and the second snapshot time are adjacent snapshot times;
  • a generating unit is configured to generate a difference position of the first LUN on the storage node Ni according to the first record and the second record.
  • the client further includes:
  • a sending unit configured to send a first snapshot instruction to the storage node Ni at the first snapshot time, and send a second snapshot instruction to the storage node Ni at the second snapshot time; the first snapshot instruction And the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • the difference bitmap data is collected at the granularity of the storage node, and the storage node manages the records corresponding to the difference data according to the LUN granularity.
  • the client only needs to establish N connections with N storage nodes.
  • embodiments of the present invention Compared to the prior art, which collects the difference bitmap with partition granularity, and the storage node manages the index corresponding to the difference data according to the partition granularity, embodiments of the present invention
  • the number of communication connections between the client and the storage node cluster is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
  • FIG. 1A is a schematic architecture diagram of a distributed system.
  • FIG. 1B is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap in the prior art.
  • FIG. 2 is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in the prior art and an embodiment of the present invention.
  • FIG. 4 is an interaction schematic diagram of a distributed system in an embodiment of the present invention.
  • FIG. 1A is a schematic architecture diagram of a distributed storage system. It includes a client 101, a storage node cluster 102, and a backup storage system 103.
  • the user controls the storage node cluster 102 through the client 101, such as triggering the storage node cluster 102 to create a snapshot of the LUN, create a difference bitmap, and perform read and write operations.
  • the backup storage system 103 is used to back up the data of the LUN in the storage node cluster 102.
  • the client 101 triggers the storage node cluster 102 to create a snapshot for the LUN. For example, a snapshot with version number 0 is created.
  • the backup storage system 103 backs up all the data of the LUN in the storage node cluster 102. All the data in the snapshot created this time is copied to the backup storage system 103. The snapshot can be used later. The user continues to trigger the storage node cluster 102 to create a snapshot for the LUN through the client 101. Each time the version number of the newly created snapshot is plus 1. By comparing the differences between two adjacent snapshots, a difference bitmap can be obtained. According to the difference bitmap, the difference data corresponding to the difference bitmap of the adjacent snapshots is transmitted to the backup storage system 103, and the backup storage system 103 receives the difference. Update data is written after the data.
  • FIG. 1B is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap in the prior art.
  • a storage node cluster may include N storage nodes, that is, storage node 1, storage node 2, storage node 3, ..., storage node N, where N is an integer greater than or equal to 2, and each storage node may It's a hard disk.
  • Each storage node includes 3 partitions.
  • storage node 1 includes partitions: partition 1, partition n + 1, and partition 2n + 1.
  • Storage node 2 includes: partition 2, partition n + 2, partition 2n + 2, and storage.
  • Node 3 includes: partition 3, partition n + 3, partition 2n + 3, and storage node N includes: partition n, partition 2n, and partition 3n.
  • the client needs to establish a communication connection with each partition in each storage node.
  • the client needs to communicate with the three partitions in storage node 1 (partition 1, partition n + 1.
  • the partition 2n + 1) establishes a communication connection to obtain the location of the data block where the LUN in the storage node 1 is updated.
  • the client needs to establish a communication connection with three partitions (partition 2, partition n + 2, and partition 2n + 2) in storage node 2 in order to obtain the location of the data block where the LUN in data storage node 2 has been updated.
  • the client needs to establish a communication connection with the three partitions (partition 3, partition n + 3, and partition 2n + 3) in the storage node 3 in order to obtain the location of the data block where the LUN in the storage node 3 is updated.
  • the client needs to establish a communication connection with the three partitions (partition n, partition 2n, and partition 3n) in the storage node N in order to obtain the location of the data block where the LUN in the storage node N is updated.
  • An embodiment of the present invention discloses a method for managing snapshots in a distributed storage system.
  • the distributed storage system includes N storage nodes, and the N storage nodes are configured to provide storage space for a first logical unit number LUN. ;
  • the storage node Ni generates a first record; the first record is only used to record an update address corresponding to the logical address of the first LUN distributed at the storage node Ni at a first snapshot time; wherein the first LUN distribution
  • N is an integer not less than 2
  • i is each value from 1 to N; that is: In one embodiment, i can be any integer value from 1 to N.
  • the storage node Ni generates a second record, and the second record is only used to record an updated address corresponding to a logical address where the first LUN is distributed on the storage node Ni at a second snapshot time; wherein the first The snapshot time and the second snapshot time are adjacent snapshot times. For example, if a snapshot operation is performed on the first LUN every 10 minutes, for example, a snapshot operation is performed on the first LUN at 22:00, and a snapshot operation is performed again on the first LUN at 22:10, then 22:00 and 22:10 are adjacent. Snapshot moments. A snapshot moment corresponds to a version number of the snapshot.
  • the update address corresponding to the logical address of the first LUN distributed on the storage node Ni is the position of the data block where the first LUN is distributed on the logical address of the storage node Ni to be updated.
  • the storage node Ni provides the client with the first record and the second record.
  • the first record and the second record may be a linked list or an array.
  • An embodiment of the present invention also discloses a method for generating a difference bitmap in a distributed storage system.
  • the distributed storage system includes N storage nodes, and the N storage nodes are configured to assign a first logical unit number LUN.
  • the method further includes: the client sends a first snapshot instruction to the storage node Ni at the first snapshot time; the client at the second snapshot time Sending a second snapshot instruction to the storage node Ni; the first snapshot instruction and the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  • the first record and the second record may be a linked list or an array.
  • FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in the prior art.
  • the specified logical unit for example, the logical unit identifier is 111.
  • the client first establishes a communication connection with the partition with the logical unit ID of 111 and the ID of 0.
  • the partition with the value of 0 starts to search. Through the search, two data in the partition are updated, and the corresponding storage block identifiers are 1 and 3.
  • the client needs to establish a communication connection with the partition identified by 50 first, and obtain the storage block corresponding to the update location in the partition by searching. Identified as 7, 9, and 10. Further, the client also needs to establish a communication connection with a partition with a logical unit ID of 111 in the storage node and a partition with an ID of 75 in the logical unit, and find the storage blocks corresponding to the update positions in the partition with the IDs 12 and 14.
  • the client also needs to establish a communication connection with the partition identified as 51200 in the logical unit identified by the logical node of the storage node as 111, and find that the storage block corresponding to the update position in the partition is identified as 1023997. It can be known from the foregoing description that, in the prior art, in order to obtain the position of the changed data in each storage node, communication connections with multiple partitions need to be established separately, which takes a long time.
  • FIG. 2 is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap provided by the present invention. From this figure, in order to obtain the difference bitmap, the client only needs to establish a connection with each storage node once.
  • the storage node cluster includes N storage nodes, that is, storage node 1, storage node 2, storage node 3, ..., storage node N, where N is an integer greater than or equal to 2, and each storage node A node can be a hard disk.
  • Each storage node includes 3 partitions.
  • storage node 1 includes partitions: partition 1, partition n + 1, and partition 2n + 1.
  • Storage node 2 includes: partition 2, partition n + 2, partition 2n + 2, and storage.
  • Node 3 includes: partition 3, partition n + 3, partition 2n + 3, and storage node N includes: partition n, partition 2n, and partition 3n.
  • the client In order to obtain the difference bitmap, the client only needs to establish a communication connection with each storage node, as shown in Figure 1B, the client only needs to establish a communication connection with storage node 1, and then the first LUN in storage node 1 can be obtained. The location of the data block for the data update.
  • the client only needs to establish a communication connection with the storage node 2 to obtain the position of the data block where the first LUN in the storage node 2 is updated.
  • the client only needs to establish a communication connection with the storage node 3 once to obtain the position of the data block where the first LUN in the storage node 3 is updated with data.
  • the client only needs to establish a communication connection with the storage node N to obtain the position of the data block where the first LUN in the storage node N is updated with data.
  • the right side of FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in an embodiment of the present invention.
  • the present invention in order to obtain a difference bitmap, the present invention only needs to establish the same storage node with each storage node separately.
  • the communication connection is sufficient. Specifically, by looking up the index corresponding to the logical unit identifier of 111 and two adjacent snapshots, it can be obtained that the data update position of the first LUN in the storage node is 1, 3, 7, 9 , 10, 12, 14, 1023998. It can be known from the foregoing description that in the embodiment of the present invention, the number of times that a client establishes a communication connection with each storage node is reduced, and the efficiency of obtaining a difference bitmap is improved.
  • FIG. 4 is an interaction schematic diagram of a distributed storage system in an embodiment of the present invention.
  • the distributed system includes: a client, a storage node cluster, and a backup storage system; wherein the storage node cluster includes N storage nodes, and M LUNs that can be identified by the client are provided on the N storage nodes.
  • N and M are integers, N ⁇ 2, and M ⁇ 1.
  • the interaction diagram shown in FIG. 4 includes the following steps:
  • the user sends a first trigger instruction to the client.
  • the first trigger instruction instructs the storage node cluster to create snapshots with version numbers V-1 for the M LUNs, respectively.
  • the client obtains a first trigger instruction.
  • the client sends a first trigger instruction to the storage node cluster.
  • the storage node cluster obtains a first trigger instruction, and creates a snapshot of version number V-1 for each of the M LUNs according to the first trigger instruction; the first trigger instruction instructs the storage node cluster to the M Create snapshots of version V-1 for each LUN.
  • Any one of the N storage nodes in the storage node cluster creates an index corresponding to the snapshot version number V for each of the M LUNs.
  • S406 user sends at least zero to the client user inputs a write command, the user writes a zero input at least any one of an instruction to write the user instruction input K comprising: a write data D k and D k of the data to be written
  • An input position P k the write position P k includes: a logical unit identifier LUN_idk ′ of the logical unit to be written to the data D k and a storage block corresponding to the write position P k in the to-be-written
  • the offset Y k in the logical unit; the idk ′ is an integer, and 1 ⁇ idk ′ ⁇ M.
  • the client obtains the at least zero user write input instructions.
  • the client sends the at least zero user write input instructions to the storage node cluster.
  • steps S408 and S409 are not performed, and no entry is added to the index.
  • the user sends a second trigger instruction to the client.
  • the second trigger instruction instructs the storage node cluster to create snapshots with version numbers V for the M LUNs, respectively.
  • the client obtains a second trigger instruction.
  • the client sends a second trigger instruction to the storage node cluster.
  • the storage node cluster obtains the second trigger instruction, and creates snapshots with version numbers V for the M LUNs according to the second trigger instruction.
  • the user sends a first instruction to the client.
  • the first instruction carries a LUN identifier LUN_id of a specified LUN and a snapshot version number V-1 and V of a snapshot created on the specified LUN; the first instruction instructs obtaining the snapshot version number of the specified LUN to be V-1 And a difference bitmap between two adjacent snapshots whose snapshot version number is V, the id and V are integers, V ⁇ 1, 1 ⁇ id ⁇ M.
  • the client obtains the first instruction.
  • the client establishes a communication connection with each of the N storage nodes.
  • the client searches for an index Liv corresponding to the specified LUN and the snapshot whose snapshot version number is V established by any storage node i of the N storage nodes; the index Liv records all The position information of each data updated between two adjacent snapshots is described, where i is an integer and 1 ⁇ i ⁇ N.
  • the client determines the difference bitmap according to an index set ⁇ L 1 v, L 2 v, ... L NV ⁇ .
  • the storage node cluster sends the differential data and the position of each differential data in the snapshot of the designated LUN with a snapshot version number of V to the backup storage system.
  • the position of the differential data and each differential data in the snapshot of the snapshot version number V of the specified LUN may be obtained by the storage node cluster from the client.
  • the backup storage system uses the received differential data and the position of each differential data in the snapshot of the snapshot version number V of the specified LUN to update.
  • the difference bitmap data is collected at the granularity of the storage node, the storage node manages the index corresponding to the difference data according to the LUN granularity, and the client collects the difference bitmap Only need to establish N connections with N storage nodes.
  • the client and the storage node cluster in the embodiment of the present invention
  • the number of communication connections is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
  • An embodiment of the present invention further provides a storage node in a distributed storage system, where the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for A logical unit number LUN provides storage space, and the storage node includes:
  • a first processing unit configured to generate a first record; the first record is only used to record an update address corresponding to a logical address of the first LUN distributed on the storage node at a first snapshot time; A logical address of a LUN distributed on the storage node and a logical address of a second LUN distributed on the storage node belong to the same partition, and N is an integer not less than 2;
  • a second processing unit configured to generate a second record, where the second record is only used to record an update address corresponding to a logical address where the first LUN is distributed on the storage node at a second snapshot moment;
  • a snapshot time and the second snapshot time are adjacent snapshot times.
  • the storage node further includes:
  • a providing unit is configured to provide the client with the first record and the second record.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • An embodiment of the present invention further provides a client in a distributed storage system, where the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN;
  • the clients include:
  • An obtaining unit configured to obtain a first record and a second record from the storage node Ni; wherein the first record is only used to record a logical address corresponding to the first LUN distributed on the storage node Ni at a first snapshot time
  • the updated address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i For each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first record The snapshot time and the second snapshot time are adjacent snapshot times;
  • a generating unit is configured to generate a difference position of the first LUN on the storage node Ni according to the first record and the second record.
  • the client further includes:
  • a sending unit configured to send a first snapshot instruction to the storage node Ni at the first snapshot time, and send a second snapshot instruction to the storage node Ni at the second snapshot time; the first snapshot instruction And the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  • the first record and the second record are both linked lists.
  • the first record and the second record are both an array.
  • An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the method includes a method for managing snapshots in any of the distributed storage systems described in the foregoing method embodiments. Some or all steps.
  • An embodiment of the present invention also provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the method includes generating a difference bitmap in any one of the distributed storage systems described in the foregoing method embodiments. Part or all of the steps of a method.
  • An embodiment of the present invention further provides an application program, where the application program is used to execute a method for managing snapshots in a distributed storage system according to an embodiment of the present invention at runtime.
  • An embodiment of the present invention further provides an application program, where the application program is used to execute a method for generating a difference bitmap in a distributed storage system according to an embodiment of the present invention at runtime.
  • the units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the storage node and the client may have a general computer structure, including a memory and a processor, the memory communicates with the processor, the memory includes computer instructions, and the processor executes the computer instructions in the memory, respectively. It is used to implement the functions of the storage node and the client in the embodiments of the present invention.
  • Each unit structure of the storage node and the client in the embodiment of the present invention may be implemented in hardware, such as a processor and a memory, or a software module, such as a computer instruction in the memory.
  • the embodiment of the present invention does not limit this.
  • Those of ordinary skill in the art may understand that all or part of the processes in the method of the foregoing embodiments are implemented.
  • the processes may be completed by a computer program instructing related hardware.
  • the program may be stored in a computer-readable storage medium.
  • the foregoing storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk, or an optical disk, which can store various program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed in embodiments of the present invention are methods for snapshot management and difference bitmap generation in a distributed storage system, and a product. The distributed storage system comprises N storage nodes. The N storage nodes are used for providing a storage space for a first logical unit number (LUN). The method for snapshot management comprises: a storage node Ni generates a first record; the first record is only used for recording an update address corresponding to a logical address of the first LUN distributed at the storage node Ni at a first snapshot moment; the logical address of the first LUN distributed at the storage node Ni and a logical address of a second LUN distributed at the storage node Ni belong to a same partition; the storage node Ni generates a second record; the second record is only used for recording the update address corresponding to the logical address of the first LUN distributed at the storage node Ni at the second snapshot moment; the first snapshot moment and the second snapshot moment are adjacent snapshot moments. The present invention can improve the obtaining efficiency of difference bitmaps.

Description

分布式存储系统中管理快照和差异位图生成方法和产品Method and product for generating management snapshot and difference bitmap in distributed storage system 技术领域Technical field
本发明涉及分布式存储技术领域,尤其涉及分布式存储系统中管理快照和差异位图生成方法和产品。The present invention relates to the field of distributed storage technology, and in particular, to a method and product for generating a management snapshot and a difference bitmap in a distributed storage system.
背景技术Background technique
分布式存储系统通常采用图1A所示架构,包括存储节点集群。用户通过客户端对存储节点集群进行控制,比如触发存储节点集群为逻辑单元号(logical unit number,LUN)创建快照、创建差异位图,执行读写操作等。备份存储系统用于备份存储节点集群中LUN的数据,备份存储系统与分布式存储系统首次同步时,客户端触发存储节点集群为LUN创建快照,或者分布式存储系统按照预定时间间隔为LUN创建快照,比如创建首个版本号为0的快照,备份存储系统对存储节点集群中LUN的全部数据进行复制,因此此次创建的快照的全部数据复制到备份存储系统。后面可以采用快照将存储节点集群中LUN的增量数据备份到备份存储系统。A distributed storage system usually adopts the architecture shown in FIG. 1A, including a storage node cluster. The user controls the storage node cluster through the client, such as triggering the storage node cluster to create a snapshot for a logical unit number (LUN), create a difference bitmap, and perform read and write operations. The backup storage system is used to back up the data of the LUNs in the storage node cluster. When the backup storage system is synchronized with the distributed storage system for the first time, the client triggers the storage node cluster to create a snapshot of the LUN, or the distributed storage system creates a snapshot of the LUN at a predetermined interval. For example, the first snapshot with version number 0 is created. The backup storage system copies all the data of the LUNs in the storage node cluster. Therefore, all the data of the snapshot created this time is copied to the backup storage system. Later, you can use snapshots to back up the incremental data of the LUNs in the storage node cluster to the backup storage system.
在分布式存储系统场景下,存储节点集群的结构可以如图1B所示,包括N个存储节点,N为大于或者等于2的整数,每个存储节点包含硬盘。In a distributed storage system scenario, the structure of a storage node cluster can be as shown in Figure 1B, including N storage nodes, where N is an integer greater than or equal to 2, and each storage node contains a hard disk.
块修改跟踪(changed block tracking,CBT)又称差异位图,是用来记录两个快照版本之间LUN数据增量。在分布式存储系统中,一个LUN会分布在多个存储节点上。分布式存储系统中包含多个分区,一个存储节点会为多个分区提供存储空间。在分布式存储系统中,客户端访问LUN中的逻辑块地址(logical block address,LBA),首先会确定LBA所在的分区,然后查询分区映射表确定分区对应的存储节点,客户端访问相应的存储节点。存储节点提供该LBA对应的存储空间。Block modification tracking (CBT), also called difference bitmap, is used to record the LUN data increment between two snapshot versions. In a distributed storage system, a LUN is distributed across multiple storage nodes. A distributed storage system contains multiple partitions, and a storage node provides storage space for multiple partitions. In a distributed storage system, when a client accesses a logical block address (LBA) in a LUN, it first determines the partition where the LBA is located, and then queries the partition mapping table to determine the storage node corresponding to the partition. The client accesses the corresponding storage. node. The storage node provides storage space corresponding to the LBA.
因为一个存储节点会为多个分区提供存储空间,多个LUN的LBA会分布在同一个分区上。在现有的分布式存储系统中,对某一个LUN进行快照操作,通常存储节点会以分区为粒度记录本存储节点上的快照数据。例如,存储节点A的分区A包含多个LUN的LBA,那么存储节点A就会记录分区A上所有的快照数据。分布式存储系统需要从存储节点A记录的分区A所有的快照数据中查询某一个LUN的LBA分布在存储节点A的分区A的快照数据。通常一个LUN的LBA又会分布在多个存储节点。因此,分布式存储系统场景下快照增量数据收集耗时长。Because a storage node provides storage space for multiple partitions, LBAs for multiple LUNs are distributed on the same partition. In the existing distributed storage system, when a snapshot operation is performed on a certain LUN, the storage node usually records the snapshot data on the storage node with partition as the granularity. For example, if partition A of storage node A contains LBAs with multiple LUNs, then storage node A records all snapshot data on partition A. The distributed storage system needs to query all snapshot data of partition A recorded by storage node A to query the snapshot data of LBA distributed to partition A of storage node A. Generally, the LBA of a LUN is distributed on multiple storage nodes. Therefore, the snapshot incremental data collection takes a long time in a distributed storage system scenario.
发明内容Summary of the invention
本发明实施例提供了一种分布式存储系统中管理快照和差异位图生成方法和产品,用于提高差异位图的获取效率。Embodiments of the present invention provide a management snapshot and a differential bitmap generation method and product in a distributed storage system, which are used to improve the acquisition efficiency of the differential bitmap.
第一方面,本发明实施例提供了一种分布式存储系统中管理快照的方法,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;所述方法包括:In a first aspect, an embodiment of the present invention provides a method for managing snapshots in a distributed storage system. The distributed storage system includes N storage nodes, and the N storage nodes are configured to provide a first logical unit number LUN. Storage space; the method includes:
存储节点Ni生成第一记录;所述第一记录只用于记录在第一快照时刻所述第一LUN 分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;The storage node Ni generates a first record; the first record is only used to record an update address corresponding to the logical address of the first LUN distributed at the storage node Ni at a first snapshot time; wherein the first LUN is distributed The logical address of the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is each value from 1 to N;
所述存储节点Ni生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。The storage node Ni generates a second record, and the second record is only used to record an updated address corresponding to a logical address where the first LUN is distributed on the storage node Ni at a second snapshot time; wherein the first The snapshot time and the second snapshot time are adjacent snapshot times.
需要说明的时,本发明实施例中的各条记录分别记录了当前快照和相邻的前一次快照之间,根据接收到的写输入指令写入数据时,数据发生变化的数据块对应的逻辑地址序列。比如,第二记录中记录了第一快照时刻和第二快照时刻之间根据写输入指令写入数据时,数据发生变化的数据块对应的逻辑地址序列。写输入指令通常携带待写入的数据、待写入的LUN标识、以及写入地址对应的数据块在待写入的LUN中的偏移量,根据偏移量可以确定写输入指令写入的是哪个存储节点。在每次快照后存储节点Ni为第一LUN生成一个空的记录,每当接收到对第一LUN进行操作的写输入指令,且写入位置位于存储节点Ni时,在记录中增加一条记录信息,用于记录写入位置,当有多个写输入指令对第一LUN执行写输入操作,且写入位置位于存储节点Ni时,在记录中相应地增加多条记录,记录写输入指令写入的地址。When it needs to be explained, each record in the embodiment of the present invention separately records the logic corresponding to the data block in which the data changes when the data is written according to the received write input instruction between the current snapshot and the previous previous snapshot. Address sequence. For example, the second record records a logical address sequence corresponding to a data block in which data changes when the data is written according to the write input instruction between the first snapshot time and the second snapshot time. The write input instruction usually carries the data to be written, the identifier of the LUN to be written, and the offset of the data block corresponding to the write address in the LUN to be written. Which storage node is it? After each snapshot, the storage node Ni generates an empty record for the first LUN. Whenever a write input instruction to operate the first LUN is received and the write position is located at the storage node Ni, a record information is added to the record. , Used to record the write position, when there are multiple write input instructions to perform a write input operation on the first LUN, and the write position is located at the storage node Ni, multiple records are added to the record accordingly, and the record write input instruction is written the address of.
采用本发明实施例提供的技术方案,在获取相邻两次快照间第一LUN的差异位图时,以存储节点粒度收集差异位图数据,存储节点按照LUN粒度管理差异数据对应的记录,在搜集差异位图时客户端只需要与N个存储节点建立N次连接,相对于现有技术以分区粒度搜集差异位图,存储节点按照分区粒度管理差异数据对应的索引来说,本发明实施例中客户端与存储节点集群建立通讯连接的次数减少了,提高了差异位图的获取效率,也有利于备份存储系统对存储节点集群中的数据进行及时备份。With the technical solution provided by the embodiment of the present invention, when obtaining the difference bitmap of the first LUN between two adjacent snapshots, the difference bitmap data is collected at the granularity of the storage node, and the storage node manages the records corresponding to the difference data according to the LUN granularity. When collecting the difference bitmap, the client only needs to establish N connections with N storage nodes. Compared to the prior art, which collects the difference bitmap with partition granularity, and the storage node manages the index corresponding to the difference data according to the partition granularity, an embodiment of the present invention The number of communication connections between the client and the storage node cluster is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
在本发明一些可能的实施方式中,存储节点Ni向客户端提供所述第一记录和所述第二记录。In some possible implementation manners of the present invention, the storage node Ni provides the client with the first record and the second record.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
第二方面,本发明实施例提供了一种分布式存储系统中生成差异位图的方法,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;In a second aspect, an embodiment of the present invention provides a method for generating a difference bitmap in a distributed storage system, where the distributed storage system includes N storage nodes, and the N storage nodes are used for a first logical unit number. LUN provides storage space;
客户端向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;The client obtains the first record and the second record from the storage node Ni; wherein the first record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the first snapshot time Wherein the logical address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is 1 to Each value of N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first snapshot time and The second snapshot moment is an adjacent snapshot moment;
所述客户端根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。The client generates a different position of the first LUN on the storage node Ni according to the first record and the second record.
在本发明一些可能的实施方式中,所述客户端在所述第一快照时刻向所述存储节点Ni 发送第一快照指令;所述客户端在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。In some possible implementation manners of the present invention, the client sends a first snapshot instruction to the storage node Ni at the first snapshot moment; the client sends the storage node Ni to the storage node Ni at the second snapshot moment Sending a second snapshot instruction; the first snapshot instruction and the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
第三方面,本发明实施例提供了一种分布式存储系统中的存储节点,所述存储节点为所述分布式存储系统包括的N个存储节点中的任意一个,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间,所述存储节点包括:In a third aspect, an embodiment of the present invention provides a storage node in a distributed storage system, where the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for And providing storage space for a first logical unit number LUN, the storage node includes:
第一处理单元,用于生成第一记录;所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点的逻辑地址与第二LUN分布在所述存储节点的逻辑地址属于相同的分区,N为不小于2的整数;A first processing unit, configured to generate a first record; the first record is only used to record an update address corresponding to a logical address of the first LUN distributed on the storage node at a first snapshot time; A logical address of a LUN distributed on the storage node and a logical address of a second LUN distributed on the storage node belong to the same partition, and N is an integer not less than 2;
第二处理单元,用于生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。A second processing unit, configured to generate a second record, where the second record is only used to record an update address corresponding to a logical address where the first LUN is distributed on the storage node at a second snapshot moment; A snapshot time and the second snapshot time are adjacent snapshot times.
在本发明一些可能的实施方式中,所述存储节点还包括:In some possible implementation manners of the present invention, the storage node further includes:
提供单元,用于向客户端提供所述第一记录和所述第二记录。A providing unit is configured to provide the client with the first record and the second record.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
第四方面,本发明实施例提供了一种分布式存储系统中的客户端,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;所述客户端包括:In a fourth aspect, an embodiment of the present invention provides a client in a distributed storage system. The distributed storage system includes N storage nodes, and the N storage nodes are configured to provide storage for a first logical unit number LUN. Space; the client includes:
获取单元,用于向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;An obtaining unit, configured to obtain a first record and a second record from the storage node Ni; wherein the first record is only used to record a logical address corresponding to the first LUN distributed on the storage node Ni at a first snapshot time The updated address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i For each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first record The snapshot time and the second snapshot time are adjacent snapshot times;
生成单元,用于根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。A generating unit is configured to generate a difference position of the first LUN on the storage node Ni according to the first record and the second record.
在本发明一些可能的实施方式中,所述客户端还包括:In some possible implementation manners of the present invention, the client further includes:
发送单元,用于在所述第一快照时刻向所述存储节点Ni发送第一快照指令,以及在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。A sending unit, configured to send a first snapshot instruction to the storage node Ni at the first snapshot time, and send a second snapshot instruction to the storage node Ni at the second snapshot time; the first snapshot instruction And the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
采用本发明实施例提供的技术方案,在获取相邻两次快照间第一LUN的差异位图时,以存储节点粒度收集差异位图数据,存储节点按照LUN粒度管理差异数据对应的记录,在搜集差异位图时客户端只需要与N个存储节点建立N次连接,相对于现有技术以分区粒度搜集 差异位图,存储节点按照分区粒度管理差异数据对应的索引来说,本发明实施例中客户端与存储节点集群建立通讯连接的次数减少了,提高了差异位图的获取效率,也有利于备份存储系统对存储节点集群中的数据进行及时备份。With the technical solution provided by the embodiment of the present invention, when obtaining the difference bitmap of the first LUN between two adjacent snapshots, the difference bitmap data is collected at the granularity of the storage node, and the storage node manages the records corresponding to the difference data according to the LUN granularity. When collecting the difference bitmap, the client only needs to establish N connections with N storage nodes. Compared to the prior art, which collects the difference bitmap with partition granularity, and the storage node manages the index corresponding to the difference data according to the partition granularity, embodiments of the present invention The number of communication connections between the client and the storage node cluster is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例或背景技术中的技术方案,下面将对本发明实施例或背景技术中所需要使用的附图进行说明。In order to more clearly explain the technical solutions in the embodiments of the present invention or the background art, the drawings that are needed in the embodiments of the present invention or the background art will be described below.
图1A是一种分布式系统的架构示意图。FIG. 1A is a schematic architecture diagram of a distributed system.
图1B是现有技术中获取差异位图时客户端与存储节点集群之间通讯连接示意图。FIG. 1B is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap in the prior art.
图2是本发明实施例获取差异位图时客户端与存储节点集群之间通讯连接示意图。2 is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap according to an embodiment of the present invention.
图3是现有技术和本发明一个实施例中客户端与一个存储节点建立通讯连接的示意图。FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in the prior art and an embodiment of the present invention.
图4是本发明一个实施例中分布式系统的交互示意图。FIG. 4 is an interaction schematic diagram of a distributed system in an embodiment of the present invention.
具体实施方式detailed description
下面结合本发明实施例中的附图对本发明实施例进行描述。The following describes the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.
图1A是一种分布式存储系统的架构示意图。包括客户端101、存储节点集群102、和备份存储系统103。用户通过客户端101对存储节点集群102进行控制,比如触发存储节点集群102为LUN创建快照、创建差异位图、执行读写操作等,备份存储系统103用于备份存储节点集群102中LUN的数据,备份存储系统103与分布式存储系统首次同步时,客户端101触发存储节点集群102为LUN创建快照,比如创建版本号为0的快照,备份存储系统103对存储节点集群102中LUN的全部数据进行复制,因此此次创建的快照中的全部数据复制到备份存储系统103,后面可以采用快照,用户继续通过客户端101触发存储节点集群102为LUN创建快照,每次新创建的快照的版本号加1。比较相邻两次快照之间的差异,可以得到差异位图,根据差异位图,将相邻快照的差异位图对应的差量数据传到备份存储系统103,备份存储系统103接收到差量数据后写入更新数据。FIG. 1A is a schematic architecture diagram of a distributed storage system. It includes a client 101, a storage node cluster 102, and a backup storage system 103. The user controls the storage node cluster 102 through the client 101, such as triggering the storage node cluster 102 to create a snapshot of the LUN, create a difference bitmap, and perform read and write operations. The backup storage system 103 is used to back up the data of the LUN in the storage node cluster 102. When the backup storage system 103 is synchronized with the distributed storage system for the first time, the client 101 triggers the storage node cluster 102 to create a snapshot for the LUN. For example, a snapshot with version number 0 is created. The backup storage system 103 backs up all the data of the LUN in the storage node cluster 102. All the data in the snapshot created this time is copied to the backup storage system 103. The snapshot can be used later. The user continues to trigger the storage node cluster 102 to create a snapshot for the LUN through the client 101. Each time the version number of the newly created snapshot is plus 1. By comparing the differences between two adjacent snapshots, a difference bitmap can be obtained. According to the difference bitmap, the difference data corresponding to the difference bitmap of the adjacent snapshots is transmitted to the backup storage system 103, and the backup storage system 103 receives the difference. Update data is written after the data.
图1B是现有技术中获取差异位图时客户端与存储节点集群之间通讯连接示意图。如图1B所示,存储节点集群可以包括N个存储节点,即:存储节点1、存储节点2、存储节点3、…、存储节点N,N为大于或者等于2的整数,每个存储节点可以是硬盘。每个存储节点包括3个分区,比如存储节点1包括的分区为:分区1、分区n+1、分区2n+1,存储节点2包括:分区2、分区n+2、分区2n+2,存储节点3包括:分区3、分区n+3、分区2n+3,存储节点N包括:分区n、分区2n和分区3n。为了获取快照的差异位图,客户端需要分别与各存储节点中的每个分区建立通讯连接,如图1B所示,客户端需要与存储节点1中的三个分区(分区1、分区n+1、分区2n+1)都建立通讯连接,才能得到存储节点1中LUN发生了数据更新的数据块的位置。客户端需要与存储节点2中的三个分区(分区2、分区n+2、和分区2n+2)都建立通讯连接,才能得到存储节点2中LUN发生了数据更新的数据块的位置。客户端需要与存储节点3中的三个分区(分区3、分区n+3、和分区2n+3)都建立通讯连接,才能得到存储节点3中LUN发生了数据更新的数据块的位置。客户端需要 与存储节点N中的三个分区(分区n、分区2n和分区3n)都建立通讯连接,才能得到存储节点N中LUN发生了数据更新的数据块的位置。FIG. 1B is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap in the prior art. As shown in FIG. 1B, a storage node cluster may include N storage nodes, that is, storage node 1, storage node 2, storage node 3, ..., storage node N, where N is an integer greater than or equal to 2, and each storage node may It's a hard disk. Each storage node includes 3 partitions. For example, storage node 1 includes partitions: partition 1, partition n + 1, and partition 2n + 1. Storage node 2 includes: partition 2, partition n + 2, partition 2n + 2, and storage. Node 3 includes: partition 3, partition n + 3, partition 2n + 3, and storage node N includes: partition n, partition 2n, and partition 3n. In order to obtain the difference bitmap of the snapshot, the client needs to establish a communication connection with each partition in each storage node. As shown in Figure 1B, the client needs to communicate with the three partitions in storage node 1 (partition 1, partition n + 1. The partition 2n + 1) establishes a communication connection to obtain the location of the data block where the LUN in the storage node 1 is updated. The client needs to establish a communication connection with three partitions (partition 2, partition n + 2, and partition 2n + 2) in storage node 2 in order to obtain the location of the data block where the LUN in data storage node 2 has been updated. The client needs to establish a communication connection with the three partitions (partition 3, partition n + 3, and partition 2n + 3) in the storage node 3 in order to obtain the location of the data block where the LUN in the storage node 3 is updated. The client needs to establish a communication connection with the three partitions (partition n, partition 2n, and partition 3n) in the storage node N in order to obtain the location of the data block where the LUN in the storage node N is updated.
本发明的一个实施例公开了一种分布式存储系统中管理快照的方法,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;An embodiment of the present invention discloses a method for managing snapshots in a distributed storage system. The distributed storage system includes N storage nodes, and the N storage nodes are configured to provide storage space for a first logical unit number LUN. ;
存储节点Ni生成第一记录;所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;即:在一个实施例中i可以是1到N中的任意一个整数值。所述存储节点Ni生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。例如,每隔10分钟对第一LUN进行快照操作,例如22:00对第一LUN进行一次快照操作,22:10对第一LUN再次进行快照操作,则22:00和22:10是相邻的快照时刻。一个快照时刻对应快照的一个版本号。第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址为第一LUN分布在所述存储节点Ni的逻辑地址发生数据数据更新的数据块的位置。The storage node Ni generates a first record; the first record is only used to record an update address corresponding to the logical address of the first LUN distributed at the storage node Ni at a first snapshot time; wherein the first LUN distribution The logical address of the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is each value from 1 to N; that is: In one embodiment, i can be any integer value from 1 to N. The storage node Ni generates a second record, and the second record is only used to record an updated address corresponding to a logical address where the first LUN is distributed on the storage node Ni at a second snapshot time; wherein the first The snapshot time and the second snapshot time are adjacent snapshot times. For example, if a snapshot operation is performed on the first LUN every 10 minutes, for example, a snapshot operation is performed on the first LUN at 22:00, and a snapshot operation is performed again on the first LUN at 22:10, then 22:00 and 22:10 are adjacent. Snapshot moments. A snapshot moment corresponds to a version number of the snapshot. The update address corresponding to the logical address of the first LUN distributed on the storage node Ni is the position of the data block where the first LUN is distributed on the logical address of the storage node Ni to be updated.
在本发明一些可能的实施例中,储节点Ni向客户端提供所述第一记录和所述第二记录。其中,所述第一记录和所述第二记录可以为链表或者数组。In some possible embodiments of the present invention, the storage node Ni provides the client with the first record and the second record. The first record and the second record may be a linked list or an array.
本发明的一个实施例还公开了一种分布式存储系统中生成差异位图的方法,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;客户端向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;所述客户端根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。An embodiment of the present invention also discloses a method for generating a difference bitmap in a distributed storage system. The distributed storage system includes N storage nodes, and the N storage nodes are configured to assign a first logical unit number LUN. Provide storage space; the client obtains the first record and the second record from the storage node Ni; wherein the first record is only used to record the logical address where the first LUN is distributed on the storage node Ni at the first snapshot time A corresponding update address; wherein the logical address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; A snapshot time and the second snapshot time are adjacent snapshot times; the client generates a difference position of the first LUN on the storage node Ni according to the first record and the second record.
在本发明一些可能的实施例中,所述方法还包括:所述客户端在所述第一快照时刻向所述存储节点Ni发送第一快照指令;所述客户端在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。In some possible embodiments of the present invention, the method further includes: the client sends a first snapshot instruction to the storage node Ni at the first snapshot time; the client at the second snapshot time Sending a second snapshot instruction to the storage node Ni; the first snapshot instruction and the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
在本发明一些可能的实施例中,所述第一记录和所述第二记录可以为链表或者数组。In some possible embodiments of the present invention, the first record and the second record may be a linked list or an array.
为了便于理解本发明实施例所要保护的技术方案,下面结合具体实例对本发明所要保护的技术方案进行描述。在下面的实施例中记录以链表为例进行描述。In order to facilitate understanding of the technical solutions to be protected in the embodiments of the present invention, the technical solutions to be protected in the present invention are described below with reference to specific examples. In the following embodiments, a record is described by taking a linked list as an example.
图3左边为现有技术中客户端与一个存储节点建立通讯连接的示意图,如图3左边所示,现有技术为了得到差异位图,需要遍历指定逻辑单元(比如逻辑单元标识为111)中所有的分区,根据每个分区对应的索引来查找每个分区内输入了新的数据的存储块的位置,比如客户端先与逻辑单元标识为111中标识为0的分区建立通讯连接,从标识为0的分区 开始查找,通过查找得到在该分区中有两个数据进行了更新,分别对应的存储块标识为1和3。进一步地,需要继续查找标识为50的分区中发生了数据更新的位置,为此,客户端需要与标识为50的分区先建立通讯连接,通过查找得到该分区内的更新位置对应的存储块的标识为7、9、和10。进一步地,客户端还需要与该存储节点的逻辑单元标识为111的逻辑单元内标识为75的分区建立通讯连接,查找得到该分区内的更新位置对应的存储块的标识为12和14。类似地,客户端还需要与该存储节点的逻辑单元标识为111的逻辑单元内标识为51200的分区建立通讯连接,查找得到该分区内的更新位置对应的存储块的标识为1023997。由前面描述可知,现有技术为了得到每个存储节点中发生了变化的数据的位置,需要与多个分区分别建立通讯连接,花费的时间较长。The left side of FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in the prior art. As shown on the left side of the prior art, in order to obtain a difference bitmap in the prior art, it is necessary to traverse the specified logical unit (for example, the logical unit identifier is 111). For all partitions, the location of the storage block where new data is entered in each partition is found according to the index corresponding to each partition. For example, the client first establishes a communication connection with the partition with the logical unit ID of 111 and the ID of 0. The partition with the value of 0 starts to search. Through the search, two data in the partition are updated, and the corresponding storage block identifiers are 1 and 3. Further, it is necessary to continue to find the location where the data update has occurred in the partition identified by 50. To this end, the client needs to establish a communication connection with the partition identified by 50 first, and obtain the storage block corresponding to the update location in the partition by searching. Identified as 7, 9, and 10. Further, the client also needs to establish a communication connection with a partition with a logical unit ID of 111 in the storage node and a partition with an ID of 75 in the logical unit, and find the storage blocks corresponding to the update positions in the partition with the IDs 12 and 14. Similarly, the client also needs to establish a communication connection with the partition identified as 51200 in the logical unit identified by the logical node of the storage node as 111, and find that the storage block corresponding to the update position in the partition is identified as 1023997. It can be known from the foregoing description that, in the prior art, in order to obtain the position of the changed data in each storage node, communication connections with multiple partitions need to be established separately, which takes a long time.
图2是本发明提供的获取差异位图时客户端与存储节点集群之间通讯连接示意图。由该图可知,为了获取差异位图,客户端只需要与各存储节点建立一次连接。具体地,如图2所示,存储节点集群包括N个存储节点,即:存储节点1、存储节点2、存储节点3、…、存储节点N,N为大于或者等于2的整数,每个存储节点可以是硬盘。每个存储节点包括3个分区,比如存储节点1包括的分区为:分区1、分区n+1、分区2n+1,存储节点2包括:分区2、分区n+2、分区2n+2,存储节点3包括:分区3、分区n+3、分区2n+3,存储节点N包括:分区n、分区2n和分区3n。为了获取差异位图,客户端只需要与各存储节点分别建立一次通讯连接,如图1B所示,客户端只需要与存储节点1建立一次通讯连接,就可以得到存储节点1中第一LUN发生了数据更新的数据块的位置。客户端只需要与存储节点2建立一次通讯连接,就可以得到存储节点2中第一LUN发生了数据更新的数据块的位置。客户端只需要与存储节点3建立一次通讯连接,就可以得到存储节点3中第一LUN发生了数据更新的数据块的位置。客户端只需要与存储节点N建立一次通讯连接,就可以得到存储节点N中第一LUN发生了数据更新的数据块的位置。FIG. 2 is a schematic diagram of a communication connection between a client and a storage node cluster when obtaining a difference bitmap provided by the present invention. From this figure, in order to obtain the difference bitmap, the client only needs to establish a connection with each storage node once. Specifically, as shown in FIG. 2, the storage node cluster includes N storage nodes, that is, storage node 1, storage node 2, storage node 3, ..., storage node N, where N is an integer greater than or equal to 2, and each storage node A node can be a hard disk. Each storage node includes 3 partitions. For example, storage node 1 includes partitions: partition 1, partition n + 1, and partition 2n + 1. Storage node 2 includes: partition 2, partition n + 2, partition 2n + 2, and storage. Node 3 includes: partition 3, partition n + 3, partition 2n + 3, and storage node N includes: partition n, partition 2n, and partition 3n. In order to obtain the difference bitmap, the client only needs to establish a communication connection with each storage node, as shown in Figure 1B, the client only needs to establish a communication connection with storage node 1, and then the first LUN in storage node 1 can be obtained. The location of the data block for the data update. The client only needs to establish a communication connection with the storage node 2 to obtain the position of the data block where the first LUN in the storage node 2 is updated. The client only needs to establish a communication connection with the storage node 3 once to obtain the position of the data block where the first LUN in the storage node 3 is updated with data. The client only needs to establish a communication connection with the storage node N to obtain the position of the data block where the first LUN in the storage node N is updated with data.
图3右边为本发明一个实施例中客户端与一个存储节点建立通讯连接的示意图,如图3右边所示,本发明为了得到差异位图,对同一个存储节点只需要与各存储节点分别建立通讯连接即可,具体地,通过查找与逻辑单元标识为111和两个相邻快照对应的索引,就可以得到该存储节点中第一LUN发生了数据更新的位置为1、3、7、9、10、12、14、1023998。由前面描述可知,本发明实施例中客户端与各存储节点建立通讯连接的次数减少了,提高了差异位图的获取效率。The right side of FIG. 3 is a schematic diagram of establishing a communication connection between a client and a storage node in an embodiment of the present invention. As shown on the right side of FIG. 3, in order to obtain a difference bitmap, the present invention only needs to establish the same storage node with each storage node separately. The communication connection is sufficient. Specifically, by looking up the index corresponding to the logical unit identifier of 111 and two adjacent snapshots, it can be obtained that the data update position of the first LUN in the storage node is 1, 3, 7, 9 , 10, 12, 14, 1023998. It can be known from the foregoing description that in the embodiment of the present invention, the number of times that a client establishes a communication connection with each storage node is reduced, and the efficiency of obtaining a difference bitmap is improved.
图4是本发明一个实施例中分布式存储系统的交互示意图。分布式系统包括:客户端、存储节点集群、和备份存储系统;其中,存储节点集群包括N个存储节点,在所述N个存储节点上设置有所述客户端能够识别的M个LUN,所述N和M为整数,所述N≥2,所述M≥1。图4所示交互示意图包括如下步骤:FIG. 4 is an interaction schematic diagram of a distributed storage system in an embodiment of the present invention. The distributed system includes: a client, a storage node cluster, and a backup storage system; wherein the storage node cluster includes N storage nodes, and M LUNs that can be identified by the client are provided on the N storage nodes. N and M are integers, N≥2, and M≥1. The interaction diagram shown in FIG. 4 includes the following steps:
S401.用户向客户端发送第一触发指令。所述第一触发指令指示所述存储节点集群对所述M个LUN分别创建版本号为V-1的快照。S401. The user sends a first trigger instruction to the client. The first trigger instruction instructs the storage node cluster to create snapshots with version numbers V-1 for the M LUNs, respectively.
S402.客户端获取第一触发指令。S402. The client obtains a first trigger instruction.
S403.客户端向存储节点集群发送第一触发指令。S403. The client sends a first trigger instruction to the storage node cluster.
S404.存储节点集群获取第一触发指令,根据第一触发指令对所述M个LUN分别创建版本号为V-1的快照;所述第一触发指令指示所述存储节点集群对所述M个LUN分别 创建版本号为V-1的快照。S404. The storage node cluster obtains a first trigger instruction, and creates a snapshot of version number V-1 for each of the M LUNs according to the first trigger instruction; the first trigger instruction instructs the storage node cluster to the M Create snapshots of version V-1 for each LUN.
S405.存储节点集群中的所述N个存储节点中的任一存储节点分别为所述M个LUN中的每个LUN创建一个与快照版本号V对应的索引。S405. Any one of the N storage nodes in the storage node cluster creates an index corresponding to the snapshot version number V for each of the M LUNs.
S406.用户向客户端发送至少零个用户写输入指令,所述至少零个用户写输入指令中的任一用户写输入指令K包括:待写入的数据D k和所述数据D k的写入位置P k,所述写入位置P k包括:所述数据D k待写入的逻辑单元的逻辑单元标识LUN_idk'以及所述写入位置P k对应的存储块在所述待写入的逻辑单元内的偏移量Y k;所述idk'是整数,1≤idk'≤M。 . S406 user sends at least zero to the client user inputs a write command, the user writes a zero input at least any one of an instruction to write the user instruction input K comprising: a write data D k and D k of the data to be written An input position P k , the write position P k includes: a logical unit identifier LUN_idk ′ of the logical unit to be written to the data D k and a storage block corresponding to the write position P k in the to-be-written The offset Y k in the logical unit; the idk ′ is an integer, and 1 ≦ idk ′ ≦ M.
S407.客户端获取所述至少零个用户写输入指令。S407. The client obtains the at least zero user write input instructions.
S408.客户端向存储节点集群发送所述至少零个用户写输入指令。S408. The client sends the at least zero user write input instructions to the storage node cluster.
S409.存储节点集群获取所述至少零个用户写输入指令,所述存储节点集群对所述任一用户写输入指令K,根据所述写入位置P k确定所述写入位置P k位于存储节点j,在所述存储节点j给LUN标识为LUN_idk'的LUN以及该LUN的快照版本号为V的快照建立的索引增加一个条目,在增加的所述条目中记录所述位置P k,所述j为整数,1≤j≤N。 S409. Acquires the storage node clusters at least zero user inputs a write command, the storage node of the cluster write any user input command K, the writing position determining P k P k according to the write position located in the storage Node j, adding an entry to the index created by the storage node j for a LUN with a LUN identified as LUN_idk 'and a snapshot version number of the LUN of V, and recording the position Pk in the added entry, so Let j be an integer, 1≤j≤N.
需要说明的时,客户端获取零个用户写输入指令是指客户端没有获取用户写输入指令,这种情况下,不执行步骤S408和S409,索引中也不增加条目。When it should be noted that the client obtains zero user write input instructions means that the client does not obtain user write input instructions. In this case, steps S408 and S409 are not performed, and no entry is added to the index.
S410.用户向客户端发送第二触发指令。所述第二触发指令指示所述存储节点集群对所述M个LUN分别创建版本号为V的快照。S410. The user sends a second trigger instruction to the client. The second trigger instruction instructs the storage node cluster to create snapshots with version numbers V for the M LUNs, respectively.
S411.客户端获取第二触发指令。S411. The client obtains a second trigger instruction.
S412.客户端向存储节点集群发送第二触发指令。S412. The client sends a second trigger instruction to the storage node cluster.
S413.存储节点集群获取所述第二触发指令,根据所述第二触发指令对所述M个LUN分别创建版本号为V的快照。S413. The storage node cluster obtains the second trigger instruction, and creates snapshots with version numbers V for the M LUNs according to the second trigger instruction.
S414.用户向客户端发送第一指令。S414. The user sends a first instruction to the client.
所述第一指令携带指定LUN的LUN标识LUN_id和对所述指定LUN创建的快照的快照版本号V-1和V;所述第一指令指示获取所述指定LUN的快照版本号为V-1和快照版本号为V的两个相邻快照间的差异位图,所述id和V是整数,V≥1,1≤id≤M。The first instruction carries a LUN identifier LUN_id of a specified LUN and a snapshot version number V-1 and V of a snapshot created on the specified LUN; the first instruction instructs obtaining the snapshot version number of the specified LUN to be V-1 And a difference bitmap between two adjacent snapshots whose snapshot version number is V, the id and V are integers, V≥1, 1≤id≤M.
S415.客户端获取第一指令。S415. The client obtains the first instruction.
S416.客户端与所述N个存储节点中的每个存储节点建立通讯连接。S416. The client establishes a communication connection with each of the N storage nodes.
S417.客户端查找所述N个存储节点中的任一存储节点i建立的与所述指定LUN以及所述指定LUN的快照版本号为V的快照对应的索引Liv;所述索引Liv记录了所述两个相邻快照间更新的各数据的位置信息,所述i为整数,1≤i≤N。S417. The client searches for an index Liv corresponding to the specified LUN and the snapshot whose snapshot version number is V established by any storage node i of the N storage nodes; the index Liv records all The position information of each data updated between two adjacent snapshots is described, where i is an integer and 1 ≦ i ≦ N.
S418.所述客户端根据索引集合{L 1v、L 2v、…L NV}确定所述差异位图。 S418. The client determines the difference bitmap according to an index set {L 1 v, L 2 v, ... L NV }.
S419.所述存储节点集群将所述差量数据和各差量数据在所述指定LUN的快照版本号为V的快照中的位置发送给所述备份存储系统。S419. The storage node cluster sends the differential data and the position of each differential data in the snapshot of the designated LUN with a snapshot version number of V to the backup storage system.
在本发明一些可能的实施方式中,差量数据和各差量数据在所述指定LUN的快照版本号为V的快照中的位置可以是存储节点集群从客户端获取得到的。In some possible implementation manners of the present invention, the position of the differential data and each differential data in the snapshot of the snapshot version number V of the specified LUN may be obtained by the storage node cluster from the client.
S420.所述备份存储系统利用接收到的所述差量数据和各差量数据在所述指定LUN的快照版本号为V的快照中的位置进行更新。S420. The backup storage system uses the received differential data and the position of each differential data in the snapshot of the snapshot version number V of the specified LUN to update.
本发明实施例在获取相邻两次快照间指定LUN的差异位图时,以存储节点粒度收集差 异位图数据,存储节点按照LUN粒度管理差异数据对应的索引,在搜集差异位图时客户端只需要与N个存储节点建立N次连接,相对于现有技术以分区粒度搜集差异位图,存储节点按照分区粒度管理差异数据对应的索引来说,本发明实施例中客户端与存储节点集群建立通讯连接的次数减少了,提高了差异位图的获取效率,也有利于备份存储系统对存储节点集群中的数据进行及时备份。In the embodiment of the present invention, when obtaining the difference bitmap of a specified LUN between two adjacent snapshots, the difference bitmap data is collected at the granularity of the storage node, the storage node manages the index corresponding to the difference data according to the LUN granularity, and the client collects the difference bitmap Only need to establish N connections with N storage nodes. Compared with the prior art, which collects the difference bitmap with partition granularity, and the storage node manages the index corresponding to the difference data according to the partition granularity, the client and the storage node cluster in the embodiment of the present invention The number of communication connections is reduced, the efficiency of obtaining the difference bitmap is improved, and it is also beneficial for the backup storage system to perform timely backup of the data in the storage node cluster.
本发明实施例还提供了一种分布式存储系统中的存储节点,所述存储节点为所述分布式存储系统包括的N个存储节点中的任意一个,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间,所述存储节点包括:An embodiment of the present invention further provides a storage node in a distributed storage system, where the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for A logical unit number LUN provides storage space, and the storage node includes:
第一处理单元,用于生成第一记录;所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点的逻辑地址与第二LUN分布在所述存储节点的逻辑地址属于相同的分区,N为不小于2的整数;A first processing unit, configured to generate a first record; the first record is only used to record an update address corresponding to a logical address of the first LUN distributed on the storage node at a first snapshot time; A logical address of a LUN distributed on the storage node and a logical address of a second LUN distributed on the storage node belong to the same partition, and N is an integer not less than 2;
第二处理单元,用于生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。A second processing unit, configured to generate a second record, where the second record is only used to record an update address corresponding to a logical address where the first LUN is distributed on the storage node at a second snapshot moment; A snapshot time and the second snapshot time are adjacent snapshot times.
在本发明一些可能的实施方式中,所述存储节点还包括:In some possible implementation manners of the present invention, the storage node further includes:
提供单元,用于向客户端提供所述第一记录和所述第二记录。A providing unit is configured to provide the client with the first record and the second record.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
本发明实施例还提供了一种分布式存储系统中的客户端,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;所述客户端包括:An embodiment of the present invention further provides a client in a distributed storage system, where the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN; The clients include:
获取单元,用于向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;An obtaining unit, configured to obtain a first record and a second record from the storage node Ni; wherein the first record is only used to record a logical address corresponding to the first LUN distributed on the storage node Ni at a first snapshot time The updated address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i For each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first record The snapshot time and the second snapshot time are adjacent snapshot times;
生成单元,用于根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。A generating unit is configured to generate a difference position of the first LUN on the storage node Ni according to the first record and the second record.
在本发明一些可能的实施方式中,所述客户端还包括:In some possible implementation manners of the present invention, the client further includes:
发送单元,用于在所述第一快照时刻向所述存储节点Ni发送第一快照指令,以及在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。A sending unit, configured to send a first snapshot instruction to the storage node Ni at the first snapshot time, and send a second snapshot instruction to the storage node Ni at the second snapshot time; the first snapshot instruction And the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为链表。In some possible implementation manners of the present invention, the first record and the second record are both linked lists.
在本发明一些可能的实施方式中,所述第一记录和所述第二记录均为数组。In some possible implementation manners of the present invention, the first record and the second record are both an array.
本发明实施例还提供了一种计算机存储介质,其中,该计算机存储介质可存储有程序,所述程序执行时包括上述方法实施例中记载的任意一种分布式存储系统中管理快照的方法 的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the method includes a method for managing snapshots in any of the distributed storage systems described in the foregoing method embodiments. Some or all steps.
本发明实施例还提供了一种计算机存储介质,其中,该计算机存储介质可存储有程序,所述程序执行时包括上述方法实施例中记载的任意一种分布式存储系统中生成差异位图的方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the method includes generating a difference bitmap in any one of the distributed storage systems described in the foregoing method embodiments. Part or all of the steps of a method.
本发明实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本发明实施例所述的一种分布式存储系统中管理快照的方法。An embodiment of the present invention further provides an application program, where the application program is used to execute a method for managing snapshots in a distributed storage system according to an embodiment of the present invention at runtime.
本发明实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本发明实施例所述的一种分布式存储系统中生成差异位图的方法。An embodiment of the present invention further provides an application program, where the application program is used to execute a method for generating a difference bitmap in a distributed storage system according to an embodiment of the present invention at runtime.
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be adjusted, combined, and deleted according to actual needs.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。A person of ordinary skill in the art may understand that all or part of the processes in the method of the foregoing embodiments are implemented. The processes may be completed by a computer program instructing related hardware. The program may be stored in a computer-readable storage medium. When the program is executed, Can include the processes of the method embodiments described above.
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present invention may be adjusted, combined, and deleted according to actual needs.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
本发明实施例中,一种实现,存储节点和客户端可以是通用的计算机结构,包含存储器和处理器,存储器与处理器通信,存储器中包含计算机指令,处理器执行存储器中的计算机指令,分别用于实现本发明实施例中存储节点和客户端的功能。In the embodiment of the present invention, in an implementation, the storage node and the client may have a general computer structure, including a memory and a processor, the memory communicates with the processor, the memory includes computer instructions, and the processor executes the computer instructions in the memory, respectively. It is used to implement the functions of the storage node and the client in the embodiments of the present invention.
本发明实施例中存储节点和客户端的各单元结构,具体实现可以是硬件实现,如处理器和存储器共同实现,也可以是软件模块,如存储器中的计算机指令。本发明实施例对此不作限定。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可存储程序代码的介质。Each unit structure of the storage node and the client in the embodiment of the present invention may be implemented in hardware, such as a processor and a memory, or a software module, such as a computer instruction in the memory. The embodiment of the present invention does not limit this. Those of ordinary skill in the art may understand that all or part of the processes in the method of the foregoing embodiments are implemented. The processes may be completed by a computer program instructing related hardware. The program may be stored in a computer-readable storage medium. Can include the processes of the method embodiments described above. The foregoing storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk, or an optical disk, which can store various program codes.

Claims (18)

  1. 一种分布式存储系统中管理快照的方法,其特征在于,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间,所述方法包括:A method for managing snapshots in a distributed storage system, wherein the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN, the method include:
    存储节点Ni生成第一记录;所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;The storage node Ni generates a first record; the first record is only used to record an update address corresponding to the logical address of the first LUN distributed at the storage node Ni at a first snapshot time; wherein the first LUN distribution The logical address of the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is each value from 1 to N;
    所述存储节点Ni生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。The storage node Ni generates a second record, and the second record is only used to record an updated address corresponding to a logical address where the first LUN is distributed on the storage node Ni at a second snapshot time; wherein the first The snapshot time and the second snapshot time are adjacent snapshot times.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    所述存储节点Ni向客户端提供所述第一记录和所述第二记录。The storage node Ni provides the client with the first record and the second record.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一记录和所述第二记录均为链表。The method according to claim 1 or 2, wherein the first record and the second record are both linked lists.
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一记录和所述第二记录均为数组。The method according to claim 1 or 2, wherein the first record and the second record are both arrays.
  5. 一种分布式存储系统中生成差异位图的方法,其特征在于,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;A method for generating a difference bitmap in a distributed storage system, wherein the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN;
    客户端向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;The client obtains the first record and the second record from the storage node Ni; wherein the first record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the first snapshot time Wherein the logical address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i is 1 to Each value of N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first snapshot time and The second snapshot moment is an adjacent snapshot moment;
    所述客户端根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。The client generates a different position of the first LUN on the storage node Ni according to the first record and the second record.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, further comprising:
    所述客户端在所述第一快照时刻向所述存储节点Ni发送第一快照指令;Sending, by the client, a first snapshot instruction to the storage node Ni at the first snapshot moment;
    所述客户端在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。The client sends a second snapshot instruction to the storage node Ni at the second snapshot moment; the first snapshot instruction and the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  7. 根据权利要求5或6所述的方法,其特征在于,所述第一记录和所述第二记录均为链表。The method according to claim 5 or 6, wherein the first record and the second record are both linked lists.
  8. 根据权利要求5或6所述的方法,其特征在于,所述第一记录和所述第二记录均为数组。The method according to claim 5 or 6, wherein the first record and the second record are both arrays.
  9. 一种分布式存储系统中的存储节点,其特征在于,所述存储节点为所述分布式存储系统包括的N个存储节点中的任意一个,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间,所述存储节点包括:A storage node in a distributed storage system, wherein the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for a first logical unit. No. LUN provides storage space, and the storage node includes:
    第一处理单元,用于生成第一记录;所述第一记录只用于记录在第一快照时刻所述第 一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点的逻辑地址与第二LUN分布在所述存储节点的逻辑地址属于相同的分区,N为不小于2的整数;A first processing unit, configured to generate a first record; the first record is only used to record an update address corresponding to a logical address of the first LUN distributed on the storage node at a first snapshot time; A logical address of a LUN distributed on the storage node and a logical address of a second LUN distributed on the storage node belong to the same partition, and N is an integer not less than 2;
    第二处理单元,用于生成第二记录,所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻。A second processing unit, configured to generate a second record, where the second record is only used to record an update address corresponding to a logical address where the first LUN is distributed on the storage node at a second snapshot moment; A snapshot time and the second snapshot time are adjacent snapshot times.
  10. 根据权利要求9所述的存储节点,其特征在于,所述存储节点还包括:The storage node according to claim 9, wherein the storage node further comprises:
    提供单元,用于向客户端提供所述第一记录和所述第二记录。A providing unit is configured to provide the client with the first record and the second record.
  11. 根据权利要求9或10所述的存储节点,其特征在于,所述第一记录和所述第二记录均为链表。The storage node according to claim 9 or 10, wherein the first record and the second record are both linked lists.
  12. 根据权利要求9或10所述的存储节点,其特征在于,所述第一记录和所述第二记录均为数组。The storage node according to claim 9 or 10, wherein the first record and the second record are both an array.
  13. 一种分布式存储系统中的客户端,其特征在于,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;所述客户端包括:A client in a distributed storage system, wherein the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN; the client include:
    获取单元,用于向存储节点Ni获取第一记录和第二记录;其中,所述第一记录只用于记录在第一快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一LUN分布在所述存储节点Ni的逻辑地址与第二LUN分布在所述存储节点Ni的逻辑地址属于相同的分区,N为不小于2的整数,并且i为1到N中的每一个值;所述第二记录只用于记录在第二快照时刻所述第一LUN分布在所述存储节点Ni的逻辑地址对应的更新地址;其中,所述第一快照时刻与所述第二快照时刻是相邻的快照时刻;An obtaining unit, configured to obtain a first record and a second record from the storage node Ni; wherein the first record is only used to record a logical address corresponding to the first LUN distributed on the storage node Ni at a first snapshot time The updated address of the first LUN distributed on the storage node Ni and the logical address of the second LUN distributed on the storage node Ni belong to the same partition, N is an integer not less than 2, and i For each value from 1 to N; the second record is only used to record the update address corresponding to the logical address of the first LUN distributed on the storage node Ni at the second snapshot time; wherein the first record The snapshot time and the second snapshot time are adjacent snapshot times;
    生成单元,用于根据所述第一记录和所述第二记录生成所述第一LUN在所述存储节点Ni的差异位置。A generating unit is configured to generate a difference position of the first LUN on the storage node Ni according to the first record and the second record.
  14. 根据权利要求13所述的客户端,其特征在于,所述客户端还包括:The client according to claim 13, wherein the client further comprises:
    发送单元,用于在所述第一快照时刻向所述存储节点Ni发送第一快照指令,以及在所述第二快照时刻向所述存储节点Ni发送第二快照指令;所述第一快照指令和所述第二快照指令分别用于对所述第一LUN执行快照操作。A sending unit, configured to send a first snapshot instruction to the storage node Ni at the first snapshot time, and send a second snapshot instruction to the storage node Ni at the second snapshot time; the first snapshot instruction And the second snapshot instruction are respectively used to perform a snapshot operation on the first LUN.
  15. 根据权利要求13或14所述的客户端,其特征在于,所述第一记录和所述第二记录均为链表。The client according to claim 13 or 14, wherein the first record and the second record are both linked lists.
  16. 根据权利要求13或14所述的客户端,其特征在于,所述第一记录和所述第二记录均为数组。The client according to claim 13 or 14, wherein the first record and the second record are both an array.
  17. 一种分布式存储系统中的存储节点,其特征在于,所述存储节点为所述分布式存储系统包括的N个存储节点中的任意一个,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间,所述存储节点包含存储器和处理器,所述存储器与所述处理器通信,所述存储器中包含计算机指令,所述处理器执行所述存储器中的所述计算机指令用于执行权利要求1-4任一所述的方法。A storage node in a distributed storage system, wherein the storage node is any one of N storage nodes included in the distributed storage system, and the N storage nodes are used for a first logical unit. LUN provides storage space, the storage node includes a memory and a processor, the memory is in communication with the processor, the memory contains computer instructions, and the processor executes the computer instructions in the memory for The method according to any one of claims 1-4 is performed.
  18. 一种分布式存储系统中的存储节点,其特征在于,所述分布式存储系统包括N个存储节点,所述N个存储节点用于为第一逻辑单元号LUN提供存储空间;所述客户端包 括点包含存储器和处理器,所述存储器与所述处理器通信,所述存储器中包含计算机指令,所述处理器执行所述存储器中的所述计算机指令用于执行权利要求5-8任一所述的方法。A storage node in a distributed storage system, characterized in that the distributed storage system includes N storage nodes, and the N storage nodes are used to provide storage space for a first logical unit number LUN; the client The inclusion point includes a memory and a processor, the memory is in communication with the processor, the memory includes computer instructions, and the processor executes the computer instructions in the memory for performing any of claims 5-8 The method described.
PCT/CN2019/095901 2018-08-08 2019-07-13 Methods for snapshot management and difference bitmap generation in distributed storage system, and product WO2020029748A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810900148.9A CN109165120B (en) 2018-08-08 2018-08-08 Method and product for generating management snapshot and difference bitmap in distributed storage system
CN201810900148.9 2018-08-08

Publications (1)

Publication Number Publication Date
WO2020029748A1 true WO2020029748A1 (en) 2020-02-13

Family

ID=64895215

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/095901 WO2020029748A1 (en) 2018-08-08 2019-07-13 Methods for snapshot management and difference bitmap generation in distributed storage system, and product

Country Status (2)

Country Link
CN (1) CN109165120B (en)
WO (1) WO2020029748A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165120B (en) * 2018-08-08 2022-04-05 华为技术有限公司 Method and product for generating management snapshot and difference bitmap in distributed storage system
CN112306746A (en) * 2019-07-30 2021-02-02 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing snapshots in an application environment
CN117421159A (en) * 2023-11-01 2024-01-19 广州鼎甲计算机科技有限公司 Data backup method, device, equipment and medium in distributed block storage system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375904A (en) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 Disaster recovery backup method based on snapshot differentiation data transmission
CN105938457A (en) * 2016-03-31 2016-09-14 华为技术有限公司 Data filtering method, and device and data reading system
CN106557274A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 Virtual snapshot processing method and processing device
CN106716377A (en) * 2015-01-12 2017-05-24 斯特拉托斯卡莱有限公司 Synchronization of snapshots in a distributed storage system
US20170185488A1 (en) * 2015-12-23 2017-06-29 Commvault Systems, Inc. Application-level live synchronization across computing platforms including synchronizing co-resident applications to disparate standby destinations and selectively synchronizing some applications and not others
CN109165120A (en) * 2018-08-08 2019-01-08 华为技术有限公司 Snapshot and difference bitmap generation method and product are managed in distributed memory system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106893A1 (en) * 2004-11-02 2006-05-18 Rodger Daniels Incremental backup operations in storage networks
US7702851B2 (en) * 2005-09-20 2010-04-20 Hitachi, Ltd. Logical volume transfer method and storage network system
CN100464307C (en) * 2006-05-26 2009-02-25 任永坚 Method and system for accomplishing data backup and recovery
US8028136B2 (en) * 2007-03-09 2011-09-27 International Business Machines Corporation Retaining disk identification in operating system environment after a hardware-driven snapshot restore from a snapshot-LUN created using software-driven snapshot architecture
US20150288758A1 (en) * 2014-04-07 2015-10-08 Strato Scale Ltd. Volume-level snapshot management in a distributed storage system
CN104750573B (en) * 2014-12-17 2017-10-24 杭州斯凯网络科技有限公司 The global coherency backup-and-restore method of distributed data system back end
CN106557385B (en) * 2015-09-28 2020-01-21 成都华为技术有限公司 Data snapshot method and storage device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375904A (en) * 2014-10-30 2015-02-25 浪潮电子信息产业股份有限公司 Disaster recovery backup method based on snapshot differentiation data transmission
CN106716377A (en) * 2015-01-12 2017-05-24 斯特拉托斯卡莱有限公司 Synchronization of snapshots in a distributed storage system
CN106557274A (en) * 2015-09-30 2017-04-05 中兴通讯股份有限公司 Virtual snapshot processing method and processing device
US20170185488A1 (en) * 2015-12-23 2017-06-29 Commvault Systems, Inc. Application-level live synchronization across computing platforms including synchronizing co-resident applications to disparate standby destinations and selectively synchronizing some applications and not others
CN105938457A (en) * 2016-03-31 2016-09-14 华为技术有限公司 Data filtering method, and device and data reading system
CN109165120A (en) * 2018-08-08 2019-01-08 华为技术有限公司 Snapshot and difference bitmap generation method and product are managed in distributed memory system

Also Published As

Publication number Publication date
CN109165120A (en) 2019-01-08
CN109165120B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
US7774565B2 (en) Methods and apparatus for point in time data access and recovery
KR101602312B1 (en) Data sending method, data receiving method, and storage device
US7836266B2 (en) Managing snapshot history in a data storage system
WO2020029748A1 (en) Methods for snapshot management and difference bitmap generation in distributed storage system, and product
US10599630B2 (en) Elimination of log file synchronization delay at transaction commit time
US7966470B2 (en) Apparatus and method for managing logical volume in distributed storage systems
US7653800B2 (en) Continuous data protection
US20060047926A1 (en) Managing multiple snapshot copies of data
US20130124873A1 (en) Storage device and its control method
US20060230243A1 (en) Cascaded snapshots
US20140108757A1 (en) Processing a copy command directed to a first storage architecture for data that is stored in a second storage architecture
CN109144416B (en) Method and device for querying data
CN101334797A (en) Distributed file systems and its data block consistency managing method
CN103827843A (en) Method, device, and system for writing data
US8782354B2 (en) Storage apparatus and method of controlling storage apparatus
US7549029B2 (en) Methods for creating hierarchical copies
US8527723B1 (en) Storage system and control method for storage system
US20130179397A1 (en) Database management method
US20210173563A1 (en) Storage system and volume copying method
JP6241449B2 (en) Data management system and data management method
CN113821476B (en) Data processing method and device
US10942891B2 (en) Reducing number of queries on a relational database
CN104572754B (en) A kind of Database Systems, Database Systems access method and device
US10635542B1 (en) Support for prompt creation of target-less snapshots on a target logical device that has been linked to a target-less snapshot of a source logical device
US10353920B2 (en) Efficient mirror data re-sync

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19846578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19846578

Country of ref document: EP

Kind code of ref document: A1