CN114816756A - SAN storage dynamic supply method under container platform and application - Google Patents

SAN storage dynamic supply method under container platform and application Download PDF

Info

Publication number
CN114816756A
CN114816756A CN202210469501.9A CN202210469501A CN114816756A CN 114816756 A CN114816756 A CN 114816756A CN 202210469501 A CN202210469501 A CN 202210469501A CN 114816756 A CN114816756 A CN 114816756A
Authority
CN
China
Prior art keywords
san
node
volume
csi
configuration file
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.)
Pending
Application number
CN202210469501.9A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Anchao Cloud Software Co Ltd
Original Assignee
Jiangsu Anchao Cloud Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jiangsu Anchao Cloud Software Co Ltd filed Critical Jiangsu Anchao Cloud Software Co Ltd
Priority to CN202210469501.9A priority Critical patent/CN114816756A/en
Publication of CN114816756A publication Critical patent/CN114816756A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45587Isolation or security of virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Abstract

The invention discloses a SAN storage dynamic supply method under a container platform and application thereof, wherein the method comprises the following steps: establishing a corresponding volume group for all nodes of the Kubernet cluster based on the storage space of the remote SAN; when a SAN-CSI Controller component of the Kubernets cluster main node receives a configuration file of a user creation event, creating a logic volume in a volume group of a node which is most matched with the space size in the configuration file; and when a POD uses the logical volume, dispatching the POD to the node, and mounting the logical volume to the POD for a container to use. According to the method, the SAN storage is mapped to the local block device, the volume group is created by using the LVM technology and serves as the storage pool, and the SAN-CSI component is deployed in the Kubernetes cluster, so that the use and management of the SAN storage under the container platform are simplified, the dynamic supply of the SAN storage under the container platform is realized, and the space utilization rate of the SAN storage under the container platform is improved.

Description

