Metadata storage method, apparatus, device, and storage medium

By setting up a metadata management module under the gateway of each block device and executing operations locally on the target node, the problem of insufficient processing capacity of the metadata management module was solved, thereby improving the performance and data processing efficiency of the cluster.

CN115934652BActive Publication Date: 2025-11-07HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211721353.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-11-07
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In existing technologies, the metadata management module has insufficient processing capacity when the number of devices increases and the amount of interactive data increases, resulting in slow metadata processing and low cluster performance limits.

Method used

A metadata management module is set up under the gateway to which each block device belongs. Each metadata management module can independently process metadata operations. Data operation instructions are executed locally on the target node through the gateway and the metadata management module, and a strong consistency mechanism is adopted to ensure the accuracy and security of data processing.

Benefits of technology

It improves metadata processing capabilities, raises the overall performance ceiling of the cluster, reduces cross-machine network interactions, and improves metadata access speed and storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934652B_ABST
    Figure CN115934652B_ABST
Patent Text Reader

Abstract

The application discloses a metadata storage method and device, equipment and a storage medium. The metadata storage method comprises the following steps: when detecting a data operation instruction of a client, determining a first block device pointed by the data operation instruction; based on the first block device, determining a first gateway module belonging to a target node with the first block device, and a first metadata management module belonging to the target node with the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module; and based on the first gateway module and the first metadata management module, executing an operation corresponding to the data operation instruction. The metadata management module is arranged under each gateway to which a block device belongs, and each metadata management module can perform data operation processing on metadata. The metadata management modules under the gateways can process metadata, so that the overall performance upper limit of the cluster is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, in particular to a metadata storage method, device, equipment and storage medium. BACKGROUND

[0002] With the deepening of informatization, the amount of information data is increasing, and metadata technology is widely used, and cloud storage systems including metadata server clusters for storing metadata (Metadata) have appeared.

[0003] The center storage method is usually used in the cloud storage system of the metadata server cluster in the prior art. In this method, the metadata of multiple devices is only processed by a metadata management module for all metadata interaction data, but when the number of devices increases and the interaction data of the generated metadata increases, the metadata management module is insufficient in processing the interaction data of the metadata, resulting in slow data processing of the metadata and low upper limit of the overall performance of the cluster. SUMMARY

[0004] The main purpose of the present application is to provide a metadata storage method, device, equipment and storage medium, which aims to solve the technical problems in the prior art that when the number of devices increases and the interaction data of the generated metadata increases, the metadata management module is insufficient in processing the interaction data of the metadata, resulting in slow data processing of the metadata and low upper limit of the overall performance of the cluster.

[0005] To achieve the above purpose, the present application provides a metadata storage method, which comprises:

[0006] When the data operation instruction of the client is detected, the first block device pointed by the data operation instruction is determined;

[0007] Based on the first block device, a first gateway module belonging to the same target node as the first block device is determined, and a first metadata management module belonging to the target node as the first gateway module and managing the metadata in the first block device is determined, wherein one gateway module corresponds to one metadata management module;

[0008] Based on the first gateway module and the first metadata management module, the operation corresponding to the data operation instruction is executed.

[0009] Optionally, the bitmap metadata managed by the first metadata management module has strong consistency with the bitmap metadata managed by the second metadata management module of the corresponding binding node of the target node;

[0010] The step of executing the operation corresponding to the data operation instruction based on the first gateway module and the first metadata management module comprises:

[0011] performing the operation corresponding to the data operation instruction locally at the target node based on the strong consistency, the first gateway module and the first metadata management module.

[0012] Optionally, the data operation instruction comprises a storage instruction of metadata; the first gateway module and a second gateway module of a binding node corresponding to the target node form a group, and a specified block device is maintained;

[0013] The step of performing the operation corresponding to the data operation instruction locally at the target node based on the strong consistency, the first gateway module and the first metadata management module comprises:

[0014] After receiving the metadata to be stored based on the first gateway module, reporting a storage message with the metadata to be stored to the first metadata management module based on the first gateway module, and sending the metadata to be stored to the second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the metadata to be stored in the binding node, and feeds back stored feedback information to the first metadata management module;

[0015] If the feedback information is received based on the first metadata management module, the metadata to be stored is determined from the first gateway module, and the metadata is stored at the target node.

[0016] Optionally, the step of reporting a storage message with the metadata to be stored to the first metadata management module based on the first gateway module after receiving the metadata to be stored based on the first gateway module, and sending the metadata to be stored to the second metadata management module corresponding to the second gateway module based on the first metadata management module comprises:

[0017] After receiving the metadata to be stored based on the first gateway module, determining state information of the binding node based on the first gateway module after reporting a storage message with the metadata to be stored to the first metadata management module.

[0018] If the state information is normal, the metadata to be stored is sent to the second metadata management module corresponding to the second gateway module based on the first metadata management module.

[0019] Optionally, the method comprises:

[0020] If the state information is node exception, the block device maintained by the second gateway is connected to the first gateway for the target node corresponding to the binding node exception during normal operation of the block device maintained by the second gateway;

[0021] Based on the first metadata management module, the to-be-stored metadata is determined from the first gateway module, and after the target node stores the metadata, the to-be-stored metadata is stored in the local log according to the storage order.

[0022] Optionally, after the step of storing the to-be-stored metadata in the local log according to the storage order based on the first metadata management module, the method comprises:

[0023] After the state of the target node corresponding to the binding node recovers from the abnormal state to the normal state, based on the first metadata management module, the backup metadata stored in the local log is read, and the backup metadata is sent to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node.

[0024] Optionally, the step of reading the backup metadata stored in the local log based on the first metadata management module, and sending the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node, comprises:

[0025] Based on the first metadata management module, a piece of backup data is read from the data stored in the local log according to the storage order, and the backup data is sent to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup data in the binding node, and feeds back the stored feedback information to the first metadata management module;

[0026] If the feedback information is received based on the first metadata management module, the step of reading a piece of backup data from the data stored in the local log according to the storage order based on the first metadata management module, and sending the backup data to the second metadata management module corresponding to the second gateway module is returned, until all the data stored in the local log is sent to the second metadata management module.

[0027] The application also provides a metadata storage device, which comprises:

[0028] a detecting module, configured to determine a first block device pointed by a data operation instruction of a client when the data operation instruction is detected;

[0029] a determining module, configured to determine, based on the first block device, a first gateway module belonging to a same target node as the first block device, and a first metadata management module belonging to the target node as the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module;

[0030] an executing module, configured to execute an operation corresponding to the data operation instruction in the target node based on the first gateway module and the first metadata management module.

[0031] Optionally, the executing module comprises:

[0032] a consistent executing module, configured to execute the operation corresponding to the data operation instruction in the target node based on the strong consistency, the first gateway module and the first metadata management module.

[0033] And / or, the consistent executing module further comprises: a first storing module, configured to report, based on the first gateway module, a storage message with to-be-stored metadata to the first metadata management module after the to-be-stored metadata is received based on the first gateway module, and send, based on the first metadata management module, the to-be-stored metadata to a second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the to-be-stored metadata in a binding node of the second metadata management module and feeds back feedback information of the to-be-stored metadata stored by the second metadata management module to the first metadata management module; and a second storing module, configured to determine the to-be-stored metadata from the first gateway module and store the metadata in the target node if the feedback information is received based on the first metadata management module.

[0034] And / or, the first storing module further comprises: a node state determining module, configured to determine state information of the binding node after the storage message with the to-be-stored metadata is reported to the first metadata management module based on the first gateway module after the to-be-stored metadata is received based on the first gateway module; and a normal state storing module, configured to send, based on the first metadata management module, the to-be-stored metadata to the second metadata management module corresponding to the second gateway module if the state information is a node normal state.

[0035] And / or, the first storage module further comprises: a block device maintenance module, configured to, if the state information is node abnormal, connect the block device maintained by the second gateway to the first gateway, so that the target node corresponds to the block device maintained by the second gateway during the abnormal period of the binding node; an abnormal state storage module configured to determine the to-be-stored metadata from the first gateway module based on the first metadata management module, and store the to-be-stored metadata in the local log according to the storage order after the target node stores the metadata.

[0036] And / or, the first storage module further comprises: a synchronization module, configured to, after the state of the target node corresponding binding node recovers from the abnormal state to the normal state, read the backup metadata stored in the local log based on the first metadata management module, and send the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node.

[0037] And / or, the synchronization module further comprises: a data synchronization module, configured to read a piece of backup data from the data stored in the local log according to the storage order based on the first metadata management module, and send the backup data to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node, and feeds back the stored feedback information to the first metadata management module;

[0038] A plurality of data synchronization modules are configured to, if the feedback information is received based on the first metadata management module, return the step of reading a piece of backup data from the data stored in the local log according to the storage order based on the first metadata management module, and sending the backup data to the second metadata management module corresponding to the second gateway module, until all the data stored in the local log is sent to the second metadata management module.

[0039] The application further provides a metadata storage device, comprising a memory, a processor, and a program stored in the memory for implementing the metadata storage method,

[0040] The memory is configured to store the program for implementing the metadata storage method;

[0041] The processor is configured to execute the program for implementing the metadata storage method, so as to implement the steps of the metadata storage method.

[0042] The application further provides a storage medium, which stores a program for implementing a metadata storage method, and the program is executed by a processor to implement the steps of the metadata storage method.

[0043] The metadata storage method, device, equipment and storage medium provided by the application can improve the upper limit of the overall performance of the cluster. BRIEF DESCRIPTION OF DRAWINGS

[0044] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the application and, together with the specification, serve to explain the principles of the application. In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the following embodiment or prior art description will be briefly introduced. Obviously, those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0045] Figure 1 is a device structure schematic diagram of a hardware running environment related to the embodiment scheme of the application;

[0046] Figure 2 is a flowchart of the first embodiment of the metadata storage method of the application;

[0047] Figure 3 is a module schematic diagram of the metadata storage device of the application;

[0048] Figure 4 is a metadata storage system schematic diagram of the application;

[0049] Figure 5This is a flowchart illustrating the normal operation of a SAN cluster under the metadata storage method described in this application.

[0050] Figure 6 This is a flowchart illustrating a scenario where a SAN cluster node operates abnormally under the metadata storage method described in this application.

[0051] Figure 7 This is a flowchart illustrating the abnormal recovery scenario of a SAN cluster under the metadata storage method of this application.

[0052] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0053] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0054] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of this application.

[0055] The terminal in this application embodiment can be a PC, or a smartphone, tablet computer, e-book reader, MP3 (Moving Picture Experts Group Audio Layer III) player, MP4 (Moving Picture Experts Group Audio Layer IV) player, portable computer, or other portable terminal devices with display functions.

[0056] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0057] Optionally, the terminal can further include a camera, RF (Radio Frequency) circuit, sensors, audio circuit, WiFi module, and the like. The sensors can include, for example, a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display screen according to the brightness of ambient light, and the proximity sensor can turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the size of acceleration in each direction (generally three axes), and can detect the size and direction of gravity when at rest, which can be used for identifying mobile terminal posture applications (such as landscape / portrait screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like. Of course, the mobile terminal can also be configured with a gyroscope, barometer, hygrometer, thermometer, infrared sensor, and other sensors, which will not be described here.

[0058] Those skilled in the art can understand that Figure 1 The terminal structure shown in the above embodiments does not constitute a limitation on the terminal, and can include more or fewer components than shown, or combine certain components, or different component arrangements.

[0059] As shown in Figure 1 The memory 1005 as a computer storage medium can include an operation device, a network communication module, a user interface module, and a metadata storage program.

[0060] In the terminal shown in Figure 1 The network interface 1004 is mainly used for connecting to a background server and communicating data with the background server; the user interface 1003 is mainly used for connecting to a client (user end) and communicating data with the client; and the processor 1001 can be used to call the metadata storage program stored in the memory 1005.

[0061] Referring to Figure 2 , the embodiments of the present application provide a metadata storage method, which comprises:

[0062] Step S100, when detecting a data operation instruction of a client, determining a first block device pointed by the data operation instruction;

[0063] Step S200, based on the first block device, determining a first gateway module belonging to a target node with the first block device, and a first metadata management module belonging to the target node with the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module;

[0064] Step S300, based on the first gateway module and the first metadata management module, performing an operation corresponding to the data operation instruction.

[0065] In this embodiment, the application scenario is:

[0066] As an example, the application scenario of the metadata storage method can be that when a user performs metadata interaction on a terminal of a cloud storage system in which a metadata server cluster is installed, since the gateway is a unified access portal, when the metadata needs to access the VIP master node of the HA metadata in the storage process, the VIP node can be on the local machine or on the opposite end. If it is on the opposite end, it needs to access across the network, which reduces the metadata access speed. For this scenario, the metadata management module is arranged under the gateway to which each block device in the metadata server cluster belongs, and each metadata management module can perform metadata data operation processing. Therefore, when the device is increased and the interactive data of the generated metadata is increased, the metadata management module under each gateway can perform metadata processing, thereby improving the overall performance upper limit of the cluster.

[0067] As an example, the application scenario of the metadata storage method can be that the SAN cluster performs metadata interaction in a consistent hash manner, but this method has the problem that data migration is complex after the SAN cluster is expanded. For this scenario, the present application introduces multiple groups of metadata management, and stores the metadata of the entire cluster according to business characteristics. The business characteristics refer to that the bitmap metadata is divided according to the block device. After the entire cluster is divided into different groups, the block device associated by the gateway module is in the group to which the node belongs, so that the metadata is stored in a distributed manner. When the scale of the cluster is expanded, only the structure of the group needs to be added, thereby reducing the complexity of data expansion and migration.

[0068] As an example, the application scenario of the metadata storage method is not only the above-mentioned scenario, but also various metadata storage scenarios, which are not limited here.

[0069] The present embodiment aims to improve the metadata access speed and the overall performance of the SAN cluster.

[0070] In this embodiment, the metadata storage method is applied to the SAN cluster, which is referred to as a cluster hereinafter.

[0071] The specific steps are as follows:

[0072] Step S100, when detecting a data operation instruction of a client, determining a first block device to which the data operation instruction points;

[0073] In the embodiment, the cluster detects a data operation instruction of the client in real time, wherein the data operation instruction mainly includes a read-write interaction operation instruction of metadata, the metadata is data about data, mainly information about data properties, and is used to support functions such as indicating a storage location, historical data, resource searching, file recording, and the like. The metadata includes but is not limited to bitmap metadata and configuration metadata. Since the data amount of the configuration metadata is small, in the embodiment, the metadata mainly refers to the bitmap metadata, including but not limited to bitmap metadata of a block device and bitmap metadata of a snapshot.

[0074] In the embodiment, the cluster determines the first block device pointed by the data operation instruction mainly by identifying a block device pointed by the user data operation instruction, wherein the block device is a type of i / o device, stores information in a fixed-size block, each block has its own address, and a certain length of data can be read at any position of the device, for example, a hard disk, a U disk, an SD card, and the like.

[0075] In step S200, based on the first block device, a first gateway module belonging to a same target node as the first block device is determined, and a first metadata management module belonging to the target node as the first gateway module and managing metadata in the first block device is determined, wherein one gateway module corresponds to one metadata management module.

[0076] In the embodiment, the gateway is a SAN-GATEWAY module, which is mainly used to respond to file reading and writing of the block device and provides a service of an ISCSI protocol, and provides a block device network operation request of a client of the ISCSI protocol as a server.

[0077] In the embodiment, the metadata management module is a SAN-BMS module in the SAN cluster, which is used for management and maintenance of bitmap metadata of the SAN cluster, and provides a read-write function of bitmap metadata of the block device and the snapshot. In each node of the SAN cluster, the bitmap metadata managed by the metadata management module is bound with the block device and snapshot information managed by the gateway module, one gateway module corresponds to one metadata management module.

[0078] In this embodiment, since the block device, gateway module, and metadata management module have a mapping relationship within a node, the cluster determines, based on the first block device, a first gateway module belonging to the same target node as the first block device, and a first metadata management module belonging to the same target node as the first gateway module and managing the metadata in the first block device. For example, node X includes block device A, gateway module B, and metadata management module C. When the cluster detects that a user's data operation instruction has been received on block device A, the cluster determines that the corresponding modules are gateway module B and metadata management module C.

[0079] Step S300: Based on the first gateway module and the first metadata management module, execute the operation corresponding to the data operation instruction.

[0080] In this embodiment, the cluster executes the operations corresponding to the data operation instructions based on the first gateway module and the first metadata management module. These operations include metadata read and store (write) operations, i.e., reading characters (or strings) stored in a file and storing target characters (or strings) in a file. The metadata management module manages and maintains the bitmap metadata of the SAN cluster, providing read and write functionality for bitmap metadata of block devices and snapshots. The gateway module primarily responds to file read and write operations of block devices and provides iSCSI protocol services, acting as a server to provide block device network operation requests to iSCSI protocol clients.

[0081] Specifically, step S300 includes the following step S310:

[0082] The bitmap metadata managed by the first metadata management module is highly consistent with the bitmap metadata managed by the second metadata management module of the target node's corresponding bound node;

[0083] Step S310: Based on the strong consistency, the first gateway module, and the first metadata management module, execute the operation corresponding to the data operation instruction locally on the target node.

[0084] In the embodiment, a plurality of sets of metadata management modules are adopted to store the metadata of the whole cluster according to business characteristics, and in the embodiment, the bitmap metadata is divided according to the block device. The whole cluster is divided into different groups, and specifically, each node can be a group, but considering data security, i.e. preventing the situation that data cannot be processed due to node exception, the gateway of each two nodes (or multiple nodes) is a group, and is associated, wherein the gateway respectively maintains a specified block device, and a metadata management module is arranged under each gateway, the bitmap metadata managed by the two (or multiple) metadata management modules in each group has strong consistency, so as to realize the dispersed storage of metadata and guarantee the security of data.

[0085] In the embodiment, the cluster is based on the strong consistency, the first gateway module and the first metadata management module to execute the operation corresponding to the data operation instruction locally on the target node.

[0086] Specifically, the step S310 includes steps S311-S312.

[0087] The data operation instruction includes a metadata storage instruction; the first gateway module and a second gateway module of the corresponding binding node of the target node form a group, and maintain a specified block device;

[0088] In the embodiment, the scenario of metadata storage operation is mainly described, and the gateway of each two nodes forms a group and is associated, wherein the gateway respectively maintains a specified block device, and a metadata management module is arranged under each gateway.

[0089] For the two gateways in a group, the self is the first metadata management module in the scheme, and the other metadata management module in the group is the second metadata management module. For example, the gateway X of the A node and the gateway Y of the B node form an associated group, the metadata management module under the gateway X is I, and the metadata management module under the gateway Y is L; when the user sends a metadata storage operation instruction on the block device of the A node, the I on the current A node is the first metadata management module, and the L is the second metadata management module; conversely, when the user sends a metadata storage operation instruction on the block device of the B node, the L on the current B node is the first metadata management module, and the I is the second metadata management module.

[0090] Step S311, after receiving the to-be-stored metadata based on the first gateway module, based on the first gateway module, a storage message with the to-be-stored metadata is reported to the first metadata management module, and based on the first metadata management module, the to-be-stored metadata is sent to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the to-be-stored metadata in the binding node thereof, and feedback information of the stored metadata is fed back to the first metadata management module.

[0091] In the embodiment, the to-be-stored metadata is metadata pointed to by a user when sending a storage request to a block device. After the user sends the storage request to the block device, after the first gateway module of the node where the block device is currently located receives the to-be-stored metadata, the cluster reports a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module, and sends the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the to-be-stored metadata in the binding node thereof, and feedback information of the stored metadata is fed back to the first metadata management module. The second metadata management module is provided with a local storage module. The second metadata management module stores the to-be-stored metadata in the binding node thereof, that is, stores the to-be-stored metadata to the local storage module of the metadata management module. The local storage module is a data storage device provided under the metadata management module, including but not limited to a bitmap file and a bitmap database. The local storage module is used for local data storage under the metadata management module. The cluster accelerates the access speed and interactive operation speed of the metadata by using the local storage, so as to improve the overall performance of the SAN cluster.

[0092] In the embodiment, if the second gateway module receives the to-be-stored metadata of the user sending a storage request to a block device, the second data management module will report the metadata message to the first data management module corresponding to the first gateway module in the same group, so as to realize local storage. The local storage means that each time the user's metadata interactive request only needs to request metadata from the local data management module, without cross-machine network interaction, so as to reduce the cross-machine network interaction and improve the performance of reading and writing metadata of the gateway module.

[0093] Step S312, if the feedback information is received based on the first metadata management module, the to-be-stored metadata is determined from the first gateway module, and the metadata is stored in the target node.

[0094] In the embodiment, if the feedback information is received based on the first metadata management module, the cluster determines the to-be-stored metadata from the first gateway module and stores the metadata in the target node. Specifically, the first metadata management module is also provided with a local storage module.

[0095] In the embodiment, to ensure the strong consistency of the to-be-stored metadata in the two metadata management modules in the group, the cluster first stores the to-be-stored metadata to the local storage module under the second metadata management module based on the second metadata management module, and then stores the to-be-stored metadata to the storage module under the first metadata management module after confirming that the storage state of the local storage module under the second metadata management module under the backup management module is data storage success. Thus, it is ensured that the two metadata management modules in the group both store the to-be-stored metadata, and the data strong consistency in the metadata management modules in the group is ensured, thereby ensuring the data security on the basis of the dispersed storage of the metadata.

[0096] Specifically, referring to Figure 5 , the SAN-BMS1 and the SAN-BMS2 modules are normal, wherein the SAN-BMS1 is the metadata management module, and the SAN-BMS2 is the backup management module associated in the same group. The business process is as follows.

[0097] (1) The SAN-GATEWAY1 module maintains the data of the volume1 (block device), and when there is a bitmap data read / write operation, the SAN-GATEWAY1 module requests the SAN-BMS1 module to report snapshot bitmap data, wherein the SAN-GATEWAY1 module is the gateway under the current node.

[0098] (2) After the SAN-BMS1 module receives the request of the SAN-GATEWAY1 module to report snapshot bitmap data, the SAN-BMS1 module forwards the request to the SAN-BMS2 module.

[0099] (3) The SAN-BMS2 module updates the local bitmap file.

[0100] (4) The SAN-BMS2 module returns a message to the SAN-BMS1 module that the reporting of the bitmap is successful.

[0101] (5) The SAN-BMS1 module updates the local bitmap file.

[0102] (6) The SAN-BMS1 module returns a message to the SAN-GATEWAY1 module that the reporting of the bitmap is successful.

[0103] The metadata storage method provided in the application can improve the upper limit of the overall performance of the cluster compared with the prior art. When the data operation instruction of the client is detected, the first block device pointed by the data operation instruction is determined. Based on the first block device, the first gateway module belonging to the same target node as the first block device is determined, and the first metadata management module belonging to the target node as the first gateway module and managing the metadata in the first block device is determined. One gateway module corresponds to one metadata management module. Based on the first gateway module and the first metadata management module, the operation corresponding to the data operation instruction is performed. That is, in the application, the metadata management module is arranged under the gateway to which each block device belongs, and each metadata management module can perform data operation processing of metadata. Therefore, when the number of devices increases and the interaction data of the generated metadata increases, the metadata management modules under each gateway can perform metadata processing, thereby improving the upper limit of the overall performance of the cluster.

[0104] Based on the first embodiment, the application further provides another embodiment. The metadata storage method comprises the following steps:

[0105] Specifically, the step S310 comprises the following steps A100-A300:

[0106] In step A100, after receiving the to-be-stored metadata based on the first gateway module, the first gateway module reports a storage message with the to-be-stored metadata to the first metadata management module, and then determines the state information of the binding node.

[0107] In this embodiment, the cluster determines the state information of the binding node after receiving the to-be-stored metadata based on the first gateway module, reporting a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module. The method usually adopts a heartbeat mechanism. The heartbeat mechanism is a mechanism for sending a self-defined structure (heartbeat packet) at a regular time in a network system to let the other party know that it is still running normally to ensure the effectiveness of the connection. That is, the first metadata management module and the second metadata management module send running state confirmation messages to each other at a predetermined time interval. If one of them does not send the message for a long time, it indicates that the node state of the metadata management module is abnormal. On the contrary, if both parties maintain normal communication state of the running state confirmation message, it indicates that both nodes are in normal operation state.

[0108] Step A200, if the state information is normal, the first metadata management module sends the to-be-stored metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the to-be-stored metadata in the binding node of the second metadata management module, and feeds back the stored feedback information to the first metadata management module;

[0109] In the embodiment, to ensure the strong consistency of the to-be-stored metadata in the two metadata management modules in the group, the device first reports a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module after receiving the to-be-stored metadata based on the first gateway module, and then forwards the to-be-stored metadata from the first metadata management module to the second metadata management module after confirming that the state of the binding node where the second metadata management module is located is normal, so that the two metadata management modules in the group both receive the to-be-stored metadata, and the strong consistency of the to-be-stored metadata in the two metadata management modules in the group is further ensured.

[0110] Step A300, after receiving the to-be-stored metadata based on the first gateway module, the device reports a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module, and then determines the state information of the binding node.

[0111] Specifically, the step S310 further includes the following steps B100-B200:

[0112] Step B100, if the state information is abnormal, the second gateway maintained block device is connected to the first gateway, so that the second gateway maintained block device normally operates during the abnormality of the binding node corresponding to the target node;

[0113] In the embodiment, if the state information is node abnormality, the cluster connects the block device maintained by the second gateway to the first gateway, so that the target node corresponds to the binding node abnormality during the normal operation of the block device maintained by the second gateway. Specifically, when the first metadata management module senses that the node where the second metadata management module is located is abnormal, the cluster control SAN-MASTET module schedules the metadata management module to generate the information of the block device on the second metadata management module on the target node, wherein the information of the block device includes but is not limited to IP address and other information used for connecting the block device. And based on the information of the block device, the block device on the second metadata management module is migrated from the current node (i.e. the abnormal node) to the node where the metadata management module is located, wherein the migration process is the process of connecting the first metadata management module and the block device on the second metadata management module. Then during the node abnormality, the first metadata management module manages the data read and write of the block device of the self node and the block device on the second metadata management module.

[0114] In the embodiment, the SAN-MASTET module described above is a management node of the SAN cluster, which is used to maintain the configuration information of the entire cluster, and manage and schedule other modules of the cluster, that is, mainly responsible for the configuration management and scheduling of the entire cluster.

[0115] Step B200, based on the first metadata management module, determining the to-be-stored metadata from the first gateway module, and after storing the metadata on the target node, storing the to-be-stored metadata to the local log according to the storage order.

[0116] In the embodiment, the cluster determines the to-be-stored metadata from the first gateway module based on the first metadata management module, and after storing the metadata on the target node, stores the to-be-stored metadata to the local log according to the storage order, so as to restore the data under the second metadata management module based on the local log file after the binding node recovers to the normal working state, further ensuring the strong consistency of the to-be-stored metadata in the two metadata management modules in the group.

[0117] In the embodiment, if the node where the current block device is located is abnormal, the same as the above method, the block device maintained by the first gateway is connected to the second gateway, so that the block device maintained by the first gateway normally operates during the target node abnormality, and the metadata generated during the target node abnormality is stored in the second metadata management module according to the storage order.

[0118] Specifically, referring to Figure 6When the SAN-BMS1 and SAN-BMS2 modules are normal, the service flow after the node where the SAN-BMS2 module is located is abnormal is as follows:

[0119] (1) When the node 2 is abnormal, the SAN-MASTET module schedules the SAN-GATEWAY1 to generate the information of the volume 2 on the node 1, and migrates the volume 2 from the node 2 to the node 1. The SAN-GATEWAY1 module maintains the data reading and writing of the volume 1 and the volume 2. When there is a bitmap reading and writing operation, the SAN-BMS1 module is requested to report the snapshot bitmap data.

[0120] (2) The SAN-BMS1 module receives the reporting snapshot bitmap data request of the SAN-GATEWAY1 module, and updates the local bitmap file.

[0121] (3) The SAN-BMS1 module stores the requested data in the local log file.

[0122] (4) The SAN-BMS1 module returns the message of reporting the bitmap successfully to the SAN-GATEWAY1 module.

[0123] Based on the first embodiment and the second embodiment, the present application further provides another embodiment of the metadata storage method, which comprises:

[0124] Specifically, the step S310 further comprises the following step C100.

[0125] The step C100 comprises the following steps: based on the first metadata management module, reading the backup metadata stored in the local log after the corresponding binding node state of the target node recovers from the abnormal state to the normal state, and sending the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node.

[0126] In the embodiment, the backup metadata is stored in the local log under the first metadata management module, and is used to store the metadata interaction operation instruction information of the block device in the abnormal node in the same group.

[0127] In the embodiment, after the target node corresponding binding node state recovers from the abnormal state to the normal state, the cluster reads the backup metadata stored in the local log based on the first metadata management module, and sends the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in its binding node, that is, the second metadata management module reads the missed data during the abnormal period from the log file under the first metadata management module saved during the abnormal period, to ensure the strong consistency of the to-be-stored metadata in the two metadata management modules in the group, and further improve the access speed of the metadata.

[0128] Specifically, the step C100 includes the following steps C110-C120:

[0129] The step C100 reads a piece of backup data from the data stored in the local log based on the first metadata management module according to the storage sequence, and sends the backup data to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in its binding node, and feeds back the stored feedback information to the first metadata management module;

[0130] The step C200 returns to the step of reading a piece of backup data from the data stored in the local log based on the first metadata management module according to the storage sequence, and sending the backup data to the second metadata management module corresponding to the second gateway module, until all the data stored in the local log is sent to the second metadata management module, if the feedback information is received based on the first metadata management module.

[0131] Specifically, referring to Figure 7 , the steps are as follows:

[0132] (1) The SAN-BMS1 module reads and writes the local log file, wherein the historical bitmap operation data requested by the SAN-GATEWAY module is stored in the log file in sequence;

[0133] (2) The SAN-BMS1 module reads a piece of data from the log file and synchronizes it to the SAN-BMS2 module;

[0134] (3) After receiving the request message of the SAN-BMS1 synchronization bitmap data, the SAN-BMS2 module updates the local bitmap file;

[0135] (4) The SAN-BMS2 module replies to the SAN-BMS1 module with a synchronization success message;

[0136] (5) The SAN-BMS1 module synchronizes the log file and repeats (2)-(4);

[0137] (6) After the SAN-BMS1 module synchronizes all data of the log file to the SAN-BMS2, the SAN-BMS1 module deletes the local log file, and the SAN-BMS2 module resumes normal operation.

[0138] In the embodiment, after the node where the second metadata management module is located recovers from the abnormal state to the normal state, the data missed during the abnormal period is read from the log file saved locally by the first metadata management module during the abnormal period, so as to ensure the strong consistency of the to-be-stored metadata in the two metadata management modules in the group, and further improve the access speed of the metadata.

[0139] The application also provides an overall system framework diagram, referring to Figure 4 , the overall framework diagram is divided into a management node, a storage node and a cloud storage.

[0140] I. The SAN-MASTER module runs in the management node. The SAN-MASTER manages the configuration information of all block devices, the on-off line information of the SAN-GATEWAY, the management information of the SAN-BMS group, and schedules the SAN-GATEWAY and the SAN-BMS. The SAN-MASTER is divided into a master and a backup, which run in two management nodes, and provides a virtual IP as a unified access entrance through the keepalive mode.

[0141] II. The SAN-GATEWAY module and the SAN-BMS module run in the storage node.

[0142] (1) Two SAN-BMS modules form a group, which ensures the strong consistent read and write of the bitmap metadata. The whole cluster is divided into multiple groups of SAN-BMS according to the scale of the storage node, such as Figure 4 As shown in the figure, two groups of SAN-BMS are divided. Each group of SAN-BMS is deployed with two SAN-GATEWAY respectively, and only maintains the metadata information of the specified block device. As shown in the above figure, the SAN-BMS of group 1 only maintains the bitmap metadata of block device 1 and block device 2, SAN-GW1 maintains the data read and write of block device 1, and SAN-GW2 maintains the data read and write of block device 2.

[0143] (2) The SAN-GATEWAY module writes the actual block device operation data to the underlying cloud storage and sends the operation request of the bitmap metadata to the local SAN-BMS module. The local SAN-BMS module interacts with the SAN-BMS module at the other end to complete the consistency operation of the metadata. The local operation of the SAN-GATEWAY module to the SAN-BMS module improves the metadata operation performance. As shown in the above figure, SAN-GW1 directly sends a bitmap write request to the local SAN-BMS1, and SAN-BMS1 synchronizes the bitmap operation to SAN-BMS2 and returns. SAN-GW1 does not need to access SAN-BMS2 across the network.

[0144] III. The underlying cloud storage is a distributed object storage system that provides block device data storage services.

[0145] The application also provides a metadata storage device, which comprises:

[0146] The detection module 10 is configured to determine a first block device pointed by a data operation instruction of a client when detecting the data operation instruction.

[0147] The determination module 20 is configured to determine, based on the first block device, a first gateway module belonging to a target node with the first block device, and a first metadata management module belonging to the target node with the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module.

[0148] The execution module 30 is configured to execute an operation corresponding to the data operation instruction in the target node based on the first gateway module and the first metadata management module.

[0149] Optionally, the execution module 30 comprises:

[0150] The consistency execution module is configured to execute the operation corresponding to the data operation instruction in the target node based on the strong consistency, the first gateway module and the first metadata management module.

[0151] And / or, the consistency execution module further comprises: a first storage module, configured to, after receiving the to-be-stored metadata based on the first gateway module, report a storage message with the to-be-stored metadata to a first metadata management module based on the first gateway module, and send the to-be-stored metadata to a second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the to-be-stored metadata in a binding node thereof, and feeds back feedback information of the stored metadata to the first metadata management module; and a second storage module, configured to, if the feedback information is received based on the first metadata management module, determine the to-be-stored metadata from the first gateway module, and store the metadata in the target node.

[0152] And / or, the first storage module further comprises: a node state determination module, configured to, after receiving the to-be-stored metadata based on the first gateway module, determine state information of the binding node after reporting the storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module; a normal state storage module, configured to, if the state information is a node normal state, send the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module.

[0153] And / or, the first storage module further comprises: a block device maintenance module, configured to, if the state information is a node abnormal state, connect a block device maintained by the second gateway to the first gateway, so that the target node corresponding to the binding node normally runs the block device maintained by the second gateway during an abnormal period of the binding node; and an abnormal state storage module, configured to, after determining the to-be-stored metadata from the first gateway module based on the first metadata management module and storing the metadata in the target node, store the to-be-stored metadata in a local log according to a storage sequence.

[0154] And / or, the first storage module further comprises: a synchronization module, configured to, after the state of the target node corresponding to the binding node recovers from an abnormal state to a normal state, read backup metadata stored in the local log based on the first metadata management module, and send the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in a binding node thereof.

[0155] And / or, the synchronization module further comprises: a data synchronization module, configured to read a backup data from the data stored in the local log according to the storage sequence based on the first metadata management module, and send the backup data to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup data in the binding node of the second metadata management module, and feeds back the stored feedback information to the first metadata management module;

[0156] a plurality of data synchronization modules, configured to return to read a backup data from the data stored in the local log according to the storage sequence based on the first metadata management module, and send the backup data to the second metadata management module corresponding to the second gateway module until all the data stored in the local log is sent to the second metadata management module, if the feedback information is received based on the first metadata management module.

[0157] The metadata storage device embodiment of the present application is basically the same as the above-mentioned metadata storage method embodiments, and will not be repeated here.

[0158] Referring to Figure 1 , Figure 1 is a terminal structure schematic diagram of a hardware running environment involved in the embodiment scheme of the present application.

[0159] As Figure 1 shown, the terminal can include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen (Display), an input unit such as a keyboard (Keyboard), and an optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a magnetic disk memory. The memory 1005 can also be an independent storage device from the aforementioned processor 1001.

[0160] Optionally, the metadata storage device can further include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface can include a display, an input sub-module such as a keyboard, and can further include a standard wired interface, a wireless interface. The network interface can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).

[0161] Those skilled in the art can understand that Figure 1 The metadata storage device structure shown in the above embodiments does not constitute a limitation on the metadata storage device, and can include more or fewer components than shown, or combine certain components, or different component arrangements.

[0162] As shown in Figure 1 The memory 1005 can include an operating system, a network communication module, and a metadata storage program as a storage medium. The operating system is a program that manages and controls hardware and software resources of the metadata storage device, supports the metadata storage program and the running of other software and / or programs. The network communication module is used to realize communication between components inside the memory 1005, and communication with other hardware and software in the metadata storage system.

[0163] In the metadata storage device shown in Figure 1 The processor 1001 is used to execute the metadata storage program stored in the memory 1005 to realize the steps of the metadata storage method described in any of the above embodiments.

[0164] The metadata storage device specific embodiments of the present application are basically the same as the above metadata storage method embodiments, and will not be described here.

[0165] The present application also provides a storage medium having a metadata storage method program stored thereon, wherein the metadata storage method program is executed by a processor to realize the metadata storage method as follows:

[0166] Upon detecting a data operation instruction of a client, determining a first block device pointed to by the data operation instruction;

[0167] Based on the first block device, determining a first gateway module belonging to a same target node as the first block device, and a first metadata management module belonging to the target node as the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module;

