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

By deploying a memory management unit, block storage cluster, unified storage cluster, and mode switching unit in the storage cluster, and integrating SAN and NAS storage systems using the podman container, the high cost and high coupling problems caused by the separation of NAS and SAN are solved, and flexible switching of storage systems and cost reduction are achieved.

CN119105698BActive Publication Date: 2025-09-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, the separation of NAS storage system and SAN storage system requires the configuration of additional physical devices, which increases the cost of use and maintenance complexity. In addition, the coupling of the two independent systems increases the risk.

Method used

By deploying a memory management unit, block storage cluster, unified storage cluster, and mode switching unit in the storage cluster, and using the podman container to integrate SAN and NAS storage systems, flexible switching and monitoring of storage modes can be achieved.

Benefits of technology

It reduces the coupling of storage systems and memory resource consumption, reduces the need for additional equipment, and achieves lower storage costs and flexible adaptation to usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105698B_ABST
    Figure CN119105698B_ABST
Patent Text Reader

Abstract

The 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, which are intended to integrate a storage area network system with a network attached storage system. The system includes: a memory management unit, deployed in a master node in a storage cluster, for managing and allocating memory resources of each storage node; a block storage cluster, deployed in each node of the storage cluster, for storing data to be stored using a block storage mode; a unified storage cluster, deployed in each node of the storage cluster via a podman container, for storing the data to be stored using the same storage mode; a mode switching unit, for switching the storage mode of the data storage system; and a monitoring unit, for monitoring each node in the storage cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The 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 in storage systems include blocks, files, and objects. Block storage is suitable for storage area networks (SANs), while file storage is suitable for network attached storage (NAS). A hybrid solution combining NAS and SANs offers maximum flexibility and performance advantages for most users. Unifying NAS and SANs is a key research topic. Related technologies incorporate additional NAS gateway devices into SAN storage clusters to achieve this integration.

[0003] The NAS storage system in the related technology is separated from the SAN storage system, and requires the separate configuration of additional physical equipment, which increases the cost of use. The coupling of the two independent systems also increases 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] According to a first aspect of an embodiment of the present application, a data storage system is provided, 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, configured 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, configured to process metadata of the storage cluster;

[0014] The front-end IO processing unit is used to perform corresponding data processing operations based on 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] When 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 of the storage cluster in a configuration file;

[0025] When the configuration file modification is complete, 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 includes:

[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 flag file;

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

[0033] Deleting the container in the storage cluster;

[0034] Cleaning 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 the container in each node to the core and the memory;

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

[0040] Start the container using the host machine;

[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 includes:

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

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

[0046] Upon 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 within 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 includes:

[0054] In the event that 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] When 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 includes:

[0059] In the event that 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] Upon 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 includes:

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

[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] Upon 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 metadata node in the metadata node cluster updates the metadata bitmap in the metadata node according to the new metadata bitmap.

[0075] Optionally, the method further includes:

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

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

[0078] According to a third aspect of an embodiment of the present application, a data storage device is provided, comprising:

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

[0080] A storage mode determination module is 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, configured to generate a corresponding mode switching command according to the target data storage mode;

[0084] The storage mode switching module is configured 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 is 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, configured to restart the node when the configuration file modification is completed;

[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 is 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 is configured to delete the unified storage mode start flag file when the mode switching command received by the storage system is a block storage mode switching command;

[0095] a data cleaning module, configured to reclaim the core and the memory allocated to the container in the configuration file;

[0096] A container deletion module, configured 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 is used to allocate corresponding cores and memories to each node in the storage cluster corresponding to the storage system;

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

[0102] A mapping establishment module, configured 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, configured to start the container using the host machine;

[0104] A control jump module, configured 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, configured 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 verification reply to the monitored end upon receiving an authentication message sent by the monitored end, and to send a metadata bitmap to the monitored end;

[0109] A message reply module, configured for the monitoring cluster to send a heartbeat reply message to the monitored end upon 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 is configured to broadcast a metadata bitmap to each of the nodes in the storage cluster when the monitoring cluster detects that the status of the metadata node of the monitored end has changed;

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

[0112] a maximum value updating module, configured to update the maximum number value of the metadata nodes when the new node belongs to the new IO group;

[0113] A new node selection module is configured to select a new node in the same IO group as the node when the monitoring cluster detects that the 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 a message for 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, configured to restart the metadata node in the first node when the monitoring cluster detects a heartbeat anomaly;

[0119] A second broadcast module is 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 update 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, when a monitoring node in the first node in the storage cluster fails, enable the remaining nodes in the monitoring cluster to receive a node offline message;

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

[0124] A second anomaly detection module, configured to detect a heartbeat anomaly in the metadata node of the first node;

[0125] A node closing module, configured 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, configured for the metadata node in the second node to send a heartbeat message to the corresponding monitoring node;

[0128] A third broadcast module is configured 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, configured 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, configured to, when the unified storage service is started, cause the metadata node in the new node to send a heartbeat message to the monitoring node corresponding to the new node;

[0133] A node number determination module is 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, configured to update a 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, configured to add a metadata node record of the new node to 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, configured to determine the node parameters of a node when a node in a 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 the 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] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described in the second aspect of the present application are implemented.

