Data storage system, method, device and equipment and storage medium

By deploying memory management, block storage and unified storage clusters in storage clusters, using podman containers and mode switching units, unified storage of SAN and NAS is achieved, solving the problems of complex device configuration and high coupling in the existing technology, reducing the problem of low-level device configuration and low-level coupling. Cost and improve resource utilization.

CN119105698AActive Publication Date: 2024-12-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411016951.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-10
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

When existing storage systems combine SAN and NAS, they require additional physical equipment configuration, which increases the cost of use and maintenance complexity, and are highly coupled and risky.

Method used

By deploying memory management units, block storage clusters and unified storage clusters in storage clusters, using podman containers to realize unified storage of SAN and NAS, using mode switching units to perform storage mode switching, and monitoring units to perform node monitoring, reducing coupling and improving resources Utilization.

Benefits of technology

It realizes a seamless combination of SAN and NAS, reduces storage costs, improves resource utilization, simplifies storage management, reduces device requirements, and meets the needs of different usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105698A_ABST
    Figure CN119105698A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of storage, in particular to a data storage system, method, device and equipment and a storage medium, and aims to integrate a storage area network system and a network attached storage system. The system comprises a memory management unit which is deployed in a main node in a storage cluster and is used for managing and distributing memory resources of each storage node; the block storage cluster is deployed in each node of the storage cluster and is used for storing to-be-stored data in a block storage mode; the unified storage cluster is deployed in each node of the storage cluster through a podman container and is used for storing the to-be-stored data in the same storage mode; the mode switching unit is used for switching storage modes of the data storage system; and the monitoring unit is used for monitoring each node in the storage cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of storage technology, and more specifically, to a data storage system, method, apparatus, device, and storage medium. Background Art

[0002] Common storage formats of storage systems include blocks, files, and objects. Block storage is suitable for storage area networks (SAN), and file storage is suitable for network attached storage (NAS). A mixed solution of NAS and SAN can bring the greatest flexibility and performance advantages to most users. How to unify NAS and SAN is an important research topic. In related technologies, an additional NAS gateway device is added to the SAN storage cluster to achieve the combination of the two.

[0003] The NAS storage system in the related technology is separated from the SAN storage system, and requires the separate configuration of additional physical devices, which increases the cost of use. The coupling of the two independent systems will also increase the probability of risks during use, and the maintenance cost is also high. Summary of the invention

[0004] The embodiments of the present application provide a data storage system, method, apparatus, device and storage medium, which are intended to integrate a storage area network system with a network attached storage system.

[0005] A first aspect of an embodiment of the present application provides a data storage system, the system comprising:

[0006] The memory management unit is deployed in the master node of the storage cluster and is used to manage and allocate memory resources of each storage node.

[0007] A block storage cluster, deployed in each node of the storage cluster, for storing the data to be stored using a block storage mode;

[0008] A unified storage cluster is deployed in each node of the storage cluster through a podman container, and is used to store the data to be stored using the same storage mode;

[0009] A mode switching unit, used to switch the storage mode of the data storage system;

[0010] The monitoring unit is used to monitor each node in the storage cluster.

[0011] Optionally, the unified storage cluster includes:

[0012] The client is used to receive operation commands sent by the front-end business interface and interact with the front-end IO processing unit to process data-related operations;

[0013] A metadata processing unit, used for processing metadata of the storage cluster;

[0014] The front-end IO processing unit is used to perform corresponding data processing operations according to the received IO information.

[0015] A second aspect of an embodiment of the present application provides a data storage method, the method being based on the data storage system of the first aspect, the method comprising:

[0016] The storage system receives data to be stored;

[0017] The storage system determines a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, wherein the data storage mode includes a unified storage mode and a block storage mode;

[0018] The data to be stored is stored using the target data storage mode.

[0019] Optionally, before storing the data to be stored using the target storage mode, the method further includes:

[0020] Generate a corresponding mode switching command according to the target data storage mode;

[0021] The storage mode of the storage system is switched to the target data storage mode through the mode switching command.

[0022] Optionally, switching the storage mode of the storage system to the target storage mode by using the mode switching command includes:

[0023] In a case where the mode switching command received by the storage system is a unified storage mode switching command, creating a unified storage mode start flag file;

[0024] Allocate cores and memory to containers in each node in the storage cluster in a configuration file;

[0025] When the configuration file is modified, restart the node;

[0026] When the node is restarted, detecting whether the unified storage mode start flag file is stored in the node;

[0027] When detecting that the unified storage mode enable flag file is stored in the node, configuring the container according to the configuration file;

[0028] When the container is configured, the image file corresponding to the storage cluster is loaded into the container;

[0029] When the image file is loaded, the container is started.

[0030] Optionally, the method further comprises:

[0031] In a case where the mode switching command received by the storage system is a block storage mode switching command, deleting the unified storage mode start mark file;

[0032] Reclaim the core and the memory allocated to the container in the configuration file;

[0033] Deleting the container in the storage cluster;

[0034] Cleaning up the image file;

[0035] Restart each node in the storage cluster.

[0036] Optionally, when the storage mode is the unified storage mode, the method includes:

[0037] Allocate corresponding cores and memory to each node in the storage cluster corresponding to the storage system;

[0038] Binding a container in each node to the core and the memory;

[0039] Establishing a directory mapping between each of the containers in the storage cluster and a host machine corresponding to the container;

[0040] Using the host machine to start the container;

[0041] Jump from the control end of the block storage mode to the control end of the container;

[0042] The corresponding unified storage command is executed through the control end of the container.

[0043] Optionally, the method further comprises:

[0044] When the block storage mode is enabled, a monitoring cluster is enabled;

[0045] When receiving the authentication message sent by the monitored end, the monitoring cluster sends an identity authentication reply to the monitored end, and sends a metadata bitmap to the monitored end;

[0046] When receiving the metadata node heartbeat message sent by the monitored end, the monitoring cluster sends a heartbeat reply message to the monitored end to monitor the status of the metadata node on the monitored end;

[0047] When the monitoring cluster detects that the state of the metadata node of the monitored end changes, the monitoring cluster broadcasts the metadata bitmap to each of the nodes in the storage cluster;

[0048] When the monitoring cluster detects that a new node has been added to the storage cluster, the monitoring cluster determines whether the new node belongs to a new io group;

[0049] In the case where the new node belongs to the new io group, updating the maximum number value of the metadata nodes;

[0050] When the monitoring cluster detects that a node in the storage cluster leaves the storage cluster, the monitoring cluster selects a new node in the same io group as the node;

[0051] Starting a new metadata node in the new node;

[0052] When receiving the message for creating a distributed file system, the monitoring cluster updates the common data bitmap and the volume information in the metadata bitmap.

[0053] Optionally, the method further comprises:

[0054] In the case where the metadata node in the first node in the storage cluster fails, the monitoring cluster detects a heartbeat anomaly;

[0055] When the monitoring cluster detects a heartbeat abnormality, restarting the metadata node in the first node;

[0056] In case the monitoring cluster receives a heartbeat sent by the metadata node, broadcasting a new metadata bitmap to each node in the storage cluster;

[0057] The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

[0058] Optionally, the method further comprises:

[0059] In the case where a monitoring node in the first node in the storage cluster fails, the remaining nodes in the monitoring cluster receive a node offline message;

[0060] The second node in the storage cluster takes over the service process;

[0061] The metadata node in the first node detects a heartbeat abnormality;

[0062] The service process in the first node controls the metadata node in the first node to shut down;

[0063] The service process in the second node starts the new metadata node;

[0064] The metadata node in the second node sends a heartbeat message to the corresponding monitoring node;

[0065] When receiving the heartbeat message, the monitoring node notifies all nodes in the monitoring cluster to broadcast the new metadata bitmap;

[0066] The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

[0067] Optionally, the method further comprises:

[0068] When a new node is added to the storage cluster of the storage system, a unified storage service in the new node is started;

[0069] When the unified storage service is started, the metadata node in the new node sends a heartbeat message to the monitoring node corresponding to the new node;

[0070] The monitoring cluster detects the heartbeat message and determines the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster;

[0071] When the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster, updating the maximum number of metadata nodes;

[0072] Add a metadata node record of the new node in the metadata bitmap;

[0073] When receiving the heartbeat message, the monitoring node corresponding to the new node notifies each monitoring node in the monitoring cluster to broadcast the new metadata bitmap;

[0074] Each of the metadata nodes in the metadata node cluster updates the metadata bitmap in the metadata node according to the new metadata bitmap.

[0075] Optionally, the method further comprises:

[0076] When a node in the storage cluster corresponding to the storage system is removed, determining a node parameter of the node;

[0077] According to the node parameters, the node is deleted by a corresponding node deletion method.

[0078] A third aspect of an embodiment of the present application provides a data storage device, the device comprising:

[0079] A data receiving module, used for the storage system to receive data to be stored;

[0080] A storage mode determination module, used for the storage system to determine a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, wherein the data storage mode includes a unified storage mode and a block storage mode;

[0081] A data storage module is used to store the data to be stored using the target data storage mode.

[0082] Optionally, the device further comprises:

[0083] A command generation module, used for generating a corresponding mode switching command according to the target data storage mode;

[0084] The storage mode switching module is used to switch the storage mode of the storage system to the target data storage mode through the mode switching command.

[0085] Optionally, the storage mode switching module includes:

[0086] A file creation module, configured to create a unified storage mode start flag file when the mode switching command received by the storage system is a unified storage mode switching command;

[0087] A first resource allocation module, configured to allocate cores and memory to containers in each node in the storage cluster in a configuration file;

[0088] A first node restart module, used for restarting the node when the configuration file is modified;

[0089] When the node is restarted, detecting whether the unified storage mode start flag file is stored in the node;

[0090] A container configuration module, configured to configure the container according to the configuration file when detecting that the unified storage mode enable flag file is stored in the node;

[0091] An image loading module, used to load the image file corresponding to the storage cluster into the container when the container is configured;

[0092] The container startup module is used to start the container when the image file is loaded.

[0093] Optionally, the device further comprises:

[0094] A file deletion module, configured to delete the unified storage mode start mark file when the mode switching command received by the storage system is a block storage mode switching command;

[0095] A data cleaning module, used for reclaiming the core and the memory allocated to the container in the configuration file;

[0096] A container deletion module, used to delete the container in the storage cluster;

[0097] A file cleaning module, used to clean up the image file;

[0098] The second node restart module is used to restart each node in the storage cluster.

[0099] Optionally, the device further comprises:

[0100] A second resource allocation module, used to allocate corresponding cores and memories to each node in the storage cluster corresponding to the storage system;

[0101] A resource binding module, used to bind the container in each node to the core and the memory;

[0102] A mapping establishment module, used to establish a directory mapping between each container in the storage cluster and a host machine corresponding to the container;

[0103] A container startup module, used to start the container using the host machine;

[0104] A control jump module, used to jump from the control end of the block storage mode to the control end of the container;

[0105] The command execution module is used to execute the corresponding unified storage command through the control end of the container.

[0106] Optionally, the device further comprises:

[0107] A monitoring cluster startup module, used to start the monitoring cluster when the block storage mode is started;

[0108] An authentication module, configured for the monitoring cluster to send an identity authentication reply to the monitored end and send a metadata bitmap to the monitored end when receiving an authentication message sent by the monitored end;

[0109] A message reply module, used for the monitoring cluster to send a heartbeat reply message to the monitored end when receiving a metadata node heartbeat message sent by the monitored end, so as to monitor the status of the metadata node on the monitored end;

[0110] A first broadcast module, configured for the monitoring cluster to broadcast a metadata bitmap to each of the nodes in the storage cluster when detecting that the state of the metadata node of the monitored end changes;

[0111] A node judgment module, used for the monitoring cluster to judge whether a new node belongs to a new io group when detecting that a new node has been added to the storage cluster;

[0112] A maximum value updating module, used for updating the maximum number value of the metadata node when the new node belongs to the new io group;

[0113] A new node selection module, configured for the monitoring cluster to select a new node in the same io group as the node when the monitoring cluster detects that a node in the storage cluster has left the storage cluster;

[0114] A metadata node startup module, used for starting the new metadata node in the new node;

[0115] The first data updating module is used for the monitoring cluster to update the common data bitmap and the volume information in the metadata bitmap when receiving the message of creating a distributed file system.

[0116] Optionally, the device further comprises:

[0117] A first anomaly detection module, configured to detect a heartbeat anomaly in the monitoring cluster when a failure occurs in the metadata node in the first node in the storage cluster;

[0118] A metadata node restart module, used to restart the metadata node in the first node when the monitoring cluster detects a heartbeat abnormality;

[0119] A second broadcast module, configured to broadcast a new metadata bitmap to each node in the storage cluster when the monitoring cluster receives a heartbeat message sent by the metadata node;

[0120] The second data updating module is used for the metadata node cluster to update the metadata bitmap of each metadata node according to the new metadata bitmap.

[0121] Optionally, the device further comprises:

[0122] A node offline module, configured to enable the remaining nodes in the monitoring cluster to receive a node offline message when a monitoring node in the first node in the storage cluster fails;

[0123] A service takeover module, used for a second node in the storage cluster to take over a service process;

[0124] A second anomaly detection module, used for detecting a heartbeat anomaly in the metadata node of the first node;

[0125] A node closing module, used for the service process in the first node to control the metadata node in the first node to close;

[0126] A metadata node startup module, used for the service process in the second node to start a new metadata node;

[0127] A heartbeat message sending module, used for the metadata node in the second node to send a heartbeat message to the corresponding monitoring node;

[0128] A third broadcast module is used for the monitoring node to notify all nodes in the monitoring cluster to broadcast the new metadata bitmap when receiving the heartbeat message;

[0129] The third data update module is used for the metadata node cluster to update the metadata bitmap of each metadata node according to the new metadata bitmap.

[0130] Optionally, the device further comprises:

[0131] A unified storage service startup module, used to start the unified storage service in a new node when a new node is added to the storage cluster of the storage system;

[0132] A heartbeat message sending module, used for, when the unified storage service is started, the metadata node in the new node sends a heartbeat message to the monitoring node corresponding to the new node;

[0133] A node quantity determination module, used to monitor the cluster and detect the heartbeat message, and determine the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster;

[0134] A metadata node data updating module, used for updating the maximum number of metadata nodes when the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster;

[0135] A node record module, used for adding a metadata node record of the new node in the metadata bitmap;

[0136] A fourth broadcast module, configured for the monitoring node corresponding to the new node to notify each monitoring node in the monitoring cluster to broadcast the new metadata bitmap when receiving the heartbeat message;

[0137] The fourth data update module is used for each metadata node in the metadata node cluster to update the metadata bitmap in the metadata node according to the new metadata bitmap.

[0138] Optionally, the device further comprises:

[0139] A node parameter determination module, used to determine the node parameters of the node when a node in the storage cluster corresponding to the storage system is removed;

[0140] The node deletion module is used to delete the node according to the node parameters and in a corresponding node deletion method.

[0141] A fourth aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the second aspect of the present application are implemented.

[0142] A fifth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the second aspect of the present application are implemented.

[0143] Using the data storage system provided by the present application, a memory management unit is deployed in the master node in the storage cluster, and is used to manage and allocate memory resources of each storage node; a block storage cluster is deployed in each node of the storage cluster, and is used to store the data to be stored using the block storage mode; a unified storage cluster is deployed in each node of the storage cluster through a podman container, and is used to store the data to be stored using the same storage mode; a mode switching unit is used to switch the storage mode of the data storage system; and a monitoring unit is used to monitor each node in the storage cluster.

[0144] In this system, a block storage node is deployed in each node of the storage cluster to form a block storage cluster. A podman container is deployed in each node of the storage cluster, and a unified storage system is deployed in the podman container to form a unified storage cluster. The block storage cluster corresponds to the SAN system, and the unified storage cluster corresponds to the NAS system. In this way, the two storage systems are deployed in the same storage cluster. Based on the characteristics of the podman container, the two storage systems are isolated, and the coupling between the operating environments of the two storage systems is reduced. The consumption of memory resources is better, and no additional equipment is required. It can flexibly switch between the two storage modes, which can reduce storage costs while meeting different usage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0145] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0146] Figure 1 is a structural diagram of a data storage system proposed in an embodiment of the present application;

[0147] Figure 2 is a schematic diagram of the data storage system process proposed in one embodiment of the present application;

[0148] Figure 3 This is a distributed file system service flow chart proposed in an embodiment of the present application;

[0149] Figure 4 is a flow chart of a data storage method proposed in one embodiment of the present application;

[0150] Figure 5 It is a service mode state diagram proposed in an embodiment of the present application;

[0151] Figure 6 is a flow chart of container management proposed in one embodiment of the present application;

[0152] Figure 7 It is a metadata node state switching diagram proposed in an embodiment of the present application;

[0153] Figure 8 It is a schematic diagram of the metadata cluster processing flow proposed in an embodiment of the present application;

[0154] Fig. 9 This is a flowchart of metadata node failure processing proposed in one embodiment of the present application;

[0155] Fig.10This is a monitoring node fault processing flow chart proposed in an embodiment of the present application;

[0156] Fig.11 is a schematic diagram of a data storage device proposed in an embodiment of the present application;

[0157] Fig.12 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0158] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0159] refer to Figure 1 , Figure 1 is a schematic diagram of the structure of a data storage system proposed in an embodiment of the present application. Figure 1 As shown, the data storage system includes:

[0160] A memory management unit is deployed in the master node of the storage cluster, and is used to manage and allocate memory resources of each storage node; a block storage cluster is deployed in each node of the storage cluster, and is used to store the data to be stored using the block storage mode; a unified storage cluster is deployed in each node of the storage cluster through a podman container, and is used to store the data to be stored using the same storage mode; a mode switching unit is used to switch the storage mode of the data storage system; a monitoring unit is used to monitor each node in the storage cluster. The unified storage cluster includes: a client, which is used to receive operation commands sent by the front-end business interface and interact with the front-end io processing unit to process data-related operations; a metadata processing unit, which is used to process the metadata of the storage cluster; and a front-end io processing unit, which is used to perform corresponding data processing operations according to the received io information.

[0161] In this embodiment, the current storage system architecture is mainly divided into a centralized architecture and a distributed architecture. The centralized architecture has strong performance and security, but the software and hardware costs are high, and the scalability is limited. It is mostly used in traditional banking, telecommunications and other industries; while the distributed architecture has more significant advantages in price cost, independent research and development, flexible compatibility, and scalability.

[0162] In this embodiment, the block storage cluster is composed of SAN nodes deployed in each node. SAN is a centralized architecture. The unified storage cluster is composed of NAS nodes deployed in each node. The storage area network (SAN) connects the storage array and the server host through a Fibre Channel switch, and finally becomes a dedicated storage network. It can isolate storage and servers, simplify storage management, and can manage various resources in a unified and centralized manner, making storage more efficient. Due to the use of fiber optic interfaces, SAN also has a higher bandwidth. In addition, SAN can shield the hardware of the system and can use storage devices from different manufacturers at the same time. SAN is generally used in environments with large continuous IO density.

[0163] In this embodiment, NAS is a distributed architecture. For environments with high concurrency, random small block IO or shared access to files, and CPU-intensive environments, SAN storage does not perform as well as network attached storage (NAS) storage. In addition, its cross-platform performance is not as good as NAS.

[0164] In this embodiment, a SAN system and a NAS system are deployed in the storage cluster in the data storage system at the same time, wherein the NAS system is deployed based on the podman container, which is a daemon-free, open source Linux native tool designed to easily find, run, build, share and deploy applications using the Open Container Initiative (OCI) containers and container images. Podman does not require a daemon or a root user to run, thereby eliminating the security risks introduced by the docker container. The two are isolated from each other and have low coupling.

[0165] In this embodiment, reference Figure 2 , Figure 2 is a schematic diagram of the data storage system process proposed in an embodiment of the present application, such as Figure 2As shown in the figure, after the storage system is started, compass_start (initialization command) is called to initialize the operating environment, and the ecmain (image management) main process is pulled up. The main process derives multiple child processes, including plmain (read-write process), container (container), sshd (remote connection service), etc. The host plmmk (memory management unit) is responsible for memory management and allocation; plmain is responsible for resource configuration, io forwarding, cache management, data storage, etc., sshd is responsible for remote authentication management, and the container is the podman container. Podman does not need a daemon program or root user to run. From the perspective of logical architecture, it is more reasonable than docker. Podman deploys a distributed file system IUFS, including a metadata MetaDS cluster, which is responsible for forming a distributed NAS cluster with multiple nodes and providing NAS services iufsd to the outside world. Among them, PLWDK is a watchdog and etc is a driver component.

[0166] In this embodiment, reference Figure 3 , Figure 3 is a distributed file system service flow chart proposed in an embodiment of the present application, such as Figure 3 As shown in the figure, the distributed file system IUFS consists of a single NAS process consisting of NFS (LAN shared data) / SMB (information service block), Lib client, METADS cluster (metadata node cluster), Virtio (front-end io processing module, processing io read and write data requests and message sending and receiving requests, and sending requests to the back-end Vhost through shared memory), and a MON cluster (monitoring cluster) integrated into the SAN. The basic business process is that the upper-layer NAS protocol receives business requests through the front-end business port, completes request parsing, authentication and other operations, and then sends them to the Lib client. The Lib client interacts with Virtio to process data-related operations and interacts with MDS to process metadata-related operations. MDS completes the persistent storage of metadata through Virtio. The MON cluster implements NAS cluster functions such as MDS map (metadata bitmap), FS map (ordinary data bitmap), heartbeat, CLI (command line), etc.

[0167] In this embodiment, reference Figure 2When the storage systems belong to the same storage mode, the NAS service process (iufsd) is started. This process uses the front-end io processing module as the basic component, and dynamically starts NFS service, SMB service, Lib client, METADS and other dynamic library components. Each component interacts through function calls in the process. The core advantage of a single process is the high utilization of cache resources. By merging the metadata cache of the Lib client and METDS, the memory resource utilization is improved. When data is transmitted between the NAS system and the SAN system, the service process establishes a shared memory transmission channel through the virtio protocol, and the bypass kernel is used during data transmission, reducing the system call overhead. In terms of horizontal links, by opening up the Virtio (front-end) -> Vhost (main system) -> LV / CO (logical volume) path, the horizontal data transmission bypasses the kernel, reducing the system call overhead; in terms of cache, through the NAS single process, the metadata cache of the Lib client and METADS is merged, the metadata cache size is increased, and the inter-process communication overhead is reduced; in terms of scenario-based performance optimization, the performance is improved through scenario-based optimization methods such as SAN / NAS resource on-demand configuration, performance mode, load balancing mode, application type adaptation, and file life cycle identification. In the metadata service, DHT is a distributed hash table, WORM is data protection time, and ACL is an access control list.

[0168] In this embodiment, a METADS cluster is used to meet the storage requirements of a large number of files and the metadata performance requirements brought by a large number of files, and provide high availability of METADS. The metadata service is distributed on each storage node, and there is no need to configure hardware nodes separately. It is responsible for metadata caching, data distribution, space management, distributed locks, directory sharding, etc. When the storage system accesses file data, it first locates the metadata node to which the file belongs based on the metadata information of the file, and then obtains the data distribution of the file through the metadata node, that is, obtains which nodes the file is distributed on and the specific location on the node, and then accesses these nodes to complete the data access operation; in addition, when one or more metadata services fail, the remaining MetaDS can still undertake metadata management services, and the front-end io is not aware of it.

[0169] refer to Figure 4 , Figure 4 FIG. 1 is a flow chart of a data storage method proposed in an embodiment of the present application, and the storage method is implemented based on a data storage system. Figure 4 As shown, the method comprises the following steps:

[0170] S11: The storage system receives data to be stored.

[0171] In this embodiment, the storage system is composed of multiple storage nodes, each of which is deployed with a block storage node, a unified storage node, a monitoring node, and a metadata node, respectively forming a block storage cluster, a unified storage cluster, a monitoring cluster, and a metadata cluster. The data to be stored is the data sent to the storage system from the outside world and needs to be stored.

[0172] In this embodiment, the system to be stored first receives the data to be stored.

[0173] S12: The storage system determines a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, where the data storage mode includes a unified storage mode and a block storage mode.

[0174] In this embodiment, the data types of the data to be stored include large block dense data and random small block data. The large block dense data is stored in a block storage mode, and the random small block data is stored in a unified storage mode.

[0175] In this embodiment, after receiving the data to be stored, the data storage mode corresponding to the data to be stored is determined according to the data type of the data to be stored, and the data storage mode includes a unified storage mode and a block storage mode.

[0176] S13: Use the target data storage mode to store the data to be stored.

[0177] In this embodiment, after the data storage mode corresponding to the data to be stored is determined, the storage system is switched to the corresponding data storage mode, and the data to be stored is stored using the data storage mode.

[0178] In this embodiment, before using the target storage mode to store the data to be stored, the method further includes:

[0179] S21: Generate a corresponding mode switching command according to the target data storage mode.

[0180] In this embodiment, a corresponding mode switching command is generated according to the target data storage mode.

[0181] In this embodiment, the mode switching command includes a block storage mode switching command and a unified storage mode switching command.

[0182] For example, the block storage mode switching command is Block_only, and the unified storage mode switching command is Unified.

[0183] S22: Switching the storage mode of the storage system to the target data storage mode through the mode switching command.

[0184] In this embodiment, the storage system provides a setmode command, which is a node command and needs to be executed in each node through the mtop setmode panel_name method, to implement the setmode script and put it in the / compass / bin / directory, encapsulating the actions of modifying the SAN configuration file and the NAS logo file management. Then, through the corresponding mode switching command, the storage mode of the storage system is switched to the target data storage mode.

[0185] In this embodiment, reference Figure 5 , Figure 5 is a service mode state diagram proposed in an embodiment of the present application, such as Figure 5 As shown in the figure, when the user selects the block storage mode, all system resources will be allocated to the SAN system to obtain the highest storage performance. When the user switches to the unified storage mode, some cores are bound to the container of the NAS system and some memory resources are allocated for use by the NAS service.

[0186] In this embodiment, switching the storage mode of the storage system to the target storage mode through the mode switching command includes:

[0187] S22-1: When the mode switching command received by the storage system is a unified storage mode switching command, create a unified storage mode start flag file.

[0188] In this embodiment, the unified storage mode on flag file is used to mark that the storage mode of the storage system has been switched to the unified storage mode. At this time, the system stores data based on a network attached storage system (NAS).

[0189] In this embodiment, when the mode switching command received by the storage system is a unified storage mode switching command, a unified storage mode start flag file is created.

[0190] For example, if the -unfied parameter is included when the setmode command is issued, a nas_opened flag file is created in the / data / nas directory to indicate that the unified mode is enabled.

[0191] S22-2: Allocate cores and memory to containers in each node in the storage cluster in the configuration file.

[0192] In this embodiment, the configuration file is a file for configuring storage resources in the storage system.

[0193] In this embodiment, when the storage system is switched to the unified storage mode, cores and memory are allocated to the container in each node in the storage cluster in the configuration file.

[0194] For example, modify the configuration files such as / compass / svc_nodetypes.xml, modify the resource allocation method, and reserve core, memory and other resources for NAS.

[0195] S22-3: When the configuration file modification is completed, restart the node.

[0196] In this embodiment, when the configuration file is modified, the corresponding node is restarted.

[0197] S22-4: When the node is restarted, detect whether the unified storage mode start flag file is stored in the node.

[0198] In this embodiment, when the node is restarted, it is detected whether the unified storage mode start flag file is stored in the node.

[0199] For example, during the execution of the / etc / init / compass.sh script, the nas_opened (unified storage mode enabled) flag file is detected.

[0200] S22-5: When it is detected that the unified storage mode enable flag file is stored in the node, configure the container according to the configuration file.

[0201] In this embodiment, the container is a packaged program that provides a corresponding interface to the outside world and implements corresponding functions.

[0202] In this embodiment, when it is detected that the unified storage mode enable flag file is stored in the node, the container is configured according to the configuration file.

[0203] S22-6: When the container is configured, the image file corresponding to the storage cluster is loaded into the container.

[0204] In this embodiment, when the container is configured, the image file corresponding to the storage cluster is loaded into the container. If the image file has been loaded into the container, this step can be omitted.

[0205] For example, use the podman images command to query. If the NAS image is not loaded, first load the image of the NAS container from the / data / nas directory.

[0206] S22-7: When the image file is loaded, start the container.

[0207] In this embodiment, when the image file is loaded, the container is started, and the storage system can provide NAS services to the outside world and store the storage data in a unified storage mode.

[0208] For example, use the podman ps-a command to check whether a NAS container is created. If not, use the podman run command to create a NAS container. Otherwise, directly execute the podman start command to start the NAS container.

[0209] In another embodiment of the present application, the method further includes:

[0210] S22-8: When the mode switching command received by the storage system is a block storage mode switching command, the unified storage mode start mark file is deleted.

[0211] In this embodiment, when the mode switching command received by the storage system is a block storage mode switching command, the unified storage mode start mark file is deleted.

[0212] For example, if the setmode command is issued with the -block_only parameter, the nas_opened file in the / data / nas directory will be deleted, indicating that the Block_only mode is enabled.

[0213] S22-9: Reclaim the core and the memory allocated to the container in the configuration file.

[0214] In this embodiment, the core and memory allocated to the container are reclaimed in the configuration file.

[0215] For example, modify the configuration files such as / compass / svc_nodetypes.xml to reclaim the allocated resources.

[0216] S22-10: Delete the container in the storage cluster.

[0217] In this embodiment, the container created in the storage cluster is deleted.

[0218] S22-11: Clean up the image file.

[0219] In this embodiment, the image files loaded in the storage cluster are cleared.

[0220] S22-12: Restart each node in the storage cluster.

[0221] In this embodiment, after the image files are cleaned up, each node in the storage cluster is restarted.

[0222] In this embodiment, the user can choose to switch to the unified storage mode or the block storage mode in the service assistant interface of the storage system, or can directly execute a command in the command line to switch.

[0223] In another embodiment of the present application, when the storage mode is the unified storage mode, the method includes:

[0224] S31: Allocate corresponding cores and memory to each node in the storage cluster corresponding to the storage system.

[0225] In this embodiment, reference Figure 6 , Figure 6 is a flow chart of container management proposed in one embodiment of the present application, such as Figure 6 As shown, when the storage mode is unified storage mode, it is necessary to manage the containers in each node. First, the corresponding core and memory are allocated to each node in the storage cluster in the configuration file corresponding to the block storage mode.