SAN storage dynamic supply method under container platform and application
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method for SAN storage dynamic supply under a container platform and application thereof.
Background
With the development of cloud computing technology, a container platform represented by kubernets gradually becomes an industry standard, and the types of backend storage for container docking are more and more.
Under the kubernets container platform, the existing SAN-based storage uses a static provisioning mode, that is, a user is required to manually create and delete a physical volume, the user is required to know sensitive information for accessing the SAN storage, such as a user name, a password and the like, and operation steps are complicated. And the creation and release of SAN space need to be managed manually, and the space utilization rate is low. In addition, once the traditional SAN storage is allocated, the operations such as the extension, the snapshot and the like are not supported, the function is single, and the use flexibility is poor. Under the container platform, it is very inconvenient to let users directly store SAN, and there are also deficiencies in security, extensibility, and the like.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The invention aims to provide a SAN storage dynamic supply method and application under a container platform, and solves the problems of complex operation, low space utilization rate and no support for snapshot and capacity expansion in the prior art.
To achieve the above object, the embodiment of the present invention provides a method for SAN storage dynamic provisioning under a container platform.
In one or more embodiments of the invention, the method comprises: establishing a corresponding volume group for all nodes of the Kubernet cluster based on the storage space of the remote SAN; when an SAN-CSI Controller component of the Kubernetes cluster main node receives a configuration file of a user created event, creating a logic volume in a volume group of a node which is matched with the space size in the configuration file to the minimum extent; and when a POD uses the logical volume, dispatching the POD to the node, and mounting the logical volume to the POD for a container to use.
In one or more embodiments of the present invention, the creating, by the remote SAN-based storage space, a corresponding volume group for all nodes of a kubernets cluster includes: connecting one or more storage spaces of a remote SAN into one or more nodes of a Kubernetes cluster through a network as one or more local block device files; creating the local block device file into a physical volume through a logical volume management technology; and creating one or more of the physical volumes into one or more volume groups as storage pools.
In one or more embodiments of the present invention, when a SAN-CSI Controller component of the kubernets cluster master node receives a configuration file of a user-created event, creating a logical volume in a volume group of a node that most closely matches a size of space in the configuration file for use by a container, including: when an SAN-CSI Controller component of the Kubernetes cluster main Node receives a configuration file of a space use event created by a user, the SAN-CSI Controller component selects a Node matched with the space size in the configuration file according to the usable space of a volume group of each Node, and informs the SAN-CSI Node component of the Node of the created space use event through a kube-api server; and the SAN-CSI Node component creates a logical volume with the space size in the configuration file in the volume group of the Node, stores the Node name in a resource object corresponding to the configuration file, and informs the SAN-CSI Controller component that the event creation is successful.
In one or more embodiments of the invention, the method further comprises: when an SAN-CSI Controller component of a main node receives a configuration file of a snapshot event created by a user, querying a node where a logical volume is located according to logical volume information in the configuration file; when the SAN-CSI Node component of the Node receives the snapshot creating event, the SAN-CSI Node component inquires a logic volume in the Node group volume; and creating a snapshot in the logical volume by using an lvcreate command, and returning a snapshot creation result to the SAN-CSI Controller component.
In one or more embodiments of the invention, the method further comprises: when an SAN-CSI Controller component of a main node receives a configuration file of a user modification space usage capacity event, querying a node where a logical volume is located according to logical volume information in the configuration file; when the SAN-CSI Node component of the Node receives the event of modifying the space usage capacity, the SAN-CSI Node component queries a logic volume in the Node group volume; and performing capacity expansion in the logical volume by using a lvextend command, and returning the capacity expansion result to the SAN-CSI Controller component.
In another aspect of the present invention, an apparatus for SAN storage dynamic provisioning under a container platform is provided, which includes a creation module, an execution module, and a usage module.
And the creating module is used for creating corresponding volume groups for all nodes of the Kubernetes cluster based on the storage space of the remote SAN.
And the execution module is used for creating a logic volume in the volume group of the node with the minimum space matching with the configuration file when the SAN-CSI Controller component of the Kubernets cluster main node receives the configuration file of the user created event.
And the using module is used for dispatching the POD to the node and mounting the logical volume to the POD for a container to use when the POD uses the logical volume.
In one or more embodiments of the invention, the creation module is further configured to: connecting one or more storage spaces of a remote SAN into one or more nodes of a Kubernetes cluster through a network as one or more local block device files; creating the local block device file into a physical volume through a logical volume management technology; and creating one or more of the physical volumes into one or more volume groups as storage pools.
In one or more embodiments of the present invention, the execution module is further configured to: when an SAN-CSI Controller component of the Kubernetes cluster main Node receives a configuration file of a space use event created by a user, the SAN-CSI Controller component selects a Node matched with the space size in the configuration file according to the usable space of a volume group of each Node, and informs the SAN-CSI Node component of the Node of the created space use event through a kube-api server; and the SAN-CSI Node component creates a logical volume with the space size in the configuration file in the volume group of the Node, stores the Node name in a resource object corresponding to the configuration file, and informs the SAN-CSI Controller component that the event creation is successful.
In one or more embodiments of the present invention, the execution module is further configured to: when an SAN-CSI Controller component of a main node receives a configuration file of a snapshot event created by a user, querying a node where a logical volume is located according to logical volume information in the configuration file; when the SAN-CSI Node component of the Node receives the snapshot creating event, the SAN-CSI Node component inquires a logic volume in the Node group volume; and creating a snapshot in the logical volume by using an lvcreate command, and returning a snapshot creation result to the SAN-CSI Controller component.
In one or more embodiments of the present invention, the execution module is further configured to: when an SAN-CSI Controller component of a main node receives a configuration file of a user modification space usage capacity event, querying a node where a logical volume is located according to logical volume information in the configuration file; when the SAN-CSI Node component of the Node receives the event of modifying the space usage capacity, the SAN-CSI Node component inquires a logic volume in the Node group volume; and performing capacity expansion in the logical volume by using a lvextend command, and returning the capacity expansion result to the SAN-CSI Controller component.
In another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method for SAN storage dynamic provisioning under a container platform as described above.
In another aspect of the present invention, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, implements the steps of the method for SAN storage dynamic provisioning under a container platform as described.
Compared with the prior art, according to the method and the application for dynamically supplying the SAN storage under the container platform, provided by the embodiment of the invention, the use and the management of the SAN storage under the container platform can be simplified by mapping the SAN storage to the local block device, using the LVM technology to create a volume group as a storage pool and deploying the SAN-CSI component in the Kubernetes cluster, the dynamic supply of the SAN storage under the container platform is realized, and the space utilization rate of the SAN storage under the container platform is improved; and the functions of expansion and snapshot of SAN storage under the container platform can be realized based on the LVM technology.
Drawings
FIG. 1 is a flow diagram of a method for SAN storage dynamic provisioning under a container platform, according to an embodiment of the present invention;
FIG. 2 is an overall block diagram of a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention;
FIG. 3 is a partial flow diagram of a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention;
FIG. 4 is a flow diagram of dynamic provisioning of a method for SAN storage dynamic provisioning under a container platform, according to an embodiment of the present invention;
FIG. 5 is a snapshot flow diagram of a method of SAN storage dynamic provisioning under a container platform, according to an embodiment of the present invention;
FIG. 6 is a detailed flow diagram of a snapshot of a method for SAN storage dynamic provisioning under a container platform, according to an embodiment of the present invention;
FIG. 7 is a capacity expansion flow diagram of a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention;
FIG. 8 is a detailed flow diagram illustrating the expansion of a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention;
FIG. 9 is a block diagram of an apparatus for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention;
FIG. 10 is a hardware block diagram of a SAN storage dynamic provisioned computing device under a container platform according to an embodiment of the present invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 1 to 4, a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention is described, which includes the following steps.
In step S101, corresponding volume groups are created for all nodes of the kubernets cluster based on the storage space of the remote SAN.
A Storage Area Network (SAN) adopts a fiber Channel (Fibre Channel) technology or an IP Channel to connect a Storage array and a server host, and establishes a special Area Network for data Storage.
As shown in fig. 3, one or more storage spaces of a remote SAN are networked to one or more nodes of a kubernets cluster as one or more local block device files. Using a logical volume management technology (a mechanism for managing disk partitions under Linux), a local block device file is created into a corresponding physical volume (referring to a hard disk partition or a device logically similar to a hard disk partition), and then one or more physical volumes are created into one or more volume groups (similar to a physical hard disk in a non-LVM system, a LVM volume group is composed of one or more physical volumes). By mapping the remote SAN storage space into volume groups on the nodes, each node can own respective volume groups and be isolated from each other. When a container wants to use SAN storage space, a logical volume may be partitioned from a volume group of a certain node for use by the container.
In step S102, when the SAN-CSI Controller component of the kubernets cluster master node receives the configuration file of the user creation event, a logical volume is created in the volume group of the node that most closely matches the size of the space in the configuration file.
SAN storage dynamic provisioning consists of two components: (1) the SAN-CSI Controller is deployed on a main node of the Kubernets cluster and used for interacting with the Kubernets system; the system is responsible for processing requests from users and managing the life cycle of each SAN storage block used by the users; and selecting a proper node for issuing the user command. (2) And the SAN-CSI Node is deployed on each Node of the Kubernetes cluster, interacts with the LVM, receives a command from the SAN-CSI Controller and executes the operation of adding, deleting, changing and checking the logical volume in the volume group.
As shown in FIG. 4, when a user wants to use a certain amount of SAN storage, only one deployment file needs to be created, including but not limited to: the configuration file is created by using the size of the space and using SAN-CSI, and after the configuration file is submitted by a user, a resource object corresponding to the configuration file is generated in the Kubernets cluster. After the user creates the deployment file, the SAN-CSI Controller receives the creation event, selects a Node which is most matched with the space size in the deployment file according to the usable space of the volume group of each Node, informs the SAN-CSI Node component of the Node of the creation event through the kube-api, creates a logic volume on the Node by the SAN-CSI Node component, saves the Node name of the logic volume in a resource object corresponding to the deployment file, and informs the SAN-CSI Controller that the storage space is successfully created.
kube-apiserer is one of the most important cores of kubernets, and has the following main functions: providing a rest api interface for cluster management, wherein the rest api interface comprises authentication authorization, data verification primary cluster state change and the like; providing data interaction and communication with other modules.
In step S103, when the POD uses the logical volume, the POD is scheduled to the node, and the logical volume is mounted to the POD for use by the container.
A POD is a group (one or more) of containers; these containers share storage, networks, and declarations to run these containers. The container is a kernel lightweight operating system layer virtualization technology, and compared with a virtual machine, the container consumes fewer system resources and is faster to operate.
Example 2
As shown in fig. 5 to 6, a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention is described, which includes the following steps.
In step S201, corresponding volume groups are created for all nodes of the kubernets cluster based on the storage space of the remote SAN.
One or more storage spaces of the remote SAN are networked to one or more nodes of the Kubernets cluster as one or more local block device files. Using a logical volume management technology (a mechanism for managing disk partitions under Linux), a local block device file is created into a corresponding physical volume (referring to a hard disk partition or a device logically similar to a hard disk partition), and then one or more physical volumes are created into one or more volume groups (similar to a physical hard disk in a non-LVM system, a LVM volume group is composed of one or more physical volumes). By mapping the remote SAN storage space into volume groups on the nodes, each node can own respective volume groups and be isolated from each other. When a container wants to use SAN storage space, a logical volume may be partitioned from a volume group of a certain node for use by the container.
In step S202, when the SAN-CSI Controller component of the kubernets cluster master node receives the profile of the user created event, a logical volume is created in the volume group of the node that most closely matches the size of the space in the profile.
SAN storage dynamic provisioning consists of two components: (1) the SAN-CSI Controller is deployed on a main node of the Kubernets cluster and used for interacting with the Kubernets system; the system is responsible for processing requests from users and managing the life cycle of each SAN storage block used by the users; and selecting a proper node for issuing the user command. (2) And the SAN-CSI Node is deployed on each Node of the Kubernetes cluster, interacts with the LVM, receives a command from the SAN-CSI Controller and executes the operation of adding, deleting, changing and checking the logical volume in the volume group.
When a user wants to use a certain amount of SAN storage, only one deployment file needs to be created, which includes, but is not limited to: the configuration file is created by using the size of the space and using SAN-CSI, and after the configuration file is submitted by a user, a resource object corresponding to the configuration file is generated in the Kubernets cluster. After the user creates the deployment file, the SAN-CSI Controller receives the creation event, selects a Node which is most matched with the space size in the deployment file according to the usable space of the volume group of each Node, informs the SAN-CSI Node component of the Node of the creation event through the kube-api, creates a logic volume on the Node by the SAN-CSI Node component, stores the Node name of the logic volume in a resource object corresponding to the deployment file for use in snapshot, and informs the SAN-CSI Controller that the storage space is successfully created.
In step S203, when the POD uses the logical volume, the POD is scheduled to the node, and the logical volume is mounted to the POD for use by the container.
A POD is a group (one or more) of containers; these containers share storage, networks, and declarations to run these containers. The container is a kernel lightweight operating system layer virtualization technology, and compared with a virtual machine, the container consumes fewer system resources and is faster to operate.
In step S204, the logical volume is snapshot based on the logical volume management technique.
As shown in fig. 6, when receiving a configuration file for a user to create a snapshot event, an SAN-CSI Controller component of a host Node triggers a snapshot creation process, where the configuration file for creating the snapshot event includes logical volume information, a Node where the logical volume is located is searched in a resource object corresponding to the configuration file according to the logical volume information in the configuration file, the SAN-CSI Node component of the Node finds the logical volume in the Node volume group after receiving the snapshot event, executes a snapshot creation operation using an lvcreate command, and returns a result to the SAN-CSI Controller component, and the user can query a snapshot creation result this time through a kube-api server.
Example 3
Referring to fig. 7 to 8, a method for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention is described, which includes the following steps.
In step S301, corresponding volume groups are created for all nodes of the kubernets cluster based on the storage space of the remote SAN.
One or more storage spaces of the remote SAN are networked to one or more nodes of the Kubernets cluster as one or more local block device files. Using a logical volume management technology (a mechanism for managing disk partitions under Linux), a local block device file is created into a corresponding physical volume (referring to a hard disk partition or a device logically similar to a hard disk partition), and then one or more physical volumes are created into one or more volume groups (similar to a physical hard disk in a non-LVM system, a LVM volume group is composed of one or more physical volumes). By mapping the remote SAN storage space into volume groups on the nodes, each node can own respective volume groups and be isolated from each other. When a container wants to use SAN storage space, a logical volume may be partitioned from a volume group of a certain node for use by the container.
In step S302, when the SAN-CSI Controller component of the kubernets cluster master node receives the profile of the user created event, a logical volume is created in the volume group of the node that most closely matches the size of the space in the profile.
SAN storage dynamic provisioning consists of two components: (1) the SAN-CSI Controller is deployed on a main node of the Kubernets cluster and used for interacting with the Kubernets system; the system is responsible for processing requests from users and managing the life cycle of each SAN storage block used by the users; and selecting a proper node for issuing the user command. (2) And the SAN-CSI Node is deployed on each Node of the Kubernetes cluster, interacts with the LVM, receives a command from the SAN-CSI Controller and executes the operation of adding, deleting, changing and checking the logical volume in the volume group.
When a user wants to use a certain amount of SAN storage, only one deployment file needs to be created, which includes, but is not limited to: the size of the space needs to be used and SAN-CSI is specified for creation, and the configuration file will generate a resource object in the kubernets cluster corresponding to the configuration file after the user submits the configuration file. After the user creates the deployment file, the SAN-CSI Controller receives the creation event, selects a Node which is most matched with the size of the space in the deployment file according to the usable space of the volume group of each Node, informs the SAN-CSI Node component of the Node of the creation event through the kube-api, creates a logic volume on the Node by the SAN-CSI Node component, stores the Node name of the logic volume in a resource object corresponding to the deployment file for use during capacity expansion, and informs the SAN-CSI Controller that the storage space is successfully created.
In step S303, when the POD uses the logical volume, the POD is scheduled to the node, and the logical volume is mounted to the POD for use by the container.
A POD is a group (one or more) of containers; these containers share storage, networks, and declarations to run these containers. The container is a kernel lightweight operating system layer virtualization technology, and compared with a virtual machine, the container consumes fewer system resources and is faster to operate.
In step S304, the logical volume is expanded based on the logical volume management technique.
As shown in fig. 8, when receiving a configuration file of a user-modified space usage capacity event, an SAN-CSI Controller component of a host Node triggers an expansion process, where the configuration file includes information of a logical volume and a size of a space after the logical volume is expanded, the SAN-CSI Controller component queries a Node where the logical volume is located in a resource object corresponding to the configuration file according to the logical volume information in the configuration file, finds the logical volume in the Node volume group after the SAN-CSI Node component of the Node where the logical volume is located receives an expansion request, executes an expansion operation using a lvextend command, and returns a result to the SAN-CSI Controller component, and the user may query a current expansion result through a kube-apiserver.
Fig. 9 is a diagram illustrating an apparatus for SAN storage dynamic provisioning under a container platform according to an embodiment of the present invention.
In an embodiment of the present invention, the apparatus for SAN storage dynamic provisioning under a container platform includes a creation module 901, an execution module 902, and a use module 903.
A creating module 901, configured to create corresponding volume groups for all nodes of the kubernet cluster based on the storage space of the remote SAN.
An executing module 902, configured to create a logical volume in a volume group of a node that most closely matches a size of space in a configuration file when a SAN-CSI Controller component of a kubernets cluster master node receives the configuration file of a user-created event.
A using module 903, configured to dispatch the POD to the node when the POD uses the logical volume, and mount the logical volume to the container for use by the POD.
The creation module 901 is further configured to: connecting one or more storage spaces of a remote SAN into one or more nodes of a Kubernetes cluster through a network as one or more local block device files; creating a local block device file into a physical volume through a logical volume management technology; and creating one or more physical volumes into one or more volume groups as storage pools.
The execution module 902 is further to: when an SAN-CSI Controller component of a Kubernetes cluster main Node receives a configuration file of a space use event created by a user, the SAN-CSI Controller component selects a Node matched with the space size in the configuration file according to the usable space of a volume group of each Node, and informs the SAN-CSI Node component of the Node of the created space use event through a kube-api server; and the SAN-CSI Node component creates a logical volume with the space size in the configuration file in the volume group of the Node, stores the Node name in a resource object corresponding to the configuration file, and informs the SAN-CSI Controller component that the event creation is successful.
The execution module 902 is further to: when an SAN-CSI Controller component of a main node receives a configuration file of a snapshot event created by a user, inquiring a node where a logical volume is located according to logical volume information in the configuration file; when an SAN-CSI Node component of a Node receives a snapshot creating event, a logic volume in a Node group volume is inquired; and creating a snapshot in the logical volume by using an lvcreate command, and returning a snapshot creation result to the SAN-CSI Controller component.
The execution module 902 is further to: when an SAN-CSI Controller component of a main node receives a configuration file of a user modification space usage capacity event, inquiring a node where a logical volume is located according to logical volume information in the configuration file; when an SAN-CSI Node component of a Node receives a capacity use event of a modification space, a logic volume in a Node group volume is inquired; and using a lvextend command to expand the volume in the logic volume, and returning the expansion result to the SAN-CSI Controller component.
FIG. 10 illustrates a hardware block diagram of a computing device 100 for SAN storage dynamic provisioning under a container platform according to an embodiment of the present description. As shown in fig. 10, the computing device 100 may include at least one processor 1001, storage 1002 (e.g., non-volatile storage), memory 1003, and a communication interface 1004, and the at least one processor 1001, storage 1002, memory 1003, and communication interface 1004 are connected together via a bus 1005. The at least one processor 1001 executes at least one computer readable instruction stored or encoded in the memory 1002.
It should be appreciated that the computer-executable instructions stored in the memory 1002, when executed, cause the at least one processor 1001 to perform the various operations and functions described above in connection with fig. 1-10 in the various embodiments of the present description.
In embodiments of the present description, computing device 100 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, Personal Digital Assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronics, and so forth.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-10 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the method and the application for dynamically supplying the SAN storage under the container platform, provided by the embodiment of the invention, the use and the management of the SAN storage under the container platform can be simplified by mapping the SAN storage into the local block device, creating a volume group as a storage pool by using an LVM technology and deploying an SAN-CSI component in a Kubernetes cluster, so that the dynamic supply of the SAN storage under the container platform is realized, and the space utilization rate of the SAN storage under the container platform is improved; and the functions of expansion and snapshot of SAN storage under the container platform can be realized based on the LVM technology.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (10)

1. A method for SAN storage dynamic provisioning under a container platform, the method comprising:
establishing a corresponding volume group for all nodes of the Kubernet cluster based on the storage space of the remote SAN;
when an SAN-CSI Controller component of the Kubernetes cluster main node receives a configuration file of a user created event, creating a logic volume in a volume group of a node which is matched with the space size in the configuration file to the minimum extent; and
and when a POD uses the logical volume, dispatching the POD to the node, and mounting the logical volume to the POD for a container to use.
2. The method for SAN storage dynamic provisioning under a container platform of claim 1, wherein said remote SAN based storage space creates corresponding volume groups for all nodes of a kubernets cluster, comprising:
connecting one or more storage spaces of a remote SAN into one or more nodes of a Kubernetes cluster through a network as one or more local block device files;
creating the local block device file into a physical volume through a logical volume management technology; and
one or more of the physical volumes are created as one or more volume groups as storage pools.
3. The method for SAN storage dynamic provisioning under a container platform of claim 1 wherein upon receipt of a configuration file for a user created event by a SAN-CSI Controller component of said Kubernets cluster master node, creating a logical volume in a volume group of a node that best matches a size of space in said configuration file for use by a container comprises:
when a SAN-CSI Controller component of the Kubernetes cluster main Node receives a configuration file of a space use event created by a user, the SAN-CSI Controller component selects a Node matched with the size of a space in the configuration file according to the usable space of a volume group of each Node, and informs the SAN-CSI Node component of the Node of the created space use event through a kube-api; and
and the SAN-CSI Node component creates a logical volume with the space size in the configuration file in the volume group of the Node, stores the Node name in a resource object corresponding to the configuration file, and informs the SAN-CSI Controller component that the event creation is successful.
4. The method for SAN storage dynamic provisioning under a container platform of claim 1, wherein the method further comprises:
when an SAN-CSI Controller component of a main node receives a configuration file of a snapshot event created by a user, querying a node where a logical volume is located according to logical volume information in the configuration file;
when the SAN-CSI Node component of the Node receives the snapshot creating event, the SAN-CSI Node component inquires a logic volume in the Node group volume; and
and creating a snapshot in the logical volume by using an lvcreate command, and returning a snapshot creation result to the SAN-CSI Controller component.
5. The method for SAN storage dynamic provisioning under a container platform of claim 1, wherein said method further comprises:
when an SAN-CSI Controller component of a main node receives a configuration file of a user modification space usage capacity event, querying a node where a logical volume is located according to logical volume information in the configuration file;
when the SAN-CSI Node component of the Node receives the event of modifying the space usage capacity, the SAN-CSI Node component inquires a logic volume in the Node group volume; and
and carrying out capacity expansion in the logical volume by using a lvextend command, and returning the capacity expansion result to the SAN-CSI Controller component.
6. An apparatus for SAN storage dynamic provisioning under a container platform, the apparatus comprising:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating corresponding volume groups for all nodes of a Kubernetes cluster based on the storage space of a remote SAN;
the system comprises an execution module, a configuration module and a configuration module, wherein the execution module is used for creating a logic volume in a volume group of a node which is the most matched with the space size in a configuration file when an SAN-CSI Controller component of a Kubernets cluster main node receives the configuration file of a user created event; and
and the using module is used for dispatching the POD to the node and mounting the logical volume to the POD for a container to use when the POD uses the logical volume.
7. The apparatus for SAN storage dynamic provisioning under a container platform of claim 6, wherein the creation module is further to:
connecting one or more storage spaces of a remote SAN into one or more nodes of a Kubernetes cluster through a network as one or more local block device files;
creating the local block device file into a physical volume through a logical volume management technology; and
one or more of the physical volumes are created as one or more volume groups as storage pools.
8. The apparatus for SAN storage dynamic provisioning under a container platform of claim 6, wherein the execution module is further to:
when an SAN-CSI Controller component of the Kubernetes cluster main Node receives a configuration file of a space use event created by a user, the SAN-CSI Controller component selects a Node matched with the space size in the configuration file according to the usable space of a volume group of each Node, and informs the SAN-CSI Node component of the Node of the created space use event through a kube-api server; and
and the SAN-CSI Node component creates a logical volume with the space size in the configuration file in the volume group of the Node, stores the Node name in a resource object corresponding to the configuration file, and informs the SAN-CSI Controller component that the event creation is successful.
9. The apparatus for SAN storage dynamic provisioning under a container platform of claim 6, wherein the execution module is further to:
when an SAN-CSI Controller component of a main node receives a configuration file of a snapshot event created by a user, querying a node where a logical volume is located according to logical volume information in the configuration file;
when the SAN-CSI Node component of the Node receives the snapshot creating event, the SAN-CSI Node component inquires a logic volume in the Node group volume; and
and creating a snapshot in the logical volume by using an lvcreate command, and returning a snapshot creation result to the SAN-CSI Controller component.
10. The apparatus for SAN storage dynamic provisioning under a container platform of claim 6, wherein the execution module is further to:
when an SAN-CSI Controller component of a main node receives a configuration file of a user modification space usage capacity event, querying a node where a logical volume is located according to logical volume information in the configuration file;
when the SAN-CSI Node component of the Node receives the event of modifying the space usage capacity, the SAN-CSI Node component queries a logic volume in the Node group volume; and
and carrying out capacity expansion in the logical volume by using a Lvexend command, and returning the capacity expansion result to the SAN-CSI Controller component.
CN202210469501.9A 2022-04-28 2022-04-28 SAN storage dynamic supply method under container platform and application Pending CN114816756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210469501.9A CN114816756A (en) 2022-04-28 2022-04-28 SAN storage dynamic supply method under container platform and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210469501.9A CN114816756A (en) 2022-04-28 2022-04-28 SAN storage dynamic supply method under container platform and application