[0143] The data storage system provided by the present application comprises a memory management unit, which 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, which 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, which is deployed in each node of the storage cluster through the podman container and is used to store the data to be stored using the same storage mode; a mode switching unit, which is used to switch the storage mode of the data storage system; and a monitoring unit, which 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, reducing 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 following briefly introduces the drawings required for use in the description of the embodiments of the present application. 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 any creative work.

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

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

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

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

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

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

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

[0153] Figure 8 This is a schematic diagram of the metadata cluster processing process proposed in one embodiment of the present application;

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

[0155] Figure 10This is a flowchart of monitoring node failure processing proposed in one embodiment of the present application;

[0156] Figure 11 is a schematic diagram of a data storage device proposed in one embodiment of the present application;

[0157] Figure 12 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0158] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this 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 This is a structural diagram of a data storage system proposed in one 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 data to be stored using a block storage mode; a unified storage cluster is deployed in each node of the storage cluster via 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. The unified storage cluster includes: a client for receiving operation commands sent by the front-end business interface and interacting with the front-end IO processing unit to process data-related operations; a metadata processing unit for processing metadata of the storage cluster; and a front-end IO processing unit for performing corresponding data processing operations based on the received IO information.

[0161] In this embodiment, current storage system architectures are mainly divided into centralized and distributed architectures. Centralized architectures offer stronger performance and security, but higher software and hardware costs and limited scalability, making them commonly used in traditional industries such as banking and telecommunications. Distributed architectures, on the other hand, offer significant advantages in terms of 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, and the unified storage cluster is composed of NAS nodes deployed in each node. The storage area network (SAN) connects the storage array and server host through a Fibre Channel switch, ultimately forming a dedicated storage network. It can isolate storage and servers, simplifying 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 higher bandwidth. In addition, SAN can shield the system hardware and can use storage devices from different manufacturers at the same time. SAN is generally used in environments with dense large-block continuous IO.

[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, the storage cluster in the data storage system deploys both a SAN system and a NAS system. The NAS system is deployed based on the podman container. Podman is a daemonless, open-source, Linux-native tool designed to easily find, run, build, share, and deploy applications using Open Container Initiative (OCI) containers and container images. Podman does not require a daemon or the root user to run, thus eliminating the security risks introduced by Docker containers. The two systems are isolated from each other, resulting in low coupling.

[0165] In this embodiment, reference Figure 2 , Figure 2 This is a schematic diagram of the data storage system process proposed in one embodiment of the present application. Figure 2As shown in the figure, after the storage system starts, compass_start (initialization command) is called to initialize the operating environment and start the main process ecmain (image management). The main process spawns multiple child processes, including plmain (read-write process), container, sshd (remote connection service), etc. The host machine 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. The container is podman, which does not require a daemon or root user to run. From a logical architecture perspective, it is more reasonable than docker. podman deploys the distributed file system IUFS, including the metadata MetaDS cluster. It is responsible for forming a distributed NAS cluster with multiple nodes and providing the external NAS service iufsd. PLWDK is the watchdog, and etc is the driver component.

[0166] In this embodiment, reference Figure 3 , Figure 3 This is a flow chart of a distributed file system service proposed in one embodiment of the present application. Figure 3 As shown, 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 (normal data bitmap), heartbeat, CLI (command line), etc.

[0167] In this embodiment, reference Figure 2When the storage systems share the same storage model, the NAS service process (iufsd) is launched. This process, based on the front-end I / O processing module, dynamically launches dynamic library components such as the NFS service, SMB service, Lib client, and METADS. These components interact within the process through function calls. The core advantage of a single process is high cache resource utilization. By merging the metadata caches of the Lib client and METDS, memory resource utilization is improved. When transferring data between the NAS and SAN systems, the service process establishes a shared memory transmission channel using the Virtio protocol, bypassing the kernel during data transfer, reducing system call overhead. Regarding horizontal links, by opening the Virtio (front-end) -> Vhost (host system) -> LV / CO (logical volume) path, horizontal data transfer bypasses the kernel, reducing system call overhead. Regarding caching, a single NAS process merges the metadata caches of the Lib client and METADS, increasing the metadata cache size and reducing inter-process communication overhead. For scenario-based performance optimization, performance is improved through scenario-based optimization methods such as on-demand SAN / NAS resource configuration, performance modes, load balancing modes, application type adaptation, and file lifecycle recognition. In the metadata service, DHT stands for distributed hash table, WORM stands for data protection time, and ACL stands for access control list.

[0168] In this embodiment, a METADS cluster is used to meet the storage needs of massive file volumes and the metadata performance requirements brought about by this large number of files, while also providing high METADS availability. Metadata services are distributed across each storage node, eliminating the need for separate hardware node configuration. These services are responsible for metadata caching, data distribution, space management, distributed locking, directory sharding, and more. When the storage system accesses file data, it first locates the metadata node to which the file belongs based on the file's metadata information. It then uses the metadata node to obtain the file's data distribution, specifically the nodes on which the file is distributed and its specific location on the nodes, before accessing these nodes to complete the data access operation. Furthermore, if one or more metadata services fail, the remaining MetaDS servers can still provide metadata management services, without the front-end I / O being aware of the failure.

[0169] refer to Figure 4 , Figure 4 This is a flow chart of a data storage method proposed in one embodiment of the present application, which is implemented based on a data storage system. Figure 4 As shown, the method includes the following steps:

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

[0171] In this embodiment, the storage system consists of multiple storage nodes. Each storage node is deployed with block storage nodes, unified storage nodes, monitoring nodes, and metadata nodes, forming a block storage cluster, unified storage cluster, monitoring cluster, and metadata cluster, respectively. Data to be stored is data sent to the storage system from the outside world that 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, a data storage mode corresponding to the data to be stored is determined according to the data type of the data to be stored. The data storage modes include a unified storage mode and a block storage mode.

[0176] S13: Storing the data to be stored using the target data storage mode.

[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 corresponding data storage mode.

[0178] In this embodiment, before storing the data to be stored using the target storage mode, 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 the setmode command, a node command that must be executed on each node using the command "mtop setmode panel_name." This script is implemented and placed in the / compass / bin / directory. This script encapsulates the actions of modifying the SAN configuration file and managing the NAS flag file. The corresponding mode switching command then switches the storage system's storage mode to the target data storage mode.

[0185] In this embodiment, reference Figure 5 , Figure 5 This 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 will be bound to the container of the NAS system and some memory resources will be allocated for use by the NAS service.

[0186] In this embodiment, switching the storage mode of the storage system to the target storage mode by using 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, the nas_opened flag file is created in the / data / nas directory to enable the unified mode.

[0191] S22-2: Allocate cores and memory to the container 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 switches 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, change the resource allocation method, and reserve core, memory and other resources for NAS.

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

[0196] In this embodiment, when the configuration file modification is completed, 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, the container is configured 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 already 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 NAS container image 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 flag 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 flag 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 is 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 cores and memory allocated to the container are reclaimed in the configuration file.

[0215] For example, modify configuration files such as / compass / svc_nodetypes.xml to reclaim 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 unified storage mode or 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 This is a flow chart of container management proposed in one embodiment of the present application. Figure 6 As shown, when the storage mode is unified storage mode, it is necessary to manage the containers in each node. First, allocate corresponding cores and memory to each node in the storage cluster in the configuration file corresponding to the block storage mode.

[0226] For example, when enabling Unified mode, you need to modify the SAN system configuration file (svc_nodetypes.xml) to allocate core and memory resources 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 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 directory and the / mnt / plfs directory inside the container to store NAS configuration files; establish a mapping between the host's / data / nas directory 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: Start the container using the host machine.

[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 the nas configuration file

[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 enter the container and view the contents

[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 is jumped to the control end of the container.

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

[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 internally compiled 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 SAN commands. Referring to the existing framework, the SAN end starts the container daemon process, communicates with the daemon process from within the container through Unix Domain Socket, and executes SAN commands. The container 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 image, decompressed directory, executable files required in the container, lib library, and files generated during the operation of NAS services.

[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, when the SAN cluster boots up, the Mon cluster is initialized and local Unix socket monitoring is started. This monitoring consists of two channels: one for METADS, listening on / data / nasunskt, with a maximum of 16 connections; and one for Client (normal data), listening on / data / nasunskt2, with a maximum of 16 connections. Upon detecting an established connection, the socket monitoring function for each channel reads the message, processes it, generates a reply message, and places it in the send queue. Each channel also initializes a pipeline for asynchronous event notification after message processing. The SAN code's built-in event monitoring mechanism then performs relevant preprocessing and notifies the read / write functions to send the message.

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

[0257] In this embodiment, a bitmap is a data structure that uses each bit to store a certain state. It is suitable for scenarios with massive amounts of data, integers, and non-duplicate data. It is usually used to determine whether a certain data exists. 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, it replies with AuthReply (authentication reply), assigns a global id (authentication number), the global id sent for each connection is different, and sends METADSMap (metadata bitmap).

[0260] S43: Upon 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.

[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 a heartbeat message from METADS, the monitoring cluster responds with a heartbeat message. The heartbeat message contains the status information of METADS. Generally, METADS sends the expected status to the monitor, and the monitor receives it and determines the response to METADS based on the file system status.

[0263] refer to Figure 7 , Figure 7 This 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] METADS normal boot sequence: 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 status 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 service update is changed, 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 considered as a new node when restarted. Therefore, 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 no update is required.

[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. In this case, 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: Upon 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, upon receiving a message to create 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 This is a schematic diagram of the metadata cluster processing process proposed in an embodiment of the present application. Figure 8 As shown in the figure, the METADS of each node is dynamically loaded into the memory as 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 based on the metadata information of the file, and then obtain the data distribution of the file through the metadata node, that is, obtain which nodes the file is distributed on and the specific location on the node. 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 Figure 9 , Figure 9 This is a flowchart of metadata node failure processing proposed in an embodiment of the present application, such as Figure 9 As shown, when a metadata node in a first node in a storage cluster fails, the monitoring cluster detects a heartbeat anomaly.

[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 anomaly.

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

[0288] In this embodiment, when the monitoring cluster detects a heartbeat abnormality, it restarts the metadata node 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 Figure 10 , Figure 10 This is a flowchart of a monitoring node fault handling process proposed in an embodiment of the present application. Figure 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 consisting of 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 in controller A, MetaDS in controller A detects a heartbeat anomaly. The local iufsd process detects that MetaDS is sending an abnormal heartbeat due to the heartbeat failure, and also detects an abnormal read and write of the vhost on the Mon server.

[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 shut down.

[0307] For example, at this time, controller iufsd sends a shutdown command to the local MetaDS.

[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 the monitoring node receives the heartbeat message, it notifies all nodes in the monitoring cluster to broadcast the new metadata bitmap.

[0314] In this embodiment, upon receiving the heartbeat message, the monitoring node 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, the 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 heartbeats 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, it determines the number of nodes in the block storage cluster and the number of nodes in the unified storage cluster.

[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, confirms that the number of NAS nodes is less than the number of SAN cluster nodes, and automatically increases the number of Max MetaDS.

[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 joined 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: Upon 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 is 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 the node parameters 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: Delete the node according to the node parameters using a corresponding node deletion method.

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

[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 volumes 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 on the node to be deleted. Select a takeover node to take over the metadata node of the node to be deleted, update the metadata bitmap, and push it to the remaining nodes. After receiving the metadata bitmap, the metadata node of the takeover node uses the iufsd service to launch a new metadata node instance.

[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, prioritizes storing 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. Figure 11 , Figure 11 FIG is a schematic diagram of a data storage device 1100 proposed in one embodiment of the present application. Figure 11 As shown, the device includes:

[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 is 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 configured to store the data to be stored using the target data storage mode.

[0352] Optionally, the device further comprises:

[0353] A command generation module, configured to generate a corresponding mode switching command according to the target data storage mode;

[0354] The storage mode switching module is configured 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 is 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, configured to restart the node when the configuration file modification is completed;

[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 is 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 is configured to delete the unified storage mode start flag file when the mode switching command received by the storage system is a block storage mode switching command;

[0365] a data cleaning module, configured to reclaim the core and the memory allocated to the container in the configuration file;

[0366] A container deletion module, configured 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 is used to allocate corresponding cores and memories to each node in the storage cluster corresponding to the storage system;

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

[0372] A mapping establishment module, configured 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, configured to start the container using the host machine;

[0374] A control jump module, configured 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, configured 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 verification reply to the monitored end upon receiving an authentication message sent by the monitored end, and to send a metadata bitmap to the monitored end;

[0379] A message reply module, configured for the monitoring cluster to send a heartbeat reply message to the monitored end upon 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 is configured to broadcast a metadata bitmap to each of the nodes in the storage cluster when the monitoring cluster detects that the status of the metadata node of the monitored end has changed;

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

[0382] a maximum value updating module, configured to update the maximum number value of the metadata nodes when the new node belongs to the new IO group;

[0383] A new node selection module is configured to select a new node in the same IO group as the node when the monitoring cluster detects that the 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 a message for 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, configured to restart the metadata node in the first node when the monitoring cluster detects a heartbeat anomaly;

[0389] A second broadcast module is 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 update 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, when a monitoring node in the first node in the storage cluster fails, enable the remaining nodes in the monitoring cluster to receive a node offline message;

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

[0394] A second anomaly detection module, configured to detect a heartbeat anomaly in the metadata node of the first node;

[0395] A node closing module, configured 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, configured for the metadata node in the second node to send a heartbeat message to the corresponding monitoring node;

[0398] A third broadcast module is configured 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, configured 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, configured to, when the unified storage service is started, cause the metadata node in the new node to send a heartbeat message to the monitoring node corresponding to the new node;

[0403] A node number determination module is 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, configured to update a 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, configured to add a metadata node record of the new node to 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, configured to determine the node parameters of a node when a node in a 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 the 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, Figure 12 This 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 can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[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 produce 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 steps in the process. 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 that can direct 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 The 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 A step that specifies a function in one or more boxes.

[0419] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. 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 invention.

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

[0421] The data storage system, method, apparatus, equipment and storage medium provided by the present application are introduced in detail above. Specific examples are used herein 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 those skilled in the art, according to the idea of ​​the present application, there may be changes in the specific implementation methods 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 a unified storage mode; A mode switching unit, configured 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, wherein: 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, configured to process metadata of the storage cluster; The front-end IO processing unit is used to perform corresponding data processing operations based on 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 data 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 data storage mode by using the mode switching command includes: When 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 of the storage cluster in a configuration file; When the configuration file modification is complete, 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: When the mode switching command received by the storage system is a block storage mode switching command, deleting the unified storage mode start flag file; reclaiming the core and the memory allocated to the container in the configuration file; Deleting the container in the storage cluster; Cleaning 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 the container in each node to the core and the memory; Establishing a directory mapping between each container in the storage cluster and a host machine corresponding to the container; Start the container using the host machine; 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 3, characterized in that: The method further comprises: When the block storage mode is enabled, a monitoring cluster is started; Upon receiving the authentication message sent by the monitored terminal, the monitoring cluster sends an identity authentication reply to the monitored terminal, and sends a metadata bitmap to the monitored terminal; Upon 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 within 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 event that 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; When 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 event that 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; Upon 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, wherein: The method further comprises: When a new node is added to the storage cluster of the storage system, starting the unified storage service in the new node; 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; Upon 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 metadata node 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 node parameters of the node; According to the node parameters, the node is deleted using a corresponding node deletion method.

13. A data storage device, characterized in that: The device is based on the data storage system according to any one of claims 1 to 2, comprising: A data receiving module is used for the storage system to receive data to be stored; A storage mode determination module is 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 3 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, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 3 to 12 are implemented.

Citation Information

Patent Citations

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

    CN107797767A

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

    CN113448686A