[go: up one dir, main page]

CN118193479A - Storage space allocation method and server - Google Patents

Storage space allocation method and server Download PDF

Info

Publication number
CN118193479A
CN118193479A CN202410346857.2A CN202410346857A CN118193479A CN 118193479 A CN118193479 A CN 118193479A CN 202410346857 A CN202410346857 A CN 202410346857A CN 118193479 A CN118193479 A CN 118193479A
Authority
CN
China
Prior art keywords
storage space
storage
server cluster
node
space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410346857.2A
Other languages
Chinese (zh)
Inventor
王鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202410346857.2A priority Critical patent/CN118193479A/en
Publication of CN118193479A publication Critical patent/CN118193479A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1727Details of free space management performed by the file system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a storage space distribution method and a server. The method is applied to the server, after the server receives the configuration request, the server registers the external storage of the server cluster to the storage space of the server cluster according to the configuration request to obtain a target storage space, and the expansion of the storage space of the server cluster by using the external storage of the server cluster is realized. And after receiving the storage space allocation request, the server provides a corresponding storage space by utilizing the target storage space so as to store temporary files generated in the process of realizing the business functions. The method provided by the application realizes the expansion of the storage resources of the server cluster by using the external storage of the server cluster, can call the internal storage of the server cluster and the external storage of the server cluster to provide storage space for the computing nodes, effectively supports the realization of service functions, improves the success rate of task execution, and avoids the failure of task execution caused by insufficient storage resources.

Description

Storage space allocation method and server
Technical Field
The present application relates to the field of server technologies, and in particular, to a storage space allocation method and a server.
Background
With the rapid development of computing technology, storage technology, and networking technology, super fusion (Hyperconvergence) technology has evolved. Super fusion is an infrastructure technology that integrates computing, storage, and network functions. The super fusion technology integrates computing and storage resources in a software-defined mode, and provides the computing and storage resources for application programs through a virtualization technology.
The super fusion cluster is a cluster formed by a plurality of servers and storage, wherein each server integrates the functions of calculation, storage and network, and can be used as a calculation node to execute tasks so as to realize the related service functions of the super fusion platform. The super fusion platform (Hyperconverged Infrastructure, HCI) is a software platform based on a super fusion cluster, and is an overall solution constructed based on a super fusion technology. The super fusion platform organizes the computing resources and the storage resources in the super fusion cluster by using virtualization and management software, so that the sharing and management of the resources are realized.
In the super fusion platform, if some platform business functions related to file processing are used, the related files need to be stored as temporary files for data reading, writing and processing. For example, in the implementation of the remote virtual machine template import function of the super fusion platform, the virtual machine template file uploaded by the user needs to be temporarily stored in a storage space directly accessible by the host, so as to perform subsequent data conversion. However, if the storage devices in the super-converged cluster cannot provide sufficient storage space, the service functions of the platform cannot be realized.
Disclosure of Invention
In view of this, the embodiment of the application provides a storage space allocation method and a server, which aim to allocate storage space for temporary files and solve the problem that service functions cannot be realized due to temporary file storage failure.
In a first aspect, an embodiment of the present application provides a method for allocating a storage space, which is applied to a server, where the method includes:
receiving a configuration request, wherein the configuration request is used for requesting to register the external storage of the server cluster into the storage space of the server cluster;
Responding to the configuration request, registering the external storage of the server cluster to the storage space of the server cluster to obtain a target storage space, wherein the target storage space comprises the storage space stored in the server cluster and the storage space stored outside the server cluster;
And when receiving the storage space allocation request, performing storage space allocation by utilizing the target storage space.
In the embodiment of the application, after the server receives the configuration request, the external storage of the server cluster is registered to the storage space of the server cluster according to the configuration request to obtain the target storage space, so that the capacity expansion of the storage space of the server cluster is realized by utilizing the external storage of the server cluster. And after receiving the storage space allocation request, the server provides a corresponding storage space by utilizing the target storage space so as to store temporary files generated in the process of realizing the business functions. The method provided by the application realizes the expansion of the storage resources of the server cluster by using the external storage of the server cluster, can call the internal storage of the server cluster and the external storage of the server cluster to provide storage space for the computing nodes, effectively supports the realization of service functions, improves the success rate of task execution, and avoids the failure of task execution caused by insufficient storage resources.
In one possible implementation manner, registering the server cluster external storage to the storage space of the server cluster to obtain a target storage space includes:
Responding to the configuration request, and establishing connection with external storage of the server cluster;
after establishing connection, verifying authorization information stored outside the server cluster;
And integrating the storage space stored outside the server cluster with the storage space stored inside the server cluster after the verification is passed to obtain the target storage space.
In the embodiment of the application, the target storage space of the server cluster is obtained by integrating the storage space stored outside the server cluster with the storage space inside the server cluster. The whole storage capacity of the server cluster is expanded by utilizing the capacity of the external storage of the server cluster, so that not only is the ever-increasing data storage requirement met, but also the hardware upgrading of the existing server is not required. In addition, after the external storage of the server cluster and the internal storage of the server cluster are integrated, storage resources can be more effectively utilized, and storage performance is improved. And compared with the capacity expansion by using the internal storage of the server cluster, the integrated external storage of the server cluster has higher capacity and cost performance, and the overall cost of the server cluster can be reduced.
In one possible implementation manner, the allocating the storage space by using the target storage space when the storage space allocation request is received includes:
Receiving a storage space allocation request sent by a computing node of the server cluster, wherein the storage space allocation request comprises a space size to be allocated and a service function identifier;
and determining a temporary storage space corresponding to the service function identifier from the target storage space according to the size of the space to be allocated and the allocation strategy, and allocating the temporary storage space to the computing node.
In the embodiment of the application, based on the storage space allocation request, the server can dynamically allocate the storage space according to the actual demand of the computing node, thereby efficiently utilizing the target storage space and avoiding the occurrence of resource waste or deficiency. The storage space allocation request comprises the size of the space to be allocated and service function identifiers, and a manager can flexibly adjust the allocation scheme of the temporary storage space according to different service demands and allocation strategies so as to better meet the storage demands of different computing nodes and optimize the utilization of storage resources. The server rapidly determines the temporary storage space according to the allocation strategy and allocates the temporary storage space to the computing nodes so as to ensure that the computing nodes can obtain the required storage resources in time. According to the service function identifiers in the storage space allocation request, the server can manage the storage spaces corresponding to different service functions, and the server can more effectively organize and manage the storage spaces through the service function identifiers, so that data isolation and security among different service functions are ensured.
In one possible implementation manner, the allocation policy includes a correspondence between service function identifiers and storage spaces;
The determining, according to the size of the space to be allocated and the allocation policy, a temporary storage space corresponding to the service function identifier from the target storage space includes:
And determining at least one storage space corresponding to the service function identifier, and determining a storage space with the residual storage space being larger than or equal to the size of the space to be allocated from the at least one storage space to provide the temporary storage space.
In the embodiment of the application, the server can more quickly determine the temporary storage space based on the allocation strategy of the service function identifier corresponding to the storage space. Through the pre-established corresponding relation, the storage space meeting the requirements can be rapidly and accurately positioned, so that the distribution efficiency is improved. And the server can select the storage space for providing the temporary storage space from the screened storage spaces with at least one residual storage space meeting the requirement, so as to ensure that the size of the provided temporary storage space can meet the requirement of the space to be allocated.
In one possible implementation, the allocation policy includes a priority of use of the plurality of storage spaces;
The determining, according to the size of the space to be allocated and the allocation policy, a temporary storage space corresponding to the service function identifier from the target storage space includes:
And determining at least one storage space with the residual storage space being larger than or equal to the size of the storage space to be allocated, and determining the storage space with the highest use priority from the at least one storage space to provide the temporary storage space according to the use priority of each storage space.
In the embodiment of the application, the server can provide the temporary storage space by preferentially utilizing the storage space with higher priority by setting the use priority of different storage spaces, so that the computing node can preferentially use the storage space with higher performance and stronger reliability when realizing important service functions, thereby improving the overall performance and reliability of the server cluster. Different business functions may have different demands on storage resources, and by setting the use priority of the storage space, a manager can flexibly adjust the allocation of the storage space according to actual conditions, so that the demands of different business functions are better met, and the adaptability and the flexibility of the server cluster are improved. In addition, when determining the temporary storage space, the server combines the remaining storage space and the use priority of the storage space, so that the most suitable storage space is selected to provide the temporary storage space for the computing node.
In one possible implementation, the allocating the temporary storage space to the computing node includes:
and creating a virtual disk corresponding to the temporary storage space through virtualization, and sending virtual disk information of the virtual disk to the computing node.
In the embodiment of the application, the virtual disk corresponding to the temporary storage space is created through virtualization, so that the resource isolation can be effectively realized, the storage spaces among different computing nodes are ensured not to interfere with each other, and the safety and the stability of the system are improved. In addition, the virtualization technology enables the temporary storage space to exist in the form of a virtual disk, and flexible allocation and management of the storage space can be achieved. Meanwhile, the information of the virtual disk is sent to the computing node, so that the quick configuration and the transplantation of the storage space are realized, and the flexibility and the portability of the server cluster are improved. In addition, the virtual disk does not need physical hardware support, can be distributed on the basis of the existing storage space, and can reduce hardware cost.
In one possible implementation, the method further includes: and acquiring storage state change information stored outside the server cluster, and updating the target storage space according to the storage state change information.
In the embodiment of the application, the server can sense the resource change condition of the external storage of the server cluster, such as increase and decrease of the residual storage space, faults of the external storage of the server cluster and the like, in real time by acquiring the storage state change information of the external storage of the server cluster. The server can respond timely and update the target storage space, and real-time performance and accuracy of the storage space are ensured.
In one possible implementation, the method further includes: and receiving a storage space release request, and releasing the data in the virtual disk indicated by the storage space release request.
In the embodiment of the application, after receiving the storage space release request, the server can dynamically release the data in the virtual disk according to the actual demand, thereby avoiding the waste of the storage space, reducing the unnecessary occupation of the storage space and improving the utilization efficiency of the storage space.
In a second aspect, an embodiment of the present application provides another method for allocating a storage space, which is applied to a server, where the method includes:
receiving a storage space allocation request sent by a computing node in a server cluster, wherein the storage space allocation request comprises a space size to be allocated and a service function identifier;
Determining a temporary storage space corresponding to the service function identifier from a target storage space of the server cluster according to the size of the space to be allocated and an allocation policy, and allocating the storage space for the computing node by using the temporary storage space, wherein the allocation policy comprises a corresponding relation between the service function identifier and the storage space or a use priority of the storage space, and the target storage space comprises a storage space stored outside the server cluster and a storage space stored inside the server cluster.
In the embodiment of the application, the server receives the storage space allocation request sent by the computing node, and determines the temporary storage space from the target storage space according to the size of the space to be allocated and the allocation strategy, so that the storage space can be allocated for different computing nodes according to actual requirements, and the reasonable utilization and allocation of storage resources are realized. The target storage space comprises a storage space of external storage of the server cluster and a storage space of internal storage of the server cluster, and the server utilizes the external storage of the server cluster to expand the storage space of the server cluster, so that the stability of the server cluster is improved.
In one possible implementation manner, the allocation policy includes a correspondence between a service function identifier and a storage space, and determining, according to the size of the space to be allocated and the allocation policy, a temporary storage space corresponding to the service function identifier from a target storage space of a server cluster includes:
And determining at least one storage space corresponding to the service function identifier, and determining a storage space with the residual storage space being larger than or equal to the size of the space to be allocated from the at least one storage space to provide the temporary storage space.
In a possible implementation manner, the allocation policy includes usage priorities of the multiple storage spaces, and the determining, according to the size of the space to be allocated and the allocation policy, the temporary storage space corresponding to the service function identifier from the target storage space of the server cluster includes:
And determining at least one storage space with the residual storage space being larger than or equal to the size of the storage space to be allocated, and determining the storage space with the highest use priority from the at least one storage space to provide the temporary storage space according to the use priority of each storage space.
In a third aspect, an embodiment of the present application provides a storage space allocation apparatus, including:
the first receiving module is used for receiving a configuration request, wherein the configuration request is used for requesting to register the external storage of the server cluster into the storage space of the server cluster;
The registration module is used for responding to the configuration request, registering the external storage of the server cluster to the storage space of the server cluster to obtain a target storage space, wherein the target storage space comprises the storage space stored in the server cluster and the storage space stored outside the server cluster;
and the first allocation module is used for allocating the storage space by utilizing the target storage space under the condition of receiving the storage space allocation request.
In a possible implementation manner, the registration module is specifically configured to respond to the configuration request and establish a connection with a storage outside the server cluster; after establishing connection, verifying authorization information stored outside the server cluster; and integrating the storage space stored outside the server cluster with the storage space stored inside the server cluster after the verification is passed to obtain the target storage space.
In a possible implementation manner, the first allocation module is specifically configured to receive a storage space allocation request sent by a computing node of the server cluster, where the storage space allocation request includes a size of a space to be allocated and a service function identifier; and determining a temporary storage space corresponding to the service function identifier from the target storage space according to the size of the space to be allocated and the allocation strategy, and allocating the temporary storage space to the computing node.
In one possible implementation manner, the allocation policy includes a correspondence between service function identifiers and storage spaces; the first allocation module is specifically configured to determine at least one storage space corresponding to the service function identifier, and determine, from the at least one storage space, that a remaining storage space is greater than or equal to the storage space to be allocated, and provide the temporary storage space.
In one possible implementation, the allocation policy includes a priority of use of the plurality of storage spaces; the first allocation module is specifically configured to determine at least one storage space with a remaining storage space greater than or equal to the size of the storage space to be allocated, and determine, according to a usage priority of each storage space, a storage space with a highest usage priority from the at least one storage space, to provide the temporary storage space.
In one possible implementation manner, the first allocation module is specifically configured to create, through virtualization, a virtual disk corresponding to the temporary storage space, and send virtual disk information of the virtual disk to the computing node.
In a possible implementation manner, the device further includes an updating module, where the updating module is configured to obtain storage state change information stored outside the server cluster, and update the target storage space according to the storage state change information.
In one possible implementation manner, the apparatus further includes a release module, where the release module is configured to receive a storage space release request, and release data in the virtual disk indicated by the storage space release request.
In a fourth aspect, an embodiment of the present application provides another storage space allocation apparatus, including:
The second receiving module is used for receiving a storage space allocation request sent by a computing node in the server cluster, wherein the storage space allocation request comprises a space size to be allocated and a service function identifier;
The second allocation module is configured to determine, according to the size of the space to be allocated and an allocation policy, a temporary storage space corresponding to the service function identifier from a target storage space of the server cluster, and allocate the storage space for the computing node by using the temporary storage space, where the allocation policy includes a correspondence between the service function identifier and the storage space or a usage priority of the storage space, and the target storage space includes a storage space stored outside the server cluster and a storage space stored inside the server cluster.
In one possible implementation manner, the allocation policy includes a correspondence between service function identifiers and stored information; the allocation module is specifically configured to determine at least one piece of storage information corresponding to the service function identifier from the plurality of pieces of storage information, and determine, from the at least one piece of storage information, storage information with a size of a remaining storage space greater than or equal to a size of the storage space as the target storage information.
In one possible implementation, the allocation policy includes the plurality of storage new usage priorities; the allocation module is specifically configured to determine at least one piece of storage information with a size of a remaining storage space greater than or equal to a size of the storage space from the plurality of pieces of storage information, and determine, according to a usage priority of each piece of storage information, storage information with a highest usage priority from the at least one piece of storage information as the target storage information.
In a fifth aspect, an embodiment of the present application provides a server, including a processor, and a memory communicatively coupled to the processor;
The memory is used for storing computer execution instructions;
The processor is configured to execute the computer-executable instructions stored in the memory, so as to implement the method for allocating storage space according to any one of the embodiments in the first aspect or the second aspect.
In a sixth aspect, an embodiment of the present application provides a server cluster, where the server cluster includes a management node, a computing node, and a storage node, where the storage node includes a server cluster internal storage and a server cluster external storage; the management node is configured to implement the storage space allocation method according to any one of the embodiments of the first aspect or the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer storage medium having code stored therein, where when the code is executed, an apparatus executing the code implements the method for allocating storage space according to any one of the first or second aspects.
Drawings
In order to more clearly illustrate this embodiment or the technical solutions of the prior art, the drawings that are required for the description of the embodiment or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system architecture diagram of a server cluster according to an embodiment of the present application;
FIG. 2 is a system architecture diagram of another server cluster according to an embodiment of the present application;
FIG. 3 is a system architecture diagram of a server cluster according to another embodiment of the present application;
Fig. 4 is a schematic diagram of a front-end management page according to an embodiment of the present application;
fig. 5 is a flow chart of a method for allocating storage space according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another method for allocating storage space according to an embodiment of the present application;
Fig. 7 is a signaling diagram of a method for allocating storage space according to an embodiment of the present application;
fig. 8 is a signaling diagram of a process of registering a storage node according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a storage space allocation device according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
It should be noted that the described embodiments of the present application are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
A server cluster is a cluster made up of multiple servers interconnected by an input/output system, such as a superset cluster. These servers may work cooperatively to provide the user with the services of application programs and data resources. The servers can be connected through a high-speed network and managed through distributed resource management software (DIGITAL RIGHTS MANAGEMENT, DRM). The plurality of servers in a server cluster can be functionally divided into management servers (also referred to as management nodes), computing servers (also referred to as computing nodes), and storage servers (also referred to as storage nodes).
The compute nodes are the core components of the server cluster that are responsible for performing the computing tasks. The compute nodes are workload processors in the cluster that are responsible for handling large amounts of data and computing tasks. Computing nodes typically have high performance processors, large amounts of memory, and high speed network interfaces to meet the high load and high performance requirements. The main tasks of the computing node are executing applications, processing data and analyzing results. They can handle multiple tasks in parallel, improving overall computing performance by way of distributed computing. The computing nodes are connected through a high-speed network to conduct data transmission and communication, so that tasks can be distributed to the nodes efficiently, and load balancing is achieved. In the embodiment of the application, the computing node can be used for executing tasks corresponding to business functions so as to provide business services for users.
A management node is a node in a server cluster that is responsible for monitoring, managing, and configuring cluster storage resources or computing resources. The management node is a management center of the server cluster and is responsible for monitoring, scheduling and managing other nodes in the server cluster. The management node is responsible for collecting the running state information, processing logs and alarm information of the clusters, and providing the deployment, configuration and maintenance functions of the clusters. Management nodes typically have powerful computing and storage capabilities to support complex monitoring and management tasks. The management node can also communicate with other nodes and send management instructions and configuration parameters to ensure stable operation and efficient performance of the server cluster. The management node also provides a visual interface of the server cluster and a management tool, such as a super fusion platform, so that an administrator can conveniently monitor and manage the cluster.
The storage nodes are nodes in the server cluster responsible for data storage and management. The storage nodes provide data storage and backup functions required by the server cluster, and ensure the reliability and durability of the data. Storage nodes are typically equipped with high performance storage devices, such as disk arrays or distributed file systems, to provide a large amount of storage space and high speed data access performance. The storage nodes exchange and synchronize data with other nodes through a network sharing protocol or other storage technologies. In the embodiment of the present application, the storage nodes inside the server cluster may also be referred to as cluster internal storage (hereinafter simply referred to as internal storage). The storage nodes may be storage area networks (Storage Area Network, SAN), block storage (RADOS Block Device, RBD), LOCAL storage (LOCAL) or network attached storage (Network Attached Storage, NAS).
A SAN is a specialized high-speed network architecture for interfacing storage devices such as disk arrays, tape libraries, and other types of storage devices, as well as servers and computer systems. SANs are commonly used to provide high performance, reliability, and flexible storage solutions.
RBD is a storage service provided in a Ceph distributed storage system. RBD allows users to create and manage virtual block devices in a Ceph cluster, similar to conventional disk devices. RBDs provide high reliability, high availability, and scalability by distributing data across multiple storage nodes in a Ceph cluster. Each RBD block is divided into a plurality of memory objects (a data unit in an object storage device) and stored on a plurality of OSDs (object storage devices) of a Ceph cluster.
NAS is a device dedicated for data storage and sharing. NAS provides file-level storage services over a network connection (e.g., ethernet). NAS is typically a stand-alone hardware device with one or more hard disk drives built in and having proprietary operating systems and management interfaces. NAS may be connected to a Local Area Network (LAN) or Wireless Local Area Network (WLAN) to enable multiple computers and other devices to share storage resources.
LOCAL refers to a physical hard disk or Solid State Disk (SSD) that is directly connected to a computer or server for storing operating systems, applications, files, and other data.
In the process of executing tasks by the computing node, some related files or intermediate data (i.e. temporary files) for executing the tasks need to be stored in the storage node, if the storage node cannot provide sufficient space for the computing node, the corresponding service functions cannot be provided for the user due to the fact that the temporary files cannot be stored to cause failure of executing the tasks. In order to improve the success rate of task execution and the stability of service function realization, the embodiment of the application provides a storage space allocation method and a server. The execution subject of the method may be a management node in a server cluster.
After receiving the configuration request, the management node registers the external storage of the server cluster into the storage space of the server cluster according to the configuration request to obtain a target storage space, so as to realize capacity expansion of the storage space of the server cluster. The management node receives the storage space allocation request, and the management node can provide a temporary storage space for the computing node requesting the temporary storage space by utilizing the expanded target storage space so as to support the computing node to store the temporary file into the temporary storage space when realizing the service function. The external storage of the server is registered in the storage space of the server cluster, so that the size of the storage space of the server cluster is improved, service function execution failure caused by insufficient temporary storage space of the server cluster is avoided, and the stability of the server cluster is improved.
The server cluster architecture provided by the embodiment of the application is described below with reference to the accompanying drawings.
The embodiment of the application provides a server cluster, as shown in fig. 1, and fig. 1 is a system architecture diagram of the server cluster. The server cluster includes a management node, at least two computing nodes, and a plurality of internal storages (the internal storages are storage nodes inside the server cluster, which are also referred to as server cluster internal storages) such as SAN, RBD, LOCAL and NAS. The management nodes in the server cluster are connected to at least one external storage (external storage is a storage node outside the server cluster, also called server cluster external storage) via a network protocol.
The management node is used for running the storage space management distribution system. The management node can provide a function of configuring the storage node for the user, and after the user performs relevant configuration on the storage node through a front-end management page displayed by a client (electronic equipment used by the user), the management node can uniformly manage the storage nodes in the server cluster according to the configuration of the user, such as registration, verification and the like of the storage node, and is used for receiving a storage space allocation request from each computing node, and performing distribution, monitoring and release of temporary storage space according to the storage space allocation request. The management node is further configured to assign tasks corresponding to the service functions to the computing nodes. The temporary storage space is used for storing temporary files involved in the task execution process of the computing node. The temporary storage space is hereinafter simply referred to as a storage space.
The computing node is used for sending a storage space allocation request to the management node to apply for the storage space, executing tasks corresponding to the service functions by utilizing the storage space provided by the internal storage or the external storage, and providing corresponding service functions for users.
Internal storage refers to storage nodes that are located within a server cluster, typically within the same local area network as the compute nodes and the management nodes. The internal storage may provide high speed data access and transmission capabilities, and the computing nodes may access data on the internal storage directly through network protocols (e.g., NFS, SMB/CIFS, etc.).
External storage refers to storage nodes located outside of a server cluster, typically in communication with management nodes and computing nodes in the cluster through high-speed network connections (e.g., fibre channel or ethernet, etc.). The external storage can provide larger storage capacity and higher performance, and the embodiment of the application expands the storage capacity of the whole server cluster by expanding the storage nodes outside the server cluster, thereby providing more sufficient storage space for the computing nodes and avoiding the failure of executing tasks by the computing nodes due to insufficient storage space.
The embodiment of the application further provides another server cluster, as shown in fig. 2, and fig. 2 is a system architecture diagram of another server cluster provided in the embodiment of the application. The compute nodes run node proxies for the storage space management distribution system. When the computing node executes the task corresponding to the service function, the computing node can apply for the storage space from the management node through the node proxy, and after receiving the related information (such as address information, storage space size and the like) of the storage space distributed by the management node through the node proxy, the computing node mounts the access path of the storage space in a certain directory of the computing node, so that the computing node accesses the storage space according to the directory, further stores the temporary file into the storage space or reads the temporary file from the storage space, thereby supporting the computing node to execute the task and realizing the service function.
In one possible implementation, as shown in fig. 3, the storage management distribution system includes a platform storage registration module, a platform storage management module, and a platform storage distribution module. The node agent comprises a computing node storage space adaptation module and a computing node storage management module. The storage node shown in fig. 3 includes an internal storage and an external storage.
After the user configures the internal storage through the front-end management page, the platform storage space registration module registers the configured internal storage. When the external storage is required to be used for carrying out storage expansion on the server cluster, a user can configure the external storage through the front-end management page, the platform storage space registration module can register the configured external storage, and the external storage is also used as a storage node. The platform storage space registration module is used for registering the external storage into the storage space of the server cluster to obtain a corresponding target storage space.
The server cluster may include a plurality of computing nodes and a plurality of storage nodes, and each computing node may be capable of network communication with a portion of the storage nodes. That is, the compute nodes are not able to access all storage nodes over the network, nor are the storage nodes able to communicate with all compute nodes over the network. In the embodiment of the application, the platform storage space registration module is further used for verifying the network connectivity between the storage node and the computing node. As one implementation, the platform storage space registration module determines a computing node capable of performing network communication with each storage node by verifying network connectivity between the storage node and other computing nodes, and obtains a computing node list corresponding to the storage node. As another implementation manner, the platform storage space registration module determines the storage nodes which can be accessed by the computing nodes through the network by verifying the network connectivity between each computing node and each storage node, and obtains a storage node list corresponding to the computing nodes.
The platform storage space management module is used for managing the distributed storage spaces in the storage nodes, periodically scanning the free storage spaces and the health states of the storage nodes, and providing guarantee for realizing service functions.
The platform storage space distribution module is used for receiving a storage space distribution request sent by the computing node and selecting a storage node to provide storage space according to the storage space distribution request and information configured by a user.
In the embodiment of the application, the platform storage space distribution module can create the virtual disk on the selected storage node through virtualization, expose the virtual disk to the computing node through a network protocol capable of performing read-write operation, and return the virtual disk information (such as address and read-write access path) to the computing node storage space management module on the computing node. The space of the virtual disk is a storage space, and can store related temporary files for realizing service functions.
The Network protocols that can be read and write operations can be the Network file system (Network FILE SYSTEM, NFS), the universal internet file system (Common INTERNETFILE SYSTEM, CIFS), the Network block devices (Network Block Device, NBD), and the internet small Computer system interface (INTERNET SMALL Computer SYSTEMINTERFACE, ISCSI).
The computing node storage space management module is used for sending a storage space allocation request to the platform storage space distribution module according to the size of the temporary file and the service function when the computing node executes the task corresponding to the service function. The storage space allocation request may include a size of space to be allocated and a service function identification indicating a unique service function.
In one possible implementation manner, after receiving the storage space allocation request, the platform storage space allocation module may determine at least one corresponding storage node according to the service function identifier, scan the sizes of the remaining storage spaces in the storage nodes by using the platform storage space management module, determine whether the sizes of the remaining storage spaces in each storage node are greater than or equal to the sizes of the spaces to be allocated, and further determine the storage node for providing the storage space from the storage nodes with the sizes of the free storage spaces greater than or equal to the sizes of the spaces to be allocated according to the use priority of each storage node, and create a virtual disk in the storage node.
The computing node storage space management module is also used for sending a storage space release request to the platform storage space distribution module when the computing node executes the task corresponding to the completion service function. The storage space release request is used to instruct release of data stored within 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 for the computing node, namely, empty the data in the storage space.
The computing node storage space adaptation module is used for receiving the related information of the storage space distributed by the platform storage space distribution module and establishing connection between the computing node and the storage node providing the storage space.
In the embodiment of the application, the platform storage space distribution module provides the relevant information of the storage space to the computing node storage space adaptation module in the form of a virtual disk, wherein the relevant information of the storage space is the relevant information of the virtual disk. After the computing node storage space adapting module establishes connection between the computing node and the virtual disk according to the related information, a file system can be further established in the virtual disk, so that the computing node stores the temporary file in the virtual disk. After the file system is established, the computing node storage space adapting module mounts the file system in a certain directory (called a temporary directory) of the computing node, informs the computing node of a path of the file system in the temporary directory, and the computing node can store the temporary file into the virtual disk through the path and read the temporary file according to the path when required.
Through the server cluster and the storage space management distribution system operated by the management node provided by the embodiment of the application, a user can configure the storage node according to own needs through the front-end management page, such as the corresponding relation between the service function and the storage node, the priority of the storage node and the available calculation node list corresponding to the storage node. The management node can register the internal storage and the external storage, and the storage resources of the server cluster are expanded by using the external storage. When a user invokes a service function, a computing node executing a task corresponding to the service function may send a request to a management node to apply for storage space. The management node can utilize external storage and internal storage to distribute storage space so as to support the computing node to store temporary files related to service functions into the storage space and realize the service functions. In addition, in the process of executing tasks by the computing nodes, the management nodes can also monitor the use condition of the storage space in each storage node in real time, and release the data in the storage space after the task execution is completed, so as to reduce unnecessary occupation and resource waste of the storage nodes.
Through the process, the management node utilizes the external storage to realize the expansion of the server cluster storage resources, and can call the internal storage or the external storage to provide a storage space for the temporary file, so that the realization of the service function is effectively supported, the success rate of task execution is improved, and the task execution failure caused by insufficient storage resources is avoided. And moreover, a user can configure the storage nodes through the front-end management page according to own requirements, and the management nodes can distribute the storage space according to the configuration of the user, so that the flexibility of the server cluster is improved.
In one possible implementation manner, as shown in fig. 4, fig. 4 is a schematic diagram of a front-end management page according to an embodiment of the present application. The front-end management page may be presented via an electronic device used by the user. The user can manage and configure the allocation policy through the front-end management page, and the allocation policy can comprise the corresponding relation between the service function and the storage nodes, the use priorities of a plurality of storage nodes or the corresponding relation between the storage nodes and the computing nodes.
In an embodiment of the application, the server cluster is capable of providing at least one service function, and the server cluster comprises at least two storage nodes. Through the front-end management page, a user can configure the corresponding relation between the service function and the storage node, namely, the storage node which can store the temporary file in the process of executing the task corresponding to the service function by the computing node is configured. One service function may correspond to one storage node, or one service function may correspond to a plurality of storage nodes.
When a user invokes a certain service function, after receiving a storage space allocation request sent by a computing node executing a task corresponding to the service function, the management node may select a storage node from one or more storage nodes corresponding to the service function according to a corresponding relationship between the service function and the storage node, which is preconfigured by the user, to provide a storage space for the computing node. In other words, the storage node corresponding to the service function is configured to provide, when the computing node performs a task corresponding to the service function, a space for storing a temporary file for implementing the service function for the computing node, that is, a storage space.
Because the computing node has different requirements for storing or reading and writing temporary files in the process of implementing different service functions, for example: the realization of the remote virtual machine template importing function has higher requirement on the available capacity of the storage node, so that the computing node needs to temporarily store the virtual machine template file uploaded by the user (the virtual machine template file is a temporary file at the moment) into the storage node which can provide a larger storage space; the realization of the sleep function of the virtual machine has high requirements on the reliability and the read-write speed of the storage node, so that the computing node needs to store the related temporary files into the storage node with high read-write performance and reliability. By configuring the corresponding relation between the service function and the storage node, a more adaptive storage node can be provided for the realization function of the computing node, and the stability and efficiency of the realization of the service function are improved.
In the embodiment of the application, the read-write speed and the storage space between different storage nodes may have different, and a user can configure the use priority of the storage node according to the read-write speed and the storage space, wherein the use priority is used for indicating the priority degree of using the storage node to provide the storage space. For example: a storage node with high read-write speed and large storage space is used with high priority; and the storage nodes with low read-write speed and small storage space have low use priority. Of course, the storage node with high read-write speed and large storage space can also be configured, and the use priority is low; and a storage node with low read/write speed and small storage space is used with high priority.
The user may also configure the usage priority of the storage node according to its usage habits, for example: the user is used to storing the service data of the user in the SAN, so as to avoid storing temporary files in the SAN to occupy space and influence the storage of the service data of the user, the use priority of the SAN can be set to be the lowest, and the RBD, LOCAL and NAS are preferentially used to provide temporary storage space.
The user may further configure the usage priority of the plurality of storage nodes according to other requirements, and embodiments of the present application are not specifically limited. But the embodiment of the application can provide more flexible service for users, has stronger configurability of the server cluster and the storage nodes and improves the user experience.
In addition, in the embodiment of the present application, after the user configures the correspondence between the service functions and the storage nodes, if one service function corresponds to at least two storage nodes, the user may further configure the usage priorities of the at least two storage nodes. When the computing node executes the task corresponding to the service function, the computing node can determine the storage node for providing the storage space from the corresponding at least two storage nodes according to the use priority configured by the user after receiving the storage space allocation request, so that more flexible configuration selection is further provided for the user.
Different traffic functions may correspond to the same storage node. For example: the service function A corresponds to the storage node SAN and the storage node RBD, and the service function B also corresponds to the storage node SAN and the storage node RBD. However, the usage priority levels of SAN and RBD may be different for traffic function a and traffic function B. For example: when executing the task corresponding to the service function A, the use priority of the SAN is higher than the use priority of the RBD, and when executing the task corresponding to the service function B, the use priority of the RBD is higher than the use priority of the SAN. Therefore, the storage nodes corresponding to the service functions are configured with the use priority, so that the storage space can be provided for the storage nodes which are more adapted to the targeted use of different service functions, and the flexibility of the server cluster is improved.
In the above embodiment, the user may configure the usage priority of the storage node corresponding to each service function. The user can also configure the corresponding relation between the service function and the storage nodes and the use priority of all the storage nodes at the same time. When the computing node executes the task corresponding to the service function, the management node can determine the storage node corresponding to the service function after receiving the storage space allocation request, and select the storage node with the highest use priority corresponding to the service function as the storage node for providing the storage space according to the use priorities of all the storage nodes.
For example: the SAN has a higher usage priority than the RBD, which is higher than the LOCAL, which is higher than the NAS. The corresponding storage nodes of the service function A and the service function B are SAN and RBD. When the computing node executes the task corresponding to the service function a, the management node may use the SAN as a storage node providing the storage space after receiving the storage space allocation request. When the computing node executes the task corresponding to the service function B, the management node also takes the SAN as the storage node for providing the storage space after receiving the storage space allocation request.
In the embodiment of the application, a user can configure a computing node list which can access a certain storage node, namely a computing node list corresponding to the storage node, wherein the computing node list comprises at least one computing node which can access the storage node. Or the user may configure a storage node list corresponding to the computing node, where the storage node list includes at least one storage node that the computing node can access. By configuring the computing node list or the storage node list, the access authority of the computing node to the storage node can be definitely determined, and the corresponding relation between the storage node and the computing node can be determined.
For example, server clusters include SAN, RBD, LOCAL and NAS, as well as compute node 1, compute node 2, and compute node 3. The SAN corresponding computing node list comprises a computing node 1 and a computing node 2, the RBD corresponding computing node list comprises a computing node 1 and a computing node 3, the local corresponding computing node list comprises a computing node 1, a computing node 2 and a computing node 3, and the NAS corresponding computing node list comprises a computing node 2 and a computing node 3.
When the computing node 1 performs a task corresponding to a service function, the management node may select SAN, RBD, or LOCAL as a storage node providing a storage space after receiving the storage space allocation request. When the computing node 2 performs a task corresponding to a service function, the management node may select SAN, LOCAL or NAS as a storage node providing a storage space after receiving a storage space allocation request. When the computing node 3 performs a task corresponding to a service function, the management node may select RBD, LOCAL and NAS as storage nodes providing storage space after receiving the storage space allocation request.
By configuring the computing node list which can access a certain storage node, the access authority of each computing node to the storage node can be configured, and the access security of the storage node is improved.
It can be appreciated that a user can configure the correspondence between the service function and the storage node, the usage priority of the plurality of storage nodes, and the computation node list corresponding to the storage nodes at the same time.
After receiving the storage space allocation request, the management node determines the storage nodes which can be accessed by the computing node sending the storage space allocation request, and determines the storage nodes corresponding to the service functions to be realized. And screening the storage nodes which can be accessed by the computing nodes and correspond to the service functions, and selecting the storage node with the highest use priority from the storage nodes which can be accessed by the computing nodes and correspond to the service functions according to the pre-configured use priority to provide a temporary storage space for the computing nodes.
The implementation flow of the storage space allocation method provided by the embodiment of the application is described below with reference to the accompanying drawings.
In a possible implementation manner, a method for allocating storage space provided by an embodiment of the present application is shown in fig. 5.
S501: and the user sends a service function calling request to the management node.
The user side is used for showing the front-end management page shown in fig. 4 to the user and for showing the various service functions to the user. After triggering the user terminal to display the options corresponding to the service functions in the page, the user terminal can generate a corresponding service function calling request according to the operation of the user, wherein the service function calling request is used for requesting to provide the service functions, and the service function calling request can comprise an identifier corresponding to the service functions, and the identifier is used for indicating the unique service functions. The user sends a service function call request to the management node to request call of the service function.
S502: the management node distributes tasks corresponding to the service functions to the computing nodes.
After receiving a service function call request sent by a user terminal, the management node distributes tasks corresponding to the service functions indicated by the identifiers to the computing nodes, and the computing nodes execute the tasks to realize the service functions.
In the embodiment of the application, the management node can determine the computing node which is most suitable for executing the task according to the load of each computing node, the available resources and other factors so as to improve the execution efficiency of the task.
S503: the compute node performs the task and sends a storage allocation request to the management node.
The storage allocation request is used to request storage from the management node. The storage space allocation request includes a size of the space to be allocated and a service function identification.
The size of the space to be allocated refers to the size of the temporary storage space applied by the computing node to the management node. The temporary storage space is used for storing temporary files involved in the task execution process of the computing node. The temporary file refers to temporary files or data generated in the task execution process, and can also be files required for realizing business functions. Temporary files include intermediate results during task execution, temporary calculation data, or other data that needs to be temporarily stored. The size of the space to be allocated may be determined according to the size of the temporary file, and the size of the space to be allocated is at least larger than the size of the temporary file.
The compute nodes may generate a series of intermediate results during execution, which may need to be used in subsequent compute steps. These intermediate results are stored in a temporary file to facilitate subsequent calculations and processing. Further, by storing the temporary file, a part of data can be temporarily stored, and the calculation efficiency and response speed can be improved.
In the process of executing tasks by the computing node, the computing node sends a storage space allocation request to the management node to acquire the needed temporary storage space, and further executes the tasks by using the storage space, so that the service function is realized.
S504: and the management node allocates the storage space for the computing node according to the storage space allocation request and feeds back the storage space information to the computing node.
The management node can determine the size of the storage space required to be allocated for the computing node according to the size of the space to be allocated, and the size of the allocated storage space is larger than or equal to the size of the space to be allocated so as to support the computing node to be capable of completely storing the temporary file into the storage space and avoid temporary file storage failure caused by insufficient storage space.
The management node can determine the corresponding unique service function according to the service function identifier, and further determine the storage node for providing the storage space according to the pre-configured corresponding relation. The pre-configured correspondence may be the correspondence between the service function and the storage node described above, or the correspondence between the storage node and the computing node.
In the embodiment of the present application, the management node may also determine the storage node for providing the storage space in combination with the use priority of the preconfigured storage node, and the specific implementation may be described above or below.
S505: and the computing node executes tasks corresponding to the service functions by using the storage space.
In the process of executing the task, the computing node stores the related intermediate result or data as a temporary file in the allocated storage space, and executes necessary operations such as computation, processing and the like to complete the task and realize the service function.
By the method, the storage space can be allocated for the computing node by using the storage node so as to store the temporary file in the task execution process of the computing node. In addition, the method can combine different service functions to be realized and the temporary file size, and flexibly select matched storage nodes to provide storage space for the computing nodes. When the residual storage space of a certain storage node is insufficient, other corresponding storage nodes can be selected to provide the storage space, so that task execution failure caused by insufficient storage space is avoided. In addition, the storage nodes comprise internal storage and external storage, and the embodiment of the application utilizes the whole storage resources of the external storage expansion server cluster to further increase the storage nodes, so that more sufficient storage space can be provided for the computing nodes.
In a possible implementation manner, as shown in fig. 6, on the basis of steps S501 to S505, the storage space allocation method further includes:
s506: and after the computing node executes the completion task, sending a storage space release request to the management node.
The storage space release request is used for requesting the management node to release the temporary file in the storage space. After the task execution is finished, the computing node sends a storage space release request to the management node, and notifies the management node of releasing the storage space allocated before, so that the storage space is released to other tasks or other computing nodes for use.
S507: and the management node releases the storage space according to the storage space release request.
When receiving a storage space release request of a computing node, the management node correspondingly releases data in the storage space allocated for the computing node, and re-brings the released storage space into an available storage resource pool so as to allocate and use the storage space again later.
S508: and the computing node returns the execution result of the task to the user side.
After the task is executed, the computing node returns an execution result to the user end, wherein the execution result may include the calculation result, output data, state information of task execution and the like. The user terminal processes and records the received execution result so as to facilitate subsequent business operation or user inquiry.
S509: and the user terminal receives the execution result and performs subsequent operation according to the service requirement.
After receiving the task execution result returned by the computing node, the user performs subsequent operations according to the service requirement, such as executing a subsequent service flow, updating a service state, displaying the execution result to the user, and the like. The user side is responsible for effectively processing and utilizing the task execution result so as to meet the requirements of users and the requirements of business processes.
Steps S506 to S509 are subsequent steps of the storage space allocation process, including release of the storage space, return of the task execution result, and the like. The steps S501-S509 together form a complete service function execution flow, which involves multiple links such as user request, task allocation, storage space allocation, task processing, and result return. In a practical scenario, it may also involve operations and management of monitoring, logging, and other aspects of exception handling.
The process of the management node distributing the storage space according to the storage space distribution request and the process of the computing node executing the task by using the storage space will be further described below with reference to fig. 7.
As shown in fig. 7, fig. 7 is a signaling diagram of a storage space allocation method according to an embodiment of the present application, and a service function implementation process includes:
s701: and the user sends a service function calling request to the management node.
S702: the management node distributes tasks corresponding to the service functions to the computing nodes.
S703: the compute node performs tasks and sends a storage allocation request to the management node through the node proxy.
Steps S701 to S703 can refer to the description of steps S501 to S503.
S704: the management node determines the storage node according to the storage space allocation request.
After receiving the storage space allocation request, the management node determines at least one storage node which can be accessed by the computing node through the network according to the corresponding relation between the computing node and the storage node, and obtains a first storage node set (the first storage node set comprises at least one storage node which can be accessed by the computing node through the network). And determining at least one storage node corresponding to the service function according to the service function identifier to obtain a second storage node set (the second storage node set comprises at least one storage node corresponding to the service function).
The management node determines at least one storage node which exists in the first storage node set and the second storage node set simultaneously, and obtains a third storage node set (the third storage node set comprises at least one storage node which exists in the first storage node set and the second storage node set simultaneously).
The management node determines a third storage node set through the platform storage space management module, and at least one storage node with the size of the remaining storage space being larger than the size of the space to be allocated is obtained to obtain a fourth storage node set (the fourth storage node set comprises at least one storage node with the size of the remaining storage space being larger than the size of the space to be allocated).
If the fourth storage node set includes one storage node, the storage node is used as a storage node for providing storage space.
If the fourth storage node set includes at least two storage nodes, according to the use priorities of the storage nodes, the storage node with the highest use priority of the at least two storage nodes is used as the storage node for providing the storage space.
The usage priority indicates a priority of using the storage node. In the embodiment of the present application, the higher the priority of use means the more preferentially the storage node is used, and therefore, the storage node with the highest priority will be used as the storage node for providing the storage space. Of course, in another implementation, the lower the priority of use means the more preferentially the storage node is used, and at this time, the storage node with the lowest priority will be used as the storage node for providing the storage space.
S705: the management node establishes a virtual disk in the storage node.
After determining the storage node for providing the storage space in step S704, the management node establishes a connection with the storage node through the network, and creates a virtual disk in the storage node through a virtualization technology.
A virtual disk is a logical unit of storage corresponding to a portion of storage space (i.e., memory space) divided over storage nodes. When creating the virtual disk, the management node needs to specify relevant parameters such as the capacity (i.e. the storage space size), performance characteristics, access rights and the like of the virtual disk so as to meet the requirement of the computing node on the storage space.
S706: the management node sends the virtual disk information to a node agent in the computing node.
The virtual disk information may include an identifier and a storage location. The identifier is used to indicate a unique virtual disk, the storage location is a specific storage location of the virtual disk on the storage node, and the storage location may be a physical address of the storage node or other location identifier.
The virtual disk information may also include capacity, access rights, and management information. The capacity of the virtual disk refers to the capacity of the virtual disk, and the node agent can know the available storage space of the virtual disk according to the capacity; the access authority is the access authority control of the virtual disk, such as read-write authority, user authority and the like; the management information may include information such as an administrator of the virtual disk, creation time, update time, and the like.
S707: and the computing node establishes network connection with the storage node according to the virtual disk information.
S708: the computing node establishes a file system in the virtual disk through the node agent, and mounts the file system in a directory of the computing node.
The node proxy creates a file system on the virtual disk. A file system is an organization structure used to manage files and data on a virtual disk in order to store temporary files on the virtual disk. Common file systems include Ext4, NTFS, XFS, etc. And selecting a certain directory on the computing node as a mounting point, and mounting the created file system into the selected directory. Mount is a process of associating a file system with a directory (i.e., mount point) that will be used to access files and data in a virtual disk, which can be made an access entry for the virtual disk by mounting the file system to the directory.
S709: the compute node determines a mount point for the file system.
S710: the compute node performs tasks.
When the intermediate result or data is generated, the computing node can access the virtual disk according to the directory (i.e. the mounting point), and then the intermediate result or data is written into the virtual disk as a temporary file. And reads the temporary file from the virtual disk according to the directory when needed.
S711: after the computing node performs the completion task, the node instead understands the mount file system.
And the node agent executes the operation of removing the mount, and separates the file system from the corresponding mount point. This process may cause the file system to be released from the virtual disk on the mount point and thus no longer visible to the compute node.
Moreover, the node agent may also perform some cleanup tasks, such as freeing up resources occupied by the file system, updating system state information, etc., to ensure the integrity of the unhooking operation.
S712: the computing node sends a storage space release request to the management node through the node proxy.
The storage space release request is used for indicating to release the data in the virtual disk so as to release the data in the storage space after the task is completed.
The storage space release request may include an identifier of the virtual disk and a storage location. The identifier and the storage location are the same as those in step S706.
S713: and the management node releases the storage space according to the storage space release request.
After receiving the storage space release request, the management node performs release operation on the virtual disk indicated by the identifier according to the information in the storage space release request.
S714: the management node deletes the virtual disk.
After releasing the virtual disk, the management node then executes the operation of deleting the virtual disk to completely clean and recycle the resources.
In the embodiment of the application, the virtual disk is successfully deleted, and the management node can also send confirmation information to the computing node, which indicates that the virtual disk is completely cleaned and recycled. After receiving the confirmation information, the computing node can continue to perform subsequent operations or terminate tasks.
Through steps S713 and S714, the management node completes the operations of releasing and deleting the virtual disk, ensuring that the resources are completely recovered and released for being reassigned to other tasks for use.
S715: and the computing node returns the execution result of the task to the user side.
And the computing node returns the execution result of the task to the user side. This means that the computing node will return relevant data, output, status information, etc. of the task execution to the user side for subsequent processing and presentation. The user side can display the execution result to the user. For example, the state of task execution, output data, log information and the like are presented in a user-friendly mode (such as pictures and pages), so that a user can clearly know the execution condition and result of the task, and the user can timely and accurately acquire the execution condition and result of the task.
In the implementation process of the service function shown in fig. 7, the flexible management of the storage space required for task execution is realized through the dynamic allocation and release operations of the management node. The dynamic allocation and release mechanism can improve the utilization rate of the whole resources, avoid resource waste and simultaneously meet the flexible requirements of different tasks on the temporary storage space. And the virtual disk is created and managed by fully utilizing the virtualization technology, so that the isolation, flexible scheduling and dynamic allocation of storage resources are realized, and the utilization rate of the storage resources and the flexibility of the use of the storage resources are improved.
By the method for distributing the storage space, task execution and resource management in a distributed computing environment are realized. The method can realize the parallel execution of tasks and the distributed storage and management of data, fully exert the advantages of distributed computing and improve the efficiency of the whole computing system. Meanwhile, reasonable storage resource allocation and scheduling are also beneficial to optimizing the performance of the system, and the efficiency and stability of task execution are improved.
And the user side displays the task execution result to the user, so that the user can intuitively know the task execution condition and the realization of the service function, and the user can timely adjust and optimize own work plan according to the state and the result of the task execution and the realization of the service function.
On the basis of the embodiment, the embodiment of the application also provides a signaling diagram for the process of registering the storage nodes. As shown in fig. 8, the process of registering a storage node may be:
S801: and the user terminal sends a configuration request to the management node.
The configuration request is used for requesting the management node for at least one of the corresponding relation between the configuration service function and the storage nodes, the use priorities of the storage nodes and the corresponding relation between the configuration storage nodes and the computing nodes. The configuration request is also for requesting registration of the external storage into the storage space of the server cluster from the management node. The configuration request is also for requesting registration of the internal storage into the storage space of the server cluster from the management node. The configuration request includes content configured by the user through the front-end management page.
The user side displays the front-end management page to the user, and the user configures the corresponding relation between the service function and the storage node in the front-end management page; configuring the use priorities of a plurality of storage nodes; and configuring the corresponding relation between the storage node and the computing node. The front end management page is shown in fig. 4.
The front-end management page provides an intuitive and friendly configuration interface for the user, so that the user can conveniently perform relevant configuration setting, the working efficiency of the user is improved, the complexity of configuration operation is reduced, and the overall user experience is improved.
By sending the configuration request to the management node by the user terminal, accurate transmission and synchronous update of the user configuration content are realized. This ensures that the management node schedules each storage node based on the latest configuration when running the storage space management distribution system.
S802: the management node registers the storage node according to the configuration request.
In one possible implementation, the configuration request is used to request registration of an external storage node into the storage space of the server cluster from the management node. Since the internal storage is a storage node internal to the server cluster, in some application scenarios the internal storage is registered to the storage space of the server cluster, the management node may register the external storage into the storage space of the server cluster according to the configuration request. The management node responds to the configuration request, and forms a target storage space of the server cluster together with the storage space of the internal storage of which the storage space of the server cluster is registered by registering the external storage to the storage space of the server cluster. The target storage space may include an internally stored storage space and an externally stored storage space. As an example, the target storage space may be a whole storage pool or a storage structure formed by a plurality of storage spaces.
In one possible implementation, the externally stored registration procedure may be: because the external storage is deployed outside the server cluster, the management node needs to establish network connection with the external storage. After establishing the connection, the management node may verify the externally stored authorization information to ensure that only authorized external stores can be registered with the server cluster. After the verification and authorization are completed, the management node can integrate the storage space of the external storage with the storage space of the internal storage, so as to obtain a target storage space, and the external storage is registered in the server cluster. After registration is successful, the external storage will become part of the server cluster storage space and can be accessed and used as a storage node by the computing node and the management node.
In one possible implementation, the internally stored registration procedure may be: the management node automatically discovers available internal storage inside the server cluster via network protocols (e.g., SNMP, SMIS, etc.). These protocols may help the management node identify key information about the type, capacity, performance, etc. of the storage node. After the internal storage is discovered, the management node configures and initializes the internal storage, for example, sets access rights of the storage node, data protection policies, backup policies, and the like. When configuration and initialization are completed, the management node may add information (such as IP address, port number, authentication credentials, etc.) stored internally to the configuration file of the server cluster, and then register the internal storage to the server cluster. After the registration is successful, the management node may also monitor the running state and performance index stored internally.
The management node responds to the configuration request and registers the internal storage and the external storage. The management node is also used for storing the corresponding relation between the service function and the storage node; priority of use of each storage node; and storing the corresponding relation between the nodes and the computing nodes.
It should be noted that, whether for internal storage or external storage, the management node needs to ensure security, integrity and availability of data during registration. Meanwhile, the management node can manage and optimize the storage nodes according to the requirements and performance requirements of the server cluster, so that the overall performance and stability of the server cluster are improved, more stable storage space is provided for the computing nodes, and the success rate of realizing the service functions is improved.
S803: and the management node returns a configuration result to the user terminal.
After the management node successfully configures each internal storage and each external storage, a configuration result representing successful registration can be returned to the user side; if the configuration fails, the management node returns a configuration result representing the registration failure to the user terminal.
S804: and the user side displays the configuration result to the user.
Through steps S801-S804, the management node can flexibly adjust and manage the storage node according to the configuration request, and utilize external storage to expand the storage resources of the server cluster, so that the storage node can provide more sufficient storage space for the computing node, avoid the situation that the computing node fails to execute tasks due to insufficient storage space, and improve the stability of service function implementation.
It should be noted that, the corresponding relationship between the service function and the storage nodes, the usage priorities of the plurality of storage nodes, and the corresponding relationship between the storage nodes and the computing nodes may be configured by the user through the front end management page; the same technical effects can be achieved by pre-configuring or acquiring the information in other modes without configuration of a user.
Based on the foregoing embodiments, the embodiment of the present application further provides a storage space allocation apparatus, as shown in fig. 9, where the apparatus 900 includes:
A first receiving module 901, configured to receive a configuration request, where the configuration request is used to request to register an external storage of a server cluster into a storage space of the server cluster;
a registration module 902, configured to register, in response to the configuration request, the external storage of the server cluster to a storage space of the server cluster, so as to obtain a target storage space, where the target storage space includes a storage space stored in the server cluster and a storage space stored outside the server cluster;
the first allocation module 903 is configured to allocate, when receiving a storage allocation request, a storage by using the target storage.
In a possible implementation manner, the registration module 901 is specifically configured to establish a connection with a storage external to the server cluster in response to the configuration request; after establishing connection, verifying authorization information stored outside the server cluster; and integrating the storage space stored outside the server cluster with the storage space stored inside the server cluster after the verification is passed to obtain the target storage space.
In a possible implementation manner, the first allocation module 903 is specifically configured to receive a storage space allocation request sent by a computing node of the server cluster, where the storage space allocation request includes a size of a space to be allocated and a service function identifier; and determining a temporary storage space corresponding to the service function identifier from the target storage space according to the size of the space to be allocated and the allocation strategy, and allocating the temporary storage space to the computing node.
In one possible implementation manner, the allocation policy includes a correspondence between service function identifiers and storage spaces; the first allocation module 903 is specifically configured to determine at least one storage space corresponding to the service function identifier, and determine, from the at least one storage space, that a remaining storage space is greater than or equal to the storage space to be allocated, to provide the temporary storage space.
In one possible implementation, the allocation policy includes a priority of use of the plurality of storage spaces; the first allocation module 903 is specifically configured to determine at least one storage space with a remaining storage space greater than or equal to the size of the storage space to be allocated, and determine, according to a usage priority of each storage space, a storage space with a highest usage priority from the at least one storage space to provide the temporary storage space.
In one possible implementation manner, the first allocation module 903 is specifically configured to create a virtual disk corresponding to the temporary storage space through virtualization, and send virtual disk information of the virtual disk to the computing node.
In a possible implementation manner, the apparatus 900 further includes an updating module, where the updating module is configured to obtain storage state change information stored outside the server cluster, and update the target storage space according to the storage state change information.
In one possible implementation, the apparatus 900 further includes a release module, configured to receive a storage space release request, and release data in the virtual disk indicated by the storage space release request.
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 10, the server 1000 includes: a processor 1001 and a memory 1002; wherein the processor 1001 is communicatively connected to the memory 1002, the memory 1001 is configured to store computer-executable instructions or code; the processor 1001 is configured to execute computer-executable instructions or codes stored in the memory 1002, and further execute the technical solutions in the foregoing method embodiments.
Alternatively, the memory 1002 may be separate or integrated with the processor 1001. Optionally, when the memory 1002 is a device separate from the processor 1001, the server 1000 may further include: and a bus for connecting the devices.
The server is used for executing the technical scheme in the foregoing method embodiment, and its implementation principle and technical effects are similar and will not be described in detail herein.
The embodiment of the application also provides a processing chip for executing the instruction or the code so as to realize the memory space allocation method according to any embodiment of the application.
The embodiment of the application also provides a computer readable storage medium. All or part of the flow in the above method embodiments may be implemented by computer instructions to instruct related hardware, and the program may be stored in the above computer readable storage medium, and the program may include the flow in the above method embodiments when executed. The computer readable storage medium may be any of the foregoing embodiments or memory.
The computer readable storage medium may be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (SMARTMEDIACARD, SMC), a secure digital (securedigital, SD) card, a flash memory card (flashcard) or the like. Further, the above-described computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. The computer-readable storage medium is used to store the above-described computer program and other programs and data required by the computer device. The above-described computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The "first" and "second" in the names of "first" and "second" (where present) and the like in the embodiments of the present application are used for name identification, and do not represent the first and second in sequence.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus general hardware platforms. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a read-only memory (ROM)/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to perform the method according to the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing description of the exemplary embodiments of the application is merely illustrative of the application and is not intended to limit the scope of the application.

Claims (10)

1. A method for allocating storage space, applied to a server, the method comprising:
receiving a configuration request, wherein the configuration request is used for requesting to register the external storage of the server cluster into the storage space of the server cluster;
Responding to the configuration request, registering the external storage of the server cluster to the storage space of the server cluster to obtain a target storage space, wherein the target storage space comprises the storage space stored in the server cluster and the storage space stored outside the server cluster;
And when receiving the storage space allocation request, performing storage space allocation by utilizing the target storage space.
2. The method of claim 1, wherein the registering the server cluster external storage to the storage space of the server cluster in response to the configuration request, to obtain the target storage space, comprises:
Responding to the configuration request, and establishing connection with external storage of the server cluster;
after establishing connection, verifying authorization information stored outside the server cluster;
And integrating the storage space stored outside the server cluster with the storage space stored inside the server cluster after the verification is passed to obtain the target storage space.
3. The method of claim 1, wherein said allocating storage space using said target storage space upon receiving a storage space allocation request comprises:
Receiving a storage space allocation request sent by a computing node of the server cluster, wherein the storage space allocation request comprises a space size to be allocated and a service function identifier;
and determining a temporary storage space corresponding to the service function identifier from the target storage space according to the size of the space to be allocated and the allocation strategy, and allocating the temporary storage space to the computing node.
4. A method according to claim 3, wherein the allocation policy comprises a correspondence between service function identifiers and storage space;
The determining, according to the size of the space to be allocated and the allocation policy, a temporary storage space corresponding to the service function identifier from the target storage space includes:
And determining at least one storage space corresponding to the service function identifier, and determining a storage space with the residual storage space being larger than or equal to the size of the space to be allocated from the at least one storage space to provide the temporary storage space.
5. The method of claim 3 or4, wherein the allocation policy comprises a priority of use of a plurality of storage spaces;
The determining, according to the size of the space to be allocated and the allocation policy, a temporary storage space corresponding to the service function identifier from the target storage space includes:
And determining at least one storage space with the residual storage space being larger than or equal to the size of the storage space to be allocated, and determining the storage space with the highest use priority from the at least one storage space to provide the temporary storage space according to the use priority of each storage space.
6. A method according to claim 3, wherein said allocating said temporary storage space to said computing node comprises:
and creating a virtual disk corresponding to the temporary storage space through virtualization, and sending virtual disk information of the virtual disk to the computing node.
7. The method according to claim 1, wherein the method further comprises:
And acquiring storage state change information stored outside the server cluster, and updating the target storage space according to the storage state change information.
8. The method according to claim 1, wherein the method further comprises:
And receiving a storage space release request, and releasing the data in the virtual disk indicated by the storage space release request.
9. A method for allocating storage space, applied to a server, the method comprising:
receiving a storage space allocation request sent by a computing node in a server cluster, wherein the storage space allocation request comprises a space size to be allocated and a service function identifier;
Determining a temporary storage space corresponding to the service function identifier from a target storage space of the server cluster according to the size of the space to be allocated and an allocation policy, and allocating the storage space for the computing node by using the temporary storage space, wherein the allocation policy comprises a corresponding relation between the service function identifier and the storage space or a use priority of the storage space, and the target storage space comprises a storage space stored outside the server cluster and a storage space stored inside the server cluster.
10. A server comprising at least one processor and at least one memory, the at least one memory having computer program instructions stored therein; the at least one processor executing the computer program instructions to cause the server to perform the method of any one of claims 1-8 or to perform the method of any one of claim 9.
CN202410346857.2A 2024-03-25 2024-03-25 Storage space allocation method and server Pending CN118193479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410346857.2A CN118193479A (en) 2024-03-25 2024-03-25 Storage space allocation method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410346857.2A CN118193479A (en) 2024-03-25 2024-03-25 Storage space allocation method and server

Publications (1)

Publication Number Publication Date
CN118193479A true CN118193479A (en) 2024-06-14

Family

ID=91404921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410346857.2A Pending CN118193479A (en) 2024-03-25 2024-03-25 Storage space allocation method and server

Country Status (1)

Country Link
CN (1) CN118193479A (en)

Similar Documents

Publication Publication Date Title
CN111488241B (en) Method and system for realizing agent-free backup and recovery operation in container arrangement platform
CN109542611B (en) Database as a service system, database scheduling method, device and storage medium
US8473596B2 (en) Method and apparatus for web based storage on-demand
US8595364B2 (en) System and method for automatic storage load balancing in virtual server environments
US8387013B2 (en) Method, apparatus, and computer product for managing operation
US11669360B2 (en) Seamless virtual standard switch to virtual distributed switch migration for hyper-converged infrastructure
CN105049268A (en) Distributed computing resource allocation system and task processing method
CN106201357A (en) The construction method of a kind of storage pool and system
US20140379921A1 (en) Resource silos at network-accessible services
CN111092921B (en) Data acquisition method, device and storage medium
CN109992373B (en) Resource scheduling method, information management method and device and task deployment system
KR101714412B1 (en) Method and apparatus for organizing database system in cloud environment
CN105095103A (en) Storage device management method and device used for cloud environment
CN106790403B (en) Method for realizing mobile cloud computing intermediate platform and method for realizing distribution
US20060206747A1 (en) Computer system and data backup method in computer system
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN114296953B (en) Multi-cloud heterogeneous system and task processing method
US20240061621A1 (en) Allocation, distribution, and configuration of volumes in storage systems
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN117076409B (en) File sharing method, device, system, electronic equipment and storage medium
KR20220118756A (en) Disaggrated data center resource management method and apparatus
CN118193479A (en) Storage space allocation method and server
CN118193478A (en) Storage space allocation method and server
CN110780817B (en) Data recording method and apparatus, storage medium, and electronic apparatus
CN115454580B (en) Node host resource management method and device and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination