Storage resource scheduling method, device and equipment and computer readable storage medium

By receiving and monitoring the storage resource requests of containers and allocating storage resources reasonably, the problem of persistent data storage in containerized applications is solved, achieving data security and efficient resource utilization.

CN115309494BActive Publication Date: 2025-11-04CHINA MOBILE GROUP ZHEJIANG +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110498378.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-08
Publication Date
2025-11-04
Estimated Expiration
2041-05-08

AI Technical Summary

Technical Problem

Containerized applications in cloud computing PaaS platforms suffer from the problem of data not being persistently stored, which makes data easily lost when containers are upgraded, shut down, or restarted.

Method used

A storage resource scheduling method is provided, which receives storage resource requests from containers, monitors the remaining resources of storage modules, determines and allocates storage resources to containers, monitors and reclaims unused storage resources, and rationally allocates storage resources to prevent data loss.

Benefits of technology

It effectively prevents data loss in containers, improves data security, rationally allocates storage resources, and saves storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309494B_ABST
    Figure CN115309494B_ABST
Patent Text Reader

Abstract

The application discloses a kind of storage resource scheduling method, device, equipment and computer readable storage medium, the storage resource scheduling method includes: receiving the storage resource request of each container, the storage resource request includes the data volume of the storage resource required by container currently;Monitoring the remaining storage resource of storage module;According to the storage resource request and the remaining storage resource, determine the storage resource to be allocated;The storage resource to be allocated is allocated to the container corresponding to the storage resource request.The application improves the security of data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of persistent storage, and in particular to a storage resource scheduling method, device and equipment, and a computer readable storage medium. BACKGROUND

[0002] As a kernel lightweight operating system layer virtualization technology, container technology can improve the security and portability of applications, realize continuous integration and continuous deployment of applications, and promote the transformation of application architecture from monolithic code base using waterfall release method to coupled services developed and deployed independently.

[0003] At present, containerized applications in cloud computing PaaS platforms are growing exponentially, but containers have inherent storage defects. When creating a container, the storage allocated to the container by default cannot be persisted, and in the case of container upgrade, shutdown or restart, the storage data of the container is easily lost. SUMMARY

[0004] The main purpose of the present application is to provide a storage resource scheduling method, device and equipment, and a computer readable storage medium, which aims to solve the problem of container storage data loss.

[0005] To achieve the above purpose, the present application provides a storage resource scheduling method, which comprises the following steps:

[0006] Receiving storage resource requests of each container, the storage resource request comprising the data amount of storage resource currently required by the container;

[0007] Monitoring the remaining storage resources of the storage module;

[0008] Determining the to-be-allocated storage resources according to the storage resource request and the remaining storage resources;

[0009] Allocating the to-be-allocated storage resources to the container corresponding to the storage resource request.

[0010] In an embodiment, the step of allocating the to-be-allocated storage resources to the container corresponding to the storage resource request comprises:

[0011] Obtaining the address of the to-be-allocated storage resources, the address comprising an initial address and a terminal address;

[0012] Generating an allocation instruction according to the to-be-allocated storage resources;

[0013] Sending the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resources according to the allocation instruction.

[0014] In an embodiment, the method further comprises, after the step of allocating the to-be-allocated storage resource to the container corresponding to the storage resource request:

[0015] monitoring the allocated storage resource of each container;

[0016] determining the usage status of the allocated storage resource of each container;

[0017] if the allocated storage resource is not used, removing the unused allocated storage resource from the container.

[0018] In an embodiment, the method further comprises, after the step of determining the usage status of the allocated storage resource of each container:

[0019] if the container uses the allocated storage resource, determining the current required storage resource of the container;

[0020] if the current required storage resource is less than the allocated storage resource of the container, determining the excess storage resource in the allocated storage resource according to the current required storage resource;

[0021] removing the excess storage resource from the container.

[0022] In an embodiment, the method further comprises, after the step of determining the current required storage resource of the container:

[0023] if the current required storage resource is greater than the allocated storage resource of the container, performing the step of monitoring the remaining storage resource of the storage module.

[0024] In an embodiment, the method is applied to a container, and the method comprises:

[0025] generating a storage resource request according to the storage resource requirement of the container and sending the storage resource request to a storage resource scheduler;

[0026] obtaining the to-be-allocated storage resource corresponding to the container determined by the storage resource scheduler;

[0027] writing the address of the to-be-allocated storage resource into the container.

[0028] In an embodiment, the step of writing the address of the to-be-allocated storage resource into the container comprises:

[0029] if the container is not allocated with a storage resource, writing the address of the to-be-allocated storage resource into the container;

[0030] If the container has been allocated with storage resources, write the address of the to-be-allocated storage resources into the container, and write the initial address of the to-be-allocated storage resources after the terminal address of the allocated storage resources.

[0031] To achieve the above object, the application further provides a storage resource scheduling device, which comprises:

[0032] a receiving module, configured to receive storage resource requests of respective containers, wherein the storage resource requests comprise data amounts of storage resources currently required by the containers;

[0033] a monitoring module, configured to monitor residual storage resources of a storage module;

[0034] a determining module, configured to determine to-be-allocated storage resources according to the storage resource requests and the residual storage resources;

[0035] an allocating module, configured to allocate the to-be-allocated storage resources to the containers corresponding to the storage resource requests.

[0036] To achieve the above object, the application further provides a storage resource scheduling device, which comprises a memory, a processor and a storage resource scheduling program stored in the memory and executable on the processor, and when the storage resource scheduling program is executed by the processor, each step of the storage resource scheduling method is implemented.

[0037] To achieve the above object, the application further provides a computer readable storage medium, which stores a storage resource scheduling program, and when the storage resource scheduling program is executed by a processor, each step of the storage resource scheduling method is implemented.

[0038] The application provides a storage resource scheduling method, device, equipment and computer readable storage medium, wherein a storage resource scheduler receives storage resource requests of respective containers, monitors residual storage resources of a storage module, determines to-be-allocated storage resources according to the storage resource requests and the residual storage resources, and allocates the to-be-allocated storage resources to the containers corresponding to the storage resource requests. The storage resource scheduler allocates the storage resources of the storage module to the respective containers according to the storage resource requests of the containers, reasonably allocates the storage resources, prevents data loss in the containers, and improves the security of the data. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 The figure is a hardware structure diagram of a storage resource scheduling device related to an embodiment of the application;

[0040] Figure 2 The figure is a flowchart of a first embodiment of a storage resource scheduling method of the application;

[0041] Figure 3 A relationship diagram of a storage resource scheduler, a storage module and a container of the present application is shown in the figure.

[0042] Figure 4 A detailed flowchart of step S40 of the second embodiment of the storage resource scheduling method of the present application is shown in the figure.

[0043] Figure 5 A flowchart of the third embodiment of the storage resource scheduling method of the present application is shown in the figure.

[0044] Figure 6 A flowchart of the fourth embodiment of the storage resource scheduling method of the present application is shown in the figure.

[0045] Figure 7 A flowchart of the fifth embodiment of the storage resource scheduling method of the present application is shown in the figure.

[0046] Figure 8 A logical structure diagram of the storage resource scheduling device of the present application is shown in the figure.

[0047] Figure 9 A logical structure diagram of the storage resource scheduling device of the present application is shown in the figure.

[0048] The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are merely intended to explain the present application and not to limit the present application.

[0050] The main solution of the embodiments of the present application is that the storage resource scheduler receives storage resource requests of various containers, monitors the remaining storage resources of the storage module, determines the to-be-allocated storage resources according to the storage resource requests and the remaining storage resources, and allocates the to-be-allocated storage resources to the containers corresponding to the storage resource requests.

[0051] The storage resource scheduler allocates the storage resources of the storage module to various containers according to the storage resource requests of the containers, reasonably allocates the storage resources, prevents data loss in the containers, and improves the security of the data.

[0052] As an implementation solution, the storage resource scheduling device can be as shown in the figure. Figure 1

[0053] The embodiments of the present application relate to a storage resource scheduling device, which includes a processor 101, such as a CPU, a memory 102 and a communication bus 103. The communication bus 103 is used to realize the connection and communication among these components. ​

[0054] The memory 102 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. As shown, the memory 102 as a computer readable storage medium can include a storage resource scheduler; and the processor 101 can be configured to invoke the storage resource scheduler stored in the memory 102 and perform the following operations: Figure 1

[0055] receive a storage resource request of each container, the storage resource request including a data amount of storage resource currently required by the container;

[0056] monitor a remaining storage resource of the storage module;

[0057] determine a to-be-allocated storage resource according to the storage resource request and the remaining storage resource;

[0058] allocate the to-be-allocated storage resource to the container corresponding to the storage resource request.

[0059] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduler stored in the memory 102 and perform the following operations:

[0060] obtain an address of the to-be-allocated storage resource, the address including an initial address and a terminal address;

[0061] generate an allocation instruction according to the to-be-allocated storage resource;

[0062] send the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction.

[0063] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduler stored in the memory 102 and perform the following operations:

[0064] monitor an allocated storage resource of each container;

[0065] determine a usage state of the allocated storage resource of each container;

[0066] if the allocated storage resource is not used, remove the unused allocated storage resource from the container.

[0067] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduler stored in the memory 102 and perform the following operations:

[0068] if the container uses the allocated storage resource, determine a storage resource currently required by the container; ​

[0069] if the current required storage resource is less than the allocated storage resource of the container, determining the redundant storage resource in the allocated storage resource according to the current required storage resource;

[0070] removing the redundant storage resource from the container.

[0071] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduling program stored in the memory 102, and perform the following operations:

[0072] if the current required storage resource is greater than the allocated storage resource of the container, performing the step of monitoring the remaining storage resource of the storage module.

[0073] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduling program stored in the memory 102, and perform the following operations:

[0074] generating a storage resource request according to the storage resource requirement of the container and sending the storage resource request to the storage resource scheduler;

[0075] obtaining the to-be-allocated storage resource corresponding to the container determined by the storage resource scheduler;

[0076] writing the address of the to-be-allocated storage resource into the container.

[0077] In an embodiment, the processor 101 can be configured to invoke the storage resource scheduling program stored in the memory 102, and perform the following operations:

[0078] if the container is not allocated with storage resource, writing the address of the to-be-allocated storage resource into the container;

[0079] if the container is allocated with storage resource, writing the address of the to-be-allocated storage resource into the container, and the initial address of the to-be-allocated storage resource is written after the termination address of the allocated storage resource.

[0080] Based on the hardware architecture of the above storage resource scheduling device, embodiments of the storage resource scheduling method are provided.

[0081] Reference Figure 2 , Figure 2 For the first embodiment of the storage resource scheduling method, the storage resource scheduling method is applied to a storage resource scheduler, and the storage resource scheduling method comprises the following steps:

[0082] Step S10, receiving storage resource requests of each container, wherein the storage resource request comprises the data amount of the current required storage resource of the container.

[0083] Specifically, the storage resource scheduler is in communication connection with the at least one container, and is configured to collect storage resource requests of the at least one container. The storage resource request includes a data amount of storage resource currently required by the container and container information.

[0084] In step S20, the remaining storage resource of the storage module is monitored.

[0085] Specifically, the storage resource scheduler is in communication connection with the storage module, and can monitor the usage of the storage resource of the storage module and schedule the storage resource of the storage module. The storage resource scheduler monitors the remaining storage resource of the storage module, and determines the storage resource allocated to the container in the remaining storage resource.

[0086] Since the storage allocated to the container by default when the container is created cannot be persisted, the storage data of the container is prone to loss in the case of container upgrade, shutdown or restart, and therefore the storage resource in the storage module is a persistent storage resource, so as to prevent the storage data of the container from being lost.

[0087] In step S30, the to-be-allocated storage resource is determined according to the storage resource request and the remaining storage resource.

[0088] Specifically, the storage resource scheduler determines the to-be-allocated storage resource according to the storage resource request and the remaining storage resource. The to-be-allocated storage resource can include a start address and an end address of the to-be-allocated storage resource.

[0089] In step S40, the to-be-allocated storage resource is allocated to the container corresponding to the storage resource request.

[0090] Specifically, the storage resource scheduler allocates the to-be-allocated storage resource to the container corresponding to the storage resource request.

[0091] Optionally, as Figure 3As shown, the storage resource scheduler is in communication connection with the container and the storage module respectively. The storage resource scheduler can comprise a demand collection module, the demand collection module is in communication connection with the storage resource monitor in the container, the demand collection module receives the storage resource request sent by the storage resource monitor in the container; the storage resource scheduler can comprise a storage resource monitoring module, the storage resource monitoring module is in communication connection with the storage module, and is used for monitoring the remaining storage resource of the storage module; the storage resource scheduler can comprise a control module, the control module is in communication connection with the demand collection module, the control module receives the storage resource request sent by the demand collection module, the control module is in communication connection with the storage resource monitoring module, and the control module receives the remaining storage resource of the storage module sent by the storage resource monitoring module; the storage resource scheduler can comprise a storage interface setting module, the storage interface setting module is in communication connection with the control module and the storage interface of the container respectively, and the storage interface setting module sends the instruction of the control module to the storage interface of the container.

[0092] In the technical scheme of the embodiment, the storage resource scheduler receives the storage resource request of each container, monitors the remaining storage resource of the storage module, determines the to-be-allocated storage resource according to the storage resource request and the remaining storage resource, and allocates the to-be-allocated storage resource to the container corresponding to the storage resource request. The storage resource scheduler allocates the storage resource of the storage module to each container according to the storage resource request of the container, reasonably allocates the storage resource, prevents data loss in the container, and improves the security of data.

[0093] Reference Figure 4 , Figure 4 For a second embodiment of the storage resource scheduling method of the application, based on the first embodiment, the step S40 comprises:

[0094] In step S41, the address of the to-be-allocated storage resource is obtained, and the address comprises an initial address and a termination address.

[0095] In step S42, an allocation instruction is generated according to the to-be-allocated storage resource.

[0096] In step S43, the allocation instruction is sent to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction.

[0097] Specifically, the storage resource scheduler obtains the address of the to-be-allocated storage resource, wherein the address of the to-be-allocated storage resource comprises an initial address and a termination address. The storage resource scheduler generates an allocation instruction according to the to-be-allocated storage resource, and sends the allocation instruction to the container corresponding to the storage resource request. After receiving the allocation instruction, the container writes the address of the storage resource in the container according to the allocation instruction.

[0098] In the technical scheme of the embodiment, the storage resource scheduler acquires an address of a storage resource to be allocated, generates an allocation instruction according to the storage resource to be allocated, and sends the allocation instruction to a container corresponding to a storage resource request, so that the container writes the address of the storage resource according to the allocation instruction. The storage resource of the storage module is scheduled to the container according to the allocation instruction, and the storage resource is reasonably allocated.

[0099] With reference to Figure 5 , Figure 5 For the third embodiment of the storage resource scheduling method, based on the first or second embodiment, after the step S40, the method further comprises:

[0100] In step S50, the allocated storage resource of each container is monitored.

[0101] In step S60, the use state of the allocated storage resource of each container is determined.

[0102] In step S70, if the allocated storage resource is not used, the unused allocated storage resource is removed from the container.

[0103] Specifically, the storage resource scheduler monitors the allocated storage resource in each container, and determines the use state of the allocated storage resource in each container. The allocated storage resource in the container still exists even if it is not used, which leads to waste of storage resources. Therefore, if the allocated storage resource is not used, the unused allocated storage resource is removed from the container.

[0104] In the technical scheme of the embodiment, the allocated storage resource of each container is monitored, the use state of the allocated storage resource of each container is determined, and if the allocated storage resource is not used, the unused allocated storage resource is removed from the container. By recycling the storage resource in the container, the storage resource is saved.

[0105] With reference to Figure 6 , Figure 6 For the third embodiment of the storage resource scheduling method, based on the first or second embodiment, after the step S60, the method further comprises:

[0106] In step S80, if the container uses the allocated storage resource, the current demand for storage resource of the container is determined.

[0107] In step S90, if the current demand for storage resource is less than the allocated storage resource of the container, the excess storage resource in the allocated storage resource is determined according to the current demand for storage resource.

[0108] In step S100, the excess storage resource is removed from the container.

[0109] Specifically, the storage resource scheduler determines the current required storage resource of the container, and if the current required storage resource is less than the allocated storage resource of the container, it is determined that part of the allocated storage resource is not used, and the excess storage resource in the allocated storage resource is determined and removed, thereby saving storage resources.

[0110] After determining the current required storage resource of the container, if the current required storage resource is greater than the allocated storage resource of the container, it is determined that the allocated storage resource is not enough for the container to use, and the storage resource scheduler monitors the remaining storage resource of the storage module, determines the to-be-allocated storage resource according to the current required storage resource and the remaining storage resource, and allocates the to-be-allocated storage resource to the container.

[0111] In the technical scheme of the embodiment, if the container uses the allocated storage resource, the current required storage resource of the container is determined, if the current required storage resource is less than the allocated storage resource, the excess storage resource in the allocated storage resource is determined according to the current required storage resource, and the excess storage resource is removed from the container. By removing the excess storage resource, storage resources are saved.

[0112] Referring to Figure 7 , Figure 7 A fifth embodiment of a storage resource scheduling method provided by the application is applied to a container, and the storage resource scheduling method comprises the following steps.

[0113] In step S110, a storage resource request is generated according to the storage resource requirement of the container and is sent to a storage resource scheduler.

[0114] In step S120, the to-be-allocated storage resource corresponding to the container determined by the storage resource scheduler is acquired.

[0115] In step S130, the address of the to-be-allocated storage resource is written into the container.

[0116] Specifically, the container generates a storage resource request according to its own storage resource requirement and sends it to the storage resource scheduler, acquires the to-be-allocated storage resource determined by the storage resource scheduler, writes the address of the to-be-allocated storage resource into the container, and determines the storage address of the data in the container.

[0117] When writing the address of the storage resource to be allocated into the container, if the container is not allocated with the storage resource, the address of the storage resource to be allocated is written into the container; if the container is allocated with the storage resource, the address of the storage resource to be allocated is written into the container, and the initial address of the storage resource to be allocated is written after the terminal address of the allocated storage resource, so as to ensure the continuity of the storage resource in the container.

[0118] In the technical scheme of the embodiment, the storage resource request is generated according to the storage resource demand of the container and is sent to the storage resource scheduler, the storage resource to be allocated corresponding to the container is determined, and the address of the storage resource to be allocated is written into the container. After the container obtains the storage resource, the address of the storage resource to be allocated is written into the container, the storage resource to be allocated corresponds to the current storage resource request of the container, and the reasonable allocation of the storage resource is realized.

[0119] With reference to Figure 8 The application further provides a storage resource scheduling device, characterized in that the storage resource scheduling device comprises:

[0120] The receiving module 100 is configured to receive the storage resource request of each container, and the storage resource request comprises the data amount of the storage resource currently demanded by the container.

[0121] The monitoring module 200 is configured to monitor the remaining storage resource of the storage module.

[0122] The determining module 300 is configured to determine the storage resource to be allocated according to the storage resource request and the remaining storage resource.

[0123] The allocating module 400 is configured to allocate the storage resource to be allocated to the container corresponding to the storage resource request.

[0124] In an embodiment, in terms of allocating the storage resource to be allocated to the container corresponding to the storage resource request, the allocating module 400 is specifically configured to:

[0125] Obtain the address of the storage resource to be allocated, and the address comprises an initial address and a terminal address.

[0126] Generate an allocation instruction according to the storage resource to be allocated.

[0127] Send the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction.

[0128] In an embodiment, in terms of allocating the storage resource to be allocated to the container corresponding to the storage resource request, the storage resource scheduling device further comprises a scheduling module 500.

[0129] The scheduling module 500 is configured to monitor the allocated storage resource of each container, determine the usage state of the allocated storage resource of each container, and remove the unused allocated storage resource from the container if the allocated storage resource is not used.

[0130] In an embodiment, after determining the usage state of the allocated storage resource of each container, the scheduling module 500 is specifically configured to:

[0131] If the container uses the allocated storage resource, determine the current required storage resource of the container.

[0132] If the current required storage resource is less than the allocated storage resource of the container, determine the excess storage resource in the allocated storage resource according to the current required storage resource.

[0133] Remove the excess storage resource from the container.

[0134] In an embodiment, after determining the current required storage resource of the container, the scheduling module 500 is specifically configured to:

[0135] If the current required storage resource is greater than the allocated storage resource of the container, perform the step of monitoring the remaining storage resource of the storage module.

[0136] With reference to Figure 9 The application further provides a storage resource scheduling device, which further comprises:

[0137] The generating module 600 is configured to generate a storage resource request according to the storage resource requirement of the container and send the storage resource request to a storage resource scheduler.

[0138] The obtaining module 700 is configured to obtain the to-be-allocated storage resource corresponding to the container determined by the storage resource scheduler.

[0139] The writing module 800 is configured to write the address of the to-be-allocated storage resource into the container.

[0140] In an embodiment, in terms of writing the address of the to-be-allocated storage resource into the container, the writing module 800 is specifically configured to:

[0141] If the container is not allocated with a storage resource, write the address of the to-be-allocated storage resource into the container.

[0142] If the container is allocated with a storage resource, write the address of the to-be-allocated storage resource into the container, and write the initial address of the to-be-allocated storage resource after the termination address of the allocated storage resource.

[0143] The application further provides a storage resource scheduling device, which comprises a memory, a processor and a storage resource scheduling program stored in the memory and executable on the processor, and each step of the storage resource scheduling method according to the above embodiment is implemented when the storage resource scheduling program is executed by the processor.

[0144] The application further provides a computer readable storage medium, which stores a storage resource scheduling program, and each step of the storage resource scheduling method according to the above embodiment is implemented when the storage resource scheduling program is executed by a processor.

[0145] The above-mentioned serial numbers of the embodiments of the application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0146] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, systems, articles or apparatuses that include a series of elements not only include those elements, but also include other elements not explicitly listed, or further include elements inherent in such processes, systems, articles or apparatuses. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, system, article or apparatus that includes the element.

[0147] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment system can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a computer readable storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, parking management device, air conditioner, or network device, etc.) execute the system described in each embodiment of the application.

[0148] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, and any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the application.

Claims

1. A storage resource scheduling method, characterized in that, The storage resource scheduling method is applied to a storage resource scheduler, and the storage resource scheduling method comprises the following steps: receiving a storage resource request of each container, wherein the storage resource request comprises a data amount of a current required storage resource of the container; if the current required storage resource is greater than an allocated storage resource of the container, monitoring a remaining storage resource of a storage module, wherein the storage resource in the storage module is a persistent storage resource; determining a to-be-allocated storage resource according to the storage resource request and the remaining storage resource; allocating the to-be-allocated storage resource to the container corresponding to the storage resource request, comprising: acquiring an address of the to-be-allocated storage resource, wherein the address comprises an initial address and a terminal address; generating an allocation instruction according to the to-be-allocated storage resource; and sending the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction.

2. The storage resource scheduling method of claim 1, wherein, After the step of allocating the to-be-allocated storage resource to the container corresponding to the storage resource request, the following steps are further included: monitoring the allocated storage resource of each container; determining a use state of the allocated storage resource of each container; if the allocated storage resource is not used, removing the unused allocated storage resource from the container.

3. The storage resource scheduling method of claim 2, wherein, After the step of determining the use state of the allocated storage resource of each container, the following steps are further included: if the container uses the allocated storage resource, determining a current required storage resource of the container; if the current required storage resource is less than the allocated storage resource of the container, determining a redundant storage resource in the allocated storage resource according to the current required storage resource; removing the redundant storage resource from the container.

4. A storage resource scheduling method, characterized by, The storage resource scheduling method is applied to a container, and the storage resource scheduling method comprises the following steps: generating a storage resource request according to a storage resource requirement of the container and sending the storage resource request to a storage resource scheduler, wherein the storage resource scheduler receives a storage resource request of each container, the storage resource request comprises a data amount of a current required storage resource of the container; if the current required storage resource is greater than an allocated storage resource of the container, monitoring a remaining storage resource of a storage module, wherein the storage resource in the storage module is a persistent storage resource; determining a to-be-allocated storage resource according to the storage resource request and the remaining storage resource; acquiring an address of the to-be-allocated storage resource, wherein the address comprises an initial address and a terminal address; generating an allocation instruction according to the to-be-allocated storage resource; and sending the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction; acquiring the to-be-allocated storage resource corresponding to the container determined by the storage resource scheduler; writing the address of the to-be-allocated storage resource into the container.

5. The storage resource scheduling method of claim 4, wherein, The step of writing the address of the to-be-allocated storage resource into the container comprises the following steps: if the container is not allocated with a storage resource, writing the address of the to-be-allocated storage resource into the container; If the container has been allocated with storage resources, write the address of the to-be-allocated storage resources into the container, and write the initial address of the to-be-allocated storage resources after the terminal address of the allocated storage resources.

6. A storage resource scheduling apparatus, characterized by comprising: The storage resource scheduling apparatus comprises: a receiving module, configured to receive a storage resource request of each container, wherein the storage resource request comprises a data amount of a currently demanded storage resource of the container; a monitoring module, configured to monitor a remaining storage resource of a storage module if the currently demanded storage resource is greater than the allocated storage resource of the container, wherein the storage resource in the storage module is a persistent storage resource; a determining module, configured to determine a to-be-allocated storage resource according to the storage resource request and the remaining storage resource; an allocating module, configured to allocate the to-be-allocated storage resource to the container corresponding to the storage resource request, comprising: obtaining an address of the to-be-allocated storage resource, wherein the address comprises an initial address and a terminal address; generating an allocation instruction according to the to-be-allocated storage resource; and sending the allocation instruction to the container corresponding to the storage resource request, so that the container writes the address of the storage resource according to the allocation instruction.

7. A storage resource scheduling device, characterized by comprising: The storage resource scheduling device comprises a memory, a processor, and a storage resource scheduling program stored in the memory and executable on the processor, and the storage resource scheduling program, when executed by the processor, implements each step of the storage resource scheduling method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a storage resource scheduling program, and the storage resource scheduling program, when executed by the processor, implements each step of the storage resource scheduling method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Cluster GPU resource management scheduling system and method and computer readable storage medium

    CN111538586A