Storage space allocation method, and server

By pooling the resources of multiple storage nodes and dynamically allocating temporary storage space, the problem of different types of storage nodes being unable to jointly provide storage space is solved, and the business function stability and resource utilization efficiency of the hyper-converged platform are improved.

WO2025200445A1PCT designated stage Publication Date: 2025-10-02XFUSION DIGITAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/129038
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-25
Filing Date
2024-10-31
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Existing technologies cannot effectively utilize multiple types of back-end storage to provide sufficient temporary file storage space for the host, resulting in the inability to realize the business functions of the hyper-converged platform.

Method used

By pooling the external and internal storage resources of the server cluster to form a storage pool, temporary storage space is dynamically allocated, the differences in storage methods of different types of storage are ignored, and multiple storage nodes are used to jointly provide storage space.

Benefits of technology

It improves the utilization efficiency of storage resources, ensures the stability and reliability of business functions, and avoids function failures caused by insufficient single storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024129038_02102025_PF_FP_ABST
    Figure CN2024129038_02102025_PF_FP_ABST
Patent Text Reader

Abstract

A storage space allocation method, and a server. The method is applied to a server. After receiving a storage space allocation request, a server can use a storage pool to allocate and provide storage space to computing nodes for executing tasks corresponding to service functions, so as to support the computing nodes in storing temporary files in the process of executing the tasks, thereby realizing the service functions. The storage pool is determined by means of storage resources in external storages of a server cluster and storage resources in internal storages of the server cluster. By means of the storage pool, the internal storages of a plurality of server clusters and the external storages of the server clusters can be used jointly to provide storage space, so as to ignore the problem of the storage modes for different types of storages being different, and to avoid the inability to realize service functions due to insufficient remaining storage space for a single storage, thereby improving the stability of realizing the service functions.
Need to check novelty before this filing date? Find Prior Art

Description

Storage space allocation method and server

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 25, 2024, with application number 202410346841.1 and application name “A method and server for allocating storage space”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of server technology, and in particular to a storage space allocation method and a server. Background Art

[0003] With the rapid development of computing, storage, and networking technologies, hyperconvergence has emerged. Hyperconvergence is an infrastructure technology that integrates computing, storage, and networking functions. Hyperconvergence uses software-defined methods to combine computing and storage resources and make them available to applications through virtualization.

[0004] A hyperconverged cluster is a cluster of multiple servers and storage systems. Each server integrates computing, storage, and networking capabilities, and can act as a host to perform tasks and implement the business functions of the hyperconverged platform. A hyperconverged infrastructure (HCI) is a software platform based on hyperconverged clusters and a comprehensive solution built on hyperconvergence technology. Using virtualization and management software, a hyperconverged platform organizes the computing and storage resources within the hyperconverged cluster, enabling resource sharing and management.

[0005] On a hyperconverged platform, if users use platform functions that require file processing, the host needs to temporarily store the files involved for data reading, writing, and processing. For example, when implementing the remote virtual machine template import function on a hyperconverged platform, the host needs to temporarily store the uploaded virtual machine template file in a storage space that the host can directly access for subsequent data conversion.

[0006] However, current technology is limited by the different storage methods of back-end storage and cannot combine multiple back-end storage to provide the host with sufficient space to store temporary files, resulting in the inability to realize the platform business functions of the hyper-converged platform.

[0007] Summary of the Invention

[0008] In view of this, an embodiment of the present application provides a storage space allocation method and server for allocating storage space for temporary files, solving the problem of improper temporary file storage affecting the operation of computing nodes or the realization of business functions.

[0009] In a first aspect, an embodiment of the present application provides a method for allocating storage space, applied to a server, the method comprising:

[0010] receiving a configuration request, wherein the configuration request is used to request registration of an external storage of the server cluster into a storage space of the server cluster;

[0011] Responding to the configuration request, obtaining storage resources stored externally by the server cluster;

[0012] Performing storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool, wherein storage resources of the storage pool are determined based on the storage resources of the external storage of the server cluster and the storage resources of the internal storage of the server cluster;

[0013] When a storage space allocation request is received, the storage space is allocated using the storage pool.

[0014] In an embodiment of the present application, after receiving a storage space allocation request, the server can allocate storage space to the computing nodes used to perform tasks corresponding to business functions based on the storage pool, thereby supporting the computing nodes in storing temporary files during task execution and achieving business functions. The storage pool is determined by the storage resources of the server's external storage and the storage resources of the server cluster's internal storage. Through the storage pool, storage space can be jointly provided by multiple server cluster internal storage and server cluster external storage, ignoring the problem of different storage methods for different types of storage, avoiding the inability to achieve business functions due to insufficient remaining storage space of a single storage, and improving the stability of business function implementation.

[0015] In a possible implementation, the performing storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool includes:

[0016] exposing the remaining available space of the external storage of the server cluster and the remaining available space of the internal storage of the server cluster as corresponding multiple block devices;

[0017] Mapping the plurality of block devices into logical block devices;

[0018] A file system is established on the logical block device to obtain the storage pool.

[0019] In an embodiment of the present application, a storage pool is generated by pooling the remaining available space of the server cluster's external storage and the remaining available space of the server cluster's internal storage. This storage pool is then used to provide storage space for computing nodes. Furthermore, the storage pool generated by resource pooling can accommodate differences in storage methods between different types of storage, thereby utilizing multiple storage devices to simultaneously provide storage space.

[0020] In a possible implementation, the server cluster external storage includes a server cluster first external storage that directly exposes a block device; the server cluster internal storage includes a server cluster first internal storage that directly exposes a block device;

[0021] The process of exposing the remaining available space of the first external storage of the server cluster or the remaining available space of the first internal storage of the server cluster as a block device is as follows:

[0022] Scan the first block device corresponding to the remaining available space in the first external storage of the server cluster or the first internal storage of the server cluster, and establish a connection with the first block device.

[0023] In a possible implementation, the server cluster external storage includes a server cluster second external storage that does not directly expose block devices, and the server cluster internal storage includes a server cluster second internal storage that does not directly expose block devices;

[0024] The process of exposing the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster as a block device is as follows:

[0025] Acquire the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk according to the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster;

[0026] The virtual disk is associated with a block device in the server.

[0027] In an embodiment of the present application, for storage that does not directly expose block devices, the remaining available space is virtualized to create a corresponding virtual disk, and then a connection is established between the virtual disk and the block device in the server, thereby exposing the remaining space of the storage that does not directly expose the block device.

[0028] In a possible implementation, upon receiving a storage space allocation request, allocating storage space using the storage pool includes:

[0029] receiving a storage space allocation request sent by a computing node of the server cluster, wherein the storage space allocation request includes a temporary file size and a service function identifier;

[0030] Determining the storage space to be allocated according to the size of the temporary file;

[0031] According to the service function identifier and allocation policy, temporary storage space is determined from the storage pool, and the temporary storage space is allocated to the computing node in the form of a virtual disk, where the temporary storage space is greater than or equal to the storage space to be allocated.

[0032] In an embodiment of the present application, the server can dynamically allocate temporary storage space using the storage pool according to the actual needs of the computing nodes to efficiently utilize the remaining storage space of each storage and avoid waste or insufficient storage resources. In addition, the administrator can flexibly adjust the allocation plan of the temporary storage space according to different business needs and allocation strategies to better meet the storage needs of different computing nodes and optimize the utilization of storage resources. The server can quickly determine the temporary storage space according to the allocation strategy and allocate it to the computing node to ensure that the computing node can obtain the required storage resources in a timely manner. Through business function identification, the server can manage the storage space corresponding to different business functions to more effectively organize and manage the storage space and ensure data isolation and security.

[0033] In a possible implementation, the allocation strategy includes a correspondence between the service function identifier and the configuration mode;

[0034] The determining, according to the service function identifier and the allocation policy, a temporary storage space from the storage pool and allocating the temporary storage space to the computing node includes:

[0035] Determine the configuration mode corresponding to the business function identifier,

[0036] If the configuration mode corresponding to the service function identifier is thin provisioning, determining a storage space from the storage pool that is larger than a first temporary storage space of the storage pool, and allocating the first temporary storage space to the computing node after zeroing the first temporary storage space;

[0037] If the configuration mode corresponding to the service function identifier is thick provisioning, determining a second temporary storage space from the storage pool, the second temporary storage space having a storage space larger than the storage space to be allocated, and allocating the second temporary storage space to the computing node after zeroing the second temporary storage space;

[0038] If the configuration mode corresponding to the service function identifier is delayed zeroing, a third temporary storage space storing data is determined from the storage pool, and the third temporary storage space is allocated to the computing node.

[0039] In the embodiment of the present application, based on the correspondence between the business function identifier and the configuration mode, the utilization of storage space can be effectively optimized, the performance and resource utilization efficiency of the server cluster can be improved, thereby providing a beneficial impact on the stability and reliability of the business function.

[0040] In a possible implementation, the allocation strategy includes a correspondence between the service function identifier and the number of copies;

[0041] The determining of temporary storage space from the storage pool according to the service function identifier and the allocation policy includes:

[0042] The size of the temporary storage space is determined according to the storage space to be allocated and the number of copies corresponding to the business function identifier, and the temporary storage space is determined from the storage pool according to the size of the temporary storage space. The temporary storage space is used to store a target number of temporary files, and the target number of copies is the number of copies corresponding to the business function identifier.

[0043] In the embodiments of the present application, the storage space size is determined based on the number of copies and the size of the temporary file, and the corresponding temporary storage space is then provided using a storage pool. When a computing node executes a task, it can use the temporary storage space to store multiple temporary files simultaneously, improving the stability of business function implementation and avoiding the inability to implement the corresponding business function due to abnormal or damaged temporary file storage.

[0044] In a possible implementation, the method further includes:

[0045] A storage space release request sent by the computing node is received, data in the virtual disk indicated by the storage space release request is released, and the virtual disk is deleted.

[0046] In an embodiment of the present application, after receiving a storage space release request, the server can dynamically release data in the virtual disk according to actual needs, thereby avoiding waste of storage space, reducing unnecessary storage space occupancy, and improving storage space utilization efficiency.

[0047] In a possible implementation, the method further includes:

[0048] Acquire storage status change information of the server cluster external storage and the server cluster internal storage, and update the storage space of the storage pool according to the storage status change information.

[0049] In this embodiment of the present application, by acquiring storage status change information for both the server cluster's external storage and the server cluster's internal storage, the server can perceive in real time changes in storage resources within the server cluster, such as increases or decreases in remaining storage space. The server can then promptly respond and update the storage pool, ensuring the real-time and accurate storage space availability of the storage pool.

[0050] In a second aspect, an embodiment of the present application provides a storage space allocation device, comprising:

[0051] A receiving module, configured to receive a configuration request, wherein the configuration request is used to request registration of an external storage of the server cluster into a storage space of the server cluster;

[0052] An acquisition module, configured to respond to the configuration request and acquire storage resources stored externally by the server cluster;

[0053] a processing module, configured to perform storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool, wherein storage resources of the storage pool are determined based on the storage resources of the external storage of the server cluster and the storage resources of the internal storage of the server cluster;

[0054] The allocation module is configured to allocate storage space using the storage pool when a storage space allocation request is received.

[0055] In one possible implementation, the processing module is specifically used to: expose the remaining available space of the server cluster's external storage and the remaining available space of the server cluster's internal storage as corresponding multiple block devices; map the multiple block devices into logical block devices; and establish a file system on the logical block devices to obtain the storage pool.

[0056] In one possible implementation, the server cluster external storage includes a server cluster first external storage that directly exposes a block device; the server cluster internal storage includes a server cluster first internal storage that directly exposes a block device; the processing module is specifically used to scan the first block device corresponding to the remaining available space in the server cluster first external storage or the server cluster first internal storage, and establish a connection with the first block device.

[0057] In one possible implementation, the server cluster external storage includes a second external storage of the server cluster that does not directly expose block devices, and the server cluster internal storage includes a second internal storage of the server cluster that does not directly expose block devices; the processing module is specifically used to obtain the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk based on the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster; and associate the virtual disk with the block device in the server.

[0058] In one possible implementation, the allocation module is specifically used to receive a storage space allocation request sent by a computing node of the server cluster, the storage space allocation request including a temporary file size and a business function identifier; determine the storage space to be allocated based on the temporary file size; determine the temporary storage space from the storage pool based on the business function identifier and allocation policy, and allocate the temporary storage space to the computing node in the form of a virtual disk, wherein the temporary storage space is greater than or equal to the storage space to be allocated.

[0059] In one possible implementation, the allocation strategy includes a correspondence between the business function identifier and the configuration mode; the allocation module is specifically used to determine the configuration mode corresponding to the business function identifier; if the configuration mode corresponding to the business function identifier is thin provisioning, determine a first temporary storage space with a storage space larger than the storage pool from the storage pool, and allocate the first temporary storage space to the computing node after setting it to zero; if the configuration mode corresponding to the business function identifier is thick provisioning, determine a second temporary storage space with a storage space larger than the storage space to be allocated from the storage pool, and allocate the second temporary storage space to the computing node after setting it to zero; if the configuration mode corresponding to the business function identifier is delayed zeroing, determine a third temporary storage space storing data from the storage pool, and allocate the third temporary storage space to the computing node.

[0060] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the number of copies; the allocation module is specifically used to determine the size of the temporary storage space based on the storage space to be allocated and the number of copies corresponding to the business function identifier, and determine the temporary storage space from the storage pool based on the size of the temporary storage space. The temporary storage space is used to store a target number of temporary files, and the target number of copies is the number of copies corresponding to the business function identifier.

[0061] In a possible implementation, the device further includes an update module, which is used to obtain storage status change information of the server cluster external storage and the server cluster internal storage, and update the storage space of the storage pool according to the storage status change information.

[0062] In a possible implementation, the device further includes a release module, which is configured to receive a storage space release request sent by the computing node, release data in the virtual disk indicated by the storage space release request, and delete the virtual disk.

[0063] In a third aspect, an embodiment of the present application provides a server, comprising a processor and a memory communicatively connected to the processor;

[0064] The memory is used to store computer-executable instructions;

[0065] The processor is used to execute the computer-executable instructions stored in the memory to implement the storage space allocation method described in any embodiment of the first aspect above.

[0066] In a fourth aspect, an embodiment of the present application provides a server cluster, which includes a management node, a computing node and a storage node, and the storage node includes internal storage of the server cluster and external storage of the server cluster; the management node is used to implement the storage space allocation method described in any embodiment of the first aspect above.

[0067] In a fifth aspect, an embodiment of the present application provides a computer storage medium, in which code is stored. When the code is executed, the device executing the code implements the storage space allocation method described in any one of the first aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the following briefly introduces the drawings required for use in the embodiment or the prior art description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0069] FIG1 is a schematic diagram of a process for implementing a service function provided by an embodiment of the present application;

[0070] FIG2 is a schematic diagram of another process for implementing a business function according to an embodiment of the present application;

[0071] FIG3 is a system architecture diagram of a server cluster provided in an embodiment of the present application;

[0072] FIG4 is a system architecture diagram of another server cluster provided in an embodiment of the present application;

[0073] FIG5 is a system architecture diagram of another server cluster provided in an embodiment of the present application;

[0074] FIG6 is a system architecture diagram of another server cluster provided in an embodiment of the present application;

[0075] FIG7 is a front-end management page of a hyper-converged platform provided in an embodiment of the present application;

[0076] FIG8 is a schematic diagram of a storage pool provided in an embodiment of the present application;

[0077] FIG9 is a schematic diagram of a flow chart of a storage space allocation method provided in an embodiment of the present application;

[0078] FIG10 is a flow chart of a method for implementing a business function provided in an embodiment of the present application;

[0079] FIG11 is a flow chart of another method for implementing a service function according to an embodiment of the present application;

[0080] FIG12 is a signaling diagram of a method for implementing a service function provided in an embodiment of the present application;

[0081] FIG13 is a schematic structural diagram of a device for implementing a service function provided in an embodiment of the present application;

[0082] FIG14 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] It should be noted that the embodiments described in this application are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0084] A server cluster is a cluster of multiple servers interconnected by an input / output system, such as a hyper-converged cluster. These servers can work together to provide users with application and data resource services. Servers include rack servers, cabinet servers, blade servers, tower servers, general-purpose servers, GPU servers, high-performance servers, etc. Servers can be connected via a high-speed network and managed using distributed resource management software (Digital Rights Management, DRM). The multiple servers in a server cluster can be divided into management servers (also called management nodes), computing servers (also called computing nodes), and storage servers (also called storage nodes) based on their functions.

[0085] Computing nodes are the core components in a server cluster that are responsible for executing computing tasks. Computing nodes are workload processors in a cluster, responsible for processing large amounts of data and computing tasks. Computing nodes typically have high-performance processors, large amounts of memory, and high-speed network interfaces to meet the requirements of high load and high performance. The main tasks of computing nodes are to execute applications, process data, and analyze results. They can process multiple tasks in parallel and improve overall computing performance through distributed computing. Data transmission and communication between computing nodes are carried out through high-speed network connections to ensure that tasks can be efficiently assigned to each node and achieve load balancing. In an embodiment of the present application, computing nodes can be used to execute tasks corresponding to business functions to provide business services to users.

[0086] A management node is a node in a server cluster responsible for monitoring, managing, and configuring the cluster's storage or computing resources. As the management center of a server cluster, a management node is responsible for monitoring, scheduling, and managing other nodes in the cluster. Management nodes collect cluster operating status information, process logs and alarms, and provide cluster deployment, configuration, and maintenance functions. Management nodes typically possess powerful computing and storage capabilities to support complex monitoring and management tasks. Management nodes can also communicate with other nodes, sending management commands and configuration parameters to ensure stable operation and efficient performance of the server cluster. Management nodes also provide a visual interface for the server cluster and management tools, such as hyperconverged platforms, to facilitate cluster monitoring and management operations.

[0087] A storage node is a node in a server cluster that is responsible for data storage and management. Storage nodes provide the data storage and backup functions required by the server cluster to ensure the reliability and persistence of the data. Storage nodes are usually equipped with high-performance storage devices, such as disk arrays or distributed file systems, to provide a large amount of storage space and high-speed data access performance. Storage nodes exchange and synchronize data with other nodes through network sharing protocols or other storage technologies. In an embodiment of the present application, the storage nodes within the server cluster may also be referred to as cluster internal storage (hereinafter referred to as internal storage). The storage node may be a storage area network (SAN), block storage (RADOS Block Device, RBD), local storage (LOCAL) or network attached storage (NAS).

[0088] A SAN is a specialized high-speed network architecture that connects servers and storage devices, such as disk arrays, tape libraries, and other types of storage devices, as well as servers and computer systems, via Fibre Channel. SANs are typically used to provide high-performance, reliable, and flexible storage solutions. In SAN storage, servers access data on storage devices by accessing logical unit numbers (LUNs). SAN storage typically consists of specialized storage devices and switches.

[0089] RBD is a storage service provided in the Ceph distributed storage system that divides data into blocks and stores them in a distributed manner on multiple storage nodes. RBD allows users to create and manage virtual block devices in a Ceph cluster, similar to traditional disk devices. RBD provides high reliability, high availability, and scalability by distributing data across multiple storage nodes in a Ceph cluster. Each RBD block is divided into multiple storage objects (a data unit in an object storage device) and stored on multiple OSDs (object storage devices) in the Ceph cluster.

[0090] NAS is a device specifically designed for data storage and sharing. NAS provides file-level storage services through a network connection (such as Ethernet). In NAS storage, data is stored on the storage device in the form of file sharing, and the server can access the files in the storage device through network protocols (such as file sharing protocols (Network File System, NFS), SMB, etc.). NAS is usually an independent hardware device with one or more hard drives built in and a dedicated operating system and management interface. NAS can be connected to a local area network (LAN) or a wireless local area network (WLAN), enabling multiple computers and other devices to share storage resources. In NAS storage, data is stored on the storage device in the form of file sharing, and the server can access the files in the storage device through network protocols (such as NFS, SMB, etc.). NAS storage is usually easy to manage and expand, and can be accessed by multiple servers simultaneously.

[0091] LOCAL refers to storing data on local storage devices directly connected to the server, such as local hard drives or solid-state drives. Local storage is typically used for storage needs on a single server and is suitable for lightweight applications and test environments.

[0092] It should be noted that, due to differences in storage methods among different types of storage nodes, it is not possible in the related art to simultaneously use two different types of storage nodes to jointly provide storage space for temporary files.

[0093] A block device (also called a physical block device) is a device used in computers to store and access data. It reads and writes data in fixed-size blocks. Common block devices include hard disk drives, solid-state drives, USB flash drives, and storage area network (SAN) devices. Block devices are typically managed and accessed through the operating system's file system. They can store large amounts of data and offer fast read and write speeds and high data persistence. In computer systems, block devices are also used for various purposes, including virtualization, data backup, and real-time data processing.

[0094] Logical block devices (LBDs) are data blocks that are logically divided and managed on physical block devices. Logical block devices are typically used to abstract and manage the details of the underlying physical devices, providing more flexible and efficient data access. In an operating system, logical block devices are typically managed and used by components such as the file system or device drivers. By mapping physical block devices to logical devices, the file system provides users with a transparent and consistent file access interface. Users do not need to worry about the details of the underlying physical devices; they can access and operate files through the interface provided by the file system.

[0095] A storage pool is a logical concept used to manage and organize storage resources. It consists of a group of physical storage devices (such as hard drives, disk arrays, tape libraries, and flash drives). By pooling these physical storage resources, it integrates different types of physical storage devices into a unified logical storage unit, making storage resource management more flexible and efficient. A storage pool can be considered a resource pool specifically designed for storage resources.

[0096] A file system is a data structure used in computers to organize, store, and access data and directories. It serves as an interface between the operating system and storage devices (such as hard drives and flash memory). It allows users to store data as files and organize these files into directories, providing a unified, abstract way for users and applications to access and manage data.

[0097] The following is an example of an application scenario of the embodiment of the present application.

[0098] The embodiments of the present application can be applied in a scenario where a user calls a certain business function of a server cluster through a user terminal.

[0099] For example, when a user invokes a certain service function through a user terminal, the management node needs to call the storage node to provide storage space. In the process of implementing the service function, the computing node can temporarily store the relevant files or intermediate data (i.e., temporary files) for the service function implementation in the storage space provided by the storage node, and then the computing node can provide the service function to the user. If the storage node cannot provide sufficient storage space for the computing node, that is, the remaining available space of the storage node is less than the temporary file size, the computing node will be unable to store the temporary file or unable to store all temporary files in the process of implementing the service function, which may cause the service function to fail to be implemented.

[0100] Exemplarily, the storage nodes include storage node 1 and storage node 2. Storage node 1 and storage node 2 are of different types, and both the remaining available space of storage node 1 and the remaining available space of storage node 2 are smaller than the storage space requested by the computing node, and the sum of the remaining available space of storage node 1 and the remaining available space of storage node 2 is greater than or equal to the storage space requested by the computing node.

[0101] In one possible implementation, as shown in Figure 1, when a user invokes a business function through a user terminal, the user terminal sends a business function invocation request to the management node. The management node schedules the task corresponding to the business function to be executed on a computing node. During the execution of the task, the computing node sequentially requests storage space allocation from storage node 1 and storage node 2. However, because the remaining available space of storage node 1 and storage node 2 are both less than the storage space requested by the computing node, neither storage node 1 nor storage node 2 can independently provide storage space for the computing node. Storage node 1 and storage node 2 provide feedback to the computing node indicating that the allocation failed. Furthermore, because storage node 1 and storage node 2 are of different types, even though the sum of the remaining available space of storage node 1 and storage node 2 is greater than the storage space requested by the computing node, storage node 1 and storage node 2 cannot jointly provide storage space for the computing node. Therefore, the computing node fails to execute the task and the business function invocation fails.

[0102] Based on this, in the storage space allocation method provided in this application, by exposing the remaining available space of the storage node as a block device, and mapping multiple block devices to a logical block device, a storage pool is obtained by establishing a file system for the logical block device to realize resource pooling of the remaining available space of the storage node, and then using the storage pool to provide temporary storage space for the computing node. As shown in Figure 2, the storage pool is obtained by pooling the remaining available space of storage node 1 and the remaining available space of storage node 2. The temporary storage space is used to store temporary files involved in the task execution of the computing node. The temporary storage space is hereinafter referred to as the storage space.

[0103] When the user calls a business function through the user terminal (step a), the management node executes step b and schedules the task corresponding to the business function to a certain computing node for execution. During the execution of the task, the computing node executes step c to request the storage pool to allocate storage space. Since the sum of the remaining available space of storage node 1 and the remaining available space of storage node 2 is greater than the storage space requested by the computing node, and the remaining available space of storage node 1 and the remaining available space of storage node 2 are pooled into a storage pool through resource pooling, therefore, although the type of storage node 1 and the type of storage node 2 are different, the remaining available space of storage node 1 and the remaining available space of storage node 2 can still be used to jointly provide storage space for the computing node through the storage pool. The storage pool executes step d to allocate storage space to the computing node. During the execution of the task, the computing node stores temporary files related to the business function in the storage space provided by the storage pool. The computing node executes step e to successfully execute the task and provide the user with the functional implementation of the business function. The user terminal executes step f to display the results of the business function implementation to the user.

[0104] The storage space allocation method provided in the embodiment of the present application can be applied not only to the above-mentioned scenario, but also to other scenarios. For example, the number of storage nodes available for providing storage space is greater than 2; and the storage nodes available for providing storage space include at least two types.

[0105] As another exemplary scenario with richer storage node types and a greater number of storage nodes, if there are three storage nodes that can be used to provide storage space: storage node 1, storage node 2, and storage node 3, and the types of storage node 1, storage node 2, and storage node 3 are all different, for example, storage node 1 is SAN, storage node 2 is RBD, and storage node 3 is LOCAL. In an embodiment of the present application, the remaining available space of storage node 1, the remaining available space of storage node 2, and the remaining available space of storage node 3 can be pooled to obtain a storage pool that can be used to provide storage space. When a computing node performs a task corresponding to a certain business function, the management node can directly use the storage pool to allocate storage space to the computing node, so that the computing node stores temporary files in the storage space provided by the storage pool, thereby supporting the completion of the task and realizing the corresponding business function.

[0106] The storage space allocation method provided in the embodiments of the present application is to pool the remaining available space of multiple storage nodes to obtain a storage pool, centrally manage storage resources, flexibly schedule them, and eliminate the isolation of storage resources between different types of storage nodes. The storage pool can utilize multiple storage nodes of different types to jointly provide temporary storage space for computing nodes based on the user's business needs, thereby supporting the implementation of business functions. This improves the utilization rate of the remaining available space of storage nodes and improves the stability of business function implementation.

[0107] The following example illustrates the system architecture of a server cluster associated with an application scenario.

[0108] For example, as shown in Figure 3, Figure 3 is a system architecture diagram of a server cluster provided in an embodiment of the present application. The server cluster includes a management node, multiple computing nodes, and multiple storage nodes such as SAN, RBD, LOCAL, and NAS. The storage nodes shown in Figure 3 are all internal storage (also called internal storage) of the server cluster.

[0109] The management node is used to run the storage space management and distribution system. The management node can provide users with the function of configuring storage nodes. After the user configures the storage node through the front-end management page displayed by the client (the electronic device used by the user), the management node can uniformly manage the storage nodes in the server cluster according to the user's configuration, such as storage node registration and verification, and is used to receive storage space allocation requests from each computing node, and distribute, monitor and release storage space according to the storage space allocation requests. The management node is also used to pool the remaining storage space resources of multiple storage nodes into a storage pool. The management node is also used to assign tasks corresponding to business functions to computing nodes.

[0110] The computing node is used to send a storage space allocation request to the management node to apply for storage space, and use the storage space provided by the storage pool to perform tasks corresponding to business functions, providing users with corresponding business functions.

[0111] The storage nodes shown in Figure 3 are storage resources within the server cluster. Each storage node can be used to provide storage space. Internal storage refers to storage nodes located within the server cluster, typically within the same local area network (LAN) as compute nodes and management nodes. Internal storage provides high-speed data access and transmission performance, allowing compute nodes to directly access data on internal storage through network protocols such as NFS, SMB / CIFS, and more.

[0112] In one possible implementation, the management node can also expand the storage resources outside the server cluster as a storage node. For example, as shown in Figure 4, Figure 4 is a system architecture diagram of another server cluster provided by an embodiment of the present application. The server cluster external storage (also referred to as external storage) can be SAN, RBD, LOCAL or NAS. External storage refers to a storage node located outside the server cluster, which usually communicates with the management node and computing node in the cluster through a high-speed network connection (such as Fibre Channel or Ethernet, etc.). After the external storage is registered with the management node, it can also serve as a storage node of the server cluster to provide corresponding storage space for the computing node. External storage can provide larger storage capacity and higher performance. The embodiment of the present application increases the overall storage capacity of the server cluster by expanding the storage nodes outside the server cluster, thereby providing more sufficient storage space for the computing nodes, reducing the impact of insufficient storage space on task execution, improving the success rate of task execution, and providing users with more stable business functions.

[0113] For example, as shown in FIG5 , FIG5 is a system architecture diagram of another server cluster provided in an embodiment of the present application. A node agent of a storage space management and distribution system runs in the computing node. When the computing node performs a task corresponding to a business function, it can apply for storage space from the management node through the node agent. After the computing node receives the relevant information of the storage space distributed by the management node through the node agent (such as address information and storage space size, etc.), the computing node mounts the access path of the storage space in a directory of the computing node, so that the computing node accesses the storage space according to the directory, and then stores temporary files in the storage space or reads temporary files from the storage space to support the computing node in executing tasks and realizing business functions.

[0114] The following describes the storage space management and distribution system and the node agent with reference to the accompanying drawings.

[0115] As shown in Figure 6, the storage space management and distribution system includes a platform storage space registration module, a platform storage space management module, and a platform storage space distribution module. The node agent includes a computing node storage space adaptation module and a computing node storage management module. The storage node shown in Figure 6 includes internal storage and external storage. In another implementation, the storage node may also include only internal storage. The storage nodes mentioned below may include both internal and external storage, or only internal storage.

[0116] The platform storage space registration module is used to register internal storage and store relevant information configured by users through the user-side front-end management page. When external storage is needed to expand the storage of the server cluster, the platform storage space registration module can register the external storage as a storage node of the server cluster.

[0117] The platform storage space registration module is also used to verify the network connectivity of storage nodes and determine the corresponding relationship between compute nodes and storage nodes. A server cluster may include multiple compute nodes and multiple storage nodes, and each compute node may be able to communicate with some of the multiple storage nodes. In other words, compute nodes may not be able to access all storage nodes via the network, and storage nodes may not be able to communicate with all compute nodes via the network.

[0118] As one implementation, the platform storage space registration module verifies the network connectivity of each storage node, determines the compute nodes that can communicate with the storage node, and obtains a list of compute nodes corresponding to the storage node. As another implementation, the platform storage space registration module verifies the network connectivity of each compute node, determines the storage nodes that the compute node can access via the network, and obtains a list of storage nodes corresponding to the compute node.

[0119] The platform storage space management module is used to expose the remaining available space of each storage node in the form of a block device and map multiple block devices into a logical block device. The platform storage space management module pools the remaining resources of the storage node by establishing a file system on the logical block device to obtain a storage pool.

[0120] The platform storage space management module also manages the allocated storage space in the storage pool and monitors the free space and health status of the storage pool to ensure the implementation of business functions. It also obtains storage status change information for both the server cluster's external storage and the server cluster's internal storage, and updates the storage pool's storage space based on this storage status change information.

[0121] The platform storage space distribution module is used to receive storage space allocation requests sent by computing nodes, and use the storage pool to provide storage space for computing nodes based on the storage space allocation requests and user-configured information.

[0122] In an embodiment of the present application, the platform storage space distribution module can create a virtual disk on the storage pool through virtualization, expose the virtual disk to the computing node through a network protocol that can perform read and write operations, and return the virtual disk information (such as the address and read and write access path) to the computing node storage space management module on the computing node. The space of the virtual disk is the storage space, which can store relevant temporary files used to implement business functions.

[0123] The network protocols that can perform read and write operations may be Network File System (NFS), Common Internet File System (CIFS), Network Block Device (NBD), and Internet Small Computer System Interface (ISCSI).

[0124] The compute node storage space management module is used to send a storage space allocation request to the platform storage space distribution module based on the temporary file size and the business function when the compute node executes a task corresponding to the business function. The storage space allocation request may include the temporary file size and the business function identifier, which is used to uniquely identify the business function.

[0125] The computing node storage space management module is further configured to send a storage space release request to the platform storage space distribution module when the computing node completes the task corresponding to the business function. The storage space release request is used to instruct the release of data stored in the storage space. Upon receiving the storage space release request, the platform storage space distribution module may release the data in the storage space allocated to the computing node, that is, clear the data in the storage space.

[0126] The computing node storage space adaptation module is used to receive the relevant information of the virtual disk distributed by the platform storage space distribution module, and establish a connection between the computing node and the virtual disk providing the storage space.

[0127] In an embodiment of the present application, the platform storage space distribution module uses a storage pool in the form of a virtual disk to provide storage space to the computing node storage space adapter module. After establishing the connection between the computing node and the virtual disk, the computing node storage space adapter module can also establish a file system in the virtual disk so that the computing node stores temporary files in the virtual disk. After the file system is established, the computing node storage space adapter module mounts the file system in a directory (called a temporary directory) of the computing node, and informs the computing node of the path of the file system in the temporary directory. The computing node can store temporary files in the virtual disk through the path and read temporary files according to the path when needed.

[0128] Through the storage space allocation method provided in the embodiment of the present application, the management node can integrate the remaining available space of each storage node into a storage pool. After the management node receives the storage space allocation request sent by the computing node, it uses the storage pool to provide the corresponding storage space for the computing node according to the storage space allocation request, so as to support the computing node to store temporary files in the storage space and realize the corresponding business function. By integrating the remaining available space of multiple storage nodes into a storage pool to provide storage space, not only can the differences in storage methods between different types of storage nodes be ignored, but also the storage resource utilization of the storage node can be improved. When the remaining storage space of several storage nodes cannot provide storage space individually, the remaining storage space of these storage nodes can be called through the storage pool to jointly provide storage space for the computing node.

[0129] Below, the front-end management page provided in the embodiment of the present application is exemplarily introduced with reference to the accompanying drawings.

[0130] In one possible implementation, as shown in FIG7 , FIG7 is a schematic diagram of a front-end management page provided in an embodiment of the present application. The front-end management page can be displayed through the electronic device (user terminal) used by the user. The user can manage and configure the allocation strategy through the front-end management page. The allocation strategy may include at least one of the correspondence between the business function identifier and the computing node, the correspondence between the business function identifier and the configuration mode, the correspondence between the business function identifier and the function priority, the number of copies corresponding to the business function identifier, and the correspondence between the business function identifier and the storage node.

[0131] In an embodiment of the present application, a server cluster is capable of providing at least one business function and includes at least two compute nodes. A user, through a front-end management page, can configure a list of compute nodes capable of implementing the business function. The list of compute nodes includes at least one compute node capable of executing the task corresponding to the business function identifier. When a user invokes a business function, the management node assigns the task corresponding to the business function identifier to a compute node in the list of compute nodes corresponding to the business function identifier.

[0132] In one possible implementation, through the front-end management page, users can also configure the correspondence between business function identifiers and storage nodes, that is, configure a list of storage nodes corresponding to each business function identifier. Since in the process of implementing different business functions, computing nodes have different requirements for the storage or reading and writing of temporary files. For example, the implementation of the remote virtual machine template import function requires a high available capacity of the storage node. Therefore, the computing node needs to temporarily store the virtual machine template file uploaded by the user (the virtual machine template file is a temporary file at this time) in a storage node that can provide a large storage space; and the implementation of the virtual machine hibernation function requires a high reliability and read-write speed of the storage node. Therefore, the computing node needs to store the relevant temporary files in a storage node with higher read-write performance and reliability. By configuring the correspondence between business function identifiers and storage nodes, more suitable storage nodes can be provided for computing nodes to implement functions, thereby improving the stability and efficiency of business function implementation.

[0133] In an embodiment of the present application, although the remaining available space of each storage node is pooled into an overall storage pool, the block devices corresponding to the remaining available space of each storage node can still be distinguished and managed through the file system. As shown in Figure 8, Figure 8 is a schematic diagram of a storage pool provided in an embodiment of the present application. The storage pool is obtained by pooling the remaining available space of 5 storage nodes, including SAN1, SAN2, LOCAL, RBD and NAS. As an example, if the user configures the storage node list corresponding to business function 1 to include SAN1, SAN2 and LOCAL, when the computing node executes the task corresponding to business function 1, the storage pool uses the block devices corresponding to the remaining available space in SAN1, SAN2 and LOCAL to provide storage space for the computing node.

[0134] In one possible implementation, users can also configure the mapping between business function identifiers and configuration modes through the front-end management page. A configuration mode refers to the mode in which the storage pool provides storage space to compute nodes when the compute nodes execute tasks corresponding to the business function. Configuration modes include thin provisioning, thick provisioning, and delayed zeroing. By providing the ability to select a configuration mode through the front-end management page, different configuration modes can be provided to implement different business functions based on user needs.

[0135] Thin provisioning is a storage technology also known as "thin provisioning." It allows a storage pool to allocate more storage capacity to compute nodes than the actual physical storage capacity of the storage pool. In other words, the allocated storage space is larger than the total storage capacity of the storage pool. This means that compute nodes "see" more storage space while actually using physical storage resources only when needed. This approach helps minimize waste and improve storage resource utilization.

[0136] Thick provisioning, as opposed to thin provisioning, is a method of allocating virtual disks for exclusive use. In thick provisioning, the storage pool can allocate more storage capacity to a compute node than the compute node requests. This means that the storage pool allocates more storage space than the compute node requests, but the compute node may not actually use all of the storage space. This improves storage performance.

[0137] Lazy zeroing is a specialized form of thick provisioning. Instead of immediately zeroing the storage pool's allocated space, lazy zeroing gradually fills the space as data is first written. The storage pool does not erase any data remaining in the allocated space during the allocation process. The space is zeroed as needed when a compute node first writes to the space, storing temporary files. This method allows for immediate allocation of the specified amount of space, while preserving the data in the space until it is actually used.

[0138] In one possible implementation, through the front-end management page, the user can also configure the function priority corresponding to the business function identifier. The function priority is used to represent the execution priority of the business function, and is also used to represent the storage priority of the temporary file corresponding to the business function identifier. As an example, when a computing node needs to execute tasks corresponding to two business functions, the task corresponding to the business function with the higher function priority is executed first. As another example, when two computing nodes (computing node 1 and computing node 2) simultaneously request storage space from the storage pool, if the function priority of the business function corresponding to the task executed by computing node 1 is higher than the function priority of the business function corresponding to the task executed by computing node 2, the storage pool will prioritize allocating storage space to computing node 1, and after satisfying the request of computing node 1, it will allocate storage space to computing node 2. By providing the function priority configuration function on the front-end management page, users can adjust the implementation priority of each business function according to their own choices, providing users with more flexible function implementation.

[0139] In one possible implementation, users can also configure the number of copies corresponding to the business function identifier through the front-end management page. The number of copies refers to the number of copies of temporary files that the computing node needs to store in the storage space when performing the tasks corresponding to the business function. For example, if the number of copies is 2, the computing node needs to store 2 temporary files in the storage space. When the user configures the number of copies, the management node needs to determine the storage space size based on the number of copies and the size of the temporary files when allocating storage space for the computing node using the storage pool. When implementing some more important business functions, increasing the number of copies of temporary files can improve the stability of business function implementation and avoid the inability to implement the corresponding business function due to abnormal or damaged temporary file storage. The front-end management page provides a configuration function for the number of copies. Users can configure the number of copies according to the importance of different business functions to themselves, providing users with more stable function implementation.

[0140] For example, if the number of replicas is 2 and the temporary file size is 10 gigabytes (GB), the storage pool needs to allocate enough storage space for the compute node to store two copies of the temporary file, meaning the storage space must be at least 20 GB. For another example, if the number of replicas is 12 and the temporary file size is 10 gigabytes (GB), the storage pool only needs to allocate 10 GB of storage space for the compute node.

[0141] Through the storage space allocation method provided in the embodiment of the present application, users can perform personalized configuration according to their own needs through the front-end management page of the user end, such as configuring the correspondence between the business function identifier and the computing node, configuring the correspondence between the business function identifier and the storage node, configuring the configuration mode corresponding to the business function identifier, and configuring the function priority corresponding to the business function identifier. When a user calls a certain business function, the computing node that executes the task corresponding to the business function identifier can send a request to the management node to apply for storage space. The management node can use the storage pool to allocate storage space according to the user's configuration, and provide storage space for the computing node to support the computing node to store temporary files related to the business function in the storage space to realize the business function. In addition, during the execution of the task by the computing node, the management node can also monitor the usage of the storage space in real time, and release the data in the storage space after the task is completed, so as to reduce unnecessary occupation of the storage node and waste of resources.

[0142] Through the above process, the management node uses the storage pool to provide storage space for temporary files, effectively supports the implementation of business functions, and improves the success rate of task execution; in addition, users can configure storage nodes according to their own needs, and the management node can distribute storage space according to the user's configuration, which increases the flexibility of the server cluster.

[0143] The following is an example of the process of establishing a storage pool by a management node with reference to the accompanying drawings.

[0144] In a possible implementation, as shown in FIG9 , FIG9 is a schematic diagram of a storage pool creation process provided in an embodiment of the present application.

[0145] S901: The user terminal sends configuration information to the management node.

[0146] Figure 7 shows the front-end management page displayed to users. This page allows users to configure the mapping between business function identifiers and storage nodes, prioritize the use of multiple storage nodes, and map storage nodes to compute nodes. This intuitive and user-friendly interface allows users to easily configure settings, improving work efficiency, reducing configuration complexity, and enhancing the overall user experience.

[0147] Through the front-end management page, users can also configure storage nodes for providing storage space, and then the management node registers these storage nodes.

[0148] Configuration information describes the configurations configured by the user through the front-end management page. This information includes the mapping between the business function identifier and other options, such as the list of compute nodes, storage nodes, configuration mode, function priority, and number of replicas. It also includes the storage nodes used to provide storage space.

[0149] As an example, the management node may package the configuration information into a message and send it to the management node through the network.

[0150] By sending configuration information to the management node, accurate transmission and synchronous update of configuration information are achieved. This ensures that the system uses the latest configuration information during operation and avoids problems caused by inconsistent information.

[0151] S902: The management node registers the storage node according to the configuration information and stores the correspondence between the service function identifier and other options.

[0152] The management node registers the storage node according to the configuration information and saves the correspondence between the business function identifier in the configuration information and the above-mentioned other options (such as the computing node list, storage node, configuration mode, function priority, and number of copies, etc.).

[0153] After receiving the configuration information from the client, the management node uses the relevant authentication information (such as username and password) to establish a connection with the storage node. This connection can be made using protocols such as iSCSI, Fibre Channel (FC), or NFS, depending on the storage node type and supported protocols. The management node authenticates the storage node by sending authentication information to ensure a successful connection.

[0154] In one possible implementation, after completing storage node registration, the management node may also perform a connectivity test on the storage node. This connectivity test verifies that communication between the compute node and the storage node is normal and that data can be transmitted and accessed. For example, the connectivity test may involve the compute node performing a simple read / write test on the storage node, such as writing test data to the storage node and then reading and verifying the correctness of the test data.

[0155] If the connectivity test fails, you need to check whether the connection configuration and authentication information are correct and make appropriate adjustments. After the connectivity test passes, the management node will mark the storage node as available and include the storage space it provides in the storage pool to provide storage space for the compute nodes.

[0156] The connectivity test described above tests the network connectivity between each compute node and each storage node within the server cluster, determines the storage nodes that each compute node can access via the network, and obtains a storage node list corresponding to each compute node. The storage node list corresponding to a compute node includes the storage nodes that the compute node can access via the network. When allocating storage space to a compute node, the temporary storage management and distribution system can allocate storage space to the compute node based on the storage node list corresponding to the compute node.

[0157] S903: The management node exposes the remaining available space of the storage node as a block device.

[0158] The remaining available space on a storage node refers to the available storage space remaining on the storage node. The storage space corresponding to a block device refers to the remaining available space on the storage node corresponding to that block device. Block devices and storage nodes have a one-to-one correspondence.

[0159] In step S903, storage nodes can be divided into two types: storage nodes that directly expose block devices (such as storage nodes that support the ISCSI protocol, also called first storage nodes) and storage nodes that do not directly expose block devices (such as storage nodes that support the NFS protocol, also called second storage nodes). For these two types of storage nodes, the management node can use different methods to expose the remaining available space in the storage node as a block device.

[0160] For storage nodes that directly expose block devices, the management node associates these exposed block devices with the storage space management and distribution system. For example, for storage nodes that support the iSCSI protocol, the management node can use appropriate tools or commands to scan for storage nodes and establish connections. For example, it can scan the IP address of a storage node, discover available block devices, and add them to the server cluster's storage device list.

[0161] For storage nodes that don't directly expose block devices, the management node detects available storage resources (i.e., remaining free space) within the storage node. Based on the detected remaining free space, the management node then uses virtualization technology to create a virtual disk, which acts as a map and proxy for the remaining free space within the storage node. Once the virtual disk is created, the management node associates the virtual disk with a block device (such as a Network Block Device (NBD)) within the management node. Using the NBD, the management node provides a block device-style access interface, exposing the available resources of the storage node that doesn't directly expose block devices to the management node as block devices.

[0162] The remaining available space of each storage node is exposed as a block device in different ways, so that the remaining available space of the storage node can be pooled for resources to achieve unified management and allocation.

[0163] In one possible implementation, the external storage includes a first external storage that directly exposes a block device; the internal storage includes a first internal storage that directly exposes a block device; and the process of exposing the remaining available space of the first external storage or the remaining available space of the first internal storage as a block device may be: scanning the first block device corresponding to the remaining available space in the first external storage or the first internal storage, and establishing a connection with the first block device.

[0164] In another possible implementation, the external storage includes a second external storage that does not directly expose the block device, and the internal storage includes a second internal storage that does not directly expose the block device; the process of exposing the remaining available space of the second external storage or the remaining available space of the second internal storage as a block device is: obtaining the remaining available space of the second external storage or the remaining available space of the second internal storage, and creating a virtual disk based on the remaining available space of the second external storage or the remaining available space of the second internal storage; and associating the virtual disk with the block device in the management node.

[0165] S904: The management node maps the block device to a logical block device.

[0166] In one possible implementation, the management node can use the device mapper to map multiple block devices into a single logical block device. The device mapper is a kernel module that provides a framework for userspace programs to define block device behavior. The device mapper redirects block device requests from kernel space to user space, thereby mapping block devices to logical block devices.

[0167] The process of the management node using Device Mapper to map multiple block devices to logical block devices is as follows:

[0168] The management node uses the Device Mapper to construct the dm_table and dm_target structures. The dm_table represents a mapping table that defines the mapping relationship between logical block device addresses and block device addresses, including information on how to map a logical block device address to a block device address. The dm_target represents an entry in the mapping table, describing how to map a logical block device to one or more block devices. The mapping table records the mapping relationship between multiple block devices and logical block devices. Once the mapping relationship is established, the logical block device can be called like a normal block device, implementing resource pooling for multiple block devices.

[0169] S905: The management node establishes a file system on the logical block device.

[0170] The file system refers to the file system established for the logical block device in step S904. By establishing a file system on the logical block device, data storage, access, and management functions are implemented. The file system manages each block device within the logical block device according to a mapping table. Each block device contains a certain amount of data and metadata information (such as file attributes and directory structure). By maintaining block device and metadata information, the file system implements operations such as storing, reading, modifying, and deleting data in the storage pool.

[0171] Common file systems for logical block devices include the Extended File System (EXT), the Extents File System (XFS), and the Butter File System (Btrfs). Each of these file systems has its own unique characteristics, suited to different application scenarios and requirements. For example, the EXT file system is a commonly used file system in Linux, supporting large files and directories, and online defragmentation. The XFS file system offers high performance and reliability, making it suitable for large-scale data storage and management.

[0172] The management node first formats the logical block device and then uses the mkfs command to create a file system on the logical block device. For example, to create an EXT4 file system, the mkfs command is "sudo mkfs -t ext4 / dev / mapper / mylogicalvolume." After the file system is created, the management node can mount the file system on the logical block device to a specified directory and access the file system created on the logical block device through the directory. By establishing a file system on the logical block device, the logical block device becomes a storage pool that can be used for data storage, access, and management.

[0173] S906: The management node completes creating the storage pool.

[0174] After establishing a file system on the logical block device and mounting the file system to a directory, the management node completes the resource pooling of the remaining available space of the storage nodes, integrating the remaining available space of each storage node into a storage pool, and then using the storage pool to call the remaining available space of each storage node to jointly provide storage space for the computing nodes.

[0175] S907: The management node returns configuration completion information to the user terminal.

[0176] After the management node successfully registers each storage node and pools the remaining available space resources of each storage node into a storage pool, it can return a configuration completion message to the user end indicating successful configuration. If the connection fails or the verification fails, the configuration completion message will be returned to the user end indicating a configuration failure.

[0177] S908: The user terminal displays the configuration result to the user.

[0178] After receiving the configuration completion information fed back by the management node, the user end can promptly display the configuration results to the user through the front-end management page, thereby improving the transparency of the system and the controllability of operations.

[0179] Through the storage pool establishment process provided by steps S901-S908, the remaining available space of each storage node can be managed in a unified manner. A storage pool is obtained by pooling the remaining available space of each storage node, and then the storage pool is used to provide storage space for the computing node. Moreover, the above process can ignore the differences in storage methods between different types of storage nodes. When a storage node cannot provide storage space alone, that is, the remaining available space of the storage node is smaller than the temporary file size, the storage pool obtained by resource pooling can simultaneously use the remaining available space of multiple storage nodes to jointly provide storage space for the computing node, breaking through the limitation of the resource capacity of a single storage node. It avoids the problem that a storage node cannot provide storage space, resulting in the inability to realize business functions, and improves the reliability of the hyper-converged platform.

[0180] Below, the implementation process of the storage space allocation method provided in the embodiment of the present application is described with reference to the accompanying drawings.

[0181] In one possible implementation, the storage space allocation method provided in the embodiment of the present application is shown in FIG10 .

[0182] S1001: The user terminal sends a service function call request to the management node.

[0183] The user terminal is used to display the front-end management page shown in Figure 7 to the user and to present various business functions to the user. After the user triggers an option corresponding to a business function on the user terminal display page, the user terminal can generate a corresponding business function call request based on the user's operation. The business function call request is used to request the provision of a business function and may include an identifier corresponding to the business function, which uniquely identifies the business function. The user terminal sends the business function call request to the management node to request the invocation of the business function.

[0184] S1002: The management node assigns tasks corresponding to business functions to computing nodes.

[0185] After receiving the service function call request sent by the user terminal, the management node assigns the task corresponding to the service function indicated by the service function identifier to the computing node, and the computing node executes the task to realize the service function.

[0186] In one possible implementation, the management node can assign tasks based on the list of computing nodes corresponding to the business function identifier. Based on the business function, the management node determines the list of computing nodes configured by the user through the front-end management page, identifies the computing node capable of executing the task corresponding to the business function, and then assigns the task corresponding to the business function to a computing node in the computing node list.

[0187] In another possible implementation, after determining the computing node list, the management node may determine the computing node most suitable for executing the task based on factors such as the load and available resources of each computing node in the computing node list to improve task execution efficiency.

[0188] S1003: The computing node executes the task and sends a storage space allocation request to the management node.

[0189] Storage space is used to store temporary files used by compute nodes during task execution. Temporary files refer to temporary files or data generated during task execution, or files required to implement business functions. Temporary files include intermediate results during task execution, temporary calculation data, or other data that requires temporary storage.

[0190] During execution, a compute node may generate a series of intermediate results that may be used in subsequent computational steps. Storing these intermediate results in temporary files facilitates subsequent computation and processing. Furthermore, temporary files allow for the temporary storage of a portion of data, improving computational efficiency and response speed.

[0191] The storage space allocation request is used to request storage space from the storage space management and distribution system. The storage space allocation request includes the temporary file size and the service function identifier. The service function identifier is used to indicate a unique service function.

[0192] During the task execution process, the computing node sends a storage space allocation request to the storage node to obtain the required storage space, and then uses the storage space to execute the task and realize the business function.

[0193] S1004: The management node allocates storage space to the computing node using the storage pool according to the storage space allocation request, and feeds back storage space information to the computing node.

[0194] A storage pool is created by the management node by pooling the remaining available space on each storage node. The management node exposes the remaining available space on each storage node as a block device, maps multiple block devices into a single logical block device, and then creates a file system on this logical block device to create a storage pool.

[0195] Based on the size of the temporary file, the management node can determine the size of the storage space that needs to be allocated to the computing node, that is, determine the size of the space to be allocated. The storage space to be allocated should be greater than or equal to the size of the temporary file to support the computing node to store the temporary file completely in the storage space, avoiding temporary file storage failure due to insufficient storage space.

[0196] Based on the business function identifier, the management node can determine the corresponding unique business function and then allocate storage space to the compute node using the storage pool according to a pre-configured allocation policy. The allocation policy can include at least one of the aforementioned correspondence between business function identifiers and compute nodes, the correspondence between business function identifiers and configuration modes, the correspondence between business function identifiers and function priorities, the number of replicas corresponding to the business function identifier, and the correspondence between business function identifiers and storage nodes.

[0197] The process of the management node using the storage pool to allocate storage space to the computing nodes is detailed in the following embodiment.

[0198] S1005: The computing node uses the storage space to execute tasks corresponding to the business functions.

[0199] When executing a task, the computing node stores the intermediate results or data involved as temporary files in the allocated storage space, and performs necessary calculations, processing, and other operations to complete the task and realize business functions.

[0200] This method, which uses a storage pool to provide storage space for compute nodes, breaks down the storage barriers between different types of storage nodes. It abstracts each storage node into a virtual form, hiding its implementation details. This allows for the variability of storage methods across different types of storage nodes and consolidates the remaining available space across multiple storage nodes into a single storage pool. This allows different types of storage nodes to simultaneously provide storage space for compute nodes, preventing task execution failures and the resulting inability to provide user services due to insufficient space on a single storage node.

[0201] The following describes the method flow after providing service functions to users with examples in conjunction with the accompanying drawings.

[0202] In a possible implementation, as shown in FIG11 , based on steps S1001 to S1005 , the storage space allocation method further includes:

[0203] S1006: After completing the task, the computing node sends a storage space release request to the management node.

[0204] A storage release request is used to request the management node to release temporary files from the storage space. After a task completes, the compute node sends a storage release request to the management node, instructing it to release the previously allocated storage space so that it can be used by other tasks or other compute nodes.

[0205] S1007: The management node releases the storage space according to the storage space release request.

[0206] When receiving a storage space release request from a compute node, the management node will release the storage space allocated to the compute node accordingly and add the released storage space back to the available storage pool so that it can be allocated and used again later.

[0207] S1008: The computing node returns the task execution result to the user end.

[0208] After the task is completed, the computing node will return the execution results to the user end. The execution results may include the calculation results, output data, and task execution status information. The user end processes and records the received execution results for subsequent business operations or user queries.

[0209] S1009: The user receives the execution result and performs subsequent operations according to business needs.

[0210] After receiving the task execution results returned by the computing node, the client will perform subsequent operations based on business needs, such as executing subsequent business processes, updating business status, and displaying execution results to users. The client is responsible for effectively processing and utilizing the task execution results to meet user needs and business process requirements.

[0211] Steps S1006-S1009 are the subsequent steps after the business function is implemented, including the release of storage space and the return of task execution results. These steps S1001-S1009 together constitute a complete business function execution process, involving multiple steps such as user request, task allocation, resource management, task processing, storage space allocation, result return, and resource release. In actual scenarios, other operational and management tasks may also be involved, such as monitoring, logging, and exception handling.

[0212] The following further illustrates the above storage space allocation process in conjunction with FIG12 , introducing the process in which the management node distributes storage space according to the storage space allocation request, and the computing node utilizes the storage space to execute tasks.

[0213] As shown in FIG12 , FIG12 is a signaling diagram of a storage space allocation method provided in an embodiment of the present application. The implementation process of the service function includes:

[0214] S1201: The user terminal sends a service function call request to the management node.

[0215] S1202: The management node assigns tasks corresponding to business functions to computing nodes.

[0216] S1203: The computing node executing the task sends a storage space allocation request to the management node through the node agent.

[0217] For steps S1201 - S1203 , reference may be made to the description of steps S1001 - S1003 .

[0218] S1204: The management node allocates storage space according to the storage space allocation request.

[0219] After receiving a storage space allocation request, the management node determines the corresponding unique business function based on the business function identifier and determines the pre-configured allocation policy based on the business function. It then uses the storage pool to allocate storage space for the compute node. The management node allocates storage space from the storage pool that can store temporary files.

[0220] As an example, the management node determines at least one storage node that the computing node can access over the network based on the storage node list corresponding to the computing node, and obtains a first storage node set (the first storage node set includes at least one storage node that the computing node can access over the network). The management node determines at least one storage node corresponding to the business function identifier based on the storage node list corresponding to the business function identifier, and obtains a second storage node set (the second storage node set includes at least one storage node corresponding to the business function identifier). The management node determines at least one storage node that exists in both the first storage node set and the second storage node set, and obtains a third storage node set (the third storage node set includes at least one storage node that exists in both the first storage node set and the second storage node set). The management node uses the block devices corresponding to the remaining storage space of each storage node in the third storage node set in the storage pool to provide storage space for the computing node.

[0221] As another example, after the management node determines the configuration mode corresponding to the service function identifier, the management node uses the storage pool to provide storage space for the compute node according to the configuration mode corresponding to the service function identifier. If the configuration mode is thin provisioning, the management node uses the storage pool to provide the compute node with a first temporary storage space that is larger than the capacity of the storage pool, and the first temporary storage space is reset to zero before being allocated to the compute node.

[0222] If the configuration mode is thick provisioning, the management node uses the storage pool to provide the computing node with a second temporary storage space that is larger than the size of the storage space to be allocated, and the second temporary storage space is reset to zero before being allocated to the computing node.

[0223] If the configuration mode is delayed zeroing, the management node still retains some other data in the third temporary storage space provided by the storage pool for the computing node. When the computing node writes a temporary file to the third temporary storage space, the other data in the third temporary storage space is cleared and reset to zero.

[0224] As another example, if the management node simultaneously receives storage space allocation requests sent by two computing nodes (storage space allocation request 1 sent by computing node 1 and storage space allocation request 2 sent by computing node 2), if the functional priority of the business function corresponding to the business function identifier in the storage space allocation request 1 is higher than the functional priority of the business function corresponding to the business function identifier in the storage space allocation request 2, the management node will prioritize using the storage pool to allocate storage space for computing node 1, and then allocate storage space for computing node 2.

[0225] As another example, the management node determines the number of copies corresponding to the business function identifier, and then needs to provide the computing node with space that can store temporary files with the same number of copies as storage space, that is, the size of the storage space is greater than or equal to the product of the number of copies and the size of the temporary file (the configuration mode is not considered at this time).

[0226] S1205: The management node creates a virtual disk.

[0227] After the storage space is divided from the storage pool in step S1204, the management node creates a corresponding virtual disk for the storage space using virtualization technology.

[0228] A virtual disk is a logical storage unit that corresponds to a portion of storage space (i.e., storage space) allocated within a storage pool. When creating a virtual disk, the management node must specify parameters such as the virtual disk's capacity (i.e., storage space size), performance characteristics, and access permissions to meet the storage space requirements of the compute nodes.

[0229] S1206: The management node sends the virtual disk information to the node agent in the computing node.

[0230] Virtual disk information can include an identifier and a storage location. The identifier uniquely identifies the virtual disk, and the storage location is the specific storage location of the virtual disk in the storage pool (such as one or more block device addresses used to provide storage space). The storage location can be the physical address of the block device or other location identifier.

[0231] Virtual disk information can also include capacity, access rights, and management information. The capacity of a virtual disk refers to its size, which allows the node agent to understand the available storage space. Access rights control the virtual disk, such as read and write permissions and user permissions. Management information can include information such as the virtual disk's administrator, creation time, and update time.

[0232] S1207: The computing node establishes a network connection between the computing node and the storage pool according to the virtual disk information.

[0233] The node agent in the computing node can associate the virtual disk with the block device (such as NBD) on the computing node, expose the virtual disk to the computing node in the form of a block device, and then establish a network connection between the computing node and the storage pool.

[0234] S1208: The computing node creates a file system in the virtual disk through the node agent, and mounts the file system in a directory of the computing node.

[0235] The node agent creates a file system on the virtual disk. A file system is an organizational structure used to manage files and data on the virtual disk, allowing for the storage of temporary files on the virtual disk. Common file systems include Ext4, NTFS, and XFS. The node agent selects a directory on the compute node as a mount point and mounts the created file system to the selected directory. Mounting is the process of associating a file system with a directory (i.e., a mount point). This directory will be used to access files and data on the virtual disk. By mounting the file system to this directory, the directory becomes the access point for the virtual disk.

[0236] S1209: The computing node determines the mount point of the file system.

[0237] S1210: The computing node executes the task.

[0238] When intermediate results or data are generated, the compute node accesses the virtual disk based on the directory (i.e., mount point), and writes the intermediate results or data to the virtual disk as a temporary file. When needed, the compute node reads the temporary file from the virtual disk based on the directory.

[0239] S1211: After the computing node completes the task, the node mounts the file system on behalf of the computing node.

[0240] The node agent performs an unmount operation to detach the file system from the corresponding mount point. This process releases the file system on the virtual disk at the mount point and makes it no longer visible to the compute node.

[0241] In addition, the node agent may also perform some cleanup work, such as releasing resources occupied by the file system and updating system status information, to ensure the integrity of the unmount operation.

[0242] S1212: The computing node sends a storage space release request to the management node through the node agent.

[0243] The storage space release request is used to instruct the release of data in the virtual disk, so as to release the data in the storage space after the task is completed.

[0244] The storage space release request may include the identifier and storage location of the virtual disk, which are the same as those in step S1206.

[0245] S1213: The management node releases the storage space according to the storage space release request.

[0246] After receiving the storage space release request, the management node will release the virtual disk indicated by the identifier according to the information in the storage space release request.

[0247] S1214: The management node deletes the virtual disk.

[0248] After the management node releases the virtual disk, it will then perform the operation of deleting the virtual disk to completely clean up and recycle the resources.

[0249] In the embodiment of the present application, if the virtual disk is successfully deleted, the management node may also send a confirmation message to the computing node, indicating that the virtual disk has been completely cleaned and recycled. After receiving the confirmation message, the computing node may continue with subsequent operations or terminate the task.

[0250] Through step S1213 and step S1214, the management node completes the release and deletion operations on the virtual disk, ensuring that the resources are completely recovered and released so that they can be reallocated to other tasks.

[0251] S1215: The computing node returns the task execution result to the user end.

[0252] The compute node returns the task execution results to the user. This means the compute node returns relevant task execution data, output, status information, and other information to the user for subsequent processing and display. The user can display the execution results to the user. For example, the task execution status, output data, and log information can be presented in a user-friendly manner (such as images or web pages), allowing the user to clearly understand the task execution status and results, ensuring that the user can obtain the task execution status and results in a timely and accurate manner.

[0253] During the implementation of the business functions shown in Figure 12, dynamic allocation and release operations on the management node enable flexible management of the storage space required for task execution. This dynamic allocation and release mechanism improves overall resource utilization, avoids resource waste, and meets the flexible storage space requirements of different tasks. It also fully leverages virtualization technology to create and manage virtual disks, enabling storage resource isolation, flexible scheduling, and dynamic allocation, improving storage resource utilization and flexibility.

[0254] The storage space allocation method provided in the embodiments of this application enables task execution and resource management in a distributed computing environment. This approach enables parallel execution of tasks and distributed storage and management of data, fully leveraging the advantages of distributed computing and improving the efficiency of the overall computing system. Furthermore, reasonable storage resource allocation and scheduling also helps optimize system performance and enhance the efficiency and stability of task execution.

[0255] In addition, the task execution results are displayed to users through the user end, allowing users to intuitively understand the task execution status and the realization of business functions. Users can adjust and optimize their work plans in a timely manner according to the status and results of task execution and business function realization.

[0256] It should be noted that the correspondence between the above-mentioned business function identifiers and computing nodes, the correspondence between the business function identifiers and storage nodes, the configuration mode corresponding to the business function identifiers, the function priority corresponding to the business function identifiers, and the number of copies corresponding to the business function identifiers can be configured by the user through the front-end management page; or it can be pre-configured or obtained through other means without user configuration, as long as the same technical effect can be achieved.

[0257] As shown in FIG13 , based on the same inventive concept, an embodiment of the present application further provides a storage space allocation device. The solution provided by this device is similar to the solution described in the above method, and the technical effects achieved are the same, so a detailed description thereof will not be repeated here. This device 1300 includes:

[0258] The receiving module 1301 is configured to receive a configuration request, wherein the configuration request is used to request registration of an external storage of the server cluster into a storage space of the server cluster;

[0259] An acquisition module 1302 is configured to respond to the configuration request and acquire storage resources stored externally by the server cluster;

[0260] The processing module 1303 is configured to perform storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool, wherein storage resources of the storage pool are determined based on the storage resources of the external storage of the server cluster and the storage resources of the internal storage of the server cluster;

[0261] The allocation module 1304 is configured to allocate storage space using the storage pool upon receiving a storage space allocation request.

[0262] In one possible implementation, the processing module 1303 is specifically used to: expose the remaining available space of the server cluster's external storage and the remaining available space of the server cluster's internal storage as corresponding multiple block devices; map the multiple block devices into logical block devices; establish a file system on the logical block devices to obtain the storage pool.

[0263] In one possible implementation, the server cluster external storage includes a server cluster first external storage that directly exposes a block device; the server cluster internal storage includes a server cluster first internal storage that directly exposes a block device; the processing module 1303 is specifically used to scan the first block device corresponding to the remaining available space in the server cluster first external storage or the server cluster first internal storage, and establish a connection with the first block device.

[0264] In one possible implementation, the server cluster external storage includes a second external storage of the server cluster that does not directly expose block devices, and the server cluster internal storage includes a second internal storage of the server cluster that does not directly expose block devices; the processing module 1303 is specifically used to obtain the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk based on the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster; and associate the virtual disk with the block device in the server.

[0265] In one possible implementation, the allocation module 1304 is specifically used to receive a storage space allocation request sent by a computing node of the server cluster, the storage space allocation request including a temporary file size and a business function identifier; determine the storage space to be allocated based on the temporary file size; determine the temporary storage space from the storage pool based on the business function identifier and allocation policy, and allocate the temporary storage space to the computing node in the form of a virtual disk, wherein the temporary storage space is greater than or equal to the storage space to be allocated.

[0266] In one possible implementation, the allocation strategy includes a correspondence between the business function identifier and the configuration mode; the allocation module 1304 is specifically used to determine the configuration mode corresponding to the business function identifier; if the configuration mode corresponding to the business function identifier is thin provisioning, determine a first temporary storage space with a storage space larger than the storage pool from the storage pool, and allocate the first temporary storage space to the computing node after setting it to zero; if the configuration mode corresponding to the business function identifier is thick provisioning, determine a second temporary storage space with a storage space larger than the storage space to be allocated from the storage pool, and allocate the second temporary storage space to the computing node after setting it to zero; if the configuration mode corresponding to the business function identifier is delayed zeroing, determine a third temporary storage space storing data from the storage pool, and allocate the third temporary storage space to the computing node.

[0267] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the number of copies; the allocation module 1304 is specifically used to determine the size of the temporary storage space based on the storage space to be allocated and the number of copies corresponding to the business function identifier, and determine the temporary storage space from the storage pool based on the size of the temporary storage space, and the temporary storage space is used to store a target number of temporary files, where the target number is the number of copies corresponding to the business function identifier.

[0268] In a possible implementation, the device further includes an update module, which is used to obtain storage status change information of the server cluster external storage and the server cluster internal storage, and update the storage space of the storage pool according to the storage status change information.

[0269] In a possible implementation, the device further includes a release module, which is configured to receive a storage space release request sent by the computing node, release data in the virtual disk indicated by the storage space release request, and delete the virtual disk.

[0270] Figure 14 is a schematic diagram of the structure of a server provided in an embodiment of the present application. As shown in Figure 14, server 1400 includes: a processor 1401 and a memory 1402; wherein processor 1401 is in communication with memory 1402, and memory 1401 is used to store computer-executable instructions or code; processor 1401 is used to execute the computer-executable instructions or code stored in memory 1402, thereby implementing the technical solutions of the aforementioned method embodiments.

[0271] Optionally, the memory 1402 may be independent or integrated with the processor 1401. Optionally, when the memory 1402 is a device independent of the processor 1401, the server 1400 may further include a bus for connecting the above devices.

[0272] The server is used to execute the technical solution in the aforementioned method embodiment, and its implementation principle and technical effects are similar and will not be repeated here.

[0273] An embodiment of the present application further provides a processing chip, which is used to execute instructions or codes to implement the storage space allocation method described in any embodiment of the present application.

[0274] The present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments may be performed by computer instructions to instruct the relevant hardware. The program may be stored in the above computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The computer-readable storage medium may be the memory or memory of any of the above embodiments.

[0275] The computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard drive, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Furthermore, the computer-readable storage medium may include both an internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is about to be output.

[0276] The "first" and "second" (if any) in the names mentioned in the embodiments of this application are only used as name identifiers and do not mean the first or second in order.

[0277] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment or certain parts of the embodiments of the present application.

[0278] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those of ordinary skill in the art can understand and implement it without paying any creative work.

[0279] The above description is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application.

Claims

1. A method for allocating storage space, characterized in that: Applied to a server, the method includes: receiving a configuration request, wherein the configuration request is used to request registration of an external storage of the server cluster into a storage space of the server cluster; Responding to the configuration request, obtaining storage resources stored externally by the server cluster; Performing storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool, wherein storage resources of the storage pool are determined based on the storage resources of the external storage of the server cluster and the storage resources of the internal storage of the server cluster; When a storage space allocation request is received, the storage space is allocated using the storage pool.

2. The method according to claim 1, characterized in that The performing storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool includes: exposing the remaining available space of the external storage of the server cluster and the remaining available space of the internal storage of the server cluster as corresponding multiple block devices; Mapping the plurality of block devices into logical block devices; A file system is established on the logical block device to obtain the storage pool.

3. The method according to claim 2, characterized in that The server cluster external storage includes a server cluster first external storage that directly exposes a block device; the server cluster internal storage includes a server cluster first internal storage that directly exposes a block device; The process of exposing the remaining available space of the first external storage of the server cluster or the remaining available space of the first internal storage of the server cluster as a block device is as follows: Scan the first block device corresponding to the remaining available space in the first external storage of the server cluster or the first internal storage of the server cluster, and establish a connection with the first block device.

4. The method according to claim 2, characterized in that The server cluster external storage includes a server cluster second external storage that does not directly expose block devices, and the server cluster internal storage includes a server cluster second internal storage that does not directly expose block devices; The process of exposing the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster as a block device is as follows: Acquire the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk according to the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster; The virtual disk is associated with a block device in the server.

5. The method according to claim 1, wherein The step of allocating storage space by using the storage pool upon receiving a storage space allocation request includes: receiving a storage space allocation request sent by a computing node of the server cluster, wherein the storage space allocation request includes a temporary file size and a service function identifier; Determining the storage space to be allocated according to the size of the temporary file; According to the service function identifier and allocation policy, temporary storage space is determined from the storage pool, and the temporary storage space is allocated to the computing node in the form of a virtual disk, where the temporary storage space is greater than or equal to the storage space to be allocated.

6. The method according to claim 5, characterized in that The allocation strategy includes the correspondence between the service function identifier and the configuration mode; The determining, according to the service function identifier and the allocation policy, a temporary storage space from the storage pool and allocating the temporary storage space to the computing node includes: Determine the configuration mode corresponding to the business function identifier, If the configuration mode corresponding to the service function identifier is thin provisioning, determining a storage space from the storage pool that is larger than a first temporary storage space of the storage pool, and allocating the first temporary storage space to the computing node after zeroing the first temporary storage space; If the configuration mode corresponding to the service function identifier is thick provisioning, determining a second temporary storage space from the storage pool, the second temporary storage space having a storage space larger than the storage space to be allocated, and allocating the second temporary storage space to the computing node after zeroing the second temporary storage space; If the configuration mode corresponding to the service function identifier is delayed zeroing, a third temporary storage space storing data is determined from the storage pool, and the third temporary storage space is allocated to the computing node.

7. The method according to claim 5, characterized in that The allocation strategy includes a correspondence between the service function identifier and the number of copies; The determining of temporary storage space from the storage pool according to the service function identifier and the allocation policy includes: The size of the temporary storage space is determined according to the storage space to be allocated and the number of copies corresponding to the business function identifier, and the temporary storage space is determined from the storage pool according to the size of the temporary storage space. The temporary storage space is used to store a target number of temporary files, and the target number of copies is the number of copies corresponding to the business function identifier.

8. The method according to claim 1, characterized in that The method further comprises: A storage space release request sent by the computing node is received, data in the virtual disk indicated by the storage space release request is released, and the virtual disk is deleted.

9. The method according to claim 1, characterized in that The method further comprises: Acquire storage status change information of the server cluster external storage and the server cluster internal storage, and update the storage space of the storage pool according to the storage status change information.

10. A server, characterized in that: The server includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions; the at least one processor executes the computer program instructions so that the server performs the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Business scheduling method and device, and fusion equipment

    CN103024001A

  • Electric power enterprise storage resource management system

    CN106973119A

  • Data processing method and device, equipment and storage medium

    CN113590309A

  • Storage space distribution method and server

    CN118193478A

  • Storage space distribution method and server

    CN118193479A