CN114546269A - Storage mounting method and device and electronic equipment - Google Patents

Storage mounting method and device and electronic equipment Download PDF

Info

Publication number
CN114546269A
CN114546269A CN202210137743.8A CN202210137743A CN114546269A CN 114546269 A CN114546269 A CN 114546269A CN 202210137743 A CN202210137743 A CN 202210137743A CN 114546269 A CN114546269 A CN 114546269A
Authority
CN
China
Prior art keywords
container
node
csi
mount
mounting
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
CN202210137743.8A
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210137743.8A priority Critical patent/CN114546269A/en
Publication of CN114546269A publication Critical patent/CN114546269A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Abstract

The application provides a storage mounting method, a storage mounting device and electronic equipment, wherein the method comprises the following steps: determining object storage resources corresponding to the container set scheduled to the node and mounting commands of the object storage resources; the CSI container in the control node calls a root process of an operating system in the node, and executes a mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, a daemon process and further a storage mounting process cannot be influenced, and the storage mounting efficiency is high.

Description

Storage mounting method and device and electronic equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a storage mounting method and apparatus, and an electronic device.
Background
In the related art, the storage mount method is mainly based on a CSI container mechanism, and the CSI container in the node may invoke a root process in the CSI container to execute a mount command. In the above scheme, since the mount command is executed by the root process of the CSI container, the daemon process is executed by the root process of the CSI container. When the CSI container is updated or abnormally restarted, the daemon process stops, so that the storage mounting is easy to have problems, and the storage mounting efficiency is poor.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
The application provides a storage mounting method and device and electronic equipment, so that a root process of an operating system in a control node is called by a CSI container in a control node to execute a mounting command, a daemon process cannot be influenced when the CSI container is updated or abnormally restarted, further, storage mounting cannot be influenced, and the storage mounting efficiency is high.
An embodiment of a first aspect of the present application provides a storage mount method, which is applied to a node in a container cluster management system, and includes:
determining object storage resources corresponding to the container set scheduled to the node and mount commands of the object storage resources;
and controlling a CSI container in the node to call a root process of an operating system in the node, and executing the mounting command so as to mount the object storage resource into a local file system of the node.
According to the storage mounting method, the object storage resources corresponding to the container set scheduled to the node and the mounting commands of the object storage resources are determined; the CSI container in the control node calls a root process of an operating system in the node, and executes a mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, a daemon process and further a storage mounting process cannot be influenced, and the storage mounting efficiency is high.
An embodiment of a second aspect of the present application provides a storage mount method, which is applied to a cluster control node in a container cluster management system, and includes:
configuring mounting parameters in a CSI container of each node in the container cluster management system, so that the CSI container mounts a root process of an operating system in the node according to the mounting parameters when being started, and executing a mounting command of an object storage resource by adopting the root process;
alternatively, the first and second electrodes may be,
and configuring an inter-process communication mechanism in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to inform the root process to execute a mount command of an object storage resource.
According to the storage mounting method, mounting parameters are configured in the CSI container of each node in the container cluster management system, so that the CSI container can mount a root process of an operating system in the node according to the mounting parameters when being started, and a mounting command of an object storage resource is executed by adopting the root process; or, an inter-process communication mechanism is configured in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to notify the root process to execute the mount command of the object storage resource, and therefore, when the CSI container is updated or abnormally restarted, the daemon process and the storage mount are not influenced, and the storage mount efficiency is high.
An embodiment of a third aspect of the present application provides a storage mount device, which is applied to a node in a container cluster management system, and includes:
a first determining module, configured to determine an object storage resource corresponding to a container set scheduled to the node and a mount command of the object storage resource;
and the processing module is used for controlling the CSI container in the node to call a root process of an operating system in the node and executing the mounting command so as to mount the object storage resource into a local file system of the node.
The storage mounting device of the embodiment of the application determines the object storage resources corresponding to the container set scheduled to the node and the mounting command of the object storage resources; the CSI container in the control node calls a root process of an operating system in the node, and executes a mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, a daemon process and further a storage mounting process cannot be influenced, and the storage mounting efficiency is high.
An embodiment of a fourth aspect of the present application provides a storage mount device, which is applied to a cluster control node in a container cluster management system, and includes:
a first configuration module, configured to configure, for each node in the container cluster management system, a mount parameter in a CSI container of the node, so that the CSI container mounts, when started, a root process of an operating system in the node according to the mount parameter, and executes a mount command of an object storage resource by using the root process;
alternatively, the first and second electrodes may be,
a second configuration module, configured to configure an inter-process communication mechanism in a CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism, so as to notify the root process to execute a mount command of an object storage resource.
According to the storage mounting device, mounting parameters are configured in the CSI container of each node in the container cluster management system, so that the CSI container can mount a root process of an operating system in the node according to the mounting parameters when being started, and a mounting command of an object storage resource is executed by adopting the root process; or, an inter-process communication mechanism is configured in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to notify the root process to execute the mount command of the object storage resource, and therefore, when the CSI container is updated or abnormally restarted, the daemon process and the storage mount are not influenced, and the storage mount efficiency is high.
An embodiment of a fifth aspect of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the storage mount method proposed in the embodiment of the first aspect of the present application, or the storage mount method proposed in the embodiment of the second aspect of the present application.
An embodiment of a sixth aspect of the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the storage mount method proposed in the embodiment of the first aspect of the present application or the storage mount method proposed in the embodiment of the second aspect of the present application.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a storage mount method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a storage mount;
fig. 3 is a schematic flowchart of a storage mount method according to a second embodiment of the present application;
fig. 4 is a schematic flowchart of a storage mount method according to a third embodiment of the present application;
fig. 5 is a schematic flowchart of a storage mount method according to a fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a storage mounting device according to a fifth embodiment of the present application;
fig. 7 is a schematic structural diagram of a storage mounting device according to a sixth embodiment of the present application;
FIG. 8 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
In the related art, the storage mount method is mainly based on a CSI container mechanism, and the CSI container in the node may invoke a root process in the CSI container to execute a mount command. In the above scheme, since the mount command is executed by the root process of the CSI container, the daemon process is executed by the root process of the CSI container. When the CSI container is updated or an abnormal container is detected, the daemon process may stop, which may cause a problem in the memory mount and may result in poor memory mount efficiency.
Therefore, the present application provides a storage mounting method, an apparatus, and an electronic device, mainly for the technical problems that in the related art, when a CSI container is updated or an abnormal container is detected, a daemon process is stopped, so that storage mounting is prone to be problematic, and storage mounting efficiency is poor.
According to the storage mounting method, the object storage resources corresponding to the container set scheduled to the node and the mounting commands of the object storage resources are determined; the CSI container in the control node calls a root process of an operating system in the node, and executes a mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, a daemon process and further a storage mounting process cannot be influenced, and the storage mounting efficiency is high.
The following describes a storage mount method, a storage mount device, and an electronic device according to an embodiment of the present application with reference to the drawings.
Fig. 1 is a schematic flowchart of a storage mount method according to an embodiment of the present application.
The embodiment of the present application is exemplified by configuring the storage mount method in a storage mount device, and the storage mount device may be applied to a node in a container cluster management system, that is, any other node in the container cluster management system except a cluster control node, so that the node may implement a storage mount function. The container cluster management system may be k8s (kubernets), for example.
Wherein the node may be an electronic device. The electronic device may be a Personal Computer (PC), a cloud device, a mobile device, and the like, and the mobile device may be a hardware device having various operating systems, touch screens, and/or display screens, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and an in-vehicle device.
As shown in fig. 1, the storage mount method may include the steps of:
step 101, determining an object storage resource corresponding to a container set scheduled to a node and a mount command of the object storage resource.
In this embodiment of the present application, the process of the storage mount device executing step 101 may be, for example, determining a container set bound to a node as a container set scheduled to the node; determining object storage resources corresponding to the container set; and determining the resource type information of the object storage resource, wherein the resource type information comprises a mounting command. The object storage resource may be a storage resource in a storage class service.
In the embodiment of the application, the container set bound with the nodes is created and bound to the nodes by the cluster control nodes according to the container set creation request of the user. In the embodiment of the present application, as shown in fig. 2, a schematic diagram of storage mount is shown. In this figure, the structure of the container cluster management system is described, as well as the interaction of the nodes with the cluster control nodes in the container cluster management system.
In fig. 2, a cluster control node (Master) includes: an automation control center component (Kube Controller Manager), an API service component (API server), a component for storing cluster state (etcd), and the like. Wherein the automation control center component is used to control all resource objects in the system.
In fig. 2, a Node (Node) includes: a kubelet component, a set of containers of different resource types (DaemonSet Pod, stateful Pod), etc. The kubelet component is responsible for creating, starting and stopping containers corresponding to the container sets in the nodes and the like, and is closely cooperated with the cluster control nodes to achieve the basic function of cluster management.
In fig. 2, an object storage resource (bucket) in a storage class service (AWSS3) is used for being mounted to a local file system of a node, so that when a container centralized service or an application is executed in the node, data in the object storage resource can be acquired by the local file system, processed, and a processing result is stored in the object storage resource through the local file system, thereby implementing a function of the service or the application.
In fig. 2, the interaction process between the cluster control Node (Master), the Node (Node) and the storage class service (AWSS3) may be, for example, (1) the cluster control Node creates resource type information (StorageClass) of the object storage resource, and specifies a mount command (mount type) in the resource type information, which may be, for example, s3 fs/goofys/rclone. That is, any one of s3fs, goofys, rclone. S3fs, goofys, rclone are programs for mounting the object storage resource to the local file system. (2) When a cluster control node receives a container set creation request of a user and a request for creating a persistent storage volume accompanied by the request, an API service component in the cluster control node creates a container set according to the container set creation request, selects a target node in a cluster, binds the container set to the target node, and schedules the container set to the target node; when a storage volume expansion component (provisioner resizer) in a stateful set Pod in a target node monitors a request for creating a persistent storage volume, a persistent storage volume creation method (creativolume) of a central control interface (CSI-Controller server) of a CSI container is called to create the persistent storage volume, the persistent storage volume is communicated with a storage class service, and an object storage resource (bucket) and directory information of the object storage resource are created.
And 102, calling a root process of an operating system in the node by a CSI container in the control node, and executing a mounting command to mount the object storage resource into a local file system of the node.
In the embodiment of the application, the kubel component in the node can interact with the CSI container, the CSI container is controlled to call a root process of an operating system in the node, and a mounting command is executed to mount the object storage resource into a local file system of the node.
In the embodiment of the application, while the root process executes the mount command, a daemon process is created at the same time and is used for guarding the storage mount. And when the container set is deleted and the persistent storage volume is unloaded, the mounting of the object storage resource is canceled, and then the daemon process is exited. And when the CSI container is updated or abnormally restarted, the daemon process cannot be exited, and the storage mounting protected by the daemon process cannot be influenced.
According to the storage mounting method, the object storage resources corresponding to the container set scheduled to the node and the mounting commands of the object storage resources are determined; the CSI container in the control node calls a root process of an operating system in the node, and executes a mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, a daemon process and further a storage mounting process cannot be influenced, and the storage mounting efficiency is high.
Fig. 3 is a schematic flowchart of a storage mount method according to a second embodiment of the present application.
As shown in fig. 3, the storage mount method may include the steps of:
step 301, determining an object storage resource corresponding to the container set scheduled to the node and a mount command of the object storage resource.
Step 302, controlling the CSI container to call the mounted root process to execute a mounting command so as to mount the object storage resource to a local file system of the node; wherein, the CSI container is loaded with a root process of the operating system.
In the embodiment of the application, when a root process of an operating system is mounted in a CSI container, and a kubel component in a Node calls a Node management and control interface (CSI-Node server) in the CSI container, the CSI container automatically calls the mounted root process to execute a mounting command. In the case where the root process is a system, the command string when the mounted root process is called to execute the mount command is "system-run-s 3 fs", or "system-run-goofys", or "system-run-rclone", or the like.
In this embodiment of the application, in order to ensure that the CSI container is populated with the root process of the operating system, before step 302, the method may further include the following steps: determining configured mounting parameters; and adding the mounting parameters into the CSI container so that the root process of the operating system is mounted to the CSI container according to the mounting parameters when the CSI container is started.
In the embodiment of the present application, the description of step 301 may refer to the detailed description of step 101 in the embodiment shown in fig. 1, and will not be described in detail here.
According to the storage mounting method, the object storage resources corresponding to the container set scheduled to the node and the mounting commands of the object storage resources are determined; under the condition that the root process of the operating system is mounted in the CSI container, the CSI container is controlled to call the mounted root process to execute a mounting command so as to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, the daemon process cannot be influenced, the storage mounting cannot be influenced, and the storage mounting efficiency is high.
Fig. 4 is a schematic flowchart of a storage mount method according to a third embodiment of the present application.
As shown in fig. 4, the storage mount method may include the steps of:
step 401, determining the object storage resource corresponding to the container set scheduled to the node and the mount command of the object storage resource.
Step 402, controlling the CSI container to communicate with a root process of an operating system according to an inter-process communication mechanism, and notifying the root process of the operating system to execute a mount command so as to mount the object storage resource into a local file system of a node; and the CSI container is provided with an inter-process communication mechanism which is used for communicating with a root process of an operating system.
In the embodiment of the application, under the condition that an inter-process communication mechanism is configured in a CSI container, when a kubel component in a Node calls a Node management and control interface (CSI-Node server) in the CSI container, the CSI container may communicate with a root process of an operating system in the Node based on the inter-process communication mechanism, and notify the root process of the operating system to execute a mount command, so as to mount an object storage resource to a local file system of the Node.
In this embodiment of the application, in order to ensure that the inter-process communication mechanism is configured in the CSI container, before step 402, the method may further include the following steps: determining a configured interprocess communication mechanism; an inter-process communication mechanism is added to the CSI container.
The interprocess communication mechanism may be, for example, dbus communication mechanism.
In the embodiment of the present application, the description of step 401 may refer to the detailed description of step 101 in the embodiment shown in fig. 1, and will not be described in detail here.
According to the storage mounting method, the object storage resources corresponding to the container set scheduled to the node and the mounting commands of the object storage resources are determined; under the condition that an interprocess communication mechanism is configured in the CSI container, the CSI container is controlled to communicate with a root process of an operating system according to the interprocess communication mechanism, the root process of the operating system is informed to execute a mount command, and object storage resources are mounted in a local file system of a node, so that a daemon process cannot be influenced when the CSI container is updated or abnormally restarted, further storage mounting cannot be influenced, and the storage mounting efficiency is high.
Fig. 5 is a schematic flowchart of a storage mount method according to a fourth embodiment of the present application.
The embodiment of the present application is exemplified by configuring the storage mount method in a storage mount device, where the storage mount device may be applied to a cluster control node in a container cluster management system, so that the node may implement a storage mount function. The container cluster management system may be k8s (kubernets), for example.
Wherein the node may be an electronic device. The electronic device may be a Personal Computer (PC), a cloud device, a mobile device, and the like, and the mobile device may be a hardware device having various operating systems, touch screens, and/or display screens, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and an in-vehicle device.
As shown in fig. 5, the storage mount method may include the steps of:
step 501, configuring mounting parameters in a CSI container of a node for each node in a container cluster management system, so that the CSI container mounts a root process of an operating system in the node according to the mounting parameters when being started, and executing a mounting command of an object storage resource by using the root process; or configuring an inter-process communication mechanism in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to inform the root process to execute the mount command of the object storage resource.
In an example, in an embodiment of the present application, an API component in a cluster management control node may configure mount parameters in a CSI container of each node except for the cluster control node in a container cluster management system. When the CSI container is started, the CSI container mounts the root process of the operating system into the CSI container according to the mounting parameters.
When a kubel component in a Node calls a Node management and control interface (CSI-Node server) in a CSI container under the condition that a root process of an operating system is mounted in the CSI container, the CSI container automatically calls the mounted root process to execute a mounting command. In the case where the root process is system, the command string when the mounted root process is called to execute the mounted command is "system-run-s 3 fs" or "system-run-goofys" or "system-run-rclone" or the like.
In this embodiment, in another example, an API component in the cluster management control node may configure an inter-process communication mechanism in a CSI container of each node except the cluster control node in the container cluster management system, so that when the kubel component in the node calls a node management control interface (CSI-node server) in the CSI container to execute a mount command, the CSI container communicates with the root process according to the inter-process communication mechanism to notify the root process to execute the mount command of the object storage resource.
When the inter-process communication mechanism is configured in the CSI container, and when the kubel component in the node calls a node management and control interface (CSI-node server) in the CSI container to execute a mount command, the CSI container may communicate with a root process of an operating system in the node based on the inter-process communication mechanism, and notify the root process of the operating system to execute the mount command.
According to the storage mounting method, mounting parameters are configured in the CSI container of each node in the container cluster management system, so that the CSI container can mount a root process of an operating system in the node according to the mounting parameters when being started, and a mounting command of an object storage resource is executed by adopting the root process; or, an inter-process communication mechanism is configured in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to notify the root process to execute the mount command of the object storage resource, and therefore, when the CSI container is updated or abnormally restarted, the daemon process and the storage mount are not influenced, and the storage mount efficiency is high.
Fig. 6 is a schematic structural diagram of a storage mounting device according to a fifth embodiment of the present application.
The storage mounting device can be applied to any node except the cluster control node in the container cluster management system, so that the node can realize the storage mounting function.
As shown in fig. 6, the storage mounting apparatus 600 may include: a first determination module 610 and a processing module 620.
The first determining module 610 is configured to determine an object storage resource corresponding to a container set scheduled to the node and a mount command of the object storage resource;
and the processing module 620 is configured to control the CSI container in the node to invoke a root process of an operating system in the node, and execute the mount command, so as to mount the object storage resource to a local file system of the node.
Further, in a possible implementation manner of the embodiment of the present application, a root process of the operating system is mounted in the CSI container; the processing module 620 is specifically configured to control the CSI container to call the mounted root process to execute the mount command, so as to mount the object storage resource to the local file system of the node.
Further, in a possible implementation manner of the embodiment of the present application, the apparatus further includes: the device comprises a second determining module and a first adding module; the second determining module is used for determining the configured mounting parameters; the first adding module is configured to add the mount parameter to the CSI container, so that when the CSI container is started, a root process of the operating system is mounted to the CSI container according to the mount parameter.
Further, in a possible implementation manner of the embodiment of the present application, an inter-process communication mechanism is configured in the CSI container, and is configured to communicate with a root process of the operating system; the processing module 620 is specifically configured to control the CSI container to communicate with the root process of the operating system according to the inter-process communication mechanism, and notify the root process of the operating system to execute the mount command, so as to mount the object storage resource to the local file system of the node.
Further, in a possible implementation manner of the embodiment of the present application, the apparatus further includes: a third determining module and a second adding module; the third determining module is configured to determine the configured interprocess communication mechanism; the second adding module is configured to add the inter-process communication mechanism to the CSI container.
Further, in a possible implementation manner of the embodiment of the present application, the first determining module 610 is specifically configured to determine a container set bound to the node as a container set scheduled to the node; determining object storage resources corresponding to the container set; and determining resource type information of the object storage resource, wherein the resource type information comprises the mounting command.
Further, in a possible implementation manner of the embodiment of the present application, the object storage resource is a storage resource in a storage class service.
It should be noted that the explanation in the first embodiment is also applicable to the storage mounting apparatus of this embodiment, and details are not described here.
The storage mounting device of the embodiment of the application determines the object storage resources corresponding to the container set scheduled to the node and the mounting command of the object storage resources; the CSI container in the control node calls a root process of an operating system in the node, and executes the mounting command to mount the object storage resource to a local file system of the node, so that when the CSI container is updated or abnormally restarted, the daemon process and the storage mounting cannot be influenced, and the storage mounting efficiency is high.
Fig. 7 is a schematic structural diagram of a storage mounting device according to a sixth embodiment of the present application.
The storage mounting device can be applied to a cluster control node in a container cluster management system, so that the node can realize a storage mounting function.
As shown in fig. 7, the training apparatus 700 of the anomaly detection combined model may include: a first configuration module 710 and a second configuration module 720.
The first configuration module 710 is configured to configure, for each node in the container cluster management system, a mount parameter in a CSI container of the node, so that the CSI container mounts, when started, a root process of an operating system in the node according to the mount parameter, and executes a mount command of an object storage resource by using the root process;
alternatively, the first and second electrodes may be,
a second configuring module 720, configured to configure an inter-process communication mechanism in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism, so as to notify the root process to execute a mount command of an object storage resource.
It should be noted that the explanation in the fourth embodiment is also applicable to the memory mounting device in this embodiment, and details are not repeated here.
According to the storage mounting device, mounting parameters are configured in the CSI container of each node in the container cluster management system, so that the CSI container can mount a root process of an operating system in the node according to the mounting parameters when being started, and a mounting command of an object storage resource is executed by adopting the root process; or, an inter-process communication mechanism is configured in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to notify the root process to execute the mount command of the object storage resource, and therefore, when the CSI container is updated or abnormally restarted, the daemon process and the storage mount are not influenced, and the storage mount efficiency is high.
In order to implement the above embodiments, the present application also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the memory mount method set forth in the foregoing embodiments of the present application; alternatively, the storage mount method proposed in the foregoing embodiment of the present application.
In order to implement the foregoing embodiments, the present application also proposes a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the storage mount method as proposed in the foregoing embodiments of the present application; alternatively, the storage mount method proposed in the foregoing embodiment of the present application.
FIG. 8 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application. The computer device 12 shown in fig. 8 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in FIG. 8, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (18)

