A method for allocating storage space and a server
By pooling the remaining space of external and internal storage of the server cluster in the hyperconverged platform to form a storage pool, and dynamically allocating storage space, the problem that different types of storage cannot jointly provide temporary file storage is solved, thereby improving the utilization rate of storage resources and the stability of business functions.
Patent Information
- Application Number
- CN202410346841.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-03-25
AI Technical Summary
Existing technologies cannot effectively utilize various types of backend storage to provide sufficient temporary file storage space for the host, resulting in the inability to realize the business functions of the hyperconverged platform.
By pooling the remaining available space in the external and internal storage of the server cluster to form a storage pool, and dynamically allocating storage space according to business needs, the computing nodes can store temporary files.
It improves the utilization efficiency of storage resources, ensures the stability and reliability of business functions, and avoids functional failures due to insufficient storage space.
Smart Images

Figure CN118193478B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a method for allocating storage space and a server. Background Technology
[0002] With the rapid development of computing, storage, and networking technologies, hyperconvergence technology has emerged. Hyperconvergence is an infrastructure technology that integrates computing, storage, and networking functions into a single unit. It uses a software-defined approach to integrate computing and storage resources, providing them to applications through virtualization technology.
[0003] A hyperconverged cluster is a cluster of multiple servers and storage units. Each server integrates computing, storage, and networking functions, and can act as a host to perform tasks and implement the relevant business functions of the hyperconverged platform. A hyperconverged infrastructure (HCI) platform is a software platform based on hyperconverged clusters, representing a holistic solution built upon hyperconverged technology. By using virtualization and management software, the hyperconverged platform organizes the computing and storage resources within the hyperconverged cluster, enabling resource sharing and management.
[0004] In a hyperconverged platform, when users utilize platform business functions involving file processing, the host needs to store the relevant files as temporary files for data reading, writing, and processing. For example, in the implementation of the remote virtual machine template import function of the hyperconverged platform, the host needs to temporarily store the virtual machine template file uploaded by the user in a storage space that the host can directly access for subsequent data conversion.
[0005] However, current technology is limited by the different storage methods of backend storage, and cannot combine multiple backend storage to provide the host with sufficient space to store temporary files, which makes it impossible to realize the platform business functions of hyperconverged platforms. Summary of the Invention
[0006] In view of this, embodiments of this application provide a storage space allocation method and server for allocating storage space for temporary files, thereby solving the problem that improper storage of temporary files affects the operation of computing nodes or the implementation of business functions.
[0007] In a first aspect, embodiments of this application provide a method for allocating storage space, applied to a server, the method comprising:
[0008] Receive a configuration request, which is used to request the external storage of the server cluster to be registered into the storage space of the server cluster;
[0009] In response to the configuration request, obtain the storage resources of the external storage of the server cluster;
[0010] The external storage and internal storage of the server cluster are processed by storage pooling to obtain a storage pool. The storage resources of the storage pool are determined based on the storage resources of the external storage and the internal storage of the server cluster.
[0011] Upon receiving a storage space allocation request, storage space is allocated using the storage pool.
[0012] In this embodiment, after receiving a storage space allocation request, the server can allocate storage space to computing nodes performing tasks corresponding to business functions based on a storage pool. This supports computing nodes storing temporary files during task execution, thereby enabling the business functions to function. The storage pool is determined by the storage resources of the server cluster's external storage and the server cluster's internal storage. By utilizing multiple server cluster internal and external storage resources together, the storage pool can overcome the problem of different storage methods for different types of storage, preventing business functions from failing due to insufficient remaining storage space in a single storage device, and improving the stability of business function implementation.
[0013] In one possible implementation, the step of performing storage pooling processing on the external storage and internal storage of the server cluster to obtain a storage pool includes:
[0014] The remaining available space in the external storage of the server cluster and the remaining available space in the internal storage of the server cluster are exposed as multiple corresponding block devices;
[0015] Map the plurality of block devices to logical block devices;
[0016] A file system is established on the logical block device to obtain the storage pool.
[0017] In this embodiment, a storage pool is obtained by pooling the remaining available space of the external storage and the remaining available space of the internal storage of the server cluster, and then using the storage pool to provide storage space for the computing nodes. Furthermore, the storage pool obtained through resource pooling can accommodate the differences in storage methods between different types of storage, thereby utilizing multiple storage systems to provide storage space simultaneously.
[0018] In one possible implementation, the server cluster external storage includes a first external storage of the server cluster that directly exposes block devices; the server cluster internal storage includes a first internal storage of the server cluster that directly exposes block devices.
[0019] The process of exposing the remaining available space of the first external storage of the server cluster or the remaining available space of the first internal storage of the server cluster as a block device is as follows:
[0020] Scan the first device corresponding to the remaining available space in the first external storage or the first internal storage of the server cluster, and establish a connection with the first device.
[0021] In one possible implementation, the server cluster external storage includes a second external storage of the server cluster that does not directly expose block devices, and the server cluster internal storage includes a second internal storage of the server cluster that does not directly expose block devices.
[0022] The process of exposing the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster as a block device is as follows:
[0023] Obtain the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk based on the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster.
[0024] Associate the virtual disk with the block device in the server.
[0025] In this embodiment of the application, for storage that does not directly expose block devices, a corresponding virtual disk is created by virtualizing the remaining available space, and then a connection is established between the virtual disk and the block device in the server, thereby exposing the remaining space of the storage that does not directly expose block devices.
[0026] In one possible implementation, the step of allocating storage space using the storage pool upon receiving a storage space allocation request includes:
[0027] Receive storage space allocation requests sent by the computing nodes of the server cluster, the storage space allocation requests including temporary file size and business function identifier;
[0028] The storage space to be allocated is determined based on the size of the temporary file;
[0029] Based on the business function identifier and allocation strategy, temporary storage space is determined from the storage pool and allocated to the computing node in the form of a virtual disk. The temporary storage space is greater than or equal to the storage space to be allocated.
[0030] In this embodiment, the server can dynamically allocate temporary storage space using the storage pool according to the actual needs of the computing nodes, thereby efficiently utilizing the remaining storage space of each storage unit and avoiding waste or insufficiency of storage resources. Furthermore, administrators can flexibly adjust the allocation scheme of temporary storage space based on different business needs and allocation strategies to better meet the storage requirements of different computing nodes and optimize the utilization of storage resources. The server can quickly determine temporary storage space according to the allocation strategy and allocate it to computing nodes, ensuring that computing nodes can obtain the necessary storage resources in a timely manner. Through business function identifiers, the server can manage the storage space corresponding to different business functions to more effectively organize and manage storage space, ensuring data isolation and security.
[0031] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the configuration mode;
[0032] The step of determining temporary storage space from the storage pool based on the business function identifier and allocation strategy, and allocating the temporary storage space to the computing node, includes:
[0033] Determine the configuration mode corresponding to the business function identifier.
[0034] If the configuration mode corresponding to the business function identifier is simplified provisioning, a first temporary storage space with a storage space greater than that of the storage pool is determined from the storage pool, and the first temporary storage space is set to zero and then allocated to the computing node.
[0035] If the configuration mode corresponding to the business function identifier is thick provisioning, a second temporary storage space with a larger storage space than the storage space to be allocated is determined from the storage pool, and the second temporary storage space is set to zero and then allocated to the computing node;
[0036] If the configuration mode corresponding to the business function identifier is zero-delay, a third temporary storage space containing data is determined from the storage pool, and the third temporary storage space is allocated to the computing node.
[0037] In this embodiment of the application, the correspondence between business function identifiers and configuration modes can effectively optimize the utilization of storage space, improve the performance and resource utilization efficiency of the server cluster, and thus provide a beneficial impact on the stability and reliability of business functions.
[0038] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the number of replicas;
[0039] The step of determining temporary storage space from the storage pool based on the business function identifier and allocation strategy includes:
[0040] The size of the temporary storage space is determined based on the storage space to be allocated and the number of copies corresponding to the business function identifier. The temporary storage space is then determined from the storage pool based on the size of the temporary storage space. The temporary storage space is used to store a target number of temporary files, where the target number of files is the number of copies corresponding to the business function identifier.
[0041] In this embodiment, the storage space size is determined based on the number of replicas and the size of the temporary files, and then a storage pool is used to provide the corresponding temporary storage space. When a compute node executes a task, it can use the temporary storage space to store multiple temporary files simultaneously, improving the stability of business function implementation and avoiding the inability to implement the corresponding business function due to abnormal or damaged temporary file storage.
[0042] In one possible implementation, the method further includes:
[0043] The system receives a storage space release request sent by the computing node, releases the data in the virtual disk indicated by the storage space release request, and deletes the virtual disk.
[0044] In this embodiment of the application, after receiving a storage space release request, the server can dynamically release the data in the virtual disk according to actual needs, thereby avoiding the waste of storage space, reducing unnecessary storage space occupation, and improving the utilization efficiency of storage space.
[0045] In one possible implementation, the method further includes:
[0046] Obtain storage status change information of the external storage and internal storage of the server cluster, and update the storage space of the storage pool according to the storage status change information.
[0047] In this embodiment, by acquiring information on changes in the storage status of both external and internal storage within the server cluster, the server can perceive real-time changes in storage resources, such as increases or decreases in remaining storage space. The server can then react promptly, updating the storage pool to ensure the real-time nature and accuracy of the storage pool's storage capacity.
[0048] Secondly, embodiments of this application provide a storage space allocation device, comprising:
[0049] A receiving module is used to receive a configuration request, which is used to request the external storage of the server cluster to be registered to the storage space of the server cluster.
[0050] The acquisition module is used to respond to the configuration request and acquire the storage resources of the external storage of the server cluster;
[0051] The processing module is used to perform storage pooling processing on the external storage and internal storage of the server cluster to obtain a storage pool. The storage resources of the storage pool are determined based on the storage resources of the external storage and the internal storage of the server cluster.
[0052] The allocation module is used to allocate storage space using the storage pool when a storage space allocation request is received.
[0053] In one possible implementation, the processing module is specifically used to: expose the remaining available space of the external storage of the server cluster and the remaining available space of the internal storage of the server cluster as multiple corresponding block devices; map the multiple block devices as logical block devices; and establish a file system on the logical block devices to obtain the storage pool.
[0054] In one possible implementation, the server cluster external storage includes a server cluster first external storage that directly exposes block devices; the server cluster internal storage includes a server cluster first internal storage that directly exposes block devices; the processing module is specifically used to scan the first block device corresponding to the remaining available space in the server cluster first external storage or the server cluster first internal storage, and establish a connection with the first block device.
[0055] In one possible implementation, the server cluster external storage includes a second external storage of the server cluster that does not directly expose block devices, and the server cluster internal storage includes a second internal storage of the server cluster that does not directly expose block devices; the processing module is specifically used to obtain the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk based on the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster; and associate the virtual disk with the block devices in the server.
[0056] In one possible implementation, the allocation module is specifically used to receive a storage space allocation request sent by the computing nodes of the server cluster, the storage space allocation request including a temporary file size and a business function identifier; determine the storage space to be allocated based on the temporary file size; determine a temporary storage space from the storage pool based on the business function identifier and the allocation strategy, and allocate the temporary storage space to the computing node in the form of a virtual disk, wherein the temporary storage space is greater than or equal to the storage space to be allocated.
[0057] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the configuration mode; the allocation module is specifically used to determine the configuration mode corresponding to the business function identifier. If the configuration mode corresponding to the business function identifier is thin provisioning, a first temporary storage space with a larger storage space than the storage pool is determined from the storage pool, and the first temporary storage space is zeroed out and allocated to the compute node; if the configuration mode corresponding to the business function identifier is thick provisioning, a second temporary storage space with a larger storage space than the storage space to be allocated is determined from the storage pool, and the second temporary storage space is zeroed out and allocated to the compute node; if the configuration mode corresponding to the business function identifier is delayed zeroing, a third temporary storage space containing data is determined from the storage pool, and the third temporary storage space is allocated to the compute node.
[0058] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the number of replicas; the allocation module is specifically used to determine the size of the temporary storage space based on the storage space to be allocated and the number of replicas corresponding to the business function identifier, and to determine the temporary storage space from the storage pool based on the size of the temporary storage space, wherein the temporary storage space is used to store a target number of temporary files, and the target number of files is the number of replicas corresponding to the business function identifier.
[0059] In one possible implementation, the device further includes an update module, which is used to acquire storage status change information of the external storage and internal storage of the server cluster, and update the storage space of the storage pool according to the storage status change information.
[0060] In one possible implementation, the apparatus further includes a release module, which is configured to receive a storage space release request sent by the computing node, release the data in the virtual disk indicated by the storage space release request, and delete the virtual disk.
[0061] Thirdly, embodiments of this application provide a server, including a processor and a memory communicatively connected to the processor;
[0062] The memory is used to store computer-executed instructions;
[0063] The processor is used to execute computer execution instructions stored in the memory to implement the memory space allocation method described in any of the embodiments of the first aspect above.
[0064] Fourthly, embodiments of this application provide a server cluster, which includes management nodes, computing nodes, and storage nodes. The storage nodes include internal storage and external storage of the server cluster. The management node is used to implement the storage space allocation method described in any of the embodiments of the first aspect above.
[0065] Fifthly, embodiments of this application provide a computer storage medium storing code, wherein when the code is executed, a device running the code implements the storage space allocation method described in any one of the first aspects above. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This application provides a schematic diagram of a process for implementing business functions.
[0068] Figure 2 This application provides another flowchart for implementing business functions.
[0069] Figure 3 A system architecture diagram of a server cluster provided in this application embodiment;
[0070] Figure 4 Another system architecture diagram of a server cluster provided in this application embodiment;
[0071] Figure 5 A system architecture diagram of another server cluster provided in the embodiments of this application;
[0072] Figure 6 A system architecture diagram of another server cluster provided in the embodiments of this application;
[0073] Figure 7 A front-end management page for a hyperconverged platform provided in this application embodiment;
[0074] Figure 8 A schematic diagram of a storage pool provided in an embodiment of this application;
[0075] Figure 9 A flowchart illustrating a storage space allocation method provided in an embodiment of this application;
[0076] Figure 10A flowchart illustrating a method for implementing a business function as provided in an embodiment of this application;
[0077] Figure 11 A flowchart illustrating another method for implementing a business function provided in an embodiment of this application;
[0078] Figure 12 A signaling diagram illustrating a method for implementing a service function as provided in an embodiment of this application;
[0079] Figure 13 A schematic diagram of a device for implementing a business function provided in an embodiment of this application;
[0080] Figure 14 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0081] It should be noted that the embodiments described in this application are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0082] A server cluster is a group of servers interconnected through input / output systems, such as a hyperconverged cluster. These servers can work together to provide users with application and data resource services. Servers include rack servers, cabinet servers, blade servers, tower servers, general-purpose servers, GPU servers, high-performance servers, etc. Servers can be connected via high-speed networks and managed through distributed resource management software (DRM). The servers in a server cluster can be functionally categorized into management servers (also called management nodes), compute servers (also called compute nodes), and storage servers (also called storage nodes).
[0083] Compute nodes are the core components of a server cluster responsible for executing computational tasks. They act as workload processors within the cluster, handling large amounts of data and computational tasks. Compute nodes typically possess high-performance processors, ample memory, and high-speed network interfaces to meet the demands of high load and high performance. The primary tasks of compute nodes are executing applications, processing data, and analyzing results. They can process multiple tasks in parallel, improving overall computing performance through distributed computing. Compute nodes communicate and transmit data via high-speed network connections, ensuring efficient task allocation across nodes and achieving load balancing. In this embodiment, compute nodes can be used to execute tasks corresponding to business functions to provide business services to users.
[0084] 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 the server cluster, it monitors, schedules, and manages other nodes within the cluster. Management nodes are responsible for collecting cluster operational status information, processing logs and alarms, and providing cluster deployment, configuration, and maintenance functions. Management nodes typically possess powerful computing and storage capabilities to support complex monitoring and management tasks. They can also communicate with other nodes, sending management commands and configuration parameters to ensure the stable operation and high performance of the server cluster. Management nodes also provide a visual interface and management tools for the server cluster, such as hyperconverged platforms, facilitating cluster monitoring and management operations for administrators.
[0085] Storage nodes are responsible for data storage and management within a server cluster. They provide the data storage and backup capabilities required by the server cluster, ensuring data reliability and durability. Storage nodes are typically equipped with high-performance storage devices, such as disk arrays or distributed file systems, to provide ample storage space and high-speed data access performance. Storage nodes exchange and synchronize data with other nodes via network sharing protocols or other storage technologies. In this embodiment, storage nodes within the server cluster can also be referred to as internal cluster storage (hereinafter referred to as internal storage). Storage nodes can be Storage Area Networks (SANs), Block Storage (RADOS Block Devices, RBDs), Local Storage (LOCAL), or Network Attached Storage (NAS).
[0086] A SAN (Storage Area Network) is a specialized high-speed network architecture that connects servers and storage devices, such as disk arrays, tape libraries, and other types of storage devices, as well as server and computer systems, via Fibre Channel. SANs are typically used to provide high-performance, reliable, and flexible storage solutions. In a SAN, servers access data within the storage devices by accessing Logical Unit Numbers (LUNs). SAN storage typically consists of dedicated storage devices and switches.
[0087] RBD is a storage service provided in the Ceph distributed storage system. It divides data into blocks and stores them in a distributed manner across multiple storage nodes. RBD allows users to create and manage virtual block devices in a Ceph cluster, similar to traditional disk devices. By distributing data across multiple storage nodes in a Ceph cluster, RBD provides high reliability, high availability, and scalability. Each RBD block is divided into multiple storage objects (a type of data unit in object storage devices) and stored on multiple OSDs (object storage devices) in the Ceph cluster.
[0088] A NAS (Network Attached Storage) is a device specifically designed for data storage and sharing. NAS provides file-level storage services via a network connection (such as Ethernet). In NAS storage, data is stored on the storage device as shared files, and servers can access these files using network protocols such as Network File System (NFS) and SMB. A NAS is typically a standalone hardware device with one or more built-in hard drives and its own operating system and management interface. 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. NAS storage is generally easy to manage and expand, and can be accessed by multiple servers simultaneously.
[0089] LOCAL refers to storing data on local storage devices directly connected to the server, such as local hard drives or solid-state drives. Local storage is typically used for storage needs on a single server and is suitable for lightweight applications and testing environments.
[0090] It should be noted that, due to the differences in storage methods among different types of storage nodes, it is not possible to use two different types of storage nodes simultaneously to provide storage space for temporary files in related technologies.
[0091] Block devices (also known as physical block devices) are computer devices used for storing and retrieving data. They perform data read and write operations in units of fixed-size blocks. Common block devices include hard disk drives (HDDs), solid-state drives (SSDs), USB flash drives, and Storage Area Network (SAN) devices. Block devices are typically managed and accessed through the operating system's file system. They can store large amounts of data and offer fast read and write speeds and persistence. In computer systems, block devices are also used for various purposes such as virtualization, data backup, and real-time data processing.
[0092] A logical block device refers to a data block that is partitioned and managed on a logical level, corresponding to a physical block device. Logical block devices are typically used to abstract and manage the details of the underlying physical device, providing a more flexible and efficient way to access data. In operating systems, logical block devices are usually managed and used by components such as the file system or device drivers. The file system provides users with a transparent and consistent file access interface by mapping physical block devices to logical devices. Users do not need to worry about the details of the underlying physical device; they can access and manipulate files simply through the interface provided by the file system.
[0093] A storage pool is a logical concept used to manage and organize storage resources. A storage pool consists of a group of physical storage devices (such as hard drives, disk arrays, tape libraries, flash memory devices, etc.). By aggregating these physical storage resources, different types of physical storage devices are integrated to form a unified logical storage unit, making storage resource management more flexible and efficient. A storage pool can be viewed as a resource pool specifically designed for storage resources.
[0094] A file system is a data structure in a computer used to organize, store, and access data and directories. It serves as the interface between the operating system and storage devices (such as hard drives and flash memory), allowing users to store data as files and organize these files through a directory structure. This provides users and applications with a unified and abstract way to access and manage data.
[0095] The following are examples illustrating the application scenarios of embodiments of this application.
[0096] The embodiments of this application can be applied to scenarios where users call a certain business function of a server cluster through a user terminal.
[0097] For example, when a user invokes a business function through a client, the management node needs to request storage space from the storage node. During the implementation of the business function, the compute node can temporarily store relevant files or intermediate data (i.e., temporary files) in the storage space provided by the storage node, and then the compute node will provide the business function to the user. If the storage node cannot provide sufficient storage space for the compute node—that is, if the remaining available space of the storage node is less than the size of the temporary files—the compute node will be unable to store the temporary files or not store all of them during the implementation of the business function, which may result in the business function failing to be implemented.
[0098] For example, the storage nodes include storage node 1 and storage node 2. Storage node 1 and storage node 2 are of different types, and the remaining available space of both storage node 1 and storage node 2 is less than the storage space requested by the compute node. The sum of the remaining available space of storage node 1 and storage node 2 is greater than or equal to the storage space requested by the compute node.
[0099] In one possible implementation, such as Figure 1 As shown in the diagram, when a user invokes a business function through the client, the client sends a business function invocation request to the management node. The management node schedules the task corresponding to the business function to a specific compute node for execution. During task execution, the compute node sequentially requests storage space from storage node 1 and storage node 2. However, because the remaining available space of both storage node 1 and storage node 2 is less than the storage space requested by the compute node, neither storage node 1 nor storage node 2 can provide storage space for the compute node individually. Therefore, storage nodes 1 and 2 report allocation failure information to the compute node. Furthermore, because storage nodes 1 and 2 are of different types, even though the sum of the remaining available space of storage node 1 and storage node 2 is greater than the storage space requested by the compute node, it is still impossible to utilize both storage nodes 1 and 2 together to provide storage space for the compute node. Consequently, the compute node fails to execute the task, and the business function invocation fails.
[0100] Based on this, in the storage space allocation method provided in this application, the remaining available space of the storage node is exposed as a block device, and multiple block devices are mapped to a single logical block device. A file system is then established for the logical block device to pool the remaining available space of the storage node, thus creating a storage pool. This storage pool is then used to provide temporary storage space for the computing node. For example... Figure 2 As shown, a storage pool is obtained by pooling the remaining available space of storage node 1 and the remaining available space of storage node 2. Temporary storage space is used to store temporary files involved in the execution of tasks by the compute nodes. The temporary storage space will be referred to as storage space below.
[0101] When a user invokes a business function through the client (step a), the management node executes step b, scheduling the task corresponding to the business function to a computing node for execution. During task execution, the computing node executes step c, requesting storage space allocation from the storage pool. Since the sum of the remaining available space of storage node 1 and storage node 2 is greater than the storage space requested by the computing node, and the remaining available space of storage node 1 and storage node 2 is pooled into a storage pool through resource pooling, although storage node 1 and storage node 2 are of different types, the storage pool can still utilize the remaining available space of storage node 1 and storage node 2 to jointly provide storage space for the computing node. The storage pool executes step d, allocating storage space to the computing node. During task execution, the computing node stores temporary files related to the business function in the storage space provided by the storage pool. The computing node executes step e, successfully executing the task and providing the user with the implementation of the business function. The client executes step f, displaying the implementation result of the business function to the user.
[0102] The storage space allocation method provided in this application can be applied not only to the above-described scenarios but also to other scenarios. For example, the number of storage nodes available for providing storage space is greater than two; the storage nodes available for providing storage space include at least two types.
[0103] As another exemplary scenario with a richer variety of storage node types and a larger number of storage nodes, consider three storage nodes available to provide storage space: storage node 1, storage node 2, and storage node 3. These nodes are all of different types; for example, storage node 1 is a SAN, storage node 2 is an RBD, and storage node 3 is a LOCAL. In this embodiment, the remaining available space of storage node 1, storage node 2, and storage node 3 can be pooled to obtain a storage pool that can provide storage space. When a compute node executes a task corresponding to a certain business function, the management node can directly allocate storage space to the compute node using the storage pool. This allows the compute node to store temporary files in the storage space provided by the storage pool, thereby supporting the completion of the task and realizing the corresponding business function.
[0104] The storage space allocation method provided in this application pools the remaining available space of multiple storage nodes to form a storage pool, enabling centralized management and flexible scheduling of storage resources and eliminating the isolation of storage resources between different types of storage nodes. The storage pool utilizes multiple storage nodes of different types to provide temporary storage space for computing nodes according to user business needs, thereby supporting the implementation of business functions. This improves the utilization rate of the remaining available space of storage nodes and enhances the stability of business function implementation.
[0105] The following example illustrates the system architecture of a server cluster associated with an application scenario.
[0106] For example, such as Figure 3 As shown, Figure 3 This application provides a system architecture diagram for a server cluster. The server cluster includes a management node, multiple compute nodes, and multiple storage nodes such as SAN, RBD, LOCAL, and NAS. Figure 3 The storage nodes shown are all internal storage within the server cluster (also known as internal storage).
[0107] The management node is used to run the storage space management and distribution system. It provides users with the ability to configure storage nodes. After users configure storage nodes through a front-end management page displayed on their client devices, the management node can centrally manage the storage nodes within the server cluster based on the user's configuration. This includes tasks such as storage node registration and verification. The management node also receives storage space allocation requests from various compute nodes and distributes, monitors, and releases storage space accordingly. Furthermore, the management node pools the remaining storage space resources from multiple storage nodes into a storage pool. Finally, it assigns tasks corresponding to business functions to compute nodes.
[0108] The compute nodes are used to send storage space allocation requests to the management nodes to apply for storage space, and use the storage space provided by the storage pool to execute tasks corresponding to business functions, thereby providing users with the corresponding business functions.
[0109] Figure 3 The storage nodes shown represent storage resources within the server cluster, and each node can provide storage space. Internal storage refers to storage nodes located within the server cluster, typically on the same local area network as compute and management nodes. Internal storage offers high-speed data access and transmission performance, and compute nodes can directly access data on internal storage via network protocols (such as NFS, SMB / CIFS, etc.).
[0110] In one possible implementation, the management node can also extend external storage resources of the server cluster as storage nodes. For example, such as... Figure 4 As shown, Figure 4This application provides another system architecture diagram for a server cluster. The external storage of the server cluster (also called external storage) can be SAN, RBD, LOCAL, or NAS. External storage refers to storage nodes located outside the server cluster, typically communicating with the management and compute nodes in the cluster via high-speed network connections (such as Fibre Channel or Ethernet). After being registered with the management node, external storage can also act as a storage node in the server cluster, providing corresponding storage space for the compute nodes. External storage can provide larger storage capacity and higher performance. This application embodiment increases the overall storage capacity of the server cluster by expanding the storage nodes outside the server cluster, thereby providing more sufficient storage space for the compute nodes, reducing the impact of insufficient storage space on task execution, improving the success rate of task execution, and providing users with more stable business functions.
[0111] For example, such as Figure 5 As shown, Figure 5 This is a system architecture diagram of another server cluster provided in this application embodiment. The compute nodes run node agents of a storage space management and distribution system. When a compute node executes a task corresponding to a business function, it can apply for storage space from the management node through the node agent. After receiving relevant information about the storage space distributed by the management node (such as address information and storage space size) through the node agent, the compute node mounts the access path of the storage space to a directory on the compute node. This allows the compute node to access the storage space through the directory, thereby storing temporary files in or reading temporary files from the storage space to support the compute node in executing tasks and realizing business functions.
[0112] The storage space management and distribution system and node agents are described below with reference to the accompanying diagrams.
[0113] like Figure 6 As shown, 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 compute node storage space adaptation module and a compute node storage management module. Figure 6 The storage node shown includes both internal and external storage. In another implementation, the storage node may consist of only internal storage. The storage node mentioned below may include both internal and external storage, or it may consist of only internal storage.
[0114] The platform's storage space registration module is used to register internal storage and store relevant information configured by users through the front-end management page. When it is necessary to expand the storage of the server cluster using external storage, the platform's storage space registration module can register external storage as storage nodes in the server cluster.
[0115] The platform's storage space registration module is also used to verify the network connectivity of storage nodes and determine the correspondence between compute nodes and storage nodes. A server cluster can include multiple compute nodes and multiple storage nodes, and each compute node may be able to communicate with some of the storage nodes via the network. That is, compute nodes cannot access all storage nodes via the network, and storage nodes cannot communicate with all compute nodes via the network.
[0116] In one implementation, the platform's storage space registration module verifies the network connectivity of each storage node to determine the computing nodes that can communicate with that storage node, thus obtaining a list of computing nodes corresponding to that storage node. In another implementation, the platform's storage space registration module verifies the network connectivity of each computing node to determine the storage nodes that the computing node can access via the network, thus obtaining a list of storage nodes corresponding to that computing node.
[0117] The platform storage space management module exposes the remaining available space of each storage node in the form of block devices and maps multiple block devices into a single logical block device. The platform storage space management module establishes a file system on this logical block device to pool the remaining resources of the storage nodes, thus obtaining a storage pool.
[0118] The platform's storage space management module is also used to manage the distributed storage space in the storage pool, and monitor the idle storage space and health status of the storage pool, ensuring the implementation of business functions. The platform's storage space management module is also used to obtain storage status change information for external and internal storage of the server cluster, and update the storage space of the storage pool based on the storage status change information.
[0119] The platform's storage space distribution module receives storage space allocation requests sent by compute nodes and provides storage space to compute nodes using the storage pool based on the storage space allocation requests and the information configured by the user.
[0120] In this embodiment, the platform storage space distribution module can create virtual disks on the storage pool through virtualization and expose the virtual disks to the compute nodes through a network protocol that allows read and write operations. It then returns the virtual disk information (such as address and read / write access path) to the compute node storage space management module on the compute node. The space of the virtual disk is the storage space, which can store temporary files related to implementing business functions.
[0121] Network protocols that can perform read and write operations include Network File System (NFS), Common Internet File System (CIFS), Network Block Device (NBD), and Internet Small Computer System Interface (iSCSI).
[0122] The compute node storage space management module sends a storage space allocation request to the platform storage space distribution module when a compute node executes a task corresponding to a business function, based on the size of the temporary file and the business function. The storage space allocation request may include the size of the temporary file and a business function identifier, which is used to indicate a unique business function.
[0123] The compute node storage space management module is also used to send a storage space release request to the platform storage space distribution module when the compute node completes the task corresponding to the business function. The storage space release request is used to instruct the release of the data stored in the storage space. After receiving the storage space release request, the platform storage space distribution module can release the data in the storage space allocated to the compute node, that is, clear the data in the storage space.
[0124] The compute node storage space adaptation module is used to receive information about the virtual disk distributed by the platform storage space distribution module and establish a connection between the compute node and the virtual disk that provides storage space.
[0125] In this embodiment, the platform storage space distribution module provides storage space to the compute node storage space adaptation module in the form of a virtual disk using a storage pool. After establishing a connection between the compute node and the virtual disk, the compute node storage space adaptation module can also create a file system on the virtual disk so that the compute node can store temporary files there. After creating the file system, the compute node storage space adaptation module mounts the file system to a directory on the compute node (called a temporary directory) and informs the compute node of the file system's path within the temporary directory. The compute node can then store temporary files on the virtual disk using this path and retrieve them when needed.
[0126] The storage space allocation method provided in this application allows the management node to consolidate the remaining available space of each storage node into a storage pool. When the management node receives a storage space allocation request from a compute node, it utilizes the storage pool to provide corresponding storage space for the compute node based on the request. This enables the compute node to store temporary files in the storage space and implement corresponding business functions. By consolidating the remaining available space of multiple storage nodes into a storage pool, the differences in storage methods between different types of storage nodes can be ignored, and the storage resource utilization of the storage nodes can be improved. When the remaining storage space of several storage nodes is insufficient to provide storage space individually, the storage pool can utilize the remaining storage space of these storage nodes to collectively provide storage space for the compute node.
[0127] The front-end management page provided in the embodiments of this application will now be described exemplarily with reference to the accompanying drawings.
[0128] In one possible implementation, such as Figure 7 As shown, Figure 7 This is a schematic diagram of a front-end management page provided in an embodiment of this application. The front-end management page can be displayed through the electronic device (user terminal) used by the user. The user can manage and configure allocation strategies through the front-end management page. The allocation strategy may include at least one of the following: the correspondence between business function identifiers and computing nodes, the correspondence between business function identifiers and configuration modes, the correspondence between business function identifiers and function priorities, the number of replicas corresponding to business function identifiers, and the correspondence between business function identifiers and storage nodes.
[0129] In this embodiment, the server cluster provides at least one business function and includes at least two computing nodes. Users can configure a list of computing nodes capable of implementing the business function through a front-end management page. This list includes at least one computing node capable of executing the task corresponding to the business function identifier. When a user invokes a business function, the management node assigns the task corresponding to the business function identifier to a specific computing node in the list of computing nodes.
[0130] In one possible implementation, users can configure the mapping between business function identifiers and storage nodes through a front-end management page, i.e., configure a list of storage nodes corresponding to each business function identifier. Because compute nodes have different requirements for storing or reading / writing temporary files during the implementation of different business functions, for example, the implementation of the remote virtual machine template import function requires high available capacity of storage nodes. Therefore, compute nodes need to temporarily store the virtual machine template files uploaded by users (at this time, the virtual machine template files are temporary files) in storage nodes that can provide larger storage space. Conversely, the implementation of the virtual machine hibernation function requires high reliability and read / write speed of storage nodes. Therefore, compute nodes need to store the relevant temporary files in storage nodes with high read / write performance and reliability. By configuring the mapping between business function identifiers and storage nodes, more suitable storage nodes can be provided for compute nodes to implement functions, improving the stability and efficiency of business function implementation.
[0131] In this embodiment of the application, although the remaining available space of each storage node is pooled into a whole storage pool, the file system can still distinguish and manage the block devices corresponding to the remaining available space of each storage node. Figure 8 As shown, Figure 8 This is a schematic diagram of a storage pool provided in an embodiment of this application. The storage pool is obtained by pooling the remaining available space of five storage nodes, including SAN1, SAN2, LOCAL, RBD, and NAS. As an example, if the storage node list corresponding to service function 1 configured by the user includes SAN1, SAN2, and LOCAL, when the compute node executes the task corresponding to service function 1, the storage pool uses the block devices corresponding to the remaining available space in SAN1, SAN2, and LOCAL to provide storage space for the compute node.
[0132] In one possible implementation, users can configure the mapping between business function identifiers and configuration modes through a front-end management page. A configuration mode refers to the storage space provided by the storage pool to a compute node when it executes a task corresponding to a business function. Examples of configuration modes include thin provisioning, thick provisioning, and latency zeroing. Providing the ability to select configuration modes through the front-end management page allows users to choose different configuration modes for each business function based on their specific needs.
[0133] Thin provisioning is a storage technique, also known as "thin provisioning." Thin provisioning allows a storage pool to allocate more storage capacity to compute nodes than the pool's actual physical storage capacity; that is, the allocated storage space is greater than the pool's total storage capacity. This means compute nodes can "see" more storage space, but only actually use physical storage resources when needed. This approach helps minimize waste and improve storage resource utilization.
[0134] Thick provisioning, as opposed to thin provisioning, is a method of allocating virtual disks for exclusive use. In thick provisioning, the storage pool can allocate more storage capacity to compute nodes than the compute nodes request; that is, the storage pool allocates more storage space than the compute nodes request, but the compute nodes may not actually use all the storage space. This can provide higher storage performance.
[0135] Delayed zeroing is a specific form of thick provisioning. Delayed zeroing does not require the storage pool to be immediately filled with zeros during storage space allocation; instead, it gradually fills the space only when data is first written. During storage space allocation, the storage pool does not erase any data already stored in the storage space. The storage space is only zeroed as needed when a compute node performs its first write operation, storing temporary files in the storage space. This method allows for the immediate allocation of a specified size of space, and the data within the space is not immediately cleared; it is only cleared when the space is actually used.
[0136] In one possible implementation, users can configure the function priority corresponding to the business function identifier through the front-end management page. Function priority represents the execution priority of a business function and also the storage priority of the temporary files corresponding to that business function identifier. As an example, when a compute node needs to execute tasks corresponding to two business functions, the task corresponding to the business function with the higher function priority is executed first. As another example, when two compute nodes (compute node 1 and compute node 2) simultaneously request storage space allocation from the storage pool, if the function priority of the business function corresponding to the task executed by compute node 1 is higher than that of the business function corresponding to the task executed by compute node 2, the storage pool will prioritize allocating storage space to compute node 1, and only allocate storage space to compute node 2 after fulfilling compute node 1's request. Providing function priority configuration functionality through the front-end management page allows users to adjust the implementation priority of each business function according to their own choices, providing users with more flexible function implementation.
[0137] In one possible implementation, users can configure the number of replicas corresponding to a business function identifier through a front-end management page. The number of replicas refers to the number of copies of temporary files that a compute node needs to store in storage space when executing tasks corresponding to a business function. For example, if the number of replicas is 2, the compute node needs to store 2 copies of the temporary files in storage space. When a user configures the number of replicas, the management node needs to determine the storage space size by combining the number of replicas and the size of the temporary files when allocating storage space to the compute nodes using the storage pool. When implementing some critical business functions, increasing the number of temporary file replicas can improve the stability of the business function implementation and prevent the failure to implement the corresponding business function due to abnormal or damaged temporary file storage. By providing the replica number configuration function through the front-end management page, users can configure the number of replicas according to the importance of different business functions, providing users with a more stable function implementation.
[0138] As an example, if the number of replicas is 2 and the temporary file size is 10 gigabytes (GB), then the storage pool needs to allocate enough storage space for the compute nodes to store two copies of the temporary file, i.e., the storage space size must be at least 20GB. As another example, if the number of replicas is 12 and the temporary file size is 10 gigabytes (GB), then the storage pool only needs to allocate 10GB of storage space for the compute nodes.
[0139] The storage space allocation method provided in this application allows users to personalize configurations according to their needs through a front-end management page on the user terminal. This includes configuring the correspondence between business function identifiers and computing nodes, the correspondence between business function identifiers and storage nodes, the configuration mode corresponding to the business function identifier, and the function priority corresponding to the business function identifier. When a user invokes a business function, the computing node executing the task corresponding to that business function identifier can send a request to the management node to apply for storage space. The management node can allocate storage space using a storage pool based on the user's configuration, providing storage space for the computing nodes to store temporary files related to the business function, thus enabling the business function to function. Furthermore, during the execution of tasks by the computing nodes, the management node can monitor the usage of storage space in real time and release the data in the storage space after the task is completed, thereby reducing unnecessary storage node occupancy and resource waste.
[0140] Through the above process, the management node can provide storage space for temporary files using the storage pool, effectively supporting the implementation of business functions and improving the success rate of task execution. Furthermore, users can configure the storage nodes according to their own needs, and the management node can distribute storage space according to the user's configuration, increasing the flexibility of the server cluster.
[0141] The following example, with reference to the accompanying diagram, illustrates the process of establishing a storage pool by the management node.
[0142] In one possible implementation, such as Figure 9 The above, Figure 9 This is a schematic diagram illustrating the creation process of a storage pool as provided in an embodiment of this application.
[0143] S901: The user terminal sends configuration information to the management node.
[0144] The front-end management page displayed to the user on the client side, such as... Figure 7 As shown, users can configure the mapping between business function identifiers and storage nodes through the front-end management page; configure the usage priority of multiple storage nodes; and configure the mapping between storage nodes and compute nodes. The front-end management page provides users with an intuitive and user-friendly configuration interface, enabling users to easily perform relevant configuration settings, improve user work efficiency, reduce the complexity of configuration operations, and enhance the overall user experience.
[0145] Through the front-end management page, users can also configure storage nodes to provide storage space, and then the management node can register these storage nodes.
[0146] Configuration information describes the content configured by the user through the front-end management page. This information includes the correspondence between business function identifiers and other options (such as compute node list, storage nodes, configuration mode, function priority, and number of replicas). The configuration information also includes the storage nodes used to provide storage space.
[0147] As an example, the management node can package configuration information into a message and send it to the management node over the network.
[0148] By sending configuration information to the management node, accurate transmission and synchronous updates of configuration information are achieved. This ensures that the system uses the latest configuration information during runtime, avoiding problems caused by inconsistencies.
[0149] S902: The management node registers storage nodes based on the configuration information and stores the correspondence between the service function identifier and other options.
[0150] The management node registers storage nodes based on the configuration information and saves the correspondence between the business function identifier in the configuration information and other options mentioned above, such as the list of compute nodes, storage nodes, configuration mode, function priority, and number of replicas.
[0151] After receiving the configuration information from the client, the management node can establish a connection with the storage node using relevant authentication information (such as username or password). The connection method can be via protocols such as iSCSI, Fibre Channel (FC), or NFS, depending on the type of storage node and the protocols it supports. The management node authenticates the storage node by sending authentication information to ensure a successful connection.
[0152] In one possible implementation, after completing the registration of the storage nodes, the management node can also perform connectivity tests on the storage nodes. Connectivity testing is to verify that communication between the compute nodes and storage nodes is normal and that data transmission and access are possible. As an example, connectivity testing could involve the compute node performing a simple read / write test on the storage node, such as writing some test data to the storage node and then reading and verifying the correctness of the test data.
[0153] If the connectivity test fails, it is necessary to check whether the connection configuration, authentication information, etc. are correct and make the corresponding adjustments. After the connectivity test passes, the management node will mark the storage node as available and include its provided storage space in the storage pool to provide storage space for the compute nodes.
[0154] The connectivity tests described above assess the network connectivity between compute nodes and storage nodes within the test server cluster. This allows us to determine which storage nodes each compute node can access via the network, resulting in a list of storage nodes corresponding to each compute node. This list includes the storage nodes that the compute node can access via the network. When allocating storage space to compute nodes, the temporary storage management and distribution system can allocate storage space to each compute node based on its corresponding list of storage nodes.
[0155] S903: The management node exposes the remaining available space of the storage node as a block device.
[0156] The remaining available space of a storage node refers to the remaining usable storage space within that node. The storage space corresponding to a block device is the remaining available space of the storage node to which that block device belongs. There is a one-to-one correspondence between block devices and storage nodes.
[0157] In step S903, storage nodes can be divided into two types: storage nodes that directly expose block devices (such as storage nodes that support the iSCSI protocol, also known as first storage nodes) and storage nodes that do not directly expose block devices (such as storage nodes that support the NFS protocol, also known as second storage nodes). For these two types of storage nodes, the management node can use different methods to expose the remaining available space in the storage node as block devices.
[0158] For storage nodes that directly expose block devices, the management node associates these exposed block devices with the storage space management and distribution system. Taking a storage node that supports the iSCSI protocol as an example, the management node can use appropriate tools or commands to scan storage nodes and establish connections. For instance, it can scan the IP addresses of storage nodes, discover available block devices, and add them to the storage device list of the server cluster.
[0159] For storage nodes that do not directly expose block devices, the management node probes for available storage resources (i.e., remaining available space) within the storage node. Then, based on the probed remaining available space, the management node uses virtualization technology to create virtual disks, which act as mappings and proxies for the remaining available space in the storage node. After the virtual disks are created, the management node associates the virtual disks with block devices (such as Network Block Devices (NBDs)) within the management node, using the NBDs to provide access interfaces in block device form. This allows the available resources of storage nodes that do not directly expose block devices to the management node in the form of block devices.
[0160] By exposing the remaining available space of each storage node as block devices in different ways, it is possible to pool the remaining available space of the storage nodes and achieve unified management and allocation.
[0161] In one possible implementation, the external storage includes a first external storage that directly exposes block devices; the internal storage includes a first internal storage that directly exposes block devices; the process of exposing the remaining available space of the first external storage or the remaining available space of the first internal storage as block devices can be: scanning the first block device corresponding to the remaining available space in the first external storage or the first internal storage, and establishing a connection with the first block device.
[0162] In another possible implementation, the external storage includes a second external storage that does not directly expose the block device, and the internal storage includes a second internal storage that does not directly expose the block device. The process of exposing the remaining available space of the second external storage or the remaining available space of the second internal storage as a block device is as follows: obtain the remaining available space of the second external storage or the remaining available space of the second internal storage, and create a virtual disk based on the remaining available space of the second external storage or the remaining available space of the second internal storage; associate the virtual disk with the block device in the management node.
[0163] S904: The management node maps block devices to logical block devices.
[0164] In one possible implementation, the management node can use a Device Mapper to map multiple block devices to a single logical block device. The Device Mapper is a kernel module that provides a framework that allows user-space programs to define the behavior of block devices. The Device Mapper handles block device requests by redirecting them from kernel space to user space, thus implementing the mapping from block devices to logical block devices.
[0165] The process by which the management node uses Device Mapper to map multiple block devices to logical block devices is as follows:
[0166] The management node utilizes Device Mapper to construct the `dm_table` and `dm_target` structures. `dm_table` represents a mapping table that defines the mapping relationship between logical block device addresses and block device addresses, including information on how to map from one logical block device address to another. `dm_target` represents an entry in the mapping table, describing how a logical block device is mapped to one or more block devices. By using the mapping table to record the mapping relationships between multiple block devices and logical block devices, once the mapping relationships are established, logical block devices can be invoked like ordinary block devices, achieving resource pooling across multiple block devices.
[0167] S905: The management node establishes a file system on the logical block device.
[0168] The file system refers to the file system established for the logical block device in step S904. By establishing a file system on the logical block device, data storage, access, and management functions are achieved. The file system can manage each block device in the logical block device according to a mapping table. Each block device includes a certain amount of data and metadata information (such as file attributes, directory structure, etc.). By maintaining block device and metadata information, the file system enables operations such as storing, reading, modifying, and deleting data in the storage pool.
[0169] Common file systems for logical block devices include Extended File System (EXT), Extended File System (XFS), and Butter File System (Btrfs). Each of these file systems has its own characteristics and is suitable for different application scenarios and needs. For example, the EXT file system is one of the commonly used file systems in Linux systems, supporting large files, large directories, and online defragmentation; the XFS file system, on the other hand, features high performance and high reliability, making it suitable for large-scale data storage and management.
[0170] The management node first formats the logical block device, then uses the `mkfs` command to create a file system on it. For example, to create an EXT4 file system, the command is `sudo mkfs -t ext4 / dev / mapper / mylogicalvolume`. After the file system is created, the management node can mount it to a specified directory, allowing access to the file system created on the logical block device through that directory. By creating a file system on the logical block device, the logical block device becomes a storage pool capable of data storage, access, and management.
[0171] S906: The management node has completed creating the storage pool.
[0172] After the file system is established on the logical block device and mounted to the directory, the management node completes the resource pooling of the remaining available space of the storage nodes, so that the remaining available space of each storage node is merged into a storage pool, and then the remaining available space of each storage node is called up by the storage pool to provide storage space for the computing nodes.
[0173] S907: The management node returns configuration completion information to the user terminal.
[0174] Once the management node successfully registers all storage nodes and pools the remaining available space resources of each storage node into a storage pool, it can return a configuration completion message indicating successful configuration to the user. If the connection or verification fails, it returns a configuration completion message indicating configuration failure to the user.
[0175] S908: The client displays the configuration results to the user.
[0176] After receiving the configuration completion information from the management node, the user terminal can promptly display the configuration results to the user through the front-end management page, thereby improving the system's transparency and operational controllability.
[0177] The storage pool establishment process provided in steps S901-S908 enables unified management of the remaining available space of each storage node. By pooling the remaining available space of each storage node into a storage pool, storage space is provided to compute nodes. Furthermore, this process can ignore the differences in storage methods between different types of storage nodes. When a storage node cannot provide storage space independently (i.e., its remaining available space is smaller than the size of temporary files), the resource-pooled storage pool can simultaneously utilize the remaining available space of multiple storage nodes to provide storage space for compute nodes, overcoming the limitations of a single storage node's resource capacity. This avoids the problem of a single storage node being unable to provide storage space, thus preventing business functions from failing and improving the reliability of the hyper-converged platform.
[0178] The implementation process of the storage space allocation method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0179] In one possible implementation, the storage space allocation method provided in this application embodiment is as follows: Figure 10 As shown.
[0180] S1001: The user sends a service function call request to the management node.
[0181] The client is used to display to the user Figure 7 The front-end management page shown is used to display various business functions to the user. After the user triggers the option corresponding to the business function on the user-side display page, the user-side generates a corresponding business function call request based on the user's operation. The business function call request is used to request the provision of the business function, and the business function call request can include an identifier corresponding to the business function, which is used to indicate a unique business function. The user-side sends the business function call request to the management node to request the invocation of the business function.
[0182] S1002: The management node assigns the tasks corresponding to the business functions to the computing nodes.
[0183] After receiving a business function call request from the user, the management node assigns the task corresponding to the business function indicated by the business function identifier to the computing node, which then executes the task to realize the business function.
[0184] In one possible implementation, the management node can assign tasks based on the list of compute nodes corresponding to the business function identifier. The management node determines the list of compute nodes configured by the user through the front-end management page based on the business function, identifies the compute nodes capable of executing the tasks corresponding to that business function, and then assigns the tasks corresponding to that business function to a specific compute node in the compute node list.
[0185] In another possible implementation, after determining the list of compute nodes, the management node can determine the most suitable compute node to perform the task based on factors such as the load and available resources of each compute node in the list, so as to improve the execution efficiency of the task.
[0186] S1003: The compute node executes a task and sends a storage space allocation request to the management node.
[0187] Storage space is used to store temporary files generated by computing nodes during task execution. Temporary files refer to temporary files or data generated during task execution, or files required to implement business functions. Temporary files include intermediate results, temporary computation data, or other data that needs to be temporarily stored during task execution.
[0188] During execution, computing nodes may generate a series of intermediate results, which may be used in subsequent computation steps. Storing these intermediate results in temporary files facilitates subsequent computation and processing. Furthermore, storing data in temporary files can temporarily store a portion of the data, improving computational efficiency and response speed.
[0189] A storage space allocation request is used to request storage space from the storage space management and distribution system. The storage space allocation request includes the temporary file size and a business function identifier. The business function identifier is used to uniquely identify the business function.
[0190] During task execution, compute nodes send storage space allocation requests to storage nodes to obtain the required storage space, and then use the storage space to execute tasks and realize business functions.
[0191] S1004: The management node allocates storage space to the compute nodes using the storage pool according to the storage space allocation request, and feeds back the storage space information to the compute nodes.
[0192] A storage pool is created by the management node by pooling the remaining available space of each storage node. The management node can expose the remaining available space of the storage nodes as block devices, map multiple block devices into a single logical block device, and then create a file system on that logical block device to obtain the storage pool.
[0193] Based on the size of the temporary file, the management node can determine the amount of storage space that needs to be allocated to the compute node, i.e., determine the size of the space to be allocated. The size of the storage space to be allocated should be greater than or equal to the size of the temporary file to support the compute node in storing the temporary file completely in the storage space and avoid temporary file storage failure due to insufficient storage space.
[0194] The management node can identify a unique business function based on the business function identifier, and then allocate storage space to the compute nodes using the storage pool according to a pre-configured allocation strategy. The allocation strategy may include at least one of the following: the mapping between business function identifiers and compute nodes, the mapping between business function identifiers and configuration modes, the mapping between business function identifiers and function priorities, the number of replicas corresponding to a business function identifier, and the mapping between business function identifiers and storage nodes.
[0195] The process by which the management node allocates storage space to the compute nodes using the storage pool is detailed in the following example.
[0196] S1005: The compute node uses the storage space to execute the tasks corresponding to the business function.
[0197] During the execution of 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 the business function.
[0198] By utilizing the above method to provide storage space for compute nodes using a storage pool, the barriers between storage methods of different types of storage nodes can be broken down. Each storage node is virtually abstracted, hiding its implementation details and thus ignoring the issue of different storage methods across different types of storage nodes. The remaining available space of multiple storage nodes is then integrated into a single storage pool. This allows for the simultaneous provision of storage space for compute nodes using different types of storage nodes, preventing task execution failures due to insufficient space on a single storage node, which would otherwise hinder the provision of business functions to users.
[0199] The following example, with reference to the accompanying diagram, illustrates the process of providing business functions to users.
[0200] In one possible implementation, such as Figure 11 As shown, based on steps S1001-S1005, the storage space allocation method further includes:
[0201] S1006: After the compute node completes its task, it sends a storage space release request to the management node.
[0202] A storage space release request is used to request the management node to release temporary files in the storage space. After a task finishes execution, a compute node sends a storage space release request to the management node, notifying the management node to release the previously allocated storage space so that this storage space can be made available for other tasks or other compute nodes.
[0203] S1007: The management node releases storage space based on the storage space release request.
[0204] When a storage space release request is received from a compute node, the management node will release the storage space allocated to that compute node accordingly and add the released storage space back into the available storage pool so that it can be reallocated and used in the future.
[0205] S1008: The compute node returns the execution result of the task to the user.
[0206] After the task is completed, the computing node returns the execution result to the user client. The result may include the calculation results, output data, and task execution status information. The user client processes and records the received result for subsequent business operations or user queries.
[0207] S1009: The user receives the execution result and performs subsequent operations according to business requirements.
[0208] Once the client receives the task execution result from the computing node, it will perform subsequent operations based on business needs, such as executing subsequent business processes, updating business status, and displaying the execution result to the user. The client is responsible for effectively processing and utilizing the task execution result to meet user needs and business process requirements.
[0209] Steps S1006-S1009 are subsequent steps after the business function is implemented, including releasing storage space and returning task execution results. The above steps S1001-S1009 together constitute a complete business function execution flow, involving multiple stages such as user request, task allocation, resource management, task processing, storage space allocation, result return, and resource release. In real-world scenarios, other operational and management tasks may also be involved, such as monitoring, logging, and exception handling.
[0210] The following is combined Figure 12 The process of allocating the aforementioned storage space is further explained, including how the management node distributes storage space according to the storage space allocation request, and how the computing node uses the storage space to perform tasks.
[0211] like Figure 12 As shown, Figure 12 A signaling diagram for a storage space allocation method provided in this application embodiment, the implementation process of the service function includes:
[0212] S1201: The user sends a service function call request to the management node.
[0213] S1202: The management node assigns the tasks corresponding to the business functions to the computing nodes.
[0214] S1203: The compute node executes a task and sends a storage space allocation request to the management node through the node agent.
[0215] Steps S1201-S1203 can be referred to the description of steps S1001-S1003.
[0216] S1204: The management node allocates storage space according to the storage space allocation request.
[0217] Upon receiving a storage space allocation request, the management node identifies the corresponding unique business function based on the business function identifier, determines the pre-configured allocation strategy based on the business function, and then allocates storage space to the compute nodes using the storage pool. The management node also allocates storage space from the storage pool suitable for storing temporary files.
[0218] As an example, the management node determines at least one storage node that the compute node can access via the network, based on the list of storage nodes corresponding to the compute node, thus obtaining a first storage node set (the first storage node set includes at least one storage node that the compute node can access via the network). The management node determines at least one storage node corresponding to a service function identifier, based on the list of storage nodes corresponding to that service function identifier, thus obtaining a second storage node set (the second storage node set includes at least one storage node corresponding to a service function identifier). The management node determines at least one storage node that exists in both the first and second storage node sets, thus obtaining a third storage node set (the third storage node set includes at least one storage node that exists in both the first and second storage node sets). The management node provides storage space for the compute node using the block devices corresponding to the remaining storage space of each storage node in the third storage node set within the storage pool.
[0219] As another example, after the management node determines the configuration mode corresponding to the service function identifier, it uses the storage pool to provide storage space for the compute nodes according to the configuration mode corresponding to the service function identifier. If the configuration mode is thin provisioning, the size of the first temporary storage space provided by the management node to the compute nodes using the storage pool can be greater than the capacity of the storage pool, and the first temporary storage space is zeroed out before being allocated to the compute nodes.
[0220] If the configuration mode is thick provisioning, the size of the second temporary storage space provided by the management node to the compute node using the storage pool can be larger than the size of the storage space to be allocated, and the second temporary storage space is zeroed out before being allocated to the compute node.
[0221] If the configuration mode is delayed zeroing, the management node will still retain some other data in the third temporary storage space provided by the storage pool for the compute node. When the compute node writes a temporary file to the third temporary storage space, the other data in the third temporary storage space will be cleared and set to zero.
[0222] As another example, if the management node receives storage space allocation requests from two compute nodes simultaneously (storage space allocation request 1 sent by compute node 1 and storage space allocation request 2 sent by compute node 2), and if the functional priority of the business function corresponding to the business function identifier in storage space allocation request 1 is higher than the functional priority of the business function corresponding to the business function identifier in storage space allocation request 2, then the management node will prioritize allocating storage space to compute node 1 using the storage pool, and then allocate storage space to compute node 2.
[0223] As another example, if the management node determines the number of replicas corresponding to the business function identifier, it needs to provide the compute node with space to store temporary files equal to that number of replicas. That is, the size of the storage space is greater than or equal to the product of the number of replicas and the size of the temporary files (configuration mode is not considered at this time).
[0224] S1205: The management node establishes a virtual disk.
[0225] After allocating storage space from the storage pool in step S1204, the management node creates a corresponding virtual disk for the storage space using virtualization technology.
[0226] A virtual disk is a logical storage unit, corresponding to a portion of storage space (i.e., storage space) allocated within a storage pool. When creating a virtual disk, the management node needs to 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.
[0227] S1206: The management node sends virtual disk information to the node agent in the compute node.
[0228] Virtual disk information can 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 pool (such as the address of one or more block devices used to provide storage space). The storage location can be the physical address of the block device or other location identifiers.
[0229] Virtual disk information can also include capacity, access permissions, and management information. The virtual disk capacity refers to its size, which allows the node agent to understand the available storage space. Access permissions control the virtual disk's access rights, such as read / write permissions and user permissions. Management information may include the virtual disk's administrator, creation time, and update time.
[0230] S1207: The compute node establishes a network connection between the compute node and the storage pool based on the virtual disk information.
[0231] Node agents in compute nodes can establish network connections between compute nodes and storage pools by associating virtual disks with block devices (such as NBDs) on the compute nodes, exposing the virtual disks as block devices.
[0232] S1208: The compute node establishes a file system in the virtual disk through the node agent and mounts the file system in the compute node's directory.
[0233] The node agent creates a file system on the virtual disk. A file system is an organizational structure used to manage files and data on the virtual disk, allowing for the storage of temporary files. Common file systems include Ext4, NTFS, and XFS. The node agent selects a directory on the compute node as the mount point and mounts the created file system to that directory. Mounting is the process of associating a file system with a directory (i.e., the mount point). This directory will be used to access files and data on the virtual disk. By mounting the file system to this directory, it makes that directory the entry point for accessing the virtual disk.
[0234] S1209: The compute node determines the mount point of the file system.
[0235] S1210: Compute node executes tasks.
[0236] When intermediate results or data are generated, the compute node can access the virtual disk based on the directory (i.e., the mount point) and write the intermediate results or data as temporary files to the virtual disk. When needed, the temporary files are read from the virtual disk based on the directory.
[0237] S1211: After the compute node completes its task, the node agent unmounts the file system.
[0238] The node agent performs an unmount operation, separating the file system from the corresponding mount point. This process releases the file system from the virtual disk on the mount point, making it no longer visible to the compute node.
[0239] 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 unmounting operation.
[0240] S1212: The compute node sends a storage space release request to the management node through the node agent.
[0241] A storage space release request is used to instruct the release of data in a virtual disk so that the data in the storage space can be released after the task is completed.
[0242] The storage space release request may include the identifier and storage location of the virtual disk. The identifier and storage location are the same as those in step S1206.
[0243] S1213: The management node releases storage space based on the storage space release request.
[0244] After receiving a storage space release request, the management node will release the virtual disk indicated by the identifier based on the information in the storage space release request.
[0245] S1214: The management node deletes the virtual disk.
[0246] After the management node releases the virtual disk, it will then perform the operation of deleting the virtual disk to completely clean up and reclaim the resources.
[0247] In this embodiment, after the virtual disk is successfully deleted, the management node can send a confirmation message to the compute node, indicating that the virtual disk has been completely cleaned up and reclaimed. Upon receiving the confirmation message, the compute node can continue with subsequent operations or terminate the task.
[0248] Through steps S1213 and S1214, the management node completes the release and deletion operations of the virtual disk, ensuring that the resources are completely reclaimed and released so that they can be reallocated to other tasks.
[0249] S1215: The compute node returns the task execution result to the user.
[0250] The compute node returns the task execution results to the user. This means that the compute node will return relevant data, output, and status information related to the task execution to the user for subsequent processing and display. The user can then display the execution results to the user. For example, it can present the task execution status, output data, log information, etc., in a user-friendly way (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.
[0251] The above Figure 12 In the implementation of the business functions shown, flexible management of storage space required for task execution is achieved through the dynamic allocation and release operations of management nodes. This dynamic allocation and release mechanism can improve the overall resource utilization rate, avoid resource waste, and meet the flexible storage space requirements of different tasks. Furthermore, it fully utilizes virtualization technology to create and manage virtual disks, achieving storage resource isolation, flexible scheduling, and dynamic allocation, thereby improving storage resource utilization and the flexibility of storage resource use.
[0252] The storage space allocation method provided in this application embodiment enables task execution and resource management in a distributed computing environment. This method allows for parallel task execution, distributed data storage and management, fully leveraging the advantages of distributed computing and improving the overall efficiency of the computing system. Simultaneously, reasonable storage resource allocation and scheduling also help optimize system performance and improve task execution efficiency and stability.
[0253] Furthermore, by displaying the task execution results to users through the user terminal, users can intuitively understand the task execution status and the implementation of business functions. Based on the status and results of task execution and business function implementation, users can adjust and optimize their work plans in a timely manner.
[0254] It should be noted that the above-mentioned correspondence between business function identifiers and computing nodes, the correspondence between business function identifiers and storage nodes, the configuration mode corresponding to the business function identifier, the function priority corresponding to the business function identifier, and the number of replicas corresponding to the business function identifier can be configured by the user through the front-end management page; alternatively, they can be pre-configured or obtained through other means without user configuration, as long as the same technical effect can be achieved.
[0255] like Figure 13 As shown, based on the same inventive concept, this application also provides a storage space allocation device. The solution provided by this device is similar to the solution described in the above method, and achieves the same technical effect, which will not be repeated here. The device 1300 includes:
[0256] The receiving module 1301 is used to receive a configuration request, which is used to request the external storage of the server cluster to be registered to the storage space of the server cluster;
[0257] The acquisition module 1302 is used to respond to the configuration request and acquire the storage resources of the external storage of the server cluster;
[0258] The processing module 1303 is used to perform storage pooling processing on the external storage of the server cluster and the internal storage of the server cluster to obtain a storage pool. The storage resources of the storage pool are determined based on the storage resources of the external storage of the server cluster and the storage resources of the internal storage of the server cluster.
[0259] The allocation module 1304 is used to allocate storage space using the storage pool when a storage space allocation request is received.
[0260] In one possible implementation, the processing module 1303 is specifically used to: expose the remaining available space of the external storage of the server cluster and the remaining available space of the internal storage of the server cluster as corresponding multiple block devices; map the multiple block devices as logical block devices; and establish a file system on the logical block devices to obtain the storage pool.
[0261] In one possible implementation, the server cluster external storage includes a server cluster first external storage that directly exposes block devices; the server cluster internal storage includes a server cluster first internal storage that directly exposes block devices; the processing module 1303 is specifically used to scan the first block device corresponding to the remaining available space in the server cluster first external storage or the server cluster first internal storage, and establish a connection with the first block device.
[0262] In one possible implementation, the server cluster external storage includes a second external storage of the server cluster that does not directly expose block devices, and the server cluster internal storage includes a second internal storage of the server cluster that does not directly expose block devices; the processing module 1303 is specifically used to obtain the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster, and create a virtual disk based on the remaining available space of the second external storage of the server cluster or the remaining available space of the second internal storage of the server cluster; and associate the virtual disk with the block devices in the server.
[0263] In one possible implementation, the allocation module 1304 is specifically configured to receive a storage space allocation request sent by the computing nodes of the server cluster, the storage space allocation request including a temporary file size and a business function identifier; determine the storage space to be allocated based on the temporary file size; determine a temporary storage space from the storage pool based on the business function identifier and the allocation strategy; and allocate the temporary storage space to the computing node in the form of a virtual disk, wherein the temporary storage space is greater than or equal to the storage space to be allocated.
[0264] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the configuration mode; the allocation module 1304 is specifically used to determine the configuration mode corresponding to the business function identifier. If the configuration mode corresponding to the business function identifier is thin provisioning, a first temporary storage space with a larger storage space than the storage pool is determined from the storage pool, and the first temporary storage space is zeroed out and allocated to the computing node; if the configuration mode corresponding to the business function identifier is thick provisioning, a second temporary storage space with a larger storage space than the storage space to be allocated is determined from the storage pool, and the second temporary storage space is zeroed out and allocated to the computing node; if the configuration mode corresponding to the business function identifier is delayed zeroing, a third temporary storage space containing data is determined from the storage pool, and the third temporary storage space is allocated to the computing node.
[0265] In one possible implementation, the allocation strategy includes the correspondence between the business function identifier and the number of replicas; the allocation module 1304 is specifically used to determine the size of the temporary storage space based on the storage space to be allocated and the number of replicas corresponding to the business function identifier, and to determine the temporary storage space from the storage pool based on the size of the temporary storage space, wherein the temporary storage space is used to store a target number of temporary files, and the target number of files is the number of replicas corresponding to the business function identifier.
[0266] In one possible implementation, the device further includes an update module, which is used to acquire storage status change information of the external storage and internal storage of the server cluster, and update the storage space of the storage pool according to the storage status change information.
[0267] In one possible implementation, the apparatus further includes a release module, which is configured to receive a storage space release request sent by the computing node, release the data in the virtual disk indicated by the storage space release request, and delete the virtual disk.
[0268] Figure 14 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Figure 14 As shown, the server 1400 includes a processor 1401 and a memory 1402; wherein the processor 1401 is communicatively connected to the memory 1402, and the memory 1401 is used to store computer execution instructions or code; the processor 1401 is used to execute the computer execution instructions or code stored in the memory 1402, thereby executing the technical solution in the aforementioned method embodiment.
[0269] Optionally, the memory 1402 can be either standalone or integrated with the processor 1401. Optionally, when the memory 1402 is a device independent of the processor 1401, the server 1400 may further include a bus for connecting the aforementioned devices.
[0270] The server is used to execute the technical solutions in the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0271] This application also provides a processing chip for executing instructions or code to implement the storage space allocation method described in any embodiment of this application.
[0272] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions to related hardware. The program can be stored in the aforementioned computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory.
[0273] The aforementioned computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device. Furthermore, the aforementioned computer-readable storage medium can include both internal storage units and external storage devices of the computer device. The aforementioned computer-readable storage medium is used to store the aforementioned computer program and other programs and data required by the computer device. The aforementioned computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0274] In the embodiments of this application, the terms "first" and "second" (if they exist) are used only as name identifiers and do not represent the order of first and second.
[0275] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0276] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0277] The above description is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method for allocating storage space, characterized in that, Applied to a server, the method includes: Receive a configuration request, which is used to request the external storage of the server cluster to be registered into the storage space of the server cluster; In response to the configuration request, obtain the storage resources of the external storage of the server cluster; The external storage and internal storage of the server cluster are mapped to a unified logical block device, and a storage pool is obtained based on the logical block device. The storage resources of the storage pool are determined based on the storage resources of the external storage and the internal storage of the server cluster. Upon receiving a storage space allocation request, storage space is allocated using the storage pool; The step of mapping the external storage and internal storage of the server cluster to a unified logical block device, and obtaining a storage pool based on the logical block device, includes: The remaining available space of the external storage of the server cluster and the remaining available space of the internal storage of the server cluster are exposed as corresponding multiple block devices; the external storage of the server cluster includes a first external storage of the server cluster that directly exposes block devices and a second external storage of the server cluster that does not directly expose block devices; the internal storage of the server cluster includes a first internal storage of the server cluster that directly exposes block devices and a second internal storage of the server cluster that does not directly expose block devices. Map the plurality of block devices to logical block devices; A file system is established on the logical block device to obtain the storage pool; the file system is mounted in the temporary directory of the compute node so that the compute node can access the storage pool according to the path of the file system in the temporary directory; The process of exposing the remaining available space of the first external storage of the server cluster as a block device is as follows: Scan the first device corresponding to the remaining available space in the first external storage of the server cluster, and establish a connection with the first device; The process of exposing the remaining available space in the first internal storage of the server cluster as a block device is as follows: Scan the second device corresponding to the remaining available space in the first internal storage of the server cluster, and establish a connection with the second device; The process of exposing the remaining available space of the second external storage of the server cluster as a block device is as follows: Obtain the remaining available space of the second external storage of the server cluster, and create a first virtual disk based on the remaining available space of the second external storage of the server cluster; the first virtual disk is used as a mapping and proxy for the remaining available space of the second external storage of the server cluster. Associating the first virtual disk with a block device in the server exposes the remaining available space of the second external storage of the server cluster as a block device. The process of exposing the remaining available space in the second internal storage of the server cluster as a block device is as follows: Obtain the remaining available space of the second internal storage of the server cluster, and create a second virtual disk based on the remaining available space of the second internal storage of the server cluster; the second virtual disk is used as a mapping and proxy for the remaining available space of the second internal storage of the server cluster. Associating the second virtual disk with a block device in the server exposes the remaining available space of the second internal storage of the server cluster as a block device.
2. The method according to claim 1, characterized in that, Upon receiving a storage space allocation request, the step of allocating storage space using the storage pool includes: Receive storage space allocation requests sent by the computing nodes of the server cluster, the storage space allocation requests including temporary file size and business function identifier; The storage space to be allocated is determined based on the size of the temporary file; Based on the business function identifier and allocation strategy, temporary storage space is determined from the storage pool and allocated to the computing node in the form of a virtual disk. The temporary storage space is greater than or equal to the storage space to be allocated.
3. The method according to claim 2, characterized in that, The allocation strategy includes the correspondence between the business function identifier and the configuration mode; The step of determining temporary storage space from the storage pool based on the business function identifier and allocation strategy, and allocating the temporary storage space to the computing node, includes: Determine the configuration mode corresponding to the business function identifier. If the configuration mode corresponding to the business function identifier is simplified provisioning, a first temporary storage space with a storage space greater than that of the storage pool is determined from the storage pool, and the first temporary storage space is set to zero and then allocated to the computing node. If the configuration mode corresponding to the business function identifier is thick provisioning, a second temporary storage space with a larger storage space than the storage space to be allocated is determined from the storage pool, and the second temporary storage space is set to zero and then allocated to the computing node; If the configuration mode corresponding to the business function identifier is zero-delay, a third temporary storage space containing data is determined from the storage pool, and the third temporary storage space is allocated to the computing node.
4. The method according to claim 2, characterized in that, The allocation strategy includes the correspondence between the business function identifier and the number of replicas; The step of determining temporary storage space from the storage pool based on the business function identifier and allocation strategy includes: The size of the temporary storage space is determined based on the storage space to be allocated and the number of copies corresponding to the business function identifier. The temporary storage space is then determined from the storage pool based on the size of the temporary storage space. The temporary storage space is used to store a target number of temporary files, where the target number of files is the number of copies corresponding to the business function identifier.
5. The method according to claim 1, characterized in that, The method further includes: The system receives a storage space release request sent by the computing node, releases the data in the virtual disk indicated by the storage space release request, and deletes the virtual disk.
6. The method according to claim 1, characterized in that, The method further includes: Obtain storage status change information of the external storage and internal storage of the server cluster, and update the storage space of the storage pool according to the storage status change information.
7. 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 to cause the server to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Business scheduling method and device, and fusion equipment
CN103024001A
Electric power enterprise storage resource management system
CN106973119A
