Method for managing local high-performance storage based on logical volumes in a cluster
By employing logical volume management and container interface service plugins in the cluster, local high-performance storage resources are dynamically created and scheduled, solving the problems of low storage resource utilization and insufficient security isolation in existing technologies. This achieves efficient storage resource management and billing, and improves the return on investment of infrastructure.
Patent Information
- Application Number
- CN202610330237.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-18
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-03-18
AI Technical Summary
Existing cloud-native storage solutions suffer from problems such as low storage resource utilization, inaccurate allocation, insufficient security isolation, lack of quota management, difficulty in billing and accounting, and risk of resource overuse when using local high-performance solid-state drives on GPU servers.
By aggregating the disk space of the node cluster using Logical Volume Management (LVM) in the cluster, deploying the Container Interface Service plugin, dynamic creation and binding of resource objects are achieved. Combined with the cluster scheduler for intelligent scheduling, dynamic and fine-grained allocation of storage resources is realized, and billing management is carried out through the CSI plugin.
It improves storage hardware utilization, enables collaborative scheduling of storage and GPU computing power, simplifies storage lifecycle management, enhances operational flexibility, solves resource fragmentation problems, and achieves accurate billing and cost sharing.
Smart Images

Figure CN122308730B_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, particularly to the field of clustered storage processing, and specifically to a local high-performance storage processing method based on logical volume management in a cluster. Background Technology
[0002] The widespread adoption of cloud-native technologies has made Kubernetes (a containerized orchestration engine) the mainstream platform for managing computing resources. Currently, block storage services are typically provided through cloud-native storage solutions such as AWS EBS (Elastic Block Store) and Azure Managed Disks. However, these solutions still face the following challenges in utilizing high-performance SSDs on GPU (Graphics Processing Unit) servers: (1) When the processing task has phased characteristics (e.g., the training task of the network model), a large amount of storage space is required to store task data (e.g., model training data) during the period. After the task is completed, the resources are idle for a long time, which makes the static allocation mechanism unable to realize the dynamic reuse of storage resources, resulting in generally low storage utilization. (2) Usually, the entire disk or a fixed partition is mounted to the container, which cannot be accurately allocated according to the actual needs of the task. This may result in small tasks occupying too much storage, while large tasks face the problem of insufficient space. Summary of the Invention
[0003] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0004] Some embodiments of this disclosure propose a local high-performance storage processing method based on logical volume management in a cluster to solve the technical problems mentioned in the background section above.
[0005] In a first aspect, some embodiments of this disclosure provide a local high-performance storage processing method based on logical volume management in a cluster. The method includes: aggregating the disk space corresponding to each specified cluster node in a node cluster to obtain a resource storage pool, wherein the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is a local logical volume group of the specified cluster node; deploying a corresponding container interface service plugin for each cluster node in the node cluster, wherein the container interface service plugin is used to manage the lifecycle of the local logical volume; in response to receiving a resource object creation task, and the resource object creation task includes persistent storage attributes, performing resource validity verification on the resource object creation task, wherein the resource object creation task is a task used to create a resource object, and the persistent storage attributes indicate that the resource object uses local persistent storage; in response to the resource validity verification of the resource object creation task passing, controlling the cluster scheduler to select a cluster node adapted to the resource object creation task from the node cluster as a target cluster node; controlling the container interface service plugin corresponding to the target cluster node to dynamically create a resource object and a corresponding logical volume in the resource storage pool of the target cluster node according to the resource object creation task, and binding the logical volume to the resource object.
[0006] Secondly, some embodiments of this disclosure provide a local high-performance storage processing device based on logical volume management in a cluster. The device includes: an aggregation unit configured to aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool, wherein the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is a local logical volume group of the specified cluster node; a deployment unit configured to deploy a corresponding container interface service plugin for each cluster node in the node cluster, wherein the container interface service plugin is used to manage the lifecycle of the local logical volume; and a verification unit configured to respond to receiving a resource object creation task and the resource object being created. The tasks include persistent storage attributes, resource validity verification for resource object creation tasks, where the resource object creation task is used to create resource objects, and persistent storage attributes indicate that the resource objects use local persistent storage; a selection unit, configured to control the cluster scheduler to select a cluster node adapted to the resource object creation task as the target cluster node in response to the successful resource validity verification of the resource object creation task; and a construction unit, configured to control the container interface service plugin corresponding to the target cluster node to dynamically create resource objects and corresponding logical volumes in the resource storage pool of the target cluster node according to the resource object creation task, and bind the logical volumes to the resource objects.
[0007] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0008] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0009] The above-described embodiments of this disclosure have the following beneficial effects: It improves the overall utilization of storage hardware: physical storage resources are fully shared after pooling, thereby significantly improving the return on infrastructure investment; Achieve intelligent collaborative scheduling of storage and GPU computing power: By extending the scheduler, storage capacity and the number of GPUs are made equally important scheduling factors, so that the cluster scheduler can comprehensively evaluate the GPU and storage resource status of cluster nodes, prioritize nodes with balanced resources, and effectively reduce the "resource fragmentation" problem caused by the mismatch between storage and computing power resources. Enables fine-grained and dynamic allocation of storage resources: Through LVM (Logical Volume Manager) volume groups, the storage space of the node's local NVMe (Non-Volatile Memory Express, a high-performance storage protocol for solid-state drives) disks is pooled in a unified manner (resource storage pool), and logical volumes can be dynamically created and deleted based on Pod (the smallest basic unit of deployment and management in a Kubernetes cluster) requests (such as resource object creation tasks); Simplify storage lifecycle management and enhance operational flexibility: Through container interface service plugins, the lifecycle of logical volumes is strongly bound to Pods, supporting automatic allocation upon Pod creation and automatic reclamation upon Pod termination. This automated management approach significantly reduces operational complexity and ensures efficient recycling of storage space. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0011] Figure 1 These are flowcharts of some embodiments of the local high-performance storage processing method based on logical volume management in a cluster according to the present disclosure; Figure 2 This is a schematic diagram of the structure of some embodiments of a local high-performance storage processing device based on logical volume management in a cluster, according to the present disclosure; Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0012] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0013] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0014] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0015] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0016] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0017] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] Figure 1 A flow 100 of a local high-performance storage processing method based on logical volume management in a cluster, according to this disclosure, is shown. This local high-performance storage processing method based on logical volume management in a cluster includes the following steps: Step 101: Aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool.
[0019] In some embodiments, the execution entity (e.g., a computing device) of the local high-performance storage processing method based on logical volume management in a node cluster can aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool. Here, the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is a group of local logical volumes of the specified cluster node. A local logical volume is the local disk space within the graphics processing server. The specified cluster node is the GPU server (node) equipped with NVMe disks in the node cluster. The node cluster is a Kubernetes node cluster. The cluster nodes in the node cluster can be either graphics processing servers or central processing units.
[0020] In practice, on each GPU server (node) equipped with NVMe disks in a node cluster, LVM logical volume management technology is used to aggregate one or more physical NVMe disk devices to create a unified LVM volume group. This volume group can be identified as localvg. This LVM volume group serves as a high-performance storage resource pool (resource storage pool) local to the GPU server, providing underlying capacity and performance support for dynamically creating logical volumes.
[0021] It should be noted that the aforementioned computing devices can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or terminal device. When the computing device is software, it can be installed within the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here. It should be understood that the number of computing devices can be arbitrary, depending on the implementation requirements.
[0022] In practice, the commonly used methods in the industry still have the following problems: 1. Insufficient security isolation due to intrusion into the host directory and lack of isolation mechanisms: When users access the same host directory, there is a lack of permission isolation, which poses a risk of data leakage and tampering.
[0023] 2. The shared disk for multiple tasks lacks an isolation mechanism, which means that the high-intensity I / O operations of a single task may affect the performance of other tasks on the same node.
[0024] 3. Lack of quota management: Kubernetes native resource quotas (ResourceQuota) mainly target computing resources such as CPU and memory, and lack fine-grained control over local storage capacity.
[0025] 4. Difficulty in billing and accounting: In a multi-user platform, it is difficult to accurately measure the actual usage of local high-performance storage by each user, which leads to difficulties in cost allocation and billing and accounting.
[0026] 5. Risk of overusing resources: Users may occupy local storage without limit, affecting the overall resource balance of the cluster and the usage rights of other users.
[0027] 6. Storage resources cannot be dynamically adjusted according to the needs of GPU resources and training tasks.
[0028] Step 102: Deploy the corresponding container interface service plugin for each cluster node in the node cluster.
[0029] In some embodiments, the aforementioned execution entity can deploy a corresponding container interface service plugin for each cluster node in the node cluster. The container interface service plugin is used to manage the lifecycle of local logical volumes. The container interface service plugin can be a pre-developed CSI (Container Storage Interface) plugin (named csi-localvg-lvm).
[0030] In practice, the Container Interface Service (CISA) plugin is the core control component, responsible for managing the entire lifecycle of the localvg volume group and its logical volumes on a node. The CISA plugin's functions include: receiving storage provisioning requests from Kubernetes, creating or deleting logical volumes of the appropriate size in a specified node's volume group, and mounting logical volumes as block devices or file systems to a specified path on the host machine. Specifically, the CISA plugin can dynamically create, delete, mount, and unmount logical volumes, and synchronize these operations with the lifecycle of persistent volume claims (PVCs) and Pods.
[0031] Step 103: In response to receiving a resource object creation task that includes persistent storage attributes, perform resource validity verification on the resource object creation task.
[0032] In some embodiments, the execution entity may, in response to receiving a resource object creation task that includes persistent storage attributes, perform resource validity verification on the resource object creation task. The persistent storage attributes indicate that the resource object uses local persistent storage. Here, the resource object to be built may be a pod container. The resource object creation task is a task used to create the resource object. The persistent storage attributes may represent the persistent volume declaration set when creating the pod container; the persistent volume declaration is used to declare whether the storage resource required by the resource object is a local high-performance storage resource.
[0033] Optionally, if the resource object creation task does not include persistent storage attributes, it indicates that the resource object does not need to be locally persistently stored, and the resource object can be constructed using the standard scheduling process of the Kubernetes node cluster.
[0034] In some optional implementations of certain embodiments, the aforementioned execution entity performs resource validity verification on the resource object creation task, including: Step S1: Determine the resource configuration information corresponding to the resource object creation task. This resource configuration information includes at least one of the following: requested resource capacity, requested storage capacity, and temporary storage amount. The corresponding resource configuration information can be extracted from the resource object creation task using the `pods.CalculatePodResources(pod)` function (a function that calculates the resource usage of a pod container). The resource configuration information represents the resource data required by the pod container. The requested resource capacity can be the capacity of the required computing resources. The requested storage capacity can be the capacity of the required (persistent) storage resources. The temporary storage amount represents the capacity of non-persistent storage resources.
[0035] Step S2: Verify the resource configuration information through the following steps to obtain the verified resource configuration information: Step S1: In response to determining that the requested resource capacity is zero, the requested resource capacity is set to the preset minimum resource capacity.
[0036] If the requested resource capacity is zero (i.e., the curUsage.CPU function value is 0), it indicates that the resource object has not been configured with CPU (Central Processing Unit) resource limits. Therefore, the resource object's resource configuration needs to be initialized first to prevent null pointer exceptions from causing program crashes. Finally, the container's CPU limit is forcibly set to the node cluster's preset minimum CPU specification (i.e., the preset minimum resource capacity) to compensate for any unconfigured resource limits. For example, the minimum resource capacity for the CPU specification could be 1 core.
[0037] Step S22: In response to determining that the requested storage capacity is zero, the requested storage capacity is set to the preset minimum storage capacity.
[0038] If the requested storage capacity is zero (i.e., curUsage.Memory value is 0), it indicates that the resource object is configured with memory resource limits. Therefore, it is necessary to first initialize the requested storage capacity and then force the requested storage capacity to be set to the minimum memory specification of the node cluster (the preset minimum storage capacity). For example, the minimum memory specification of the node cluster can be 4 Gi.
[0039] Step S3: Match the verified resource configuration information with the preset standard specification information database in the node cluster to obtain the matching result.
[0040] Here, the `MatchSpecRoundUp(curUsage, false)` resource specification matching function can be called to match the verified resource configuration information (curUsage) with the node cluster's preset standard specification information library to obtain the matching structure. During the matching process, the `RoundUp` function performs "rounding up" matching. For example, requesting a 1.2-core CPU will match a 2-core CPU specification. The standard specification information library can be a specification library used for resource configuration in the Kubernetes cluster, containing parameters such as resource limits (CPU / memory), ports, mounted volumes, and environment variables corresponding to different resource object construction tasks.
[0041] Step S4: In response to a failed match, terminate the resource object creation task and construct a resource object configuration error log based on the validated resource configuration information and the resource object creation task. Specifically, if a match fails (e.g., err is not empty or the matching result result is nil), construct an error log containing the Pod namespace, name, and current resource, print it, and return it to the configuration error log.
[0042] Step S5: In response to the successful matching and the temporary storage amount meeting the preset temporary storage conditions, the resource validity verification of the resource object creation task is determined to be successful. The preset temporary storage conditions may include the temporary storage amount not exceeding the temporary storage limit.
[0043] Specifically, the temporary storage amount (in bytes) declared in the resource object creation task can be extracted. If the temporary storage amount is less than the temporary storage limit, it is determined that the temporary storage amount meets the preset temporary storage conditions. Otherwise, a log indicating that the temporary storage limit has been exceeded is printed.
[0044] Step 104: In response to the successful verification of the resource validity of the resource object creation task, control the cluster scheduler to select a cluster node from the node cluster that is compatible with the resource object creation task as the target cluster node.
[0045] In some embodiments, the execution entity may, in response to the successful verification of the resource validity of the resource object creation task, control the cluster scheduler to select a cluster node from the node cluster that is compatible with the resource object creation task as the target cluster node.
[0046] The cluster scheduler can be the Volcano scheduler, used to provide more granular resource scheduling strategies for batch processing, high-performance computing, and GPU task design. The Volcano scheduler can select cluster nodes from the node cluster that are compatible with the resource object creation task. Here, the target cluster node is the cluster node that meets the construction conditions of the resource object.
[0047] Optionally, before the resource validity verification in response to the resource object creation task passes, and before the cluster scheduler selects a target cluster node from the node cluster that is compatible with the resource object creation task, the aforementioned execution entity may also: Based on the admission control interface, resource object creation task, and persistent storage attributes, a set of resource annotation key-value pairs is constructed. Each resource policy key-value pair in the resource policy key-value pair set corresponds to the billing mode identifier, performance requirement information, and data cleanup policy of the logical volume to be built. The logical volume to be built is the logical volume corresponding to the resource object. The admission control interface is Kubernetes' admission control mechanism. Through the admission control mechanism, the corresponding set of resource annotation key-value pairs can be constructed based on the resource object creation task and persistent storage attributes. The performance requirement information consists of the performance parameters of the logical volume to be built, such as the read and write speeds. The data cleanup policy can be a method used to clean up the resources occupied by the resource object.
[0048] Resource annotation key-value pairs are data pairs used to store non-identifiable, non-selective metadata and auxiliary information that does not require object selection or grouping. For example, resource annotation key-value pairs can also include resource object version information or operation and maintenance script information. Operation and maintenance script information can be parameter information of scripts that maintain the normal operation of logical volumes and resource objects.
[0049] Here, the admission control mechanism is Kubernetes' native admission control mechanism, such as the Webhook (MutatingAdmission Webhook) mechanism. The admission control mechanism allows cluster administrators to intercept requests at critical lifecycle nodes (such as verification and change phases) when creating, updating, or deleting resource objects (such as Pod containers), and send them to external servers for custom processing (such as verification, modification, or rejection), thereby achieving customized control over policy enforcement and resource operations.
[0050] In practice, the cluster scheduler not only considers CPU, memory, and GPU resources, but also, by combining the admission control mechanism of this application, simultaneously considers the available storage capacity in the volume groups of the target cluster nodes. This makes storage capacity and the number of GPUs equally important scheduling factors, allowing the cluster scheduler to comprehensively evaluate the GPU and storage resource status of nodes, prioritize nodes with balanced resources, and effectively reduce the "resource fragmentation" problem caused by the mismatch between storage and computing resources.
[0051] Step 105: Control the container interface service plugin corresponding to the target cluster node, create a task based on the resource object in the resource storage pool of the target cluster node, dynamically create the resource object and the corresponding logical volume, and bind the logical volume to the resource object.
[0052] In some embodiments, the aforementioned execution entity can control the container interface service plugin corresponding to the target cluster node, and in the resource storage pool of the target cluster node, create a task based on the resource object, dynamically create the resource object and the corresponding logical volume, and bind the logical volume to the resource object.
[0053] In some optional implementations of certain embodiments, the aforementioned execution entity controls the container interface service plugin corresponding to the target cluster node, dynamically creates resource objects and corresponding logical volumes in the resource storage pool of the target cluster node based on the resource object creation task, and binds the logical volumes to the resource objects, including: Step S1: Control the container interface service plugin corresponding to the target cluster node to create a resource object based on the resource object creation task. The container interface service plugin can construct the resource object corresponding to the resource object creation task using a pre-defined object creation component (such as the kubelet build component of the target cluster node).
[0054] Step S2 involves controlling the container interface service plugin corresponding to the target cluster node to dynamically create logical volumes in the resource storage pool of the target cluster node, based on the resource annotation key-value pair set, and to create corresponding logical volume information. First, the container interface service plugin dynamically creates logical volumes in the resource storage pool of the target cluster node according to the parameter declarations in each resource annotation key-value pair in the resource annotation key-value pair set. Then, an admission control mechanism can be used to add logical volume information to the created logical volumes. Logical volume information is the annotation information of the PersistentVolume (PV) object declared for persistent storage. Logical volume information carries metadata required for subsequent processing, such as identifying the billing mode, performance requirements, or data cleanup strategy of the storage volume. The billing mode can be the billing method for using the logical volume. Performance requirements characterize the performance of the logical volume. The data cleanup strategy can be the method for cleaning up the data stored in the logical volume.
[0055] Step S3 involves binding the logical volume information corresponding to the logical volume to the resource object. The bound logical volume is mounted to the path specified by the resource object, and the bound resource object can access the resource storage pool of the target cluster node after startup. This binding operation is achieved by establishing a connection between the logical volume information and the resource object. Binding ensures that when a pod is deleted, the associated logical volume and data are synchronously cleaned up and reclaimed, achieving the ability to discard storage resources as needed.
[0056] In practice, logical volume information can be bound to resource objects through container interface service plugins. This completes the construction of the resource objects.
[0057] Optionally, the aforementioned implementing entity may also perform the following steps: Step S1: In response to the detection that a resource object has been created, the billing mode identifier is extracted from the resource annotation key-value pair set corresponding to the resource object. The billing mode identifier represents shared resource pool billing, dedicated node billing, discounted billing, or default billing. Shared resource pool billing can be based on storage capacity and usage duration. For example, the billing method is: unit price × capacity × duration. Dedicated node billing indicates that the logical volume is located on a dedicated node and does not require separate billing. Discounted billing is based on the discounted unit price. For example, the billing method is: unit price × discount × capacity × duration. Default billing uses the shared resource pool billing rules. Here, the creation event of the resource object can be monitored through the Kubernetes List-Watch mechanism in the cluster system, and then the billing mode identifier can be extracted from the resource annotation key-value pair corresponding to the resource object using a key-value index.
[0058] Step S2, in response to the billing mode identifier representing non-dedicated node billing, perform the following billing steps on the resource object, wherein non-dedicated node billing may include shared resource pool billing, discounted billing, or default billing: Step S21: Record the storage capacity information of the resource object before it runs. This storage capacity information may be the initial storage capacity corresponding to the resource object.
[0059] Step S22 involves billing based on the billing mode identifier, storage capacity information, and usage duration of the resource object, and periodically generating billing logs. Specifically, billing can be performed based on the usage duration of the resource object, according to the billing method specified in the billing mode identifier and the unit price corresponding to the storage capacity information, thereby periodically generating billing logs. These billing logs can be stored and sent to the user terminal (e.g., a mobile phone).
[0060] Step S3: In response to the billing mode identifier representing the dedicated node billing, a resource object operation log is generated. For dedicated nodes, the use of storage resources is included in the node rental fee and does not require separate billing. Therefore, only the resource object operation log is generated. The resource object operation log is a log record of the resource object's use of storage resources.
[0061] Step S4: In response to the detection of a resource object deletion command, control the resource object to stop running. The resource object deletion command indicates that the resource object needs to be deleted, thereby stopping the resource object's operation.
[0062] Step S5: In response to the resource object stopping operation, stop billing for the resource object and generate a termination billing statement. Note that billing can be stopped synchronously after the resource object stops operating, and the billing value is used as the termination billing statement for the resource object.
[0063] In practice, due to different billing rules across regions, cluster nodes can extract the region label "regionLabel" of resource objects as the region dimension for billing records before billing. Then, the IsInNodePoolElsPvc (node pool type determination function) can be used to determine whether the resource object's PVC belongs to the node pool type (dedicated node pool PVC, whose billing rules differ from regular PVCs). If so, the lifecycle records of the resource object in the logs (e.g., name, UID (UserIdentification), region, etc.) are queried, and the PVC status of the resource object is updated to obtain the updated PVC status. Finally, billing is performed based on the updated PVC status.
[0064] Optionally, the aforementioned implementing entity may also perform the following steps: Step S1: In response to the detection of a deletion command for a resource object, control the resource object to stop running. This can be achieved through a kubelet component. The resource object is the one specified by the deletion command.
[0065] Step S2 involves performing high-performance storage attribute detection on the resource object to obtain the local high-performance storage attribute. This local high-performance storage attribute indicates whether the resource object uses the local resource storage pool. Secondly, the persistent storage attribute of the resource object can be extracted as the local high-performance storage attribute. If the resource object does not use local high-performance storage resources, the local high-performance storage attribute (e.g., "0") indicates that the local resource storage pool is not used. The local resource storage pool is the resource storage pool of the target cluster node corresponding to the resource object.
[0066] Step S3: In response to the resource object using the local resource storage pool, the logical volume corresponding to the resource object is unmounted and detached from the mount point through the container interface service plugin deployed on the cluster node where the resource object resides, and the binding relationships of the resource object are cleaned up. The use of the local resource storage pool by the resource object indicates that the resource object uses local high-performance storage resources. Therefore, in order to release the occupied high-performance storage resources in a timely manner, when the resource object is deleted, the logical volume corresponding to the resource object is unmounted and detached from the mount point, and the binding relationships of the resource object are cleaned up.
[0067] Specifically, cleaning up the binding relationships of resource objects includes cleaning up the binding relationships between the PersistentVolume (PV) and the PersistentVolumeClaim (PVC) of the resource object.
[0068] Step S4: Delete the logical volume and logical volume information corresponding to the above resource object, and release the corresponding storage space back to the local resource storage pool. The storage space can be released according to the data cleanup strategy corresponding to the resource object. Finally, clear the PV object annotation information of the resource object.
[0069] As an example, the data structure design of the resource object pod struct is as follows: 1. The pod structure includes the resource object name, the namespace it belongs to (K8s resource isolation boundary), and the pod tag (used for subsequent filtering and association).
[0070] 2. Scheduling Strategy: Adapted to scheduling rules for high-performance computing tasks. First, instead of using the default kube-scheduler in Kubernetes, the Volcano scheduler is specified (designed specifically for batch processing, high-performance computing, and GPU tasks, supporting more granular resource scheduling strategies). Second, the container termination "prestop" time is 1 second (default 30 seconds), ensuring that after a Pod receives a termination signal, it forcibly stops the container after a maximum wait of 1 second, accelerating the release of GPU node resources.
[0071] 3. Force binding to a specific GPU node: Use `nodeAffinity` to restrict Pods to only run on nodes that meet the hardware requirements, ensuring GPU resource matching. For example, firstly, only allow Pods to be scheduled to nodes with the label `cloud.ebtech.com / gpu: A800_NVLINK_80GB`, ensuring that Pods can use the specified A800 GPU. Then, this condition must be met during the scheduling phase (otherwise, the Pod cannot be scheduled), and even if the node label changes during runtime (e.g., due to GPU failure), the Pod will not be evicted (ensuring task uninterrupted).
[0072] 4. Container Configuration: This defines the runtime environment for PyTorch GPU tasks. Containers are the core of a Pod (a Pod can contain multiple containers, but here we only have one), defining all the runtime rules for the business container. First, configure the container name, the base image for the container, and the image pull policy "imagePullPolicy: IfNotPresent". If the image is available locally on the node, it is reused; otherwise, it is pulled from a private repository (reducing network overhead from repeated pulls). Second, optimize container termination response through startup commands: First, capture the SIGTERM termination signal: when the container receives the termination command, it immediately prints a message and exits (exit 0), avoiding the default "slow response". Then, use an infinite loop to keep it alive: replace `sleep infinity` with `while true; sleep 1`, allowing the container to run continuously while responding to termination signals faster (the `sleep 1` loop is more sensitive than infinite sleep). Third, constrain hardware resource usage (hard constraints) to prevent containers from excessively consuming node resources, ensuring that GPU tasks have dedicated hardware resources while preventing impact on the operation of other Pods on the node. Fourth, add the IPC_LOCK system capability to the container—allowing the container to lock memory (preventing data from being swapped out to the swap partition), improving memory access performance for GPU computing tasks. Fifth, mount the subsequently defined tmp-test1 volume to the / mnt / tmp-test1 path inside the container, allowing the container to access storage through this path after startup.
[0073] 5. Dynamically create a PVC based on volumeClaimTemplate (PVC template), associate it with the ephemeral-els-premium storage class (corresponding to the "temporary high-performance storage" handled in the previous code), and finally create a 500Gi local logical volume on the node and mount it to the container.
[0074] Optionally, the following is an explanation of the Kubernetes PersistentVolumeClaim (PVC) YAML configuration file. This PVC is a temporary high-performance storage claim dynamically created for a specific Pod. Its core characteristics are that it contains a large number of custom business annotations (recording Pod ownership, node type, billing priority, etc.), and its lifecycle is strongly bound to the Pod it belongs to: 1. Basic unique identifier: including the PVC name and the namespace to which the PVC belongs.
[0075] 2. Persistent volume declarations include two types: native K8s annotations (which control storage binding logic) and custom business annotations (such as business information like bearer nodes, billing, and Pod ownership).
[0076] 3. A PVC is a dependent resource, and its lifecycle is controlled by the Pod it belongs to. When a Pod is deleted, Kubernetes automatically deletes the PVC (to prevent storage resource leaks). At the same time, `blockOwnerDeletion: true` ensures that the PVC is not prematurely deleted during the Pod deletion process, guaranteeing that the Pod can access storage data before termination.
[0077] 4. PVC storage requirement definition: This defines the core storage requirements of the PVC and serves as the basis for the CSI plugin to create storage volumes and bind PVs to Kubernetes.
[0078] In practice, addressing the three core challenges of low resource utilization, poor multi-user isolation, and difficulty in quota management, as well as the limitations of existing commercial solutions being closed-source, customized, and lacking solutions to core problems, this disclosure proposes a method for achieving local high-performance storage processing based on LVM in a Kubernetes cluster. The core innovation of this method lies in: 1. Integration of open source and standardization: The solution adopts open source LVM technology and standard Kubernetes CSI interface to achieve transparency and controllability.
[0079] 2. Dynamic pooling and fine-grained management: By aggregating multiple NVMe disks within a node into an LVM volume group (VG), unified pooling of storage resources is achieved, and on-demand creation, destruction, scaling up and down of logical volumes (LVs) is supported, completely solving the problems of low utilization and coarse management of the hostPath method.
[0080] 3. Enhanced design for multi-user environments: Based on storage pooling, a logical volume-based user isolation, storage I / O limiting and quota management mechanism is introduced, and it is linked with the K8s resource quota system to effectively solve the problems of security isolation and fairness in multi-user environments.
[0081] 4. Accurate metering and cost accounting: Through the CSI plug-in and monitoring system, the storage capacity of each logical volume is collected in real time, providing a reliable basis for accurate billing and cost allocation.
[0082] Therefore, this disclosure provides a high-efficiency, flexible, and easy-to-manage local storage solution for high-performance computing scenarios such as AI training by lightweightly integrating LVM and CSI standards without changing the core architecture of Kubernetes. The above-described embodiments of this disclosure have the following beneficial effects: 1. Improved overall utilization of storage hardware: Physical storage resources are fully shared after pooling, thereby significantly improving the return on investment in infrastructure; 2. Achieve intelligent collaborative scheduling of storage and GPU computing power: By extending the scheduler, storage capacity and the number of GPUs are made equally important scheduling factors, so that the cluster scheduler can comprehensively evaluate the GPU and storage resource status of cluster nodes, prioritize nodes with balanced resources, and effectively reduce the "resource fragmentation" problem caused by the mismatch between storage and computing power resources. 3. Enable fine-grained and dynamic allocation of storage resources: Through LVM (Logical Volume Manager) volume groups, the storage space of the node's local NVMe (Non-Volatile Memory Express, a high-performance storage protocol solid-state drive) disks is pooled in a unified manner (resource storage pool), and logical volumes can be dynamically created and deleted based on Pod (the smallest basic unit of deployment and management in a Kubernetes cluster) requests (such as resource object creation tasks); 4. Simplify storage lifecycle management and improve operational flexibility: Through the container interface service plugin, the lifecycle of logical volumes is strongly bound to Pods, supporting automatic allocation when Pods are created and automatic recycling and cleanup when Pods terminate. This automated management approach greatly reduces operational complexity and ensures efficient recycling of storage space.
[0083] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a local high-performance storage processing device based on logical volume management in a cluster. These device embodiments are similar to... Figure 1 Corresponding to the method embodiments shown, this local high-performance storage processing device based on logical volume management in a cluster can be specifically applied to various electronic devices.
[0084] like Figure 2As shown, some embodiments of a local high-performance storage processing device 200 based on logical volume management in a cluster include: an aggregation unit 201, a deployment unit 202, a verification unit 203, a selection unit 204, and a construction unit 205. The aggregation unit 201 is configured to aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool, wherein the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is a local logical volume group of the specified cluster node; the deployment unit 202 is configured to deploy a corresponding container interface service plugin for each cluster node in the node cluster, wherein the container interface service plugin is used to manage the lifecycle of the local logical volume; the verification unit 203 is configured to, in response to receiving a resource object creation task, and the resource object creation task includes persistent storage attributes, verify the resource object creation task... The system performs resource validity verification. The resource object creation task is used to create resource objects, and the persistent storage attribute indicates that the resource object uses local persistent storage. Selection unit 204 is configured to, in response to the successful resource validity verification of the resource object creation task, control the cluster scheduler to select a cluster node from the node cluster that matches the resource object creation task as the target cluster node. Construction unit 205 is configured to control the container interface service plugin corresponding to the target cluster node to dynamically create the resource object and its corresponding logical volume in the resource storage pool of the target cluster node, based on the resource object creation task, and bind the logical volume to the resource object.
[0085] It is understandable that the units described in the local high-performance storage processing device 200, which is based on logical volume management in the cluster, are related to the reference... Figure 1 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the local high-performance storage processing device 200 and its constituent units based on logical volume management in a cluster, and will not be repeated here.
[0086] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device 300 (e.g., a computing device) suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0087] like Figure 3As shown, the electronic device 300 may include a processing unit 301 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in the read-only memory 302 or a program loaded from the storage device 308 into the random access memory 303. The random access memory 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, the read-only memory 302, and the random access memory 303 are interconnected via a bus 304. An input / output interface 305 is also connected to the bus 304.
[0088] Typically, the following devices can be connected to the input / output interface 305: input devices 306 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.
[0089] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a read-only memory 302. When the computer program is executed by the processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0090] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0091] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0092] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs. When the electronic device executes these programs, it causes the electronic device to: aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool, wherein the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is a local logical volume group of the specified cluster node; deploy a corresponding container interface service plugin for each cluster node in the node cluster, wherein the container interface service plugin is used to manage the lifecycle of the local logical volume; in response to receiving a resource object creation task, and the resource object creation task includes persistent storage attributes, perform resource validity verification on the resource object creation task, wherein the resource object creation task is a task used to create a resource object, and the persistent storage attributes indicate that the resource object uses local persistent storage; in response to the resource validity verification of the resource object creation task passing, control the cluster scheduler to select a cluster node adapted to the resource object creation task from the node cluster as the target cluster node; control the container interface service plugin corresponding to the target cluster node to dynamically create the resource object and the corresponding logical volume in the resource storage pool of the target cluster node according to the resource object creation task, and bind the logical volume to the resource object.
[0093] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0095] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0096] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A local high-performance storage processing method based on logical volume management in a cluster, characterized in that, include: Aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool. Here, the specified cluster node is a graphics processing server in the node cluster equipped with disk space, and the resource storage pool is the local logical volume group of the specified cluster node. For each cluster node in the node cluster, deploy the corresponding container interface service plugin, which is used to manage the lifecycle of the local logical volume; In response to receiving a resource object creation task that includes persistent storage attributes, the system performs resource validity verification on the resource object creation task. The resource object creation task is the task used to create the resource object, and the persistent storage attributes indicate that the resource object uses local persistent storage. Based on the admission control interface, the resource object creation task, and the persistent storage attributes, a resource annotation key-value pair set is constructed. Each resource policy key-value pair in the resource policy key-value pair set corresponds to the billing mode identifier, performance requirement information, and data cleanup policy of the logical volume to be built. The logical volume to be built is the logical volume corresponding to the resource object to be built. The admission control interface is the Kubernetes admission control mechanism, and the performance requirement information is the performance parameters of the logical volume to be built. In response to the successful verification of the resource validity of the resource object creation task, the cluster scheduler is controlled to select a cluster node from the node cluster that is compatible with the resource object creation task as the target cluster node. The system controls the container interface service plugin corresponding to the target cluster node to dynamically create resource objects and corresponding logical volumes in the resource storage pool of the target cluster node based on resource object creation tasks, and binds the logical volumes to the resource objects. This includes: controlling the container interface service plugin corresponding to the target cluster node to create resource objects based on resource object creation tasks; and controlling the container interface service plugin corresponding to the target cluster node to dynamically create logical volumes in the resource storage pool of the target cluster node based on resource annotation key-value pair sets, and creating logical volume information corresponding to the logical volumes. The logical volume information is the annotation information of the PV object declared by the logical volume and uses persistent storage. The logical volume information is used to carry metadata required for subsequent processing. The logical volume information corresponding to the volume is bound to the resource object. The bound logical volume is mounted to the path specified by the resource object. After startup, the bound resource object can access the resource storage pool of the target cluster node. The resource object is then subjected to high-performance storage attribute detection to obtain the local high-performance storage attribute, which indicates whether the resource object uses the local resource storage pool. In response to the resource object using the local resource storage pool, the logical volume corresponding to the resource object is unloaded and detached from the mount point through the container interface service plugin deployed on the target cluster node, and the binding relationship of the resource object is cleaned up. The logical volume and logical volume information corresponding to the resource object are deleted, and the corresponding storage space is released back to the local resource storage pool.
2. The method according to claim 1, characterized in that, The resource validity verification for the resource object creation task includes: Determine the resource configuration information corresponding to the resource object creation task, wherein the resource configuration information includes at least one of the following: requested resource capacity, requested storage capacity, and temporary storage amount; The resource configuration information is verified using the following steps to obtain the verified resource configuration information: In response to the determination that the requested resource capacity is zero, the requested resource capacity is set to the preset minimum resource capacity; In response to the determination that the requested storage capacity is zero, the requested storage capacity is set to the preset minimum storage capacity; The verified resource configuration information is matched with the preset standard specification information database in the node cluster to obtain the matching result; In response to the matching result indicating that the match failed, the resource object creation task is terminated, and a resource object configuration error log is constructed based on the verified resource configuration information and the resource object creation task. In response to the matching result indicating that the matching is successful and the temporary storage amount meets the preset temporary storage conditions, the resource legality verification of the resource object creation task is determined to be successful.
3. The method according to claim 2, characterized in that, The method further includes: In response to the detection that the resource object has been created, the billing mode identifier is extracted from the resource annotation key-value pair corresponding to the resource object. The billing mode identifier represents the shared resource pool billing, dedicated node billing, discount billing or default billing. In response to the billing mode identifier representing non-dedicated node billing, the following billing steps are performed on the resource object: Record the storage capacity information of the resource object before it runs; Billing is based on the billing mode identifier, storage capacity information, and usage duration of resource objects, and billing logs are generated periodically. In response to the billing mode identifier representing the billing of a dedicated node, a resource object runtime log is generated; In response to the detection of a resource object deletion command, control the resource object to stop running; In response to a resource object ceasing operation, billing for the resource object is stopped, and a termination billing statement is generated.
4. A local high-performance storage processing device based on logical volume management in a cluster, characterized in that, include: The aggregation unit is configured to aggregate the disk space corresponding to each specified cluster node in the node cluster to obtain a resource storage pool. Here, the specified cluster node is a graphics processing server equipped with disk space in the node cluster, and the resource storage pool is the local logical volume group of the specified cluster node. The deployment unit is configured to deploy the corresponding container interface service plugin to each cluster node in the node cluster. The container interface service plugin is used to manage the lifecycle of the local logical volume. Based on the admission control interface, resource object creation task and persistent storage attributes, a resource annotation key-value pair set is constructed. Each resource policy key-value pair in the resource policy key-value pair set corresponds to the billing mode identifier, performance requirement information and data cleanup policy of the logical volume to be built. The logical volume to be built is the logical volume to be built corresponding to the resource object. The admission control interface is the Kubernetes admission control mechanism and the performance requirement information is the performance parameters of the logical volume to be built. The verification unit is configured to perform resource validity verification on the resource object creation task in response to receiving a resource object creation task, and the resource object creation task includes persistent storage attributes. The resource object creation task is a task used to create a resource object, and the persistent storage attributes indicate that the resource object uses local persistent storage. The selection unit is configured to control the cluster scheduler to select a cluster node from the node cluster that is compatible with the resource object creation task as the target cluster node in response to the successful resource validity verification of the resource object creation task. The building unit is configured to control the container interface service plugin corresponding to the target cluster node to dynamically create resource objects and corresponding logical volumes in the resource storage pool of the target cluster node based on resource object creation tasks, and to bind logical volumes to resource objects. This includes: controlling the container interface service plugin corresponding to the target cluster node to create resource objects based on resource object creation tasks; and controlling the container interface service plugin corresponding to the target cluster node to dynamically create logical volumes in the resource storage pool of the target cluster node based on resource annotation key-value pair sets, and creating logical volume information corresponding to the logical volumes. The logical volume information is the annotation information of the PV object declared by the logical volume and uses persistent storage. The logical volume information is used to carry the metadata required for subsequent processing. The process involves: binding the logical volume information corresponding to the logical volume to the resource object; mounting the bound logical volume to the path specified by the resource object; and allowing the bound resource object to access the resource storage pool of the target cluster node after startup. The process also includes: performing high-performance storage attribute detection on the resource object to obtain local high-performance storage attributes, which indicate whether the resource object uses the local resource storage pool; responding to the resource object using the local resource storage pool by using the container interface service plugin deployed on the target cluster node to unmount and detach the logical volume corresponding to the resource object from the mount point, and cleaning up the binding relationships of the resource object; deleting the logical volume and logical volume information corresponding to the resource object, and releasing the corresponding storage space back to the local resource storage pool.
5. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 3.
6. A computer-readable medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by a processor, implements the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and system for calling of CSI LVM Plugin and dynamic persistent volume supply and medium
CN113504954A
Method and application for dynamically supplying SAN (Storage Area Network) storage under container platform
CN114816756A
Heterogeneous cloud resource management method and device, equipment and storage medium
CN120821581A