1. A storage mounting method is applied to a node in a container cluster management system, and comprises the following steps:
determining object storage resources corresponding to the container set scheduled to the node and mount commands of the object storage resources;
and controlling a CSI container in the node to call a root process of an operating system in the node, and executing the mounting command so as to mount the object storage resource to a local file system of the node.
2. The method of claim 1, wherein a root process of the operating system is mounted in the CSI container;
the controlling the CSI container in the node to call a root process of an operating system in the node and execute the mount command includes:
and controlling the CSI container to call the mounted root process to execute the mounting command so as to mount the object storage resource to a local file system of the node.
3. The method of claim 2, wherein before controlling the CSI container in the node to call a root process of an operating system in the node, and executing the mount command, the method further comprises:
determining configured mounting parameters;
adding the mounting parameters into the CSI container so that when the CSI container is started, the root process of the operating system is mounted to the CSI container according to the mounting parameters.
4. The method of claim 1, wherein an inter-process communication mechanism is configured in the CSI container for communicating with a root process of the operating system;
the controlling the CSI container in the node to call a root process of an operating system in the node and execute the mount command includes:
and controlling the CSI container to communicate with the root process of the operating system according to the inter-process communication mechanism, and informing the root process of the operating system to execute the mount command so as to mount the object storage resource into a local file system of the node.
5. The method of claim 4, wherein before controlling the CSI container in the node to call a root process of an operating system in the node and execute the mount command, the method further comprises:
determining the configured interprocess communication mechanism;
adding the inter-process communication mechanism to the CSI container.
6. The method of claim 1, wherein the determining the object storage resource corresponding to the container set scheduled to the node and the mount command of the object storage resource comprises:
determining the container set bound with the node as the container set scheduled to the node;
determining object storage resources corresponding to the container set;
and determining resource type information of the object storage resource, wherein the resource type information comprises the mounting command.
7. The method of any of claims 1-6, wherein the object storage resource is a storage resource in a storage class service.
8. A storage mounting method is applied to a cluster control node in a container cluster management system, and comprises the following steps:
configuring mounting parameters in a CSI container of each node in the container cluster management system, so that the CSI container mounts a root process of an operating system in the node according to the mounting parameters when being started, and executing a mounting command of an object storage resource by adopting the root process;
alternatively, the first and second electrodes may be,
and configuring an inter-process communication mechanism in the CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism to inform the root process to execute a mount command of an object storage resource.
9. A storage mounting device applied to a node in a container cluster management system comprises:
a first determining module, configured to determine an object storage resource corresponding to a container set scheduled to the node and a mount command of the object storage resource;
and the processing module is used for controlling the CSI container in the node to call a root process of an operating system in the node and executing the mounting command so as to mount the object storage resource into a local file system of the node.
10. The apparatus of claim 9, wherein a root process of the operating system is mounted in the CSI container; the processing module is specifically configured to perform,
and controlling the CSI container to call the mounted root process to execute the mounting command so as to mount the object storage resource to a local file system of the node.
11. The apparatus of claim 10, further comprising: a second determining module and a first adding module;
the second determining module is used for determining the configured mounting parameters;
the first adding module is configured to add the mount parameter to the CSI container, so that when the CSI container is started, a root process of the operating system is mounted to the CSI container according to the mount parameter.
12. The apparatus of claim 9, wherein the CSI container is configured with an inter-process communication mechanism for communicating with a root process of the operating system; the processing module is specifically configured to,
and controlling the CSI container to communicate with the root process of the operating system according to the inter-process communication mechanism, and informing the root process of the operating system to execute the mount command so as to mount the object storage resource into a local file system of the node.
13. The apparatus of claim 12, further comprising: a third determining module and a second adding module;
the third determining module is configured to determine the configured interprocess communication mechanism;
the second adding module is configured to add the inter-process communication mechanism to the CSI container.
14. The apparatus of claim 9, wherein the first determining means is specifically configured to,
determining the container set bound with the node as the container set scheduled to the node;
determining object storage resources corresponding to the container set;
and determining resource type information of the object storage resource, wherein the resource type information comprises the mounting command.
15. The apparatus according to any of claims 9-14, wherein the object storage resource is a storage resource in a storage class service.
16. A storage mounting device is applied to a cluster control node in a container cluster management system, and comprises:
a first configuration module, configured to configure, for each node in the container cluster management system, a mount parameter in a CSI container of the node, so that the CSI container mounts, when started, a root process of an operating system in the node according to the mount parameter, and executes a mount command of an object storage resource by using the root process;
alternatively, the first and second electrodes may be,
a second configuration module, configured to configure an inter-process communication mechanism in a CSI container of the node, so that the CSI container communicates with the root process according to the inter-process communication mechanism, so as to notify the root process to execute a mount command of an object storage resource.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7; or, performing the method of claim 8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7; or, performing the method of claim 8.
CN202210137743.8A 2022-02-15 2022-02-15 Storage mounting method and device and electronic equipment Pending CN114546269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210137743.8A CN114546269A (en) 2022-02-15 2022-02-15 Storage mounting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210137743.8A CN114546269A (en) 2022-02-15 2022-02-15 Storage mounting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114546269A true CN114546269A (en) 2022-05-27

Family

ID=81675043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210137743.8A Pending CN114546269A (en) 2022-02-15 2022-02-15 Storage mounting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114546269A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150058863A1 (en) * 2013-08-26 2015-02-26 Vmware, Inc. Load balancing of resources
US20170153930A1 (en) * 2015-11-30 2017-06-01 Coreos, Inc. Application container runtime
CN108121591A (en) * 2017-12-18 2018-06-05 浪潮软件股份有限公司 A kind of implementation method and device of Kubernetes nodes
CN109240809A (en) * 2017-07-11 2019-01-18 阿里巴巴集团控股有限公司 Process maintenance management method, container maintaining method, device and operating system
CN111913665A (en) * 2020-07-30 2020-11-10 星辰天合(北京)数据科技有限公司 Mounting method and device of storage volume and electronic equipment
CN113885928A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Program updating method and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150058863A1 (en) * 2013-08-26 2015-02-26 Vmware, Inc. Load balancing of resources
US20170153930A1 (en) * 2015-11-30 2017-06-01 Coreos, Inc. Application container runtime
CN109240809A (en) * 2017-07-11 2019-01-18 阿里巴巴集团控股有限公司 Process maintenance management method, container maintaining method, device and operating system
CN108121591A (en) * 2017-12-18 2018-06-05 浪潮软件股份有限公司 A kind of implementation method and device of Kubernetes nodes
CN111913665A (en) * 2020-07-30 2020-11-10 星辰天合(北京)数据科技有限公司 Mounting method and device of storage volume and electronic equipment
CN113885928A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Program updating method and electronic device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHARLIERORO: "基于openshift+华为对象存储的CSI开发", Retrieved from the Internet <URL:https://www.cnblogs.com/charlieroro/p/12581405.html> *
JSAFRANE: "Run mount in its own systemd scope.#49640", pages 1 - 9, Retrieved from the Internet <URL:https://github.com/kubernetes/kubernetes/pull/49640> *
REIMU: "kubelet 挂载 volume 原理分析", pages 1 - 10, Retrieved from the Internet <URL:https://blog.k8s.li/kubelet-mount-volumes-analysis.html> *

Similar Documents

Publication Publication Date Title
JP6516730B2 (en) Method and apparatus for backing up and restoring applications
US10007586B2 (en) Deferred server recovery in computing systems
US10204020B2 (en) System, method, and computer program product for dynamic volume mounting in a system maintaining synchronous copy objects
EP1963962B1 (en) Changing a scheduler in a virtual machine monitor
US8499143B2 (en) Method for shortening the boot time of a computer system
US20200310779A1 (en) Validating a firmware compliance policy prior to use in a production system
CN107291950B (en) Form data updating method and device and computer equipment
US9684475B2 (en) Multi-mode hybrid storage drive
KR20140125565A (en) Method for managing memory and an electronic device thereof
US20200220777A1 (en) Systems and methods for dynamically commissioning and decommissioning computer components
CN114489512A (en) Method and device for limiting container capacity, electronic equipment and storage medium
US8086834B2 (en) System and method for populating a dedicated system service repository for an information handling system
KR101551206B1 (en) A vehicle data control system and a control method
US20130097412A1 (en) Performing A Boot Sequence In A Multi-Processor System
US8266541B2 (en) Message window display control apparatus, method, and program product
US9003172B2 (en) Intelligently controlling loading of legacy option ROMs in a computing system
CN114546269A (en) Storage mounting method and device and electronic equipment
US7577814B1 (en) Firmware memory management
US20100223366A1 (en) Automated virtual server deployment
CN107656702B (en) Method and system for accelerating hard disk read-write and electronic equipment
CN115576685A (en) Container scheduling method and device and computer equipment
US11314413B2 (en) Adjustable tape storage capacity
US7114066B1 (en) Method, apparatus, and computer-readable medium for ensuring compatibility between an operating system and a BIOS redirection component
CN114679465A (en) Resource operation method and device, electronic equipment and storage medium
CN113821219A (en) Method and system for realizing application program containerization

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