Publications (1)

Publication Number Publication Date
CN114816756A true CN114816756A (en) 2022-07-29

Family

ID=82508882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210469501.9A Pending CN114816756A (en) 2022-04-28 2022-04-28 SAN storage dynamic supply method under container platform and application

Country Status (1)

Country Link
CN (1) CN114816756A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060236068A1 (en) * 2005-04-14 2006-10-19 International Business Machines Corporation Method and apparatus for storage provisioning automation in a data center
CN106201357A (en) * 2016-07-18 2016-12-07 浪潮(北京)电子信息产业有限公司 The construction method of a kind of storage pool and system
CN113504954A (en) * 2021-07-08 2021-10-15 华云数据控股集团有限公司 Method, system and medium for calling CSI LVM plug-in, dynamic persistent volume provisioning
CN113568569A (en) * 2021-06-21 2021-10-29 长沙证通云计算有限公司 SAN storage docking method and system based on cloud platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060236068A1 (en) * 2005-04-14 2006-10-19 International Business Machines Corporation Method and apparatus for storage provisioning automation in a data center
CN106201357A (en) * 2016-07-18 2016-12-07 浪潮(北京)电子信息产业有限公司 The construction method of a kind of storage pool and system
CN113568569A (en) * 2021-06-21 2021-10-29 长沙证通云计算有限公司 SAN storage docking method and system based on cloud platform
CN113504954A (en) * 2021-07-08 2021-10-15 华云数据控股集团有限公司 Method, system and medium for calling CSI LVM plug-in, dynamic persistent volume provisioning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李家俊 等: "基于高端SAN存储系统虚拟整合技术研究" *

Similar Documents

Publication Publication Date Title
US11093159B2 (en) Storage system with storage volume pre-copy functionality for increased efficiency in asynchronous replication
CN107197022B (en) OpenStack storage optimization method and system
EP3686739B1 (en) Method and system for enabling agentless backup and restore operations on a container orchestration platform
US11249834B2 (en) Storage system with coordinated recovery across multiple input-output journals of different types
CN110247984B (en) Service processing method, device and storage medium
US11232065B2 (en) Using a Unix-based file system to manage and serve clones to windows-based computing clients
US10649955B2 (en) Providing unique inodes across multiple file system namespaces
US11429568B2 (en) Global namespace for a hierarchical set of file systems
US10657102B2 (en) Storage space management in union mounted file systems
US11108864B2 (en) System and method for client policy assignment in a data storage system
WO2015000378A1 (en) Method to optimize provisioning time with dynamically generated virtual disk contents
CN112988060A (en) Key value storage device and method for operating key value storage device
US10757175B2 (en) Synchronization optimization based upon allocation data
EP4052126A1 (en) Management of multiple physical function non-volatile memory devices
US10579587B2 (en) Space management for a hierarchical set of file systems
CN109032753B (en) Heterogeneous virtual machine hard disk hosting method and system, storage medium and Nova platform
CN116848517A (en) Cache indexing using data addresses based on data fingerprints
CN107329798B (en) Data replication method and device and virtualization system
US10579598B2 (en) Global namespace for a hierarchical set of file systems
US10592479B2 (en) Space management for a hierarchical set of file systems
CN104426965A (en) Self-management storage method and system
CN110750221A (en) Volume cloning method, volume cloning device, electronic equipment and machine-readable storage medium
CN114816756A (en) SAN storage dynamic supply method under container platform and application
US20180357005A1 (en) Storage system and operating method thereof
US11269855B2 (en) On-demand remote snapshot creation for a synchronous replication session in automatic recovery

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220729