[0226] For example, when Unified mode is enabled, the SAN system configuration file (svc_nodetypes.xml) needs to be modified to allocate resources such as cores and memory to the NAS container.

[0227] S32: Bind the container in each node to the core and the memory.

[0228] In this embodiment, in the container configuration file corresponding to the same storage mode, the container in each node is bound to the core and the memory.

[0229] S32: Establish a directory mapping between each container in the storage cluster and a host machine corresponding to the container.

[0230] In this embodiment, a directory mapping is established between each container in the storage cluster and the host machine corresponding to the container.

[0231] For example, establish a mapping between the host's / mnt / plfs and the / mnt / plfs directory inside the container to store NAS configuration files; establish a mapping between the host's / data / nas and the / nas directory inside the container to store NAS backup configuration files, etc.; establish a mapping between the host's / dumps / nas / and the / log directory inside the container to store NAS log files

[0232] S33: Using the host machine to start the container.

[0233] In this embodiment, the host machine is used to start the container.

[0234] For example, the command to create a container is as follows:

[0235] podman run --name iufs / / Container name

[0236] --privileged / / Give the container the same device access rights as the host

[0237] --network=host / / The container uses the host mode and uses the same network configuration as the host

[0238] -v / mnt / plfs: / mnt / plfs / / / mnt / plfs directory is mapped to the container

[0239] -v / data / nas: / nas / / / data / nas directory is mapped to the container to store nas configuration files

[0240] -v / dumps / nas: / var / log / / / dumps / nas directory is mapped to the container to store nas logs

[0241] -it / / Run in interactive mode to view the contents of the container

[0242] -d / / Run in background mode

[0243] mage_name / / Container image

[0244] S34: Jump from the control end of the block storage mode to the control end of the container.

[0245] In this embodiment, each mode in the storage system has a corresponding control end. In the same storage mode, the control end of the block storage mode jumps to the control end of the container.

[0246] For example, use podman exec –it iufs xxxxx to jump from the SAN end to the container to execute the NAS command.

[0247] S35: Execute the corresponding unified storage command through the control end of the container.

[0248] In this embodiment, after jumping to the container control end, the corresponding unified storage command is executed through the container control end.

[0249] For example, the system needs to encapsulate the podman command into a chnascontainer command for internal debugging. Non-cluster and node commands are compiled internally into executable files and placed in the / compass / bin directory.

[0250] In this embodiment, when the container needs to communicate with the SAN end, it jumps from the container to the SAN end to execute the SAN command. Referring to the existing framework, the SAN end starts the daemon process of the container, communicates with the daemon process from the inside of the container through Unix Domain Socket, and executes the SAN command. The container's image, default configuration file, and root directory storage path are all placed in the / data / nas directory. It is estimated that about 40G of storage space needs to be reserved for the NAS container to carry the NAS container's image, the decompressed directory, the executable files required in the container, the lib library, and the files generated during the operation of the NAS business.

[0251] In another embodiment of the present application, the method further includes:

[0252] S41: When the block storage mode is enabled, a monitoring cluster is enabled.

[0253] In this embodiment, the monitoring cluster MON is used to monitor each node in the storage cluster.

[0254] In this embodiment, when the block storage mode is started, the monitoring cluster is started.

[0255] For example, the SAN cluster is started, the Mon cluster is initialized, and the local Unix socket monitoring is started. The monitoring includes two channels, one is the channel with METADS, monitoring / data / nasunskt, with a maximum of 16 links, and the other is the channel with Client (normal data), monitoring / data / nasunskt2, with a maximum of 16 links. After the socket monitoring function of each channel monitors that a connection has been established, it reads the message for processing, generates a reply message, and puts it into the sending queue. At the same time, each channel initializes a pipeline for asynchronous event notification after message processing, and then performs relevant preprocessing and notifies the read and write functions to send messages through the event monitoring processing mechanism of the SAN code.

[0256] S42: When receiving the authentication message sent by the monitored end, the monitoring cluster sends an identity authentication reply to the monitored end, and sends a metadata bitmap to the monitored end.

[0257] In this embodiment, a bitmap is a data structure that uses each bit to store a certain state, and is suitable for scenarios with massive data, integers, and non-repeated data. It is usually used to determine whether a certain data exists, and the metadata bitmap is used to indicate whether a metadata node exists.

[0258] In this embodiment, when the monitoring cluster receives the authentication message sent by the monitored end, it sends an identity authentication reply to the monitored end and a metadata bitmap to the monitored end. The identity authentication reply includes an authentication number. The authentication number sent for each connection is different, and the number is different due to the different timestamps carried.

[0259] For example, after receiving the authentication message sent by the link peer, reply AuthReply (authentication reply), assign a global id (authentication number), the global id sent for each connection is different, and send METADSMap (metadata bitmap).

[0260] S43: When the monitoring cluster receives the metadata node heartbeat message sent by the monitored end, it sends a heartbeat reply message to the monitored end to monitor the status of the metadata node on the monitored end.

[0261] In this embodiment, upon receiving a metadata node heartbeat message sent by the monitored end, the monitoring cluster sends a heartbeat reply message to the monitoring end to monitor the status of the metadata node on the monitored end.

[0262] For example, after receiving the heartbeat message from METADS, the monitoring cluster replies with a heartbeat. The heartbeat contains the status information of METADS. Generally, METADS sends the expected status to Mon, and Mon receives it and determines the reply to METADS based on the status of the file system.

[0263] refer to Figure 7 , Figure 7 is a metadata node state switching diagram proposed in an embodiment of the present application, such as Figure 7 As shown, the switching status of the metadata node is:

[0264] Normal boot sequence of METADS: boot->standby->creating->active;

[0265] Shutdown sequence: active->stopping->stopped; master-slave switching sequence:

[0266] boot->standby->replay->reconnect->rejoin->clientreplay->active

[0267] S44: When the monitoring cluster detects that the state of the metadata node of the monitored end changes, the monitoring cluster broadcasts the metadata bitmap to each of the nodes in the storage cluster.

[0268] In this embodiment, when the monitoring cluster detects that the status of the metadata node of the monitored end has changed, such as when a new node is connected, a node is disconnected, or the volume information of the created service update changes, it broadcasts a new metadata bitmap to all metadata nodes and ordinary data nodes so that each node can be aware of the status change of the metadata node in the node.

[0269] S45: When the monitoring cluster detects that a new node has been added to the storage cluster, it determines whether the new node belongs to a new io group.

[0270] In this embodiment, when the monitoring cluster detects that a new node has been added to the storage cluster, it determines whether the new node belongs to a new io group.

[0271] In this embodiment, the new node may be a node that does not belong to the original io group, or a node in the original io group may be regarded as a new node when restarted, so it is necessary to determine whether the node belongs to the new io group.

[0272] S46: When the new node belongs to the new io group, update the maximum number value of the metadata nodes.

[0273] In this embodiment, when the new node belongs to a new io group, the metadata node in the new node is also a node newly added to the metadata processing cluster. At this time, the maximum number of metadata nodes needs to be updated and increased by one.

[0274] For example, when a new node joins, it is determined whether it belongs to a new io group. If it belongs to a new io group, MAX_METADS needs to be updated, otherwise it does not need to be updated.

[0275] S47: When the monitoring cluster detects that a node in the storage cluster leaves the storage cluster, the monitoring cluster selects a new node in the same io group as the node.

[0276] In this embodiment, when the monitoring cluster detects that a node in the storage cluster leaves the storage cluster, it indicates that the number of nodes is reduced, and at this time, a new node needs to be selected in the same io group.

[0277] S48: Start the new metadata node in the new node.

[0278] In this embodiment, a new metadata node is started in the selected new node to take over the NAS service.

[0279] S49: When receiving the message for creating a distributed file system, the monitoring cluster updates the common data bitmap and the volume information in the metadata bitmap.

[0280] In this embodiment, when receiving a message for creating a distributed file system, the monitoring cluster updates the volume information in the common data bitmap (fsmap) and the metadata bitmap (MetaDSmao).

[0281] In another embodiment of the present application, reference Figure 8 , Figure 8 : is a schematic diagram of the metadata cluster processing flow proposed in an embodiment of the present application, such as Figure 8 As shown in the figure, the METADS of each node is dynamically loaded into the memory in the form of a plug-in to undertake the io distributed by the upstream module libclient. The message communication between METADS and LIBCLIENT adopts the function call method; MetaDS will first locate the metadata node to which the file belongs according to the metadata information of the file, and then obtain the data distribution of the file through the metadata node to which it belongs, that is, obtain which nodes the file is distributed on and the specific location on the node, and the MetaDS of the belonging node will send the io to virtio, thereby reducing unnecessary io path forwarding.

[0282] In this embodiment, the METADS plug-in supports loading multiple instances. In a failure scenario, the METADS of other controllers will drift to this node and be dynamically loaded into the process.

[0283] In another embodiment of the present application, the method further includes:

[0284] S51: When the metadata node in the first node in the storage cluster fails, the monitoring cluster detects a heartbeat abnormality.

[0285] In this embodiment, reference Fig. 9 , Fig. 9 This is a flowchart of metadata node failure processing proposed in an embodiment of the present application, such as Fig. 9 As shown, when a metadata node in a first node in a storage cluster fails, the monitoring cluster detects a heartbeat abnormality.

[0286] For example, in a dual-controller system, there are nodes A and B. When the MetaDS of controller A fails, the local MON service will detect a heartbeat abnormality.

[0287] S52: When the monitoring cluster detects a heartbeat abnormality, restarting the metadata node in the first node.

[0288] In this embodiment, when the monitoring cluster detects a heartbeat abnormality, the metadata node is restarted in the first node.

[0289] For example, MetaDS is restarted through iufsd controlled by A.

[0290] S53: When the monitoring cluster receives the heartbeat sent by the metadata node, broadcast a new metadata bitmap to each node in the storage cluster.

[0291] In this embodiment, after the metadata node is restarted, it sends a heartbeat message to the monitoring node. When the monitoring cluster receives the heartbeat message sent by the metadata node, it broadcasts a new metadata bitmap to each node in the storage cluster.

[0292] S54: The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

[0293] In this embodiment, each node in the metadata cluster updates its own metadata bitmap according to the metadata bitmap.

[0294] For example, after receiving the heartbeat, the local Mon node will notify all Mon nodes in the cluster to broadcast the MDSMap, and each Mon node in the MetaDS cluster will update its own map.

[0295] In another embodiment of the present application, the method further includes:

[0296] S61: When a monitoring node in the first node in the storage cluster fails, the remaining nodes in the monitoring cluster receive a node offline message.

[0297] In this embodiment, reference Fig.10 , Fig.10 is a flowchart of monitoring node failure processing proposed in an embodiment of the present application, such as Fig.10 As shown, in the case where a monitoring node in the first node of the storage cluster fails, the remaining monitoring nodes in the monitoring cluster receive a node offline message.

[0298] For example, in a dual-controller cluster, there are nodes A and B. When the Mon service of controller A fails, the remaining nodes in the Mon cluster will receive a node offline event.

[0299] S62: The second node in the storage cluster takes over the service process.

[0300] In this embodiment, the second node in the storage cluster takes over the service process.

[0301] For example, the B controller Mon service is re-elected and the B controller iufsd takes over the service.

[0302] S63: The metadata node in the first node detects a heartbeat abnormality.

[0303] In this embodiment, the metadata node in the first node detects a heartbeat abnormality after the monitoring node fails.

[0304] For example, due to a failure of A controller Mon, MetaDS in A controller found that the heartbeat was abnormal. The local iufsd process detected that MetaDS sent an abnormality due to the heartbeat failure, and also detected that the vhost read and write of the Mon server was abnormal.

[0305] S64: The service process in the first node controls the metadata node in the first node to shut down.

[0306] In this embodiment, the service process in the first node controls the metadata node in the first node to be closed.

[0307] For example, at this time, controller iufsd of A will send a shutdown command to the MetaDS of the local end.

[0308] S65: The service process in the second node starts the new metadata node.

[0309] In this embodiment, the service process in the second node starts a new metadata node. At this time, there are two metadata nodes in the second node, which do not interfere with each other.

[0310] For example, controller B iufsd will also start a new MetaDS instance to take over the cluster metadata service.

[0311] S66: The metadata node in the second node sends a heartbeat message to the corresponding monitoring node.

[0312] In this embodiment, the metadata node in the second node sends a heartbeat message to the corresponding monitoring reception.

[0313] S67: When receiving the heartbeat message, the monitoring node notifies all nodes in the monitoring cluster to broadcast the new metadata bitmap.

[0314] In this embodiment, when the monitoring node receives the heartbeat message, it notifies all nodes in the monitoring cluster to broadcast the new metadata bitmap.

[0315] S68: The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

[0316] In this embodiment, the metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

[0317] For example, after receiving the heartbeat, the local Mon node will notify all Mon nodes in the cluster to broadcast the MDSMap, and each Mon node in the MetaDS cluster will update its own metadata bitmap.

[0318] In another embodiment of the present application, the method further includes:

[0319] S71: When a new node is added to the storage cluster of the storage system, a unified storage service in the new node is started.

[0320] In this embodiment, when a new node is added to the storage cluster corresponding to the storage system, the unified storage service in the new node is started.

[0321] For example, the NAS service of the newly added node is automatically started, MetaDS actively reports the heartbeat to MON and enters the standby state.

[0322] S72: When the unified storage service is started, the metadata node in the new node sends a heartbeat message to the monitoring node corresponding to the new node.

[0323] In this embodiment, when the unified storage service is started, the metadata node in the new node sends a heartbeat to the monitoring node corresponding to the new node.

[0324] S73: The monitoring cluster detects the heartbeat message and determines the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster.

[0325] In this embodiment, when the monitoring cluster detects a heartbeat message, the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster are determined.

[0326] S74: When the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster, update the maximum number of metadata nodes.

[0327] In this embodiment, when the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster, the maximum number of metadata nodes is updated.

[0328] For example, the MON cluster detects that a new node reports a heartbeat, and after confirming that the number of NAS nodes is less than the number of SAN cluster nodes, the Max MetaDS number is automatically increased.

[0329] S75: Add a metadata node record of the new node in the metadata bitmap.

[0330] In this embodiment, a metadata node record of the new node is added to the existing metadata bitmap. At this time, the metadata bitmap can indicate that the new node has been added to the cluster.

[0331] For example, at this time, a new MetaDS record of the node to be added is added to the MDS MAP, and the MetaDS of the node to be added enters the active state.

[0332] S76: When receiving the heartbeat, the monitoring node corresponding to the new node notifies each monitoring node in the monitoring cluster to broadcast the new metadata bitmap.

[0333] In this embodiment, the monitoring node corresponding to the new node notifies each monitoring node in the monitoring cluster to broadcast the new metadata bitmap when the heartbeat has been received.

[0334] S77: Each metadata node in the metadata node cluster updates the metadata bitmap in the metadata node according to the new metadata bitmap.

[0335] In this embodiment, each metadata node in the metadata node cluster updates the original metadata bitmap in the metadata node according to the new metadata bitmap.

[0336] For example, after receiving the heartbeat, the local Mon node will notify all Mon nodes in the cluster to broadcast the MDSMap, and each Mon node in the MetaDS cluster will update its own metadata bitmap.

[0337] In another embodiment of the present application, the method further includes:

[0338] S81: When a node in the storage cluster corresponding to the storage system is removed, determine a node parameter of the node.

[0339] In this embodiment, the node parameters are parameters specific to each node in the storage system.

[0340] In this embodiment, when a node in the storage cluster corresponding to the storage system is removed, the node parameters of the node are determined.

[0341] S82: Deleting the node according to the node parameters by using a corresponding node deletion method.

[0342] In this embodiment, the node is deleted according to the node parameters by using a corresponding node deletion method.

[0343] For example, if the node is the last node in the io group and -force is specified in the parameter:

[0344] The monitoring cluster reduces the maximum number of nodes by one and shuts down the metadata node of the node to be deleted (specify mds.rank_id). This operation kicks the node to be deleted out of the NAS cluster, stops the iufsd service process of the node to be deleted, and deletes the NAS volume in the io group to which the node to be deleted belongs.

[0345] When the node is not the last node in the io group:

[0346] Stop the iufsd service process of the node to be deleted. Select a takeover node, take over the metadata node of the node to be deleted, update the metadata bitmap and push it to the remaining nodes. After the metadata node of the takeover node receives the metadata bitmap, it pulls up a new metadata node instance through the iufsd service.

[0347] In another embodiment of the present application, the monitoring cluster collects node information of each node in the storage cluster in real time when the storage system is running, determines the load status of each node, and during the data storage process, preferentially stores data in nodes with lower loads. When the overall load of the cluster is high, it automatically searches for new nodes that can be added to the storage cluster, configures the new nodes accordingly, deploys the corresponding SAN system and NAS system, deploys monitoring nodes and metadata access nodes, adds the new nodes to the storage cluster, expands the storage system, and ensures the stable operation of the storage system.

[0348] Based on the same inventive concept, an embodiment of the present application provides a data storage device. Fig.11 , Fig.11 FIG. 1 is a schematic diagram of a data storage device 1100 proposed in an embodiment of the present application. Fig.11 As shown, the device comprises:

[0349] The data receiving module 1101 is used for the storage system to receive data to be stored;

[0350] A storage mode determination module 1102, configured for the storage system to determine a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, wherein the data storage mode includes a unified storage mode and a block storage mode;

[0351] The data storage module 1103 is used to store the data to be stored using the target data storage mode.

[0352] Optionally, the device further comprises:

[0353] A command generation module, used for generating a corresponding mode switching command according to the target data storage mode;

[0354] The storage mode switching module is used to switch the storage mode of the storage system to the target data storage mode through the mode switching command.

[0355] Optionally, the storage mode switching module includes:

[0356] A file creation module, configured to create a unified storage mode start flag file when the mode switching command received by the storage system is a unified storage mode switching command;

[0357] A first resource allocation module, configured to allocate cores and memory to containers in each node in the storage cluster in a configuration file;

[0358] A first node restart module, used for restarting the node when the configuration file is modified;

[0359] When the node is restarted, detecting whether the unified storage mode start flag file is stored in the node;

[0360] A container configuration module, configured to configure the container according to the configuration file when detecting that the unified storage mode enable flag file is stored in the node;

[0361] An image loading module, used to load the image file corresponding to the storage cluster into the container when the container is configured;

[0362] The container startup module is used to start the container when the image file is loaded.

[0363] Optionally, the device further comprises:

[0364] A file deletion module, configured to delete the unified storage mode start mark file when the mode switching command received by the storage system is a block storage mode switching command;

[0365] A data cleaning module, used for reclaiming the core and the memory allocated to the container in the configuration file;

[0366] A container deletion module, used to delete the container in the storage cluster;

[0367] A file cleaning module, used to clean up the image file;

[0368] The second node restart module is used to restart each node in the storage cluster.

[0369] Optionally, the device further comprises:

[0370] A second resource allocation module, used to allocate corresponding cores and memories to each node in the storage cluster corresponding to the storage system;

[0371] A resource binding module, used to bind the container in each node to the core and the memory;

[0372] A mapping establishment module, used to establish a directory mapping between each container in the storage cluster and a host machine corresponding to the container;

[0373] A container startup module, used to start the container using the host machine;

[0374] A control jump module, used to jump from the control end of the block storage mode to the control end of the container;

[0375] The command execution module is used to execute the corresponding unified storage command through the control end of the container.

[0376] Optionally, the device further comprises:

[0377] A monitoring cluster startup module, used to start the monitoring cluster when the block storage mode is started;

[0378] An authentication module, configured for the monitoring cluster to send an identity authentication reply to the monitored end and send a metadata bitmap to the monitored end when receiving an authentication message sent by the monitored end;

[0379] A message reply module, used for the monitoring cluster to send a heartbeat reply message to the monitored end when receiving a metadata node heartbeat message sent by the monitored end, so as to monitor the status of the metadata node on the monitored end;

[0380] A first broadcast module, configured for the monitoring cluster to broadcast a metadata bitmap to each of the nodes in the storage cluster when detecting that the state of the metadata node of the monitored end changes;

[0381] A node judgment module, used for the monitoring cluster to judge whether a new node belongs to a new io group when detecting that a new node has been added to the storage cluster;

[0382] A maximum value updating module, used for updating the maximum number value of the metadata node when the new node belongs to the new io group;

[0383] A new node selection module, configured for the monitoring cluster to select a new node in the same io group as the node when the monitoring cluster detects that a node in the storage cluster has left the storage cluster;

[0384] A metadata node startup module, used for starting the new metadata node in the new node;

[0385] The first data updating module is used for the monitoring cluster to update the common data bitmap and the volume information in the metadata bitmap when receiving the message of creating a distributed file system.

[0386] Optionally, the device further comprises:

[0387] A first anomaly detection module, configured to detect a heartbeat anomaly in the monitoring cluster when a failure occurs in the metadata node in the first node in the storage cluster;

[0388] A metadata node restart module, used to restart the metadata node in the first node when the monitoring cluster detects a heartbeat abnormality;

[0389] A second broadcast module, configured to broadcast a new metadata bitmap to each node in the storage cluster when the monitoring cluster receives a heartbeat sent by the metadata node;

[0390] The second data updating module is used for the metadata node cluster to update the metadata bitmap of each metadata node according to the new metadata bitmap.

[0391] Optionally, the device further comprises:

[0392] A node offline module, configured to enable the remaining nodes in the monitoring cluster to receive a node offline message when a monitoring node in the first node in the storage cluster fails;

[0393] A service takeover module, used for a second node in the storage cluster to take over a service process;

[0394] A second anomaly detection module, used for detecting a heartbeat anomaly in the metadata node of the first node;

[0395] A node closing module, used for the service process in the first node to control the metadata node in the first node to close;

[0396] A metadata node startup module, used for the service process in the second node to start a new metadata node;

[0397] A heartbeat message sending module, used for the metadata node in the second node to send a heartbeat message to the corresponding monitoring node;

[0398] A third broadcast module is used for the monitoring node to notify all nodes in the monitoring cluster to broadcast the new metadata bitmap when receiving the heartbeat message;

[0399] The third data update module is used for the metadata node cluster to update the metadata bitmap of each metadata node according to the new metadata bitmap.

[0400] Optionally, the device further comprises:

[0401] A unified storage service startup module, used to start the unified storage service in a new node when a new node is added to the storage cluster of the storage system;

[0402] A heartbeat message sending module, used for, when the unified storage service is started, the metadata node in the new node sends a heartbeat message to the monitoring node corresponding to the new node;

[0403] A node quantity determination module, used to monitor the cluster and detect the heartbeat message, and determine the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster;

[0404] A metadata node data updating module, used for updating the maximum number of metadata nodes when the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster;

[0405] A node record module, used for adding a metadata node record of the new node in the metadata bitmap;

[0406] A fourth broadcast module, configured for the monitoring node corresponding to the new node to notify each monitoring node in the monitoring cluster to broadcast the new metadata bitmap when receiving the heartbeat;

[0407] The fourth data update module is used for each metadata node in the metadata node cluster to update the metadata bitmap in the metadata node according to the new metadata bitmap.

[0408] Optionally, the device further comprises:

[0409] A node parameter determination module, used to determine the node parameters of the node when a node in the storage cluster corresponding to the storage system is removed;

[0410] The node deletion module is used to delete the node according to the node parameters and in a corresponding node deletion method.

[0411] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the data storage method described in any of the above embodiments of the present application.

[0412] Based on the same inventive concept, another embodiment of the present application provides an electronic device, Fig.12 It is a schematic diagram of an electronic device 1200 proposed in one embodiment of the present application, including a memory 1202, a processor 1201, and a computer program stored in the memory and executable on the processor, wherein when the processor executes, the steps in the data storage method described in any of the above embodiments of the present application are implemented.

[0413] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0414] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0415] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0416] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0417] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0418] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0419] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0420] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0421] The data storage system, method, device, equipment and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data storage system, characterized in that: The system comprises: The memory management unit is deployed in the master node of the storage cluster and is used to manage and allocate memory resources of each storage node. A block storage cluster, deployed in each node of the storage cluster, for storing the data to be stored using a block storage mode; A unified storage cluster is deployed in each node of the storage cluster through a podman container, and is used to store the data to be stored using the same storage mode; A mode switching unit, used to switch the storage mode of the data storage system; The monitoring unit is used to monitor each node in the storage cluster.

2. The data storage system according to claim 1, characterized in that: The unified storage cluster includes: The client is used to receive operation commands sent by the front-end business interface and interact with the front-end IO processing unit to process data-related operations; A metadata processing unit, used for processing metadata of the storage cluster; The front-end IO processing unit is used to perform corresponding data processing operations according to the received IO information.

3. A data storage method, characterized in that: The method is based on the data storage system according to any one of claims 1 to 2, comprising: The storage system receives data to be stored; The storage system determines a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, wherein the data storage mode includes a unified storage mode and a block storage mode; The data to be stored is stored using the target data storage mode.

4. The data storage method according to claim 3, characterized in that: Before storing the data to be stored using the target storage mode, the method further includes: Generate a corresponding mode switching command according to the target data storage mode; The storage mode of the storage system is switched to the target data storage mode through the mode switching command.

5. The data storage method according to claim 4, characterized in that: The step of switching the storage mode of the storage system to the target storage mode by means of the mode switching command includes: In a case where the mode switching command received by the storage system is a unified storage mode switching command, creating a unified storage mode start flag file; Allocate cores and memory to containers in each node in the storage cluster in a configuration file; When the configuration file is modified, restart the node; When the node is restarted, detecting whether the unified storage mode start flag file is stored in the node; When detecting that the unified storage mode enable flag file is stored in the node, configuring the container according to the configuration file; When the container is configured, the image file corresponding to the storage cluster is loaded into the container; When the image file is loaded, the container is started.

6. The data storage method according to claim 5, characterized in that: The method further comprises: In a case where the mode switching command received by the storage system is a block storage mode switching command, deleting the unified storage mode start mark file; Reclaim the core and the memory allocated to the container in the configuration file; Deleting the container in the storage cluster; Cleaning up the image file; Restart each node in the storage cluster.

7. The data storage method according to claim 3, characterized in that: When the storage mode is the unified storage mode, the method includes: Allocate corresponding cores and memory to each node in the storage cluster corresponding to the storage system; Binding a container in each node to the core and the memory; Establishing a directory mapping between each of the containers in the storage cluster and a host machine corresponding to the container; Using the host machine to start the container; Jump from the control end of the block storage mode to the control end of the container; The corresponding unified storage command is executed through the control end of the container.

8. The data storage method according to claim 1, characterized in that: The method further comprises: When the block storage mode is enabled, a monitoring cluster is enabled; When receiving the authentication message sent by the monitored end, the monitoring cluster sends an identity authentication reply to the monitored end, and sends a metadata bitmap to the monitored end; When receiving the metadata node heartbeat message sent by the monitored end, the monitoring cluster sends a heartbeat reply message to the monitored end to monitor the status of the metadata node on the monitored end; When the monitoring cluster detects that the state of the metadata node of the monitored end changes, the monitoring cluster broadcasts the metadata bitmap to each of the nodes in the storage cluster; When the monitoring cluster detects that a new node has been added to the storage cluster, the monitoring cluster determines whether the new node belongs to a new io group; In the case where the new node belongs to the new io group, updating the maximum number value of the metadata nodes; When the monitoring cluster detects that a node in the storage cluster leaves the storage cluster, the monitoring cluster selects a new node in the same io group as the node; Starting a new metadata node in the new node; When receiving the message for creating a distributed file system, the monitoring cluster updates the common data bitmap and the volume information in the metadata bitmap.

9. The data storage method according to claim 8, characterized in that: The method further comprises: In the case where the metadata node in the first node in the storage cluster fails, the monitoring cluster detects a heartbeat anomaly; When the monitoring cluster detects a heartbeat abnormality, restarting the metadata node in the first node; In case the monitoring cluster receives a heartbeat sent by the metadata node, broadcasting a new metadata bitmap to each node in the storage cluster; The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

10. The data storage method according to claim 9, characterized in that: The method further comprises: In the case where a monitoring node in the first node in the storage cluster fails, the remaining nodes in the monitoring cluster receive a node offline message; The second node in the storage cluster takes over the service process; The metadata node in the first node detects a heartbeat abnormality; The service process in the first node controls the metadata node in the first node to shut down; The service process in the second node starts the new metadata node; The metadata node in the second node sends a heartbeat message to the corresponding monitoring node; When receiving the heartbeat message, the monitoring node notifies all nodes in the monitoring cluster to broadcast the new metadata bitmap; The metadata node cluster updates the metadata bitmap of each metadata node according to the new metadata bitmap.

11. The data storage method according to claim 3, characterized in that: The method further comprises: When a new node is added to the storage cluster of the storage system, a unified storage service in the new node is started; When the unified storage service is started, the metadata node in the new node sends a heartbeat message to the monitoring node corresponding to the new node; The monitoring cluster detects the heartbeat message and determines the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster; When the number of nodes in the block storage cluster is greater than the number of nodes in the unified storage cluster, updating the maximum number of metadata nodes; Add a metadata node record of the new node in the metadata bitmap; When receiving the heartbeat message, the monitoring node corresponding to the new node notifies each monitoring node in the monitoring cluster to broadcast the new metadata bitmap; Each of the metadata nodes in the metadata node cluster updates the metadata bitmap in the metadata node according to the new metadata bitmap.

12. The data storage method according to claim 3, characterized in that: The method further comprises: When a node in the storage cluster corresponding to the storage system is removed, determining a node parameter of the node; According to the node parameters, the node is deleted by a corresponding node deletion method.

13. A data storage device, characterized in that: The device comprises: A data receiving module, used for the storage system to receive data to be stored; A storage mode determination module, used for the storage system to determine a target data storage mode corresponding to the data to be stored according to the data type of the data to be stored, wherein the data storage mode includes a unified storage mode and a block storage mode; A data storage module is used to store the data to be stored using the target data storage mode.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 12 are implemented.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Distributed storage system deployed on the basis of container technology and storage method thereof

    CN107797767A

  • Unified management method, system and device of distributed storage cluster, and storage medium

    CN108881412A

  • Rapid Ceph deployment method and device, server and storage medium

    CN112860374A

  • Resource deployment method and device, electronic equipment and storage medium

    CN113448686A

  • Cluster management method and device based on NAS, computer equipment and medium

    CN117149095A