[0168] Based on the first gateway module and the first metadata management module, the operation corresponding to the data operation instruction is executed.

[0169] Optionally, the bitmap metadata managed by the first metadata management module has strong consistency with the bitmap metadata managed by the second metadata management module of the corresponding binding node of the target node.

[0170] The step of executing the operation corresponding to the data operation instruction based on the first gateway module and the first metadata management module comprises:

[0171] Based on the strong consistency, the first gateway module and the first metadata management module, the operation corresponding to the data operation instruction is executed locally on the target node.

[0172] Optionally, the data operation instruction comprises a metadata storage instruction; the first gateway module and the second gateway module of the corresponding binding node of the target node are divided into a group and maintain a specified block device.

[0173] The step of executing the operation corresponding to the data operation instruction based on the strong consistency, the first gateway module and the first metadata management module on the target node comprises:

[0174] After receiving the to-be-stored metadata based on the first gateway module, a storage message with the to-be-stored metadata is reported to the first metadata management module based on the first gateway module, and the to-be-stored metadata is sent to the second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the to-be-stored metadata in the binding node thereof and feeds back stored feedback information to the first metadata management module.

[0175] If the feedback information is received based on the first metadata management module, the to-be-stored metadata is determined from the first gateway module, and the metadata is stored on the target node.

[0176] Optionally, the step of reporting the storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module after receiving the to-be-stored metadata based on the first gateway module, and sending the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module comprises:

[0177] After receiving the to-be-stored metadata based on the first gateway module, the state information of the binding node is determined based on the first gateway module after reporting the storage message with the to-be-stored metadata to the first metadata management module.

[0178] if the status information is normal, sending the to-be-stored metadata to a second metadata management module corresponding to the second gateway module based on the first metadata management module.

[0179] Optionally, after the step of sending the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module if the status information is normal, the method comprises:

[0180] if the status information is abnormal, connecting the block device maintained by the second gateway to the first gateway for normal operation of the block device maintained by the second gateway during the abnormality of the target node corresponding binding node;

[0181] determining the to-be-stored metadata from the first gateway module based on the first metadata management module, and storing the to-be-stored metadata in the local log according to the storage order after the target node stores the metadata.

[0182] Optionally, after the step of determining the to-be-stored metadata from the first gateway module based on the first metadata management module, and storing the to-be-stored metadata in the local log according to the storage order after the target node stores the metadata, the method comprises:

[0183] after the state of the target node corresponding binding node recovers from the abnormal state to the normal state, reading the backup metadata stored in the local log based on the first metadata management module, and sending the backup metadata to a second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node thereof.

[0184] Optionally, the step of reading the backup metadata stored in the local log based on the first metadata management module, and sending the backup metadata to a second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node thereof, comprises:

[0185] reading a piece of backup data from the data stored in the local log according to the storage order based on the first metadata management module, and sending the backup data to a second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node thereof, and feeds back to the first metadata management module the feedback information that it has stored;

[0186] If the feedback information is received based on the first metadata management module, the step of reading a backup data from the data stored in the local log according to the storage order based on the first metadata management module and sending the backup data to the second gateway module corresponding to the second metadata management module is returned until the data stored in the local log is completely sent to the second metadata management module.

[0187] The storage medium embodiment of the present application is basically the same as the above-mentioned metadata storage method, and will not be described here.

[0188] The present application also provides a computer program product, including a computer program, which is executed by a processor to realize the steps of the above-mentioned metadata storage method.

[0189] The computer program product embodiment of the present application is basically the same as the above-mentioned metadata storage method, and will not be described here.

[0190] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a…" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0191] The above-mentioned embodiment number of the present application is only for description, not representing the pros and cons of the embodiment.

[0192] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by software plus the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present application.

[0193] The above is only the preferred embodiment of the present application, and does not limit the protection scope of the present application, and any equivalent structure or equivalent process transformation made by using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the protection scope of the present application.

Claims

1. A metadata storage method characterized by comprising: The metadata storage method comprises: Upon detecting a data operation instruction of a client, determining a first block device pointed by the data operation instruction; Based on the first block device, determining a first gateway module belonging to a same target node as the first block device, and a first metadata management module belonging to the target node as the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module; Based on the first gateway module and the first metadata management module, executing an operation corresponding to the data operation instruction; Bitmap metadata managed by the first metadata management module has strong consistency with bitmap metadata managed by a second metadata management module of a second node corresponding to a binding node of the target node; The step of executing the operation corresponding to the data operation instruction based on the first gateway module and the first metadata management module comprises: Based on the strong consistency, the first gateway module and the first metadata management module, executing the operation corresponding to the data operation instruction locally in the target node; The data operation instruction comprises a metadata storage instruction; the first gateway module and a second gateway module of a second node corresponding to a binding node of the target node are grouped and maintain a specified block device; The step of executing the operation corresponding to the data operation instruction based on the strong consistency, the first gateway module and the first metadata management module in the target node locally comprises: After receiving the to-be-stored metadata based on the first gateway module, reporting a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module, and sending the to-be-stored metadata to a second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the to-be-stored metadata in a binding node thereof and feeds back stored feedback information to the first metadata management module; If the feedback information is received based on the first metadata management module, the to-be-stored metadata is determined from the first gateway module, and the metadata is stored in the target node.

2. The metadata storage method of claim 1, wherein, The step of reporting the storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module after receiving the to-be-stored metadata based on the first gateway module, and sending the to-be-stored metadata to a second metadata management module corresponding to the second gateway module based on the first metadata management module comprises: After receiving the to-be-stored metadata based on the first gateway module, determining state information of the binding node after reporting the storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module; If the state information is normal, the to-be-stored metadata is sent to the second metadata management module corresponding to the second gateway module based on the first metadata management module.

3. The metadata storage method of claim 2, wherein, If the state information is normal, the method comprises the following steps of: If the state information is abnormal, the second gateway maintained block device is connected to the first gateway, so that the target node corresponding binding node maintains the normal operation of the block device during the abnormal period; Based on the first metadata management module, the first gateway module determines the to-be-stored metadata, and after the target node stores the metadata, the to-be-stored metadata is stored in the local log according to the storage order.

4. The metadata storage method of claim 3, wherein, After the step of determining the to-be-stored metadata based on the first metadata management module from the first gateway module, and after the target node stores the metadata, the to-be-stored metadata is stored in the local log according to the storage order, the method comprises the following steps: After the state of the target node corresponding binding node recovers from the abnormal state to the normal state, based on the first metadata management module, the backup metadata stored in the local log is read, and the backup metadata is sent to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node.

5. The metadata storage method of claim 4, wherein, The step of reading the backup metadata stored in the local log based on the first metadata management module, and sending the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node, comprises the following steps: Based on the first metadata management module, a piece of backup data is read from the data stored in the local log according to the storage order, and the backup data is sent to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup data in the binding node, and feeds back the feedback information stored by the first metadata management module to the first metadata management module; If the feedback information is received based on the first metadata management module, return to the step of reading a piece of backup data from the data stored in the local log according to the storage order based on the first metadata management module, and sending the backup data to the second metadata management module corresponding to the second gateway module, until all the data stored in the local log are sent to the second metadata management module.

6. A metadata storage device, characterized by The metadata storage device comprises: A detection module is configured to determine a first block device pointed by a data operation instruction of a client when detecting the data operation instruction; A determination module is configured to determine, based on the first block device, a first gateway module belonging to a target node with the first block device, and a first metadata management module belonging to the target node with the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module; A determination module is configured to determine, based on the first block device, a first gateway module belonging to a target node with the first block device, and a first metadata management module belonging to the target node with the first gateway module and managing metadata in the first block device, wherein one gateway module corresponds to one metadata management module; An execution module configured to execute the operation corresponding to the data operation instruction in the target node based on the first gateway module and the first metadata management module; The execution module comprises: A consistent execution module configured to execute the operation corresponding to the data operation instruction in the target node based on strong consistency, the first gateway module and the first metadata management module; The consistent execution module further comprises: a first storage module configured to, after receiving the to-be-stored metadata based on the first gateway module, report a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module, and send the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module, so that the second metadata management module stores the to-be-stored metadata in the binding node thereof and feeds back feedback information about the stored metadata to the first metadata management module; and a second storage module configured to, if the feedback information is received based on the first metadata management module, determine the to-be-stored metadata from the first gateway module and store the metadata in the target node.

7. The metadata storage device of claim 6, wherein The first storage module further comprises: a node state determination module configured to, after receiving the to-be-stored metadata based on the first gateway module and reporting a storage message with the to-be-stored metadata to the first metadata management module based on the first gateway module, determine state information of the binding node; a normal state storage module configured to, if the state information is a normal node, send the to-be-stored metadata to the second metadata management module corresponding to the second gateway module based on the first metadata management module; And / or, the first storage module further comprises: a block device maintenance module configured to, if the state information is an abnormal node, connect the block device maintained by the second gateway to the first gateway, so that the block device maintained by the second gateway operates normally during the abnormality of the target node corresponding binding node; and an abnormal state storage module configured to, after determining the to-be-stored metadata from the first gateway module and storing the metadata in the target node based on the first metadata management module, store the to-be-stored metadata in the local log according to a storage order; And / or, the first storage module further comprises: a synchronization module configured to, after the state of the target node corresponding binding node recovers from the abnormal state to the normal state, read backup metadata stored in the local log based on the first metadata management module, and send the backup metadata to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup metadata in the binding node thereof. And / or, the synchronization module further comprises: a data synchronization module, configured to read a backup data from the data stored in the local log according to the storage order based on the first metadata management module, and send the backup data to the second metadata management module corresponding to the second gateway module, so that the second metadata management module stores the backup data in the binding node of the second metadata management module, and feeds back the feedback information stored by the second metadata management module to the first metadata management module; A plurality of data synchronization modules, configured to return to the step of reading a backup data from the data stored in the local log according to the storage order based on the first metadata management module, and sending the backup data to the second metadata management module corresponding to the second gateway module, until all the data stored in the local log is sent to the second metadata management module, if the feedback information is received based on the first metadata management module.

8. A metadata storage device, characterized by The metadata storage device comprises a memory, a processor and a program stored in the memory for implementing the metadata storage method, The memory is configured to store the program for implementing the metadata storage method; The processor is configured to execute the program for implementing the metadata storage method to implement the steps of the metadata storage method according to any one of claims 1 to 5.

9. A storage medium, characterized by The storage medium has the program for implementing the metadata storage method stored thereon, and the program for implementing the metadata storage method is executed by the processor to implement the steps of the metadata storage method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Industrial data acquisition and storage system and method based on data lake

    CN114915634A

  • Volte roaming using general purpose packet data access

    US10694457B1