Storage space allocation method and server
By integrating the external and internal storage space of the server cluster in the hyper-converged platform and dynamically allocating virtual disks, the problem of insufficient storage space is solved, and the success rate of task execution and the stability of the server cluster are improved.
Patent Information
- Application Number
- PCT/CN2024/129032
- 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
In a hyper-converged platform, if the storage device cannot provide sufficient storage space, business functions cannot be realized.
By receiving configuration requests, the server cluster's external storage is registered to the server cluster's storage space, internal and external storage space is integrated, temporary storage space is dynamically allocated, virtual disks are created using virtualization technology, and storage space is allocated and released based on business function identification and usage priority.
It improves the utilization efficiency of storage resources, avoids task execution failure caused by insufficient storage resources, enhances the stability and flexibility of server clusters, and reduces hardware upgrade costs.
Smart Images

Figure CN2024129032_02102025_PF_FP_ABST
Abstract
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 202410346857.2 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 function as a compute node to execute 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 cluster, enabling resource sharing and management.
[0005] In a hyperconverged platform, when using certain platform functions that involve file processing, the files involved need to be stored as temporary files for data reading, writing, and processing. For example, when implementing the remote virtual machine template import function on a hyperconverged platform, the uploaded virtual machine template file needs to be temporarily stored in storage space directly accessible to the host for subsequent data conversion. However, if the storage devices in the hyperconverged cluster lack sufficient storage space, the platform's functions cannot be implemented.
[0006] Summary of the Invention
[0007] In view of this, an embodiment of the present application provides a storage space allocation method and server, which aims to allocate storage space for temporary files and solve the problem of business functions being unable to be implemented due to temporary file storage failure.
[0008] In a first aspect, an embodiment of the present application provides a method for allocating storage space, applied to a server, the method comprising:
[0009] 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;
[0010] In response to the configuration request, register the server cluster external storage to the storage space of the server cluster to obtain a target storage space, wherein the target storage space includes the storage space of the server cluster internal storage and the storage space of the server cluster external storage;
[0011] When a storage space allocation request is received, the target storage space is used to allocate storage space.
[0012] In an embodiment of the present application, after receiving a configuration request, the server registers the server cluster external storage to the server cluster storage space according to the configuration request to obtain the target storage space, thereby expanding the storage space of the server cluster using the server cluster external storage. When the server receives a storage space allocation request, it uses the target storage space to provide corresponding storage space to store temporary files generated during the implementation of business functions. The method provided in the present application uses the server cluster external storage to expand the server cluster storage resources, and can call the server cluster internal storage and the server cluster external storage to provide storage space for computing nodes, effectively supporting the implementation of business functions, improving the success rate of task execution, and avoiding task execution failure due to insufficient storage resources.
[0013] In a possible implementation, registering the server cluster external storage with the storage space of the server cluster to obtain a target storage space includes:
[0014] In response to the configuration request, establishing a connection with the external storage of the server cluster;
[0015] After establishing the connection, verifying the authorization information stored externally in the server cluster;
[0016] After the verification is passed, the storage space stored externally by the server cluster and the storage space stored internally by the server cluster are integrated to obtain the target storage space.
[0017] In an embodiment of the present application, the target storage space of the server cluster is obtained by integrating the storage space of the server cluster's external storage with the storage space within the server cluster. Utilizing the capacity of the server cluster's external storage to expand the server cluster's overall storage capacity not only meets the ever-growing demand for data storage but also eliminates the need to upgrade the hardware of existing servers. Furthermore, integrating the server cluster's external storage with the server cluster's internal storage allows for more efficient utilization of storage resources and improved storage performance. Furthermore, compared to expanding capacity using the server cluster's internal storage, integrating the server cluster's external storage offers higher capacity and cost-effectiveness, thereby reducing the overall cost of the server cluster.
[0018] In a possible implementation, upon receiving the storage space allocation request, allocating the storage space using the target storage space includes:
[0019] Receiving a storage space allocation request sent by a computing node of the server cluster, the storage space allocation request including a size of space to be allocated and a service function identifier;
[0020] According to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier is determined from the target storage space, and the temporary storage space is allocated to the computing node.
[0021] In an embodiment of the present application, based on a storage space allocation request, the server can dynamically allocate storage space according to the actual needs of the computing node, thereby efficiently utilizing the target storage space and avoiding waste or insufficiency of resources. The storage space allocation request includes the size of the space to be allocated and the business function identifier. 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 quickly determines the temporary storage space based on the allocation strategy and allocates it to the computing node to ensure that the computing node can obtain the required storage resources in a timely manner. Based on the business function identifier in the storage space allocation request, the server can manage the storage space corresponding to different business functions. Through the business function identifier, the server can more effectively organize and manage the storage space to ensure data isolation and security between different business functions.
[0022] In a possible implementation, the allocation strategy includes a correspondence between a service function identifier and a storage space;
[0023] The determining, from the target storage space according to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier includes:
[0024] At least one storage space corresponding to the service function identifier is determined, and a storage space having a remaining storage space greater than or equal to the size of the space to be allocated is determined from the at least one storage space to provide the temporary storage space.
[0025] In this embodiment of the present application, based on the allocation strategy corresponding to the service function identifier and storage space, the server can more quickly determine temporary storage space. By pre-establishing this correspondence, it can quickly and accurately locate the storage space that meets the requirements, thereby improving allocation efficiency. Furthermore, the server selects the storage space to provide temporary storage space from the at least one storage space that has been screened out and has remaining storage space that meets the requirements, ensuring that the size of the temporary storage space provided meets the required space to be allocated.
[0026] In a possible implementation, the allocation strategy includes usage priorities of multiple storage spaces;
[0027] The determining, from the target storage space according to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier includes:
[0028] At least one storage space whose remaining storage space is greater than or equal to the size of the storage space to be allocated is determined, and according to the usage priority of each storage space, a storage space with the highest usage priority is determined from the at least one storage space to provide the temporary storage space.
[0029] In an embodiment of the present application, by setting the usage priority of different storage spaces, the server can give priority to using storage spaces with higher priorities to provide temporary storage space, so that computing nodes can give priority to using storage spaces with higher performance and greater reliability when implementing important business functions, thereby improving the overall performance and reliability of the server cluster. Different business functions may have different requirements for storage resources. By setting the usage priority of storage space, managers can flexibly adjust the allocation of storage space according to actual conditions to better meet the needs of different business functions, thereby improving the adaptability and flexibility of the server cluster. In addition, when determining the temporary storage space, the server combines the remaining storage space and usage priority of the storage space to select the most suitable storage space to provide temporary storage space for the computing node.
[0030] In a possible implementation, allocating the temporary storage space to the computing node includes:
[0031] A virtual disk corresponding to the temporary storage space is created through virtualization, and virtual disk information of the virtual disk is sent to the computing node.
[0032] In an embodiment of the present application, by virtualizing and creating a virtual disk corresponding to the temporary storage space, resource isolation can be effectively achieved, ensuring that the storage spaces of different computing nodes do not interfere with each other, thereby improving the security and stability of the system. In addition, virtualization technology allows temporary storage space to exist in the form of a virtual disk, which can achieve flexible allocation and management of storage space. At the same time, by sending the virtual disk information to the computing node, the storage space can be quickly configured and transplanted, thereby improving the flexibility and portability of the server cluster. In addition, the virtual disk does not require physical hardware support and can be allocated based on the existing storage space, which can reduce hardware costs.
[0033] In a possible implementation, the method further includes: acquiring storage status change information stored externally by the server cluster, and updating the target storage space according to the storage status change information.
[0034] In the embodiments of the present application, by acquiring storage status change information of the server cluster's external storage, the server can perceive in real time changes in the server cluster's external storage resources, such as the increase or decrease in remaining storage space, or failures in the server cluster's external storage. The server can respond promptly and update the target storage space, ensuring the real-time and accuracy of the storage space.
[0035] In a possible implementation, the method further includes: receiving a storage space release request, and releasing data in the virtual disk indicated by the storage space release request.
[0036] 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.
[0037] In a second aspect, an embodiment of the present application provides another method for allocating storage space, which is applied to a server. The method includes:
[0038] Receiving a storage space allocation request sent by a computing node in a server cluster, the storage space allocation request including the size of the space to be allocated and a service function identifier;
[0039] According to the size of the space to be allocated and the allocation strategy, the temporary storage space corresponding to the business function identifier is determined from the target storage space of the server cluster, and the temporary storage space is used to allocate storage space to the computing node. The allocation strategy includes the correspondence between the business function identifier and the storage space or the usage priority of the storage space. The target storage space includes the storage space stored externally by the server cluster and the storage space stored internally by the server cluster.
[0040] In this embodiment of the present application, the server receives storage space allocation requests from computing nodes and determines temporary storage space from the target storage space based on the size of the space to be allocated and the allocation policy. This allows for the allocation of storage space to different computing nodes based on actual needs, thus achieving the rational utilization and allocation of storage resources. The target storage space includes storage space external to the server cluster and storage space internal to the server cluster. The server utilizes the server cluster's external storage to expand the server cluster's storage space, thereby improving the stability of the server cluster.
[0041] In one possible implementation, the allocation strategy includes a correspondence between a business function identifier and a storage space, and determining, based on the size of the to-be-allocated space and the allocation strategy, the temporary storage space corresponding to the business function identifier from the target storage space of the server cluster includes:
[0042] At least one storage space corresponding to the service function identifier is determined, and a storage space having a remaining storage space greater than or equal to the size of the space to be allocated is determined from the at least one storage space to provide the temporary storage space.
[0043] In one possible implementation, the allocation strategy includes usage priorities of the multiple storage spaces, and determining the temporary storage space corresponding to the service function identifier from the target storage space of the server cluster according to the size of the to-be-allocated space and the allocation strategy includes:
[0044] At least one storage space whose remaining storage space is greater than or equal to the size of the storage space to be allocated is determined, and according to the usage priority of each storage space, a storage space with the highest usage priority is determined from the at least one storage space to provide the temporary storage space.
[0045] In a third aspect, an embodiment of the present application provides a storage space allocation device, comprising:
[0046] A first receiving module is configured to receive a configuration request, wherein the configuration request is used to request to register the external storage of the server cluster into the storage space of the server cluster;
[0047] a registration module, configured to respond to the configuration request, register the server cluster external storage with the storage space of the server cluster, and obtain a target storage space, wherein the target storage space includes the storage space of the server cluster internal storage and the storage space of the server cluster external storage;
[0048] The first allocation module is configured to allocate storage space using the target storage space when a storage space allocation request is received.
[0049] In one possible implementation, the registration module is specifically used to respond to the configuration request and establish a connection with the external storage of the server cluster; after the connection is established, verify the authorization information of the external storage of the server cluster; after the verification is passed, integrate the storage space of the external storage of the server cluster and the storage space of the internal storage of the server cluster to obtain the target storage space.
[0050] In one possible implementation, the first allocation module is specifically used to receive a storage space allocation request sent by a computing node of the server cluster, where the storage space allocation request includes the size of the space to be allocated and a business function identifier; based on the size of the space to be allocated and the allocation strategy, determine a temporary storage space corresponding to the business function identifier from the target storage space, and allocate the temporary storage space to the computing node.
[0051] In one possible implementation, the allocation strategy includes a correspondence between a business function identifier and a storage space; the first allocation module is specifically used to determine at least one storage space corresponding to the business function identifier, and to determine from the at least one storage space a storage space whose remaining storage space is greater than or equal to the size of the space to be allocated to provide the temporary storage space.
[0052] In one possible implementation, the allocation strategy includes usage priorities of multiple storage spaces; the first allocation module is specifically used to determine at least one storage space whose remaining storage space is greater than or equal to the size of the storage space to be allocated, and based on the usage priority of each storage space, determine the storage space with the highest usage priority from the at least one storage space to provide the temporary storage space.
[0053] In a possible implementation, the first allocation module is specifically configured to create a virtual disk corresponding to the temporary storage space through virtualization, and send virtual disk information of the virtual disk to the computing node.
[0054] In a possible implementation, the apparatus further includes an update module, configured to obtain storage status change information stored externally by the server cluster, and update the target storage space according to the storage status change information.
[0055] In a possible implementation, the apparatus further includes a release module, configured to receive a storage space release request and release data in the virtual disk indicated by the storage space release request.
[0056] In a fourth aspect, an embodiment of the present application provides another storage space allocation device, including:
[0057] A second receiving module is configured to receive a storage space allocation request sent by a computing node in the server cluster, wherein the storage space allocation request includes a size of the space to be allocated and a service function identifier;
[0058] The second allocation module is used to determine the temporary storage space corresponding to the business function identifier from the target storage space of the server cluster based on the size of the space to be allocated and the allocation strategy, and use the temporary storage space to allocate storage space to the computing node. The allocation strategy includes the correspondence between the business function identifier and the storage space or the usage priority of the storage space. The target storage space includes the storage space stored externally by the server cluster and the storage space stored internally by the server cluster.
[0059] In one possible implementation, the allocation strategy includes a correspondence between a business function identifier and storage information; the allocation module is specifically used to determine at least one piece of storage information corresponding to the business function identifier from the multiple pieces of storage information, and determine, from the at least one piece of storage information, storage information whose remaining storage space is greater than or equal to the size of the storage space as the target storage information.
[0060] In one possible implementation, the allocation strategy includes the new usage priorities of the multiple storages; the allocation module is specifically used to determine at least one storage information from the multiple storage information whose remaining storage space is greater than or equal to the size of the storage space, and based on the usage priorities of each storage information, determine the storage information with the highest usage priority from the at least one storage information as the target storage information.
[0061] In a fifth aspect, an embodiment of the present application provides a server, comprising a processor and a memory communicatively connected to the processor;
[0062] The memory is used to store computer-executable instructions;
[0063] 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 or the second aspect.
[0064] In the sixth 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 or the second aspect above.
[0065] In a seventh 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 or second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] 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.
[0067] FIG1 is a system architecture diagram of a server cluster provided in an embodiment of the present application;
[0068] FIG2 is a system architecture diagram of another server cluster provided in an embodiment of the present application;
[0069] FIG3 is a system architecture diagram of another server cluster provided in an embodiment of the present application;
[0070] FIG4 is a schematic diagram of a front-end management page provided in an embodiment of the present application;
[0071] FIG5 is a flow chart of a method for allocating storage space according to an embodiment of the present application;
[0072] FIG6 is a flow chart of another storage space allocation method provided in an embodiment of the present application;
[0073] FIG7 is a signaling diagram of a storage space allocation method provided in an embodiment of the present application;
[0074] FIG8 is a signaling diagram of a storage node registration process provided by an embodiment of the present application;
[0075] FIG9 is a schematic structural diagram of a storage space allocation device provided in an embodiment of the present application;
[0076] FIG10 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] 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.
[0078] A server cluster consists of multiple servers interconnected by an input / output system, such as a hyperconverged cluster. These servers work together to provide users with application and data resource services. Servers are connected via high-speed networks and managed using distributed resource management (Digital Rights Management) software. The multiple servers in a server cluster can be categorized by function into management servers (also known as management nodes), compute servers (also known as compute nodes), and storage servers (also known as storage nodes).
[0079] 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.
[0080] 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.
[0081] 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).
[0082] A SAN is a specialized high-speed network architecture used to connect storage devices, such as disk arrays, tape libraries, and other types of storage devices, as well as servers and computer systems. SANs are typically used to provide storage solutions that deliver high performance, reliability, and flexibility.
[0083] RBD is a storage service provided in the Ceph distributed storage system. 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.
[0084] A NAS is a device designed specifically for data storage and sharing. It provides file-level storage services over a network connection, such as Ethernet. A NAS is typically a standalone hardware device with one or more hard drives, a dedicated operating system, and a management interface. A NAS can connect to a local area network (LAN) or wireless local area network (WLAN), enabling multiple computers and other devices to share storage resources.
[0085] LOCAL refers to the physical hard drive or solid-state drive (SSD) directly connected to a computer or server, which is used to store the operating system, applications, files, and other data.
[0086] When computing nodes execute tasks, it is necessary to store some files or intermediate data (i.e., temporary files) related to the task execution in the storage node. If the storage node cannot provide sufficient space for the computing node, the task execution may fail due to the inability to store temporary files, and the corresponding business function cannot be provided to the user. In order to improve the success rate of task execution and improve the stability of business function implementation, an embodiment of the present application provides a storage space allocation method and server. The execution subject of this method can be a management node in a server cluster.
[0087] After receiving a configuration request, the management node can register the server cluster's external storage with the server cluster's storage space to obtain the target storage space, thereby expanding the server cluster's storage space. When the management node receives a storage space allocation request, it can use the expanded target storage space to provide temporary storage space to computing nodes that request it, thereby enabling computing nodes to store temporary files in the temporary storage space when implementing business functions. By registering the server's external storage with the server cluster's storage space, the server cluster's storage space size is increased, avoiding business function execution failures due to the server cluster's inability to provide sufficient temporary storage space, and improving the stability of the server cluster.
[0088] Below, the server cluster architecture provided in the embodiment of the present application is described with reference to the accompanying drawings.
[0089] An embodiment of the present application provides a server cluster, as shown in Figure 1, which is a system architecture diagram of a server cluster provided by an embodiment of the present application. The server cluster includes a management node, at least two computing nodes, and multiple internal storages such as SAN, RBD, LOCAL, and NAS (internal storage is a storage node inside the server cluster, also known as server cluster internal storage). The management node in the server cluster is connected to at least one external storage (external storage is a storage node outside the server cluster, also known as server cluster external storage) via a network protocol.
[0090] 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, verification, etc., and is used to receive storage space allocation requests from each computing node, and distribute, monitor and release temporary storage space according to the storage space allocation request. The management node is also used to assign tasks corresponding to business functions to computing nodes. Temporary storage space is used to store temporary files involved in the execution of tasks by computing nodes. Temporary storage space is hereinafter referred to as storage space.
[0091] 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 internal storage or external storage to perform tasks corresponding to business functions and provide corresponding business functions for users.
[0092] Internal storage refers to storage nodes within a server cluster, typically located on the same local area network (LAN) as compute and management nodes. Internal storage provides high-speed data access and transmission, allowing compute nodes to access data directly through network protocols such as NFS, SMB, and CIFS.
[0093] External storage refers to storage nodes located outside the server cluster, typically communicating with the cluster's management and compute nodes via a high-speed network connection (such as Fibre Channel or Ethernet). External storage can provide greater storage capacity and higher performance. Embodiments of this application expand the overall storage capacity of the server cluster by expanding storage nodes outside the server cluster, thereby providing more storage space for the compute nodes and preventing compute node task failures due to insufficient storage space.
[0094] The embodiment of the present application further provides another server cluster, as shown in FIG2 , which is a system architecture diagram of another server cluster provided by the embodiment of the present application. The computing node runs the node agent of the storage space management and distribution system. When the computing node performs a task corresponding to a business function, the computing node can apply for storage space from the management node through the node agent, and 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 to perform tasks and realize business functions.
[0095] In one possible implementation, as shown in Figure 3, 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 3 includes internal storage and external storage.
[0096] After users configure internal storage through the front-end management page, the platform storage space registration module registers the configured internal storage. If external storage is needed to expand the server cluster's storage, users can also configure external storage through the front-end management page. The platform storage space registration module also registers the configured external storage, treating it as a storage node. The platform storage space registration module is used to register external storage with the server cluster's storage space, obtaining the corresponding target storage space.
[0097] A server cluster may include multiple computing nodes and multiple storage nodes, and each computing node may be able to communicate with some storage nodes over the network. That is, the computing node is not able to access all storage nodes through the network, and the storage node is also unable to communicate with all computing nodes over the network. In an embodiment of the present application, the platform storage space registration module is also used to verify the network connectivity between the storage node and the computing node. As an implementation method, the platform storage space registration module verifies the network connectivity between each storage node and other computing nodes, determines the computing nodes that can communicate with the storage node over the network, and obtains a list of computing nodes corresponding to the storage node. As another implementation method, the platform storage space registration module verifies the network connectivity between each computing node and each storage node, determines the storage nodes that the computing node can access over the network, and obtains a list of storage nodes corresponding to the computing node.
[0098] The platform storage space management module is used to manage the distributed storage space in the storage nodes and periodically scan the free storage space and health status of each storage node to provide guarantees for the implementation of business functions.
[0099] The platform storage space distribution module is used to receive a storage space allocation request sent by a computing node, and select a storage node to provide storage space according to the storage space allocation request and information configured by the user.
[0100] In an embodiment of the present application, the platform storage space distribution module can create a virtual disk on a selected storage node through virtualization, expose the virtual disk to the compute node via a network protocol that can perform read and write operations, and return virtual disk information (such as address and read and write access path) to the compute node storage space management module on the compute node. The space on the virtual disk is the storage space, which can store relevant temporary files used to implement business functions.
[0101] 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).
[0102] 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 size of temporary files and the business function when the compute node executes a task corresponding to a business function. The storage space allocation request may include the size of the space to be allocated and the business function identifier, which is used to indicate a unique business function.
[0103] In one possible implementation, after receiving a storage space allocation request, the platform storage space distribution module can determine at least one corresponding storage node based on the business function identifier, and use the platform storage space management module to scan the size of the remaining storage space in these storage nodes, and determine whether the size of the remaining storage space in each storage node is greater than or equal to the size of the space to be allocated, and then determine the storage node used to provide storage space from the storage nodes whose free storage space size is greater than or equal to the size of the space to be allocated based on the usage priority of each storage node, and create a virtual disk in the storage node.
[0104] 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.
[0105] The computing node storage space adaptation module is used to receive the relevant information of the storage space distributed by the platform storage space distribution module, and to establish a connection between the computing node and the storage node providing the storage space.
[0106] In an embodiment of the present application, the platform storage space distribution module provides the computing node storage space adapter module with relevant information of the storage space in the form of a virtual disk, and the relevant information of the storage space is relevant information of the virtual disk. After the computing node storage space adapter module establishes a connection between the computing node and the virtual disk based on the relevant information, it 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.
[0107] Through the storage space management and distribution system run by the server cluster and management node provided by the embodiment of the present application, users can configure the storage nodes according to their own needs through the front-end management page, such as the correspondence between business functions and storage nodes, the priority of storage nodes, and the list of available computing nodes corresponding to storage nodes. The management node can register internal storage and external storage, and use external storage to expand the storage resources of the server cluster. When a user calls a certain business function, the computing node that performs the task corresponding to the business function can send a request to the management node to apply for storage space. The management node can use external storage and internal storage to distribute storage space 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 each storage node 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.
[0108] Through the above process, the management node leverages external storage to expand the server cluster's storage resources and can call upon internal or external storage to provide storage space for temporary files. This effectively supports the implementation of business functions, improves the success rate of task execution, and avoids task failures due to insufficient storage resources. Furthermore, users can configure storage nodes based on their needs through the front-end management page, and the management node can allocate storage space based on user configuration, increasing the flexibility of the server cluster.
[0109] In one possible implementation, as shown in FIG4 , FIG4 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 on the electronic device used by the user. The user can manage and configure allocation policies through the front-end management page. The allocation policies may include the correspondence between business functions and storage nodes, the usage priority of multiple storage nodes, or the correspondence between storage nodes and computing nodes.
[0110] In an embodiment of the present application, a server cluster can provide at least one business function and includes at least two storage nodes. Users can configure the mapping between business functions and storage nodes through the front-end management page, specifically, the storage nodes that can store temporary files used by compute nodes during the execution of tasks corresponding to the business function. Each business function can correspond to one storage node, or multiple storage nodes.
[0111] When a user invokes a service function, the management node receives a storage space allocation request from the compute node executing the corresponding task. Based on the preconfigured mapping between service functions and storage nodes, the management node selects one or more storage nodes corresponding to the service function to provide storage space for the compute node. In other words, the storage node corresponding to the service function provides storage space for the compute node while the compute node executes the task.
[0112] Because computing nodes have different requirements for storing or reading and writing temporary files when implementing different business functions, for example, the implementation of the remote virtual machine template import function requires a high level of available capacity on the storage node. Therefore, the computing node needs to temporarily store the virtual machine template files uploaded by the user (in this case, the virtual machine template files are temporary files) in a storage node that can provide a large amount of storage space. The implementation of the virtual machine hibernation function requires high reliability and read / write speeds on the storage node. Therefore, the computing node needs to store the relevant temporary files in a storage node with high read / write performance and reliability. By configuring the corresponding relationship between business functions and storage nodes, more suitable storage nodes can be provided for computing node implementation, thereby improving the stability and efficiency of business function implementation.
[0113] In an embodiment of the present application, there may be differences in the read and write speeds and storage space between different storage nodes. The user can configure the usage priority of the storage node based on the read and write speed and storage space. The usage priority is used to indicate the priority of using the storage node to provide storage space. For example, a storage node with a fast read and write speed and a large storage space has a high usage priority, while a storage node with a slow read and write speed and a small storage space has a low usage priority. Of course, it is also possible to configure a storage node with a fast read and write speed and a large storage space to have a low usage priority, while a storage node with a slow read and write speed and a small storage space has a high usage priority.
[0114] Users can also configure the usage priority of storage nodes according to their own usage habits. For example, if a user is accustomed to storing their own business data in the SAN, to avoid storing temporary files in the SAN and occupying space, which affects the storage of their own business data, the SAN usage priority can be set to the lowest, and RBD, LOCAL, and NAS can be used first to provide temporary storage space.
[0115] Users can also configure the usage priority of multiple storage nodes according to other needs, which is not specifically limited in the embodiments of the present application. However, the embodiments of the present application can provide users with more flexible services, stronger configurability of server clusters and storage nodes, and improved user experience.
[0116] Furthermore, in embodiments of the present application, after configuring the correspondence between business functions and storage nodes, if a business function corresponds to at least two storage nodes, the user can also configure the usage priority of the at least two storage nodes. When a computing node executes a task corresponding to the business function, upon receiving a storage space allocation request, the computing node can determine the storage node to provide storage space from the at least two corresponding storage nodes based on the user-configured usage priority, further providing the user with more flexible configuration options.
[0117] Different business functions can correspond to the same storage node. For example, business function A corresponds to storage node SAN and storage node RBD, and business function B also corresponds to storage node SAN and storage node RBD. However, the usage priority of SAN and RBD may be different for business function A and business function B. For example, when executing tasks corresponding to business function A, the usage priority of SAN is higher than the usage priority of RBD. When executing tasks corresponding to business function B, the usage priority of RBD is higher than the usage priority of SAN. Therefore, configuring usage priority for the storage nodes corresponding to each business function can provide storage space for different business functions by using more suitable storage nodes in a targeted manner, thereby improving the flexibility of the server cluster.
[0118] In the previous embodiment, users can configure the usage priority of the storage nodes corresponding to each business function. Users can also simultaneously configure the correspondence between business functions and storage nodes, as well as the usage priority of all storage nodes. When a compute node executes a task corresponding to a business function, the management node, upon receiving a storage space allocation request, can determine the storage node corresponding to the business function and, based on the usage priorities of all storage nodes, select the storage node with the highest usage priority corresponding to the business function as the storage node to provide storage space.
[0119] For example, the SAN usage priority is higher than the RBD usage priority, which is higher than the LOCAL usage priority, which is higher than the NAS usage priority. The storage nodes corresponding to both business functions A and B are SAN and RBD. When the compute node performs tasks corresponding to business function A, the management node can use the SAN as the storage node to provide storage space after receiving a storage space allocation request. When the compute node performs tasks corresponding to business function B, the management node can also use the SAN as the storage node to provide storage space after receiving a storage space allocation request.
[0120] In an embodiment of the present application, a user can configure a list of computing nodes that can access a certain storage node, that is, a list of computing nodes corresponding to a storage node, where the list of computing nodes includes at least one computing node that can access the storage node. Alternatively, a user can configure a list of storage nodes corresponding to a computing node, where the list of storage nodes includes at least one storage node that the computing node can access. By configuring either the computing node list or the storage node list, the access rights of the computing node to the storage node can be clarified, and the corresponding relationship between the storage node and the computing node can be determined.
[0121] For example, a server cluster includes SAN, RBD, LOCAL, and NAS, as well as compute nodes 1, 2, and 3. The compute node list for SAN includes compute nodes 1 and 2, the compute node list for RBD includes compute nodes 1 and 3, the compute node list for LOCAL includes compute nodes 1, 2, and 3, and the compute node list for NAS includes compute nodes 2 and 3.
[0122] When compute node 1 performs tasks corresponding to the business function, the management node, upon receiving a storage space allocation request, can select SAN, RBD, or LOCAL as the storage node to provide storage space. When compute node 2 performs tasks corresponding to the business function, the management node, upon receiving a storage space allocation request, can select SAN, LOCAL, or NAS as the storage node to provide storage space. When compute node 3 performs tasks corresponding to the business function, the management node, upon receiving a storage space allocation request, can select RBD, LOCAL, or NAS as the storage node to provide storage space.
[0123] By configuring a list of compute nodes that can access a storage node, you can configure the access permissions of each compute node to the storage node, thereby improving storage node access security.
[0124] It is understandable that the user can simultaneously configure the correspondence between business functions and storage nodes, the usage priorities of multiple storage nodes, and the list of computing nodes corresponding to the storage nodes.
[0125] When the management node receives a storage space allocation request, it determines the storage nodes accessible to the compute node that sent the request and the storage nodes corresponding to the business function to be implemented. It then selects the storage nodes accessible to the compute node and corresponding to the business function. Based on the pre-configured usage priority, the management node with the highest usage priority is selected from the storage nodes accessible to the compute node and corresponding to the business function to provide temporary storage space for the compute node.
[0126] 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.
[0127] In a possible implementation, the storage space allocation method provided in the embodiment of the present application is shown in FIG5 .
[0128] S501: The user terminal sends a service function call request to the management node.
[0129] The user terminal is used to display the front-end management page shown in Figure 4 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.
[0130] S502: The management node assigns tasks corresponding to the business functions to the computing nodes.
[0131] 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 identifier to the computing node, and the computing node executes the task to realize the service function.
[0132] In an embodiment of the present application, the management node can determine the computing node that is most suitable for executing the task based on factors such as the load and available resources of each computing node to improve the execution efficiency of the task.
[0133] S503: The computing node executes the task and sends a storage space allocation request to the management node.
[0134] The storage space allocation request is used to request storage space from the management node. The storage space allocation request includes the size of the space to be allocated and the service function identifier.
[0135] The size of the unallocated space refers to the amount of temporary storage space that the compute node requests from the management node. Temporary storage space is used to store temporary files used by the compute node during task execution. Temporary files refer to temporary files or data generated during task execution, or files required for business functions. Temporary files include intermediate results during task execution, temporary calculation data, or other data that requires temporary storage. The size of the unallocated space is determined by the size of the temporary files and must be at least as large as the temporary files.
[0136] 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.
[0137] When a computing node is executing a task, it sends a storage space allocation request to the management node to obtain the required temporary storage space, and then uses the storage space to execute the task and realize the business function.
[0138] S504: The management node allocates storage space to the computing node according to the storage space allocation request, and feeds back storage space information to the computing node.
[0139] Based on the size of the space to be allocated, the management node can determine the size of the storage space that needs to be allocated for the computing node. The size of the allocated storage space should be greater than or equal to the size of the space to be allocated to support the computing node to completely store temporary files in the storage space and avoid temporary file storage failure due to insufficient storage space.
[0140] The management node can determine the corresponding unique business function based on the business function identifier, and then determine the storage node to provide storage space based on pre-configured correspondences. The pre-configured correspondences can be the correspondences between business functions and storage nodes, and the correspondences between storage nodes and compute nodes described above.
[0141] In an embodiment of the present application, the management node may also determine the storage node for providing storage space in combination with the usage priority of the pre-configured storage nodes. For specific implementation, please refer to the above or below introduction.
[0142] S505: The computing node uses the storage space to execute tasks corresponding to the business functions.
[0143] 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.
[0144] Through the above method, storage nodes can be used to allocate storage space for computing nodes to store temporary files during the execution of tasks by computing nodes. In addition, the above method can flexibly select matching storage nodes to provide storage space for computing nodes in combination with the different business functions to be implemented and the size of temporary files. When the remaining storage space of a certain storage node is insufficient, other corresponding storage nodes can be selected to provide storage space to avoid task execution failure due to insufficient storage space. In addition, the above storage nodes include both internal storage and external storage. The embodiment of the present application uses external storage to expand the overall storage resources of the server cluster and further increase storage nodes to provide more sufficient storage space for computing nodes.
[0145] In a possible implementation, as shown in FIG6 , based on steps S501 to S505 , the storage space allocation method further includes:
[0146] S506: After completing the task, the computing node sends a storage space release request to the management node.
[0147] 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.
[0148] S507: The management node releases the storage space according to the storage space release request.
[0149] When receiving a storage space release request from a computing node, the management node will release the data in the storage space allocated to the computing node accordingly, and put the released storage space back into the available storage resource pool so that it can be allocated and used again in the future.
[0150] S508: The computing node returns the task execution result to the user end.
[0151] 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.
[0152] S509: The user terminal receives the execution result and performs subsequent operations according to business requirements.
[0153] After receiving the task execution results returned by the computing node, the client performs 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.
[0154] Steps S506-S509 are the subsequent steps in the storage space allocation process, including the release of storage space and the return of task execution results. These steps S501-S509 together constitute a complete business function execution process, involving multiple steps such as user request, task allocation, storage space allocation, task processing, and result return. In actual scenarios, other operational and management tasks may also be involved, such as monitoring, logging, and exception handling.
[0155] The following further illustrates the above storage space allocation process in conjunction with FIG. 7 , 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.
[0156] As shown in FIG7 , FIG7 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:
[0157] S701: The user terminal sends a service function call request to the management node.
[0158] S702: The management node assigns tasks corresponding to the business functions to the computing nodes.
[0159] S703: The computing node executes the task and sends a storage space allocation request to the management node through the node agent.
[0160] For steps S701 - S703 , reference may be made to the description of steps S501 - S503 .
[0161] S704: The management node determines a storage node according to the storage space allocation request.
[0162] After receiving the storage space allocation request, the management node determines, based on the correspondence between the computing nodes and the storage nodes, at least one storage node that the computing node can access through the network, thereby obtaining a first storage node set (the first storage node set includes at least one storage node that the computing node can access through the network). Based on the service function identifier, the management node determines at least one storage node corresponding to the service function, thereby obtaining a second storage node set (the second storage node set includes at least one storage node corresponding to the service function).
[0163] The management node determines at least one storage node that exists in both the first storage node set and the second storage node set to obtain 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).
[0164] The management node determines, through the platform storage space management module, at least one storage node in the third storage node set whose remaining storage space size is greater than the size of the space to be allocated, and obtains a fourth storage node set (the fourth storage node set includes at least one storage node whose remaining storage space size is greater than the size of the space to be allocated).
[0165] If the fourth storage node set includes one storage node, the storage node is used as the storage node for providing storage space.
[0166] If the fourth storage node set includes at least two storage nodes, based on the usage priorities of the storage nodes, a storage node with the highest usage priority among the at least two storage nodes is used as the storage node for providing storage space.
[0167] The usage priority indicates the priority of using the storage node. In the embodiment of the present application, a higher usage priority means a higher priority for using the storage node. Therefore, the storage node with the highest priority will be used as the storage node for providing storage space. Of course, in another implementation, a lower usage priority may also mean a higher priority for using the storage node. In this case, the storage node with the lowest priority will be used as the storage node for providing storage space.
[0168] S705: The management node creates a virtual disk in the storage node.
[0169] After determining the storage node for providing the storage space in step S704, the management node establishes a connection with the storage node through the network and creates a virtual disk in the storage node using virtualization technology.
[0170] A virtual disk is a logical storage unit that corresponds to a portion of storage space allocated on a storage node (i.e., storage space). 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.
[0171] S706: The management node sends the virtual disk information to the node agent in the computing node.
[0172] The virtual disk information may include an identifier and a storage location. The identifier is used to indicate a unique virtual disk, and the storage location is the specific storage location of the virtual disk on the storage node. The storage location may be the physical address of the storage node or other location identifier.
[0173] 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.
[0174] S707: The computing node establishes a network connection with the storage node according to the virtual disk information.
[0175] S708: 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.
[0176] 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 temporary file storage on the virtual disk. Common file systems include Ext4, NTFS, and XFS. A directory on the compute node is selected as a mount point, and the created file system is mounted 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.
[0177] S709: The computing node determines the mount point of the file system.
[0178] S710: The computing node executes the task.
[0179] 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.
[0180] S711: After the computing node completes the task, the node mounts the file system on its behalf.
[0181] 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.
[0182] 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.
[0183] S712: The computing node sends a storage space release request to the management node through the node agent.
[0184] 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.
[0185] The storage space release request may include the identifier and storage location of the virtual disk, which are the same as those in step S706.
[0186] S713: The management node releases the storage space according to the storage space release request.
[0187] 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.
[0188] S714: The management node deletes the virtual disk.
[0189] 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.
[0190] 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.
[0191] Through step S713 and step S714, 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.
[0192] S715: The computing node returns the task execution result to the user end.
[0193] 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.
[0194] During the implementation of the business functions shown in Figure 7, 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 needs of different tasks for temporary storage space. 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.
[0195] 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.
[0196] In addition, the task execution results are displayed to users through the user end, so that users can 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.
[0197] Based on the above embodiment, the embodiment of the present application further provides a signaling diagram of the process of registering a storage node. As shown in Figure 8, the process of registering a storage node can be:
[0198] S801: The user terminal sends a configuration request to the management node.
[0199] The configuration request is used to request the management node to configure at least one of the following: the mapping between business functions and storage nodes, the usage priority of multiple storage nodes, and the mapping between storage nodes and compute nodes. The configuration request is also used to request the management node to register external storage with the storage space of the server cluster. The configuration request is also used to request the management node to register internal storage with the storage space of the server cluster. The configuration request includes the content configured by the user through the front-end management page.
[0200] The client displays a front-end management page to the user, where they can configure the mapping between business functions and storage nodes, configure the usage priorities of multiple storage nodes, and configure the mapping between storage nodes and compute nodes. Figure 4 shows the front-end management page.
[0201] The front-end management page provides users with an intuitive and friendly configuration interface, allowing users to easily make relevant configuration settings, improve user work efficiency, reduce the complexity of configuration operations, and enhance the overall user experience.
[0202] By sending configuration requests from the user end to the management node, accurate transmission and synchronous updates of user configuration content are achieved. This ensures that the management node can schedule each storage node based on the latest configuration when running the storage space management and distribution system.
[0203] S802: The management node registers the storage node according to the configuration request.
[0204] In one possible implementation, a configuration request is used to request the management node to register an external storage node with the storage space of the server cluster. Since the internal storage is a storage node within the server cluster, in some application scenarios, the internal storage has been registered with the storage space of the server cluster. Therefore, the management node can register the external storage with the storage space of the server cluster according to the configuration request. The management node responds to the configuration request by registering the external storage with the storage space of the server cluster, and together with the storage space of the internal storage that has been registered with the storage space of the server cluster, they form the target storage space of the server cluster. The target storage space can include the storage space of the internal storage and the storage space of the external storage. As an example, the target storage space can be an entire storage pool or a storage structure composed of multiple storage spaces.
[0205] In one possible implementation, the external storage registration process can be as follows: Since the external storage is deployed outside the server cluster, the management node must first establish a network connection with the external storage. After the connection is established, the management node can verify the authorization information of the external storage to ensure that only authorized external storage can be registered with the server cluster. After verification and authorization are complete, the management node can integrate the storage space of the external storage with the storage space of the internal storage to obtain the target storage space, thereby registering the external storage with the server cluster. After successful registration, the external storage becomes part of the server cluster's storage space and can be accessed and used as a storage node by compute nodes and management nodes.
[0206] In one possible implementation, the registration process for internal storage can be as follows: the management node automatically discovers available internal storage within the server cluster through network protocols (such as SNMP, SMIS, etc.). These protocols can help the management node identify key information such as the type, capacity, and performance of the storage node. After discovering the internal storage, the management node will configure and initialize the internal storage, such as setting the access rights, data protection policy, backup policy, etc. of the storage node. When the configuration and initialization are completed, the management node can add the internal storage information (such as IP address, port number, and authentication credentials, etc.) to the configuration file of the server cluster, and then register the internal storage with the server cluster. After successful registration, the management node can also monitor the operating status and performance indicators of the internal storage.
[0207] The management node responds to configuration requests and registers internal and external storage. It also stores the mapping between business functions and storage nodes, the usage priority of each storage node, and the mapping between storage nodes and compute nodes.
[0208] It's important to note that, whether targeting internal or external storage, the management node must ensure data security, integrity, and availability during the registration process. Furthermore, the management node manages and optimizes storage nodes based on the needs and performance requirements of the server cluster, improving the overall performance and stability of the server cluster, providing more stable storage space for compute nodes, and increasing the success rate of business functions.
[0209] S803: The management node returns the configuration result to the user terminal.
[0210] After the management node successfully configures the internal storage and external storage, it can return a configuration result indicating a successful registration to the user terminal. If the configuration fails, the management node returns a configuration result indicating a failed registration to the user terminal.
[0211] S804: The user terminal displays the configuration result to the user.
[0212] Through steps S801-S804, the management node can flexibly adjust and manage the storage nodes according to the configuration request, and use external storage to expand the storage resources of the server cluster, so that the storage nodes can provide more sufficient storage space for the computing nodes, avoiding the failure of the computing nodes to perform tasks due to insufficient storage space, and improving the stability of business function implementation.
[0213] It should be noted that the correspondence between the above-mentioned business functions and storage nodes, the usage priority of multiple storage nodes, and the correspondence between storage nodes and computing nodes can be configured by the user through the front-end management page; or they can be pre-configured or obtained through other means without user configuration, as long as the same technical effect can be achieved.
[0214] Based on the above embodiment, the present application also provides a storage space allocation device, as shown in FIG9 , the device 900 includes:
[0215] A first receiving module 901 is configured to receive a configuration request, wherein the configuration request is configured to request registration of an external storage of a server cluster into a storage space of the server cluster;
[0216] A registration module 902 is configured to register the server cluster external storage with the server cluster storage space in response to the configuration request, thereby obtaining a target storage space, wherein the target storage space includes the storage space of the server cluster internal storage and the storage space of the server cluster external storage;
[0217] The first allocation module 903 is configured to allocate storage space using the target storage space when a storage space allocation request is received.
[0218] In one possible implementation, the registration module 901 is specifically used to respond to the configuration request and establish a connection with the external storage of the server cluster; after the connection is established, verify the authorization information of the external storage of the server cluster; after the verification is passed, integrate the storage space of the external storage of the server cluster and the storage space of the internal storage of the server cluster to obtain the target storage space.
[0219] In one possible implementation, the first allocation module 903 is specifically used to receive a storage space allocation request sent by a computing node of the server cluster, where the storage space allocation request includes the size of the space to be allocated and a business function identifier; based on the size of the space to be allocated and the allocation strategy, determine a temporary storage space corresponding to the business function identifier from the target storage space, and allocate the temporary storage space to the computing node.
[0220] In one possible implementation, the allocation strategy includes a correspondence between a business function identifier and a storage space; the first allocation module 903 is specifically used to determine at least one storage space corresponding to the business function identifier, and to determine from the at least one storage space a storage space whose remaining storage space is greater than or equal to the size of the space to be allocated to provide the temporary storage space.
[0221] In one possible implementation, the allocation strategy includes usage priorities of multiple storage spaces; the first allocation module 903 is specifically used to determine at least one storage space whose remaining storage space is greater than or equal to the size of the storage space to be allocated, and based on the usage priority of each storage space, determine the storage space with the highest usage priority from the at least one storage space to provide the temporary storage space.
[0222] In a possible implementation, the first allocation module 903 is specifically configured to create a virtual disk corresponding to the temporary storage space through virtualization, and send virtual disk information of the virtual disk to the computing node.
[0223] In a possible implementation, the apparatus 900 further includes an update module, which is configured to obtain storage status change information stored externally by the server cluster and update the target storage space according to the storage status change information.
[0224] In a possible implementation, the apparatus 900 further includes a release module, which is configured to receive a storage space release request and release data in the virtual disk indicated by the storage space release request.
[0225] Figure 10 is a schematic diagram of the structure of a server provided in an embodiment of the present application. As shown in Figure 10, the server 1000 includes: a processor 1001 and a memory 1002; wherein the processor 1001 is in communication with the memory 1002, and the memory 1001 is used to store computer-executable instructions or code; the processor 1001 is used to execute the computer-executable instructions or code stored in the memory 1002, thereby implementing the technical solutions of the aforementioned method embodiments.
[0226] Optionally, the memory 1002 may be independent or integrated with the processor 1001. Optionally, when the memory 1002 is a device independent of the processor 1001, the server 1000 may further include a bus for connecting the above devices.
[0227] The server is used to execute the technical solution in the aforementioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0228] 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.
[0229] 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.
[0230] 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.
[0231] 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.
[0232] 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.
[0233] 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.
[0234] 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; In response to the configuration request, register the server cluster external storage to the storage space of the server cluster to obtain a target storage space, wherein the target storage space includes the storage space of the server cluster internal storage and the storage space of the server cluster external storage; When a storage space allocation request is received, the target storage space is used to allocate storage space.
2. The method according to claim 1, characterized in that The step of responding to the configuration request and registering the server cluster external storage with the storage space of the server cluster to obtain a target storage space includes: In response to the configuration request, establishing a connection with the external storage of the server cluster; After establishing the connection, verifying the authorization information stored externally in the server cluster; After the verification is passed, the storage space stored externally by the server cluster and the storage space stored internally by the server cluster are integrated to obtain the target storage space.
3. The method according to claim 1, characterized in that The step of allocating storage space using the target storage space upon receiving the storage space allocation request includes: Receiving a storage space allocation request sent by a computing node of the server cluster, the storage space allocation request including a size of space to be allocated and a service function identifier; According to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier is determined from the target storage space, and the temporary storage space is allocated to the computing node.
4. The method according to claim 3, characterized in that The allocation strategy includes a correspondence between business function identifiers and storage spaces; The determining, from the target storage space according to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier includes: At least one storage space corresponding to the service function identifier is determined, and a storage space having a remaining storage space greater than or equal to the size of the space to be allocated is determined from the at least one storage space to provide the temporary storage space.
5. The method according to claim 3 or 4, characterized in that The allocation strategy includes usage priorities of multiple storage spaces; The determining, from the target storage space according to the size of the space to be allocated and the allocation strategy, a temporary storage space corresponding to the service function identifier includes: At least one storage space whose remaining storage space is greater than or equal to the size of the storage space to be allocated is determined, and according to the usage priority of each storage space, a storage space with the highest usage priority is determined from the at least one storage space to provide the temporary storage space.
6. The method according to claim 3, characterized in that Allocating the temporary storage space to the computing node includes: A virtual disk corresponding to the temporary storage space is created through virtualization, and virtual disk information of the virtual disk is sent to the computing node.
7. The method according to claim 1, characterized in that The method further comprises: Acquire storage status change information of the external storage of the server cluster, and update the target storage space according to the storage status change information.
8. The method according to claim 1, characterized in that The method further comprises: A storage space release request is received, and data in the virtual disk indicated by the storage space release request is released.
9. A method for allocating storage space, characterized in that: Applied to a server, the method includes: Receiving a storage space allocation request sent by a computing node in a server cluster, the storage space allocation request including the size of the space to be allocated and a service function identifier; According to the size of the space to be allocated and the allocation strategy, the temporary storage space corresponding to the business function identifier is determined from the target storage space of the server cluster, and the temporary storage space is used to allocate storage space to the computing node. The allocation strategy includes the correspondence between the business function identifier and the storage space or the usage priority of the storage space. The target storage space includes the storage space stored externally by the server cluster and the storage space stored internally by the server cluster.
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 executes the method according to any one of claims 1 to 8, or executes the method according to any one of claim 9.
Citation Information
Patent Citations
Method and equipment for allocating resources
CN101599978A
Hyper-converged system and longitudinal extension method thereof
CN105892952A
Virtual cluster automatic expansion method under cloud computing environment
CN107734035A
Storage resource allocation method and device, storage medium and electronic device
CN115826845A
Storage space distribution method and server
CN118193478A
Cited By
Storage space processing method and device
CN121143734A