A system and method for implementing distributed replication of local storage in multi-CPU architecture containers

By providing a distributed replication system for container local storage in a multi-CPU architecture in a containerized environment, using Linstor and CSI interfaces to realize container storage interface and distributed block device replication, it solves the problem of high availability of local storage under a multi-CPU architecture in a containerized environment, and realizes cross-node data access and high availability storage of containers.

CN114610439BActive Publication Date: 2025-03-07SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210024570.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2025-03-07
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high availability of container local storage under multi-CPU architecture in a containerized environment, especially when using local storage across nodes.

Method used

By providing a system that realizes distributed replication of local storage of containers in multiple CPU architectures, including resource modules, work nodes and master nodes, the container storage interface is implemented using Linstor and CSI interfaces, and the container is directly used to use local storage, and the high availability of data between multiple nodes is achieved through distributed block device replication.

Benefits of technology

It realizes the ability of containers to access the same data between multiple nodes, improves the high availability of local storage, and supports multiple CPU architectures and domestic servers, ensuring the stability of container services and the promotion and application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610439B_ABST
    Figure CN114610439B_ABST
Patent Text Reader

Abstract

The present invention discloses a system and method for implementing distributed replication of local storage of multi-CPU architecture containers, belonging to the technical field of container local storage. The system for implementing distributed replication of local storage of multi-CPU architecture containers of the present invention includes a resource module, a working node and a master node. The resource module is used for storage volume declaration, Piraeus storage class, storage volume and volume loading. The working node includes a Linstor processor, a CSI node, a container group, a container manager, a Linstor processor, and the master node includes a database, a Linstor controller, a Linstr processor and a CSI controller. The system for implementing distributed replication of local storage of multi-CPU architecture containers of the present invention can ensure that Inspur Cloud supports the ability of containers to use local storage across nodes, improves local storage, and has a good value for promotion and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of container local storage, and specifically provides a system and method for implementing distributed replication of local storage of multi-CPU architecture containers. Background Art

[0002] Container technology is a popular PaaS technology for providing microservices, and Kubernetes is the de facto standard for container orchestration and scheduling. Kubernetes is a leading distributed architecture solution based on container technology, providing a series of functions such as deployment, operation, container orchestration, container scheduling, service discovery and dynamic scaling for containerized applications, improving the convenience and high availability of large-scale container cluster management. Providing a container cloud platform based on Kubernetes is the first choice of major cloud vendors. Container storage is divided into distributed storage and local storage. Distributed storage supports high-availability functions such as multiple copies. Local storage generally uses the node's storage directory, and storage performance is guaranteed, but it does not have high availability capabilities across nodes.

[0003] Inspur Container Cloud supports distributed replication technology for local storage, supports containers using local storage across nodes, supports domestically produced servers, and supports X86 / ARM / MIPS multi-CPU architecture operating systems, thus improving the high availability of local storage. Summary of the invention

[0004] The technical task of the present invention is to address the above-mentioned problems and provide a system that can ensure that Inspur Cloud supports the ability of containers to use local storage across nodes, supports domestically produced servers, supports X86 / ARM / MIPS multi-CPU architecture operating systems, and improves the high availability of local storage to realize distributed replication of local storage of multi-CPU architecture containers.

[0005] A further technical task of the present invention is to provide a method for implementing distributed replication of local storage of multi-CPU architecture containers.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A system for implementing distributed replication of local storage of multi-CPU architecture containers includes a resource module, a working node and a master node. The resource module is used for storage volume declaration, Piraeus storage class, storage volume and volume loading. The working node includes a Linstor processor, a CSI node, a container group, a container manager, and a Linstor processor. The master node includes a database, a Linstor controller, a Linstr processor and a CSI controller.

[0008] Preferably, the CSI controller detects the storage volume declaration and storage class, calls the Linstor controller to create the storage volume and record the metadata to the database, and generates the storage volume and Volume loading objects.

[0009] Preferably, after the container group is scheduled to a specific node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and calls the Linstor controller to complete the node volume addition.

[0010] Preferably, when the container manager creates a container group, it calls the CSI node to access the Linstor controller to implement node volume mounting.

[0011] Preferably, the Linstor processor calls the Linstor controller to complete the creation, addition and mounting of the current node disk.

[0012] The system for realizing distributed replication of local storage of multi-CPU architecture containers of the present invention realizes the container storage interface, supports containers to directly use local storage, supports container drift function, ensures that containers can access the same data on multiple nodes, and realizes distributed replication function. Distributed block device replication realizes the replication function of machine storage devices, supports three synchronization strategies: full synchronization, semi-synchronization, and asynchronous, and supports dual-master mode and master-slave mode.

[0013] Linstor provides distributed fast device replication management capabilities, including two components: controller and processor. The controller provides a unified API and stores metadata in the database. The executor runs on each machine that provides distributed block device replication capabilities and communicates with the controller to manage storage pools, resources, storage volumes and other resources. Linstor-CSI implements storage volume creation, addition, and mounting functions based on the container storage interface.

[0014] Piraeus encapsulates Linstor-CSI and Linstor, provides operator objects and custom resources, supports LinstorCSIDriver, LinstorController, and LinstorSatelliteSet resources, and generates LinstorCSI-Controller, LinstorCSI-Node, Linstor-Controller, and Linstor-Satellite container processes by parsing these resources.

[0015] When a user creates a Piraeus type storage, LinstorCSI-Controller will call Linstor-Controller to create a storage volume and generate PV and VolumeAttachment. When the container group is assigned a node, the CSI controller will add the volume in the PV to the corresponding node. When the container manager creates a container group, it calls LinstorCSI-Node to mount the volume to the container group.

[0016] A method for implementing distributed replication of local storage of multi-CPU architecture containers is implemented based on the system for implementing distributed replication of local storage of multi-CPU architecture containers described in the present invention. A user creates a container group for mounting local storage, a Linstor container storage interface controller listens to storage volume declarations and storage classes, calls the Linstor controller to generate metadata, and stores it in a database. The Linstor processor obtains the metadata regularly and generates a DRBD disk on a node. The Linstor container storage interface controller adds the DRBD disk to the node. When a container manager generates a container group, it calls the Linstor CSI node and mounts the DRBD disk to the container group.

[0017] Preferably, after the container group is scheduled to the node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and when the container manager creates the container group, the CSI node is called to access the Linstor controller to implement node volume mounting.

[0018] Preferably, the CSI controller detects storage volume declaration and storage class, calls the Linstor controller to create storage volume and record metadata to the database, generates storage volume and Volume loading objects, and the Linstor processor calls the Linstor controller to complete the creation, addition, and mounting tasks of the current node disk.

[0019] Compared with the prior art, the method for realizing distributed replication of local storage of multi-CPU architecture containers of the present invention has the following outstanding beneficial effects: the method for realizing distributed replication of local storage of multi-CPU architecture containers is applied to Inspur Cloud, so that Inspur Cloud has the ability to use local storage for containers across nodes, which not only ensures the performance of local storage, but also improves the high availability of local storage; at the same time, it supports multiple CPU architectures such as X86, ARM, MIPS, supports domestically produced servers, and continuously and stably provides container services to users, which has good promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a topology diagram of the system for implementing distributed replication of local storage of multi-CPU architecture containers according to the present invention;

[0021] Figure 2 It is a flow chart of the method for implementing distributed replication of local storage of multi-CPU architecture containers described in the present invention. DETAILED DESCRIPTION

[0022] The following will further describe in detail the system and method for implementing distributed replication of local storage of multi-CPU architecture containers in conjunction with the accompanying drawings and embodiments.

[0023] Example

[0024] like Figure 1 As shown, the system for implementing distributed replication of local storage of multi-CPU architecture containers of the present invention includes a resource module, a working node and a master node. The resource module is used for storage volume declaration, Piraeus storage class, storage volume and Volume loading. The working node includes a Linstor processor, a CSI node, a container group, a container manager, a Linstor processor, and the master node includes a database, a Linstor controller, a Linstr processor and a CSI controller.

[0025] Among them, the CSI controller detects the storage volume declaration and storage class, calls the Linstor controller to create the storage volume and record the metadata to the database, and generates the storage volume and Volume loading object. After the container group is scheduled to a specific node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and calls the Linstor controller to complete the node adding volume. When the container manager creates a container group, it calls the CSI node to access the Linstor controller to implement node mounting volume. The Linstor processor calls the Linstor controller to complete the creation, addition, and mounting of the current node disk.

[0026] The system for realizing distributed replication of local storage of multi-CPU architecture containers of the present invention realizes the container storage interface, supports containers to directly use local storage, supports container drift function, ensures that containers can access the same data on multiple nodes, and realizes distributed replication function. Distributed block device replication realizes the replication function of machine storage devices, supports three synchronization strategies: full synchronization, semi-synchronization, and asynchronous, and supports dual-master mode and master-slave mode.

[0027] Linstor provides distributed fast device replication management capabilities, including two components: controller and processor. The controller provides a unified API and stores metadata in the database. The executor runs on each machine that provides distributed block device replication capabilities and communicates with the controller to manage storage pools, resources, storage volumes and other resources. Linstor-CSI implements storage volume creation, addition, and mounting functions based on the container storage interface.

[0028] Piraeus encapsulates Linstor-CSI and Linstor, provides operator objects and custom resources, supports LinstorCSIDriver, LinstorController, and LinstorSatelliteSet resources, and generates LinstorCSI-Controller, LinstorCSI-Node, Linstor-Controller, and Linstor-Satellite container processes by parsing these resources.

[0029] When a user creates a Piraeus type storage, LinstorCSI-Controller will call Linstor-Controller to create a storage volume and generate PV and VolumeAttachment. When the container group is assigned a node, the CSI controller will add the volume in the PV to the corresponding node. When the container manager creates a container group, it calls LinstorCSI-Node to mount the volume to the container group.

[0030] like Figure 2 As shown, the method for implementing distributed replication of local storage of multi-CPU architecture containers of the present invention is implemented based on the system for implementing distributed replication of local storage of multi-CPU architecture containers. The user creates a container group for mounting local storage, the Linstor container storage interface controller listens to storage volume declarations and storage classes, calls the Linstor controller to generate metadata, and stores it in the database, the Linstor processor obtains metadata regularly, and generates a DRBD disk on the node, the Linstor container storage interface controller adds the DRBD disk to the node, and when the container manager generates a container group, it calls the Linstor CSI node and mounts the DRBD disk to the container group.

[0031] After the container group is scheduled to the node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and when the container manager creates a container group, it calls the CSI node to access the Linstor controller to implement node volume mounting. The CSI controller detects the storage volume declaration and storage class, calls the Linstor controller to create the storage volume and record the metadata to the database, generates the storage volume and Volume loading objects, and the Linstor processor calls the Linstor controller to complete the creation, addition, and mounting tasks of the current node disk.

[0032] Piraeus encapsulates Linstor-CSI and Linstor, provides operator objects and custom resources, supports LinstorCSIDriver, LinstorController, and LinstorSatelliteSet resources, and generates LinstorCSI-Controller, LinstorCSI-Node, Linstor-Controller, and Linstor-Satellite container processes by parsing these resources. When a user creates a Piraeus type storage, LinstorCSI-Controller will call Linstor-Controller to create a storage volume and generate PV and VolumeAttachment. When the container group is assigned a node, the CSI controller will add the volume in the PV to the corresponding node. When the container manager creates a container group, it calls LinstorCSI-Node to mount the volume to the container group.

[0033] The embodiments described above are only preferred specific implementations of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A system for implementing distributed replication of local storage of multi-CPU architecture containers, characterized by: The system includes a resource module, a working node and a master node. The resource module is used for storage volume declaration, Piraeus storage class, storage volume and volume loading. The working node includes a Linstor processor, a CSI node, a container group, a container manager, and a Linstor processor. The master node includes a database, a Linstor controller, a Linstor processor and a CSI controller. The working method of the system is that a user creates a container group for mounting local storage. The Linstor container storage interface controller listens to storage volume declaration and storage class, calls the Linstor controller to generate metadata, and stores it in the database. The Linstor processor obtains metadata regularly and generates a DRBD disk on the node. The Linstor container storage interface controller adds the DRBD disk to the node. When the container manager generates a container group, it calls the Linstor CSI node and mounts the DRBD disk to the container group.

2. The system for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 1, characterized in that: The CSI controller detects the storage volume declaration and storage class, calls the Linstor controller to create the storage volume and record the metadata to the database, and generates the storage volume and Volume loading objects.

3. The system for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 2, characterized in that: After the container group is scheduled to a specific node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and calls the Linstor controller to complete the node volume addition.

4. The system for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 3, characterized in that: When the container manager creates a container group, it calls the CSI node to access the Linstor controller to mount the volume on the node.

5. The system for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 4, characterized in that: The Linstor processor calls the Linstor controller to complete the creation, addition, and mounting of the current node disk.

6. A method for implementing distributed replication of local storage in a multi-CPU architecture container, characterized in that: The method is implemented based on the system for implementing distributed replication of local storage of multi-CPU architecture containers as described in any one of claims 1-5. A user creates a container group for mounting local storage. The Linstor container storage interface controller listens to storage volume declarations and storage classes, calls the Linstor controller to generate metadata, and stores it in a database. The Linstor processor obtains metadata regularly and generates a DRBD disk on the node. The Linstor container storage interface controller adds the DRBD disk to the node. When the container manager generates a container group, it calls the Linstor CSI node and mounts the DRBD disk to the container group.

7. The method for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 6, characterized in that: After the container group is scheduled to the node, the Volume loading object is updated, the CSI controller detects the Volume attachment object, and when the container manager creates a container group, it calls the CSI node to access the Linstor controller to implement node volume mounting.

8. The method for implementing distributed replication of local storage of multi-CPU architecture containers according to claim 7, characterized in that: The CSI controller detects the storage volume declaration and storage class, calls the Linstor controller to create the storage volume and record the metadata to the database, generates the storage volume and Volume loading objects, and the Linstor processor calls the Linstor controller to complete the creation, addition, and mounting tasks of the current node disk.

Citation Information

Patent Citations

  • Multi-alive system based on Openstack O edition characteristics

    CN107707393A

  • Container cloud platform cloud storage resource encryption method and system and medium

    CN111753326A