CN114911421B - Data storage method, system, device and storage medium based on CSI plug-in - Google Patents
Data storage method, system, device and storage medium based on CSI plug-in Download PDFInfo
- Publication number
- CN114911421B CN114911421B CN202210555018.2A CN202210555018A CN114911421B CN 114911421 B CN114911421 B CN 114911421B CN 202210555018 A CN202210555018 A CN 202210555018A CN 114911421 B CN114911421 B CN 114911421B
- Authority
- CN
- China
- Prior art keywords
- csi
- driving unit
- node
- pvc
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a data storage method, a system, a device and a storage medium based on a CSI plug-in, wherein the method comprises the following steps: deploying a first driving unit in the CSI management node, and deploying a second driving unit in each CSI data node; the control center sends a PVC volume creation command, the CSI management node receives the PVC volume creation command, the external supply unit sends external configuration parameters, and the first driving unit sends the external configuration parameters to the distributed storage system to create a corresponding PV volume; after receiving a creation command referencing the pod of the created PVC, the external attachment unit sends an attachment command, and the first drive unit attaches the created corresponding PV volume to the target CSI data node. According to the scheme, the data can be permanently stored on the distributed storage system, and meanwhile, the distributed storage system can be effectively used in the k8s container, so that the advantages of the distributed storage system can be effectively played.
Description
Technical Field
The application relates to a data storage method, a system, a device and a storage medium based on a CSI plug-in, and belongs to the technical field of data storage of a distributed storage system.
Background
The K8s container orchestration system has become a de facto standard for container cloud platforms, and more users deploy applications in K8s clusters, which typically require persisting data, but the storage plug-ins of K8s are not capable of meeting the storage requirement scenarios of diverse applications.
The Container Storage Interface (CSI) defines a standard interface for the container orchestration system (Kubernetes) to expose any storage systems to their container workload, enabling the storage vendor to create custom storage plug-ins without adding them to the Kubernetes code repository. In contrast to Kubernetes' own storage plugins, CSI (container storage interface) allows for the development of volume plugin CSI storage plugins independent of Kubernetes code base to be deployed (installed) as an extension on Kubernetes clusters, which can greatly extend the variety of storage devices supported by k8 s.
However, the ISCSI-based distributed storage system or CSI plugin is still a blank, so that the advantages of distributed storage cannot be effectively utilized.
Disclosure of Invention
The application provides a data storage method, a system, a device and a storage medium based on a CSI plug-in, which are used for solving the technical problem that a distributed storage system or a CSI plug-in based on ISCSI is still blank.
In order to solve the technical problems, the application provides the following technical scheme:
in a first aspect, according to an embodiment of the present application, there is provided a data storage method based on CSI plugins, which is applied to storing data to be stored in an ISCSI-based distributed storage system, and includes:
a first CSI-driver driving unit is deployed in the CSI management node, and a second CSI-driver driving unit is deployed in each CSI data node;
the control center sends a PVC volume creation command to the CSI management node, after the CSI management node receives the PVC volume creation command, an external supply unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to the distributed storage system so as to create a corresponding PV volume in the distributed storage system;
after receiving a creation command of a pod of the PVC which is created by reference, the external attachment unit sends an attachment command to the first driving unit, and the first driving unit attaches the created corresponding PV volume to the target CSI data node;
the second drive unit in the target CSI data node mounts the PV volume attached to that node into the pod referencing the PVC.
Preferably, the deploying the CSI-driver first driving unit in the CSI management node, and deploying the CSI-driver second driving unit in each CSI data node includes:
disposing a first driving unit of the CSI-driver and an External supply unit (External-provider) and an External attachment unit (External-attachment) in the same pod in the CSI management node;
and disposing a CSI-Driver second driving unit and a Node registration unit (Node-Driver-registry) in the same pod in the CSI data Node.
Preferably, after the CSI management node receives the PVC volume creation command, an External provisioning unit (External-provider) in the CSI management node sends preset External configuration parameters to the first driving unit, and then the first driving unit sends the configuration parameters to the distributed storage system, including:
after receiving a PVC volume creation command, the CSI data node calls a CreateVolume interface through unix domain socket words, and sends external configuration parameters corresponding to the distributed storage system through a first driving unit;
the external configuration parameters include the type of external configuration parameters, parameter names, and parameter values.
Preferably, when the first driving unit sends external configuration parameters to the distributed storage system to create corresponding PV volumes in the distributed storage system, then a pod referencing PVC is created at the target CSI data node.
Preferably, the method further comprises:
deleting the data pod application;
and deleting the corresponding PVC data resource.
Preferably, the deleting the data pod application includes:
the control center sends a preset deleting command to a target CSI data node, the target CSI data node calls a CleadultPoint interface, and the PV mounted in the pod using PVC is unbinding from the target CSI data node through an iscsi_lib.Disconnect of a preset standard library CleadultPoint.
Preferably, the deleting the corresponding PVC data resource includes:
the control center sends a preset deleting command to the CSI management node, and the external supply unit calls a DeleteVolume interface to delete the PVC;
and inquiring the unbinding PV information in the target CSI data node, unbinding the target CSI data node in the CSI management node according to the inquired PV information, calling and deleting the Vdisk interface, and deleting the PV.
In a second aspect, a data storage system based on CSI plugins provided according to an embodiment of the present application includes:
the control center is used for sending the PVC volume creation command to the CSI management node after receiving the PVC creation command;
the system comprises a CSI management node, a first driving unit and a second driving unit, wherein the CSI management node is used for receiving a PVC volume creation command, an external supply unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to a distributed storage system so as to create a corresponding PV volume in the distributed storage system; an External attaching unit (External-attachment) of the CSI management node receives a creation command of a pod referencing the created PVC, and then sends the attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node;
CSI data node, a preset second driving unit mounts the PV volume attached to the node into a pod referencing PVC;
the preset second driving unit is a second driving unit in the target data node.
Preferably, the CSI management node is further configured to:
after receiving a PVC volume creation command, an external supply unit calls a CreateVolume interface through unix domain socket words, and external configuration parameters corresponding to the distributed storage system are sent to the distributed storage system through a first driving unit;
the external configuration parameters include the type of external configuration parameters, parameter names, and parameter values.
Preferably, the control center is further configured to:
and sending a preset deleting command to a target CSI data node, wherein the target CSI data node calls a clearingphysical point interface, and unbinding the PV mounted in the pod using the PVC from the target CSI data node through an iscsi_lib.disconnect of a preset standard library clearingphysical point.
In a third aspect, according to an embodiment of the present application, there is provided a data storage device based on CSI plugin, the device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program is loaded and executed by the processor to implement any of the CSI plugin based data storage methods described above.
In a fourth aspect, according to an embodiment of the present application, there is provided a computer readable storage medium storing a computer program, where the computer program is used to implement any one of the above CSI plugin based data storage methods when executed by a processor.
The beneficial effects of this application lie in:
according to the data storage method, system and device based on the CSI plug-in and the storage medium, a first CSI driver driving unit is deployed in a CSI management node, and a second CSI driver driving unit is deployed in each CSI data node; the control center sends a PVC volume creation command to the CSI management node, after the CSI management node receives the PVC volume creation command, an External supply unit (External-provider) in the CSI management node sends preset External configuration parameters to the first driving unit, and then the first driving unit sends the External configuration parameters to the distributed storage system so as to create a corresponding PV volume in the distributed storage system; an External attaching unit (External-attachment) in the CSI management node receives a creation command of a pod referencing the created PVC, and then sends the attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node; the second drive unit in the target CSI data node mounts the PV volume attached to that node into the pod referencing the PVC. According to the scheme, the distributed storage system or the CSI plug-in based on the ISCSI can permanently store data on the distributed storage system, and the distributed storage system based on the ISCSI has the characteristics of multiple copies, page size settable, compression algorithm configurable, read cache and the like, and can provide higher data security, performance and expansibility than local storage; the CSI plug-in provided by the scheme is convenient for effectively using the distributed storage system in the k8s container cloud, and further effectively playing the advantages of the distributed storage system.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical means of the present application more clearly understood, it can be implemented according to the content of the specification, and the following detailed description of the preferred embodiments of the present application will be given with reference to the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of a network architecture of a data storage method based on a CSI plug-in according to an embodiment of the present application;
FIGS. 2-3 are flowcharts of a data storage method based on a CSI plug-in according to an embodiment of the present application;
FIG. 4 is a flowchart of the sub-steps involved in step S12 provided in one embodiment of the present application;
FIG. 5 is a flowchart of the sub-steps involved in step S16 provided in one embodiment of the present application;
FIG. 6 is a flowchart of the sub-steps involved in step S17 provided in one embodiment of the present application;
FIG. 7 is a block diagram of a CSI plug-in based data storage system provided in one embodiment of the present application;
fig. 8 is a hardware schematic of a CSI plugin-based data storage device according to one embodiment of the present application.
Detailed Description
The following examples are illustrative of the present application but are not intended to limit the scope of the present application.
Example 1
Fig. 1 is a network architecture for performing data storage by using a data storage method based on CSI plugins provided in the embodiments of the present application, where the network architecture includes a control center (Master) 11, a CSI management node 12, a CSI data node 13, and a distributed storage system 14, after the control center (Master) 11 receives a command that a user creates PVC and a storage class resource through a kubecel command, a kube-apiserver service in the control center (Master) 11 receives a request, and the kube-schedule triggers a PV creation flow, and an external supply unit of the CSI management node sends external configuration parameters, so that a corresponding PV volume is created in the distributed storage system, so as to prepare for storing data to be stored. After that, when the pod referencing PVC is created, the CSI management node 12 attaches the corresponding volume in the distributed storage to the target CSI data node, the corresponding target CSI data node 13 completes the mounting operation of the PV volume, and the pod using PVC can store the data to be stored to the PV volume created by the CSI management node 12 after the mounting operation of the target CSI data node 13, thereby achieving the purpose of persisting the data into the distributed storage system.
Fig. 2 is a flowchart of a data storage method based on a CSI plugin, which is applied to storing data to be stored in a distributed storage system based on an ISCSI protocol, and includes:
step S11, a first CSI-driver driving unit is deployed in a CSI management node, and a second CSI-driver driving unit is deployed in each CSI data node;
in this embodiment, the CSI-driver first driving unit, the External-provider (External-provider), and the External attachment unit (External-attachment) need to be deployed in the same pod in advance in the CSI management node; and disposing a CSI-Driver second driving unit and a Node registration unit (Node-Driver-registry) in the same pod in the CSI data Node. It should be noted that the CSI management node is one, the number of CSI data nodes may be more than one, and in addition, here, the pod in the CSI management node and the pod in the CSI data node are two different pods, and the pod in the two different nodes may be understood as two data planes.
S12, the control center sends a PVC volume creation command to the CSI management node;
in the embodiment of the present application, after receiving a command that a user creates PVC and a storage class resource (object) through a kubecel command, a kube-apiserver service in a control center (Master) 11 communicates with a CSI management node service, and transmits a PVC volume creation command to the CSI management node service.
Step S13, after receiving a PVC volume creation command, an External supply unit (External-provider) in the CSI management node sends preset External configuration parameters to a first driving unit, and then the first driving unit sends the External configuration parameters to a distributed storage system so as to create a corresponding PV volume in the distributed storage system;
in the embodiment of the present application, the CSI management node 12 includes an External provisioning unit (External-provider), an External attachment unit (External-attachment), and a first driving unit (CSI-driver 1), and for the CSI management node 12, the External provisioning unit (External-provider) and the External attachment unit (External-attachment) may each receive a PVC volume creation command sent by the control center Master11, where the External provisioning unit (External-provider) sends External configuration parameters to the distributed storage system through the first driving unit (CSI-driver 1) after receiving the PVC volume creation command sent by the control center Master11, and thus creates corresponding PV volumes in the distributed storage system.
Step S14, after receiving a creation command of a pod referencing the created PVC, an External attachment unit (External-attachment) sends an attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node;
in step S15, the second driving unit in the target CSI data node mounts the PV volume attached to the node into the pod referencing PVC.
In the embodiment of the application, when the external supply unit creates a corresponding volume in the distributed storage system, determining the pod creation of the PVC; the proxy server of the CSI data node receives a preset PVC volume creation command and determines to use the Pod creation of the PVC, then the first driving unit receives an attachment command from the CSI management node, the first driving unit attaches the corresponding PV volume created in the distributed storage system to the target CSI data node, and the second driving unit in the target CSI data node mounts the corresponding PV volume created in the distributed storage system by the first driving unit to the created Pod needing to use the PVC.
In this embodiment of the present application, after the proxy server of the CSI data node operates, the node registration unit automatically performs node registration with the kubelet proxy server, and the proxy server mounts the PV volume into the Pod through a second driving unit (CSI-driver 2), where the second driving unit is a driving unit in the ds Pod in the CSI data node.
In an embodiment of the present application, referring to fig. 3, the method further includes:
step S16, deleting the pod application;
step S17, deleting the corresponding PVC data resources;
when an apiserver in a control center receives a preset PVC resource (object) through a kubectl command, the preset PVC resource is processed by a management unit (kube-controller-manager) in a control center Master and a generated preset deleting command is sent to a proxy server kubecet through the apiserver, and the proxy server deletes a corresponding service pod in a CSI data node; and the apiserver in the control center Master simultaneously sends the preset deleting command to an external supply unit and an external attachment unit of the CSI management node so as to delete the corresponding PVC and PV in the distributed storage through the first driving unit.
In the embodiment of the application, the objects received through the kubectl command are the storage class. Yml and pvc. Yml objects, when the received objects are the storage class. Yml and pvc. Yaml description objects, the token is to create a volume into the distributed storage, and when the pvc. Yml object is deleted, the token is to delete the corresponding volume in the distributed storage.
Example 2
On the basis of the above embodiment, further, in the step S12, after the CSI management node receives the PVC volume creation command, an External supply unit (External-provider) in the CSI management node sends preset External configuration parameters to the first driving unit, and then the first driving unit sends the External configuration parameters to the distributed storage system to create a corresponding PV volume in the distributed storage system;
after the CSI management node receives the PVC volume creation command, the external supply unit calls the CreateVolume interface through an unix domain socket (unix domain socket), and the external configuration parameter type, the parameter name and the external configuration parameter value corresponding to the distributed storage system are sent to the distributed storage system through the first driving unit. It is noted that in this embodiment, the CSI management node and the distributed storage system communicate via the ISCSI protocol, and at the same time, the CSI data node and the distributed storage system also communicate via the ISCSI protocol.
In this embodiment of the present application, after the CSI management node is connected to the distributed storage system, pool, target, virtual disk (Vdisk) resources are created in the REST API mode, mapvdisk (mapping virtual disk) resources are associated with the Target and the client Iqn on which the CSI management node is installed, creating a volume is completed, and the PV automatically performs Bound with the PVC, where the PVC resources are ready.
Referring to fig. 4, the step S12 includes:
step S121, after receiving a creation command of a pod referencing the created PVC, an External attachment unit (External-attachment) sends an attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node;
in step S122, the second driving unit in the target CSI data node mounts the PV volume attached to the node into the pod referencing PVC.
In this embodiment, after the proxy service of the CSI data node operates, the node registration unit automatically registers with the proxy service kubelet, so that the second driving unit establishes communication connection with the kubelet to complete subsequent mounting operation; specifically, the proxy service kubelet can be implemented to communicate with the second driving unit based on the registration address of the node registration unit, and then the data to be stored is stored into the corresponding volume in the distributed storage through the second driving unit.
In the application, when a CSI control node service adopts Pod to use persistent volume to declare a PVC volume created by using a CSI management node, a sidecar of an external attachment unit (External attacher) calls a nodebublishvolume interface through unix domain socket, in the interface, an Iqn of the CSI management node is unbinding with a distributed storage system and performs a control node (unattached) Detach operation, and the Iqn of a target CSI data node scheduled by the Pod is rebinding, that is, a Remap operation is completed, a virtual disk (vdisk) resource Attach is sent to the CSI data node, formatting of the virtual disk (vdisk) is realized by calling a format and Mount standard library to the CSI data node and the Mount is sent to a container directory of the Pod, and the CSI data node can persist data to the distributed storage system.
In this embodiment of the present application, storing data to be stored in a CSI data node is performed after a CSI management node completes creation of a vdisk and binds the created vdisk to a preset node (i.e., completes creation of a mapvdisk object), specifically: enabling a mapvdisk to command a logic to a node through iscsi, enabling a device mount to be in a volume directory of a pod referencing the pvc, and enabling a service in the pod to complete writing of data in the vdisk through interfaces of linux vfs and arstor after writing the data into the mounting point; similarly, deleting the pod referencing the pvc is also performed after the CSI control node deletes the corresponding vdisk and creates the unmapvdisk object.
In the embodiment of the application, the CSI management node creates a data pool (pool), a Target object (Target), a virtual disk (Vdisk) and a Mapvdisk object (mapping relationship between a virtual disk and a physical device) in the distributed storage system. Meanwhile, the process of deleting the corresponding volume in the distributed storage by the CSI management node is as follows: deleting the corresponding storage pool, and deleting the Mapvdisk object (the mapping relation between the virtual disk and the physical device), specifically, deleting the Mapvdisk object by executing the UnMAPvdisk object.
When creating a volume, the second driving unit of the CSI data node executes remappVdisk and formaAndMount after the corresponding CSI control node creates Vdisk and mapVdisk, so as to realize mounting. Similarly, when deleting a volume, clearingpoint_lib.disconnect is performed.
Step S16, deleting the data pod application;
in this embodiment, when a PVC deletion command is received, the corresponding PVC data resource and data pod application need to be deleted for other CSI management nodes and CSI data nodes to call, thereby improving the utilization rate of the PVC data resource and data pod service.
Further, in the embodiment of the present application, referring to fig. 5, step S16 includes:
step S161, after receiving a preset deletion command, the CSI data node calls a CleannupMountPoint interface;
step S162, the CSI data Node unbinding (Detach) the Volume from the Node through iscsi_lib.disconnect of the preset standard library clearu pmountpoint.
In this embodiment of the present application, when the Pod service is deleted, a Node uinpublishflume interface is also called through the call chain of the CSI data Node, the mount point in the container is cleaned by calling the standard library clearingpm outpoint, and then iscsi_lib.
Step S17, deleting the corresponding PVC data resources; further, referring to fig. 6, step S17 includes:
step S171, after receiving a preset PVC deletion command, the CSI management node calls a DeleteVolume interface by an external supply unit (configuration pod) so as to delete the corresponding PVC;
step S172, inquiring target PV information unbinding in the target CSI data node, unbinding with the CSI management node according to the inquired virtual PV information, and deleting the corresponding PVC in the distributed storage system;
step S173, delete the data in the virtual disk Vdisk.
In this embodiment of the present application, when a PVC resource needs to be deleted, after receiving a preset PVC deletion command, the CSI management node invokes a delevolume interface, first queries Vdisk information (corresponding volume information in the distributed storage system) mapped by the CSI data node, performs data plane unbinding Vdisk on the CSI management node, invokes the Vdisk deletion interface, and performs a cleaning operation on a virtual disk (Vdisk), where at this time, the PV resource is cleaned from a cluster (CSI data node), and corresponding data is also thoroughly cleaned in the distributed storage system.
According to the scheme, the distributed storage method based on the ISCSI can permanently store data on a distributed storage system, and the distributed storage system based on the ISCSI has the characteristics of multiple copies, page size settable, compression algorithm configurable, read cache and the like, and can provide higher data security, performance and expansibility than local storage; the CSI plug-in provided by the scheme is convenient for effectively using the distributed storage system in the k8s container, and further effectively taking advantage of the distributed storage system.
Example 3
According to an embodiment of the present application, there is provided a data storage system based on CSI plugins, as shown in fig. 7, including:
the control center 71 is configured to send a PVC volume creation command to the CSI management node after receiving the PVC creation command;
the CSI management node 72 is configured to, after receiving the PVC volume creation command, send a preset external configuration parameter to the first driving unit by the external supply unit in the CSI management node, and then send the external configuration parameter to the distributed storage system by the first driving unit so as to create a corresponding PV volume in the distributed storage system; an External attaching unit (External-attachment) of the CSI management node receives a creation command of a pod referencing the created PVC, and then sends the attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node;
CSI data node 73, a preset second driving unit mounts the PV volume attached to the node into a pod referencing PVC;
the preset second driving unit is a second driving unit in the target data node.
In an embodiment of the present application, the CSI management node is further configured to:
after receiving a PVC volume creation command, an external supply unit calls a CreateVolume interface through unix domain socket words, and external configuration parameters corresponding to the distributed storage system are sent to the distributed storage system through a first driving unit;
the external configuration parameters include the type of external configuration parameters, parameter names, and parameter values.
In this embodiment of the present application, the control center is further configured to:
and sending a preset deleting command to a target CSI data node, wherein the target CSI data node calls a clearingphysical point interface, and unbinding the PV mounted in the pod using the PVC from the target CSI data node through an iscsi_lib.disconnect of a preset standard library clearingphysical point.
The data storage system based on the CSI plug-in provided by the embodiment of the application can permanently store data on the distributed storage system based on the ISCSI plug-in or the distributed storage system based on the ISCSI plug-in, and the distributed storage system based on the ISCSI has the characteristics of multiple copies, settable page size, configurable compression algorithm, read cache and the like, and can provide higher data security, performance and expansibility than local storage; the CSI plug-in provided by the scheme is convenient for effectively using the distributed storage system in the k8s container, and further effectively taking advantage of the distributed storage system.
Example 4
Fig. 8 is a block diagram of a CSI plugin-based data storage device according to an embodiment of the present application, where the CSI plugin-based data storage device may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server, and the device may include, but is not limited to, a processor and a memory. The CSI plugin-based data storage device according to this embodiment at least includes a processor and a memory, where the memory stores a computer program, where the computer program is executable on the processor, and when the processor executes the computer program, the steps in the CSI plugin-based data storage method embodiment described above, for example, the steps of the CSI plugin-based data storage method shown in any one of fig. 2 to 3, are implemented. Alternatively, when the processor executes the computer program, the functions of each module in the data storage device embodiment based on the CSI plugin are implemented.
The computer program may be divided into one or more modules, which are stored in the memory and executed by a processor to accomplish the present invention, for example. The one or more modules may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the CSI plug-in based data store. For example, the computer program may be divided into a management end, a CSI management node and a CSI data node, and specific functions of each module are as follows:
the control center is used for sending the PVC volume creation command to the CSI management node after receiving the PVC creation command;
the system comprises a CSI management node, a first driving unit and a second driving unit, wherein the CSI management node is used for receiving a PVC volume creation command, an external supply unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to a distributed storage system so as to create a corresponding PV volume in the distributed storage system; an External attaching unit (External-attachment) of the CSI management node receives a creation command of a pod referencing the created PVC, and then sends the attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node;
CSI data node, a preset second driving unit mounts the PV volume attached to the node into a pod referencing PVC;
the preset second driving unit is a second driving unit in the target data node.
The processor may include one or more processing cores, such as: 4 core processor, 6 core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; the central processor is a low power consumption processor for processing data in a standby state. In some embodiments, the processor may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning. The processor is a control center of the Kubernetes integration and deployment device supporting multiple architectures, and utilizes various interfaces and lines to connect various parts of the whole CSI plug-in based data storage device.
The memory may be used to store the computer program and/or module, and the processor may implement various functions of the CSI plug-in based data storage device by running or executing the computer program and/or module stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, memory device, or other volatile solid-state storage device.
It will be appreciated by those skilled in the art that the apparatus described in this embodiment is merely an example of an apparatus supporting Kubernetes integration and deployment of multiple architectures, and does not constitute a limitation of a CSI plug-in based data storage apparatus, and in other embodiments, more or fewer components may be included, or some components may be combined, or different components, for example, a CSI plug-in based data storage apparatus may further include an input/output device, a network access device, a bus, and so on. The processor, memory, and peripheral interfaces may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface via buses, signal lines or circuit boards. Illustratively, peripheral devices include, but are not limited to: radio frequency circuitry, touch display screens, audio circuitry, and power supplies, among others.
Of course, the CSI plug-in based data store may also include fewer or more components, as this embodiment is not limited in this regard.
Optionally, the present application further provides a computer readable storage medium storing a computer program for implementing the steps of the CSI plug-in based data storage method described above when executed by a processor.
Optionally, the present application further provides a computer product, which includes a computer readable storage medium, where a computer program is stored, where the computer program is loaded and executed by a processor to implement the steps of the CSI plug-in based data storage method embodiment described above.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (11)
1. The data storage method based on the CSI plug-in is applied to storing data to be stored in an ISCSI-based distributed storage system, and is characterized by comprising the following steps:
deploying a first driving unit in the CSI management node, and deploying a second driving unit in each CSI data node;
the control center sends a PVC volume creation command to the CSI management node, after the CSI management node receives the PVC volume creation command, an external supply unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to the distributed storage system so as to create a corresponding PV volume in the distributed storage system;
after receiving a creation command of a pod of the PVC which is created by reference, the external attachment unit sends an attachment command to the first driving unit, and the first driving unit attaches the created corresponding PV volume to the target CSI data node;
a second driving unit in the target CSI data node mounts the PV volume attached to the node into a pod referencing PVC;
the deployment of the first driving unit in the CSI management node, and the deployment of the second driving unit in each CSI data node comprises the following steps:
disposing the first driving unit, the external supply unit and the external attachment unit in the same pod in the CSI management node;
the second driving unit and the node registration unit are deployed in the same pod in the CSI data node.
2. The method according to claim 1, wherein after the CSI management node receives the PVC volume creation command, the external provisioning unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to the distributed storage system to create the corresponding PV volume in the distributed storage system, including:
after receiving a PVC volume creation command, the CSI management node calls a CreateVolume interface through unix domain socket words, and sends external configuration parameters corresponding to the distributed storage system through a first driving unit;
the external configuration parameters include the type of external configuration parameters, parameter names, and parameter values.
3. The method of claim 2, wherein when the first drive unit sends external configuration parameters to the distributed storage system to create a corresponding PV volume in the distributed storage system, then a pod referencing a PVC is created at the target CSI data node.
4. The method as recited in claim 1, further comprising:
and deleting the data pod application, and deleting the corresponding PVC data resource.
5. The method of claim 4, wherein deleting the data pod application comprises:
the control center sends a preset deleting command to a target CSI data node, the target CSI data node calls a CleadultPoint interface, and the PV mounted in the pod using PVC is unbinding from the target CSI data node through an iscsi_lib.Disconnect of a preset standard library CleadultPoint.
6. The method according to claim 4, wherein: the deleting the corresponding PVC data resource comprises the following steps:
the control center sends a preset deleting command to the CSI management node, and the external supply unit calls a DeleteVolume interface to delete the PVC;
and inquiring the unbinding PV information in the target CSI data node, unbinding the target CSI data node in the CSI management node according to the inquired PV information, calling and deleting the Vdisk interface, and deleting the PV.
7. A CSI plugin-based data storage system, comprising:
the control center is used for sending the PVC volume creation command to the CSI management node after receiving the PVC creation command;
the system comprises a CSI management node, a first driving unit and a second driving unit, wherein the CSI management node is used for receiving a PVC volume creation command, an external supply unit in the CSI management node sends preset external configuration parameters to the first driving unit, and then the first driving unit sends the external configuration parameters to a distributed storage system so as to create a corresponding PV volume in the distributed storage system; after receiving a creation command of a pod of the PVC which is created by reference, an external attachment unit of the CSI management node sends an attachment command to a first driving unit, and the first driving unit attaches the created corresponding PV volume to a target CSI data node; disposing a first driving unit, an external supply unit and an external attachment unit in the same pod in the CSI management node;
CSI data node, a preset second driving unit mounts the PV volume attached to the node into a pod referencing PVC; disposing a second driving unit and a node registration unit in the same pod in the CSI data node;
the preset second driving unit is a second driving unit in the target data node.
8. The CSI plug-in based data storage system of claim 7, wherein said CSI management node is further configured to:
after receiving a PVC volume creation command, an external supply unit calls a CreateVolume interface through unix domain socket words, and external configuration parameters corresponding to the distributed storage system are sent to the distributed storage system through a first driving unit;
the external configuration parameters include the type of external configuration parameters, parameter names, and parameter values.
9. The CSI plug-in based data storage system of claim 8, wherein said control center is further configured to:
and sending a preset deleting command to a target CSI data node, wherein the target CSI data node calls a clearingphysical point interface, and unbinding the PV mounted in the pod using the PVC from the target CSI data node through an iscsi_lib.disconnect of a preset standard library clearingphysical point.
10. CSI plugin based data storage device comprising a processor, a memory and a computer program stored in the memory and executable on the processor, characterized in that the computer program is loaded and executed by the processor to implement the CSI plugin based data storage method according to any of claims 1 to 6.
11. A computer readable storage medium storing a computer program, which when executed by a processor is adapted to implement the CSI plug-in based data storage method according to any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210555018.2A CN114911421B (en) | 2022-05-19 | 2022-05-19 | Data storage method, system, device and storage medium based on CSI plug-in |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210555018.2A CN114911421B (en) | 2022-05-19 | 2022-05-19 | Data storage method, system, device and storage medium based on CSI plug-in |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114911421A CN114911421A (en) | 2022-08-16 |
CN114911421B true CN114911421B (en) | 2023-08-04 |
Family
ID=82769242
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210555018.2A Active CN114911421B (en) | 2022-05-19 | 2022-05-19 | Data storage method, system, device and storage medium based on CSI plug-in |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114911421B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117857587B (en) * | 2024-01-09 | 2024-10-29 | 暗物质(北京)智能科技有限公司 | Data communication method and device between object storage systems |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193504A (en) * | 2017-06-02 | 2017-09-22 | 郑州云海信息技术有限公司 | A kind of method and system of automation distribution and establishment application memory based on Kubernetes |
CN111913665A (en) * | 2020-07-30 | 2020-11-10 | 星辰天合(北京)数据科技有限公司 | Mounting method and device of storage volume and electronic equipment |
WO2021017279A1 (en) * | 2019-07-30 | 2021-02-04 | 平安科技(深圳)有限公司 | Cluster security management method and apparatus based on kubernetes and network domain, and storage medium |
CN112764766A (en) * | 2021-01-22 | 2021-05-07 | 苏州浪潮智能科技有限公司 | Method, device, equipment and storage medium for butting k8s cluster and storage |
CN113504954A (en) * | 2021-07-08 | 2021-10-15 | 华云数据控股集团有限公司 | Method, system and medium for calling CSI LVM plug-in, dynamic persistent volume provisioning |
CN114253656A (en) * | 2020-09-24 | 2022-03-29 | 红帽公司 | Overlay container storage drive for microservice workloads |
CN114281253A (en) * | 2021-12-10 | 2022-04-05 | 招商银行股份有限公司 | Storage volume management method |
-
2022
- 2022-05-19 CN CN202210555018.2A patent/CN114911421B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193504A (en) * | 2017-06-02 | 2017-09-22 | 郑州云海信息技术有限公司 | A kind of method and system of automation distribution and establishment application memory based on Kubernetes |
WO2021017279A1 (en) * | 2019-07-30 | 2021-02-04 | 平安科技(深圳)有限公司 | Cluster security management method and apparatus based on kubernetes and network domain, and storage medium |
CN111913665A (en) * | 2020-07-30 | 2020-11-10 | 星辰天合(北京)数据科技有限公司 | Mounting method and device of storage volume and electronic equipment |
CN114253656A (en) * | 2020-09-24 | 2022-03-29 | 红帽公司 | Overlay container storage drive for microservice workloads |
CN112764766A (en) * | 2021-01-22 | 2021-05-07 | 苏州浪潮智能科技有限公司 | Method, device, equipment and storage medium for butting k8s cluster and storage |
CN113504954A (en) * | 2021-07-08 | 2021-10-15 | 华云数据控股集团有限公司 | Method, system and medium for calling CSI LVM plug-in, dynamic persistent volume provisioning |
CN114281253A (en) * | 2021-12-10 | 2022-04-05 | 招商银行股份有限公司 | Storage volume management method |
Also Published As
Publication number | Publication date |
---|---|
CN114911421A (en) | 2022-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113268308B (en) | Information processing method, device and storage medium | |
CN113766042B (en) | Container address configuration method, system, device, equipment and medium | |
CN112835524A (en) | Storage resource allocation method, storage resource controller and scheduling system | |
WO2021086693A1 (en) | Management of multiple physical function non-volatile memory devices | |
CN113961520A (en) | Dynamic file mounting method, system, computer equipment and readable storage medium | |
CN110753119A (en) | Application package deployment system based on K8s cluster | |
CN114911421B (en) | Data storage method, system, device and storage medium based on CSI plug-in | |
CN113051102B (en) | File backup method, device, system, storage medium and computer equipment | |
WO2019162830A1 (en) | Chronologically ordered out-of-place update key-value storage system | |
CN115080479B (en) | Transmission method, server, device, bare metal instance and baseboard management controller | |
CN103607429A (en) | Cloud computing service realization method and system thereof | |
CN116155978A (en) | Multi-registry adaptation method, device, electronic equipment and storage medium | |
CN117194039A (en) | K8S drive integrated system, request processing method, device and storage medium | |
CN113504872B (en) | Method, system, equipment and medium for mounting virtual disk on cloud physical machine | |
CN110704249A (en) | Method, device and system for ensuring application consistency | |
CN109189339B (en) | Automatic configuration cache acceleration method under storage system | |
CN114461228B (en) | Object generation method, device, equipment, system and readable storage medium | |
CN116820430B (en) | Asynchronous read-write method, device, computer equipment and storage medium | |
CN117056029B (en) | Resource processing method, system, device, storage medium and electronic equipment | |
CN110069221A (en) | Data method for releasing and device | |
CN113703676B (en) | Calling method, device, equipment and medium for double live volumes | |
US8849763B1 (en) | Using multiple clients for data backup | |
US20040049560A1 (en) | Method and apparatus for configuring a computer system to operate with perhiperal devices | |
CN115987869A (en) | Multi-network card container custom route configuration method, device and medium | |
JP2023174559A (en) | Method and system for providing volume in a container environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |