CN115543594A - Storage resource allocation method, device, equipment and storage medium - Google Patents

Storage resource allocation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115543594A
CN115543594A CN202110730256.8A CN202110730256A CN115543594A CN 115543594 A CN115543594 A CN 115543594A CN 202110730256 A CN202110730256 A CN 202110730256A CN 115543594 A CN115543594 A CN 115543594A
Authority
CN
China
Prior art keywords
storage
logic unit
limit value
service
stored
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
CN202110730256.8A
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing 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 China Mobile Communications Group Co Ltd, China Mobile Group Chongqing Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110730256.8A priority Critical patent/CN115543594A/en
Publication of CN115543594A publication Critical patent/CN115543594A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

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

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for allocating storage resources, wherein the method comprises the following steps: receiving a storage space allocation application request sent by user equipment, wherein the storage space allocation application request comprises a service type of a service to be stored; determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored; when the storage resource use information meets the preset storage resource index information of the storage pool, allocating storage resources for the service to be stored; the method and the device for allocating the storage resources can solve the problem that an existing allocation method for the storage resources is low in application rate of the storage space resources.

Description

Storage resource allocation method, device, equipment and storage medium
Technical Field
The present application belongs to the field of computer information processing, and in particular, to a method, an apparatus, a device, and a storage medium for allocating storage resources.
Background
The resource creation and distribution of the cloud platform host of the operator are oriented, along with the continuous increase of the cloud proportion of hardware resources of enterprises, the cloud host resources are widely applied to various businesses of the enterprises and increasingly permeate into core businesses, the cloud host is more and more widely used, the business requirements are higher, especially, the space capacity and performance requirements on the storage resources corresponding to the cloud host are very high, and whether the storage space distribution reasonably and directly influences the key of whether the cloud host can stably operate and whether the business requirement performance is met or not.
When a new service storage space is allocated, the existing allocation method of the storage resources has poor monitoring on the storage space, so that the application rate of the storage space resources is low.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for allocating storage resources, which can solve the problem that the existing method for allocating storage resources has low resource utilization rate of storage space.
In a first aspect, an embodiment of the present application provides a method for allocating storage resources, including:
receiving a storage space allocation application request sent by user equipment, wherein the storage space allocation application request comprises a service type of a service to be stored;
determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored;
and when the storage resource use information meets the preset storage resource index information of the storage pool, allocating storage resources for the service to be stored.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; the storage pool comprises a plurality of storage logical units; the storage resource usage information includes: storing the occupied ratio of the front port corresponding to the logic unit and the occupied space ratio of the logic unit;
when the storage resource usage information meets the preset storage resource index information of the storage pool, allocating storage resources for the service to be stored, including:
and when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied space ratio of the storage logic unit is smaller than the second upper limit value, allocating storage resources for the service to be stored.
Further, in one embodiment, the method further comprises:
comparing the storage resource use information with preset storage resource index information to obtain a comparison result representing the storage use degree of the storage pool;
and when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool.
Further, in an embodiment, the preset storage resource indicator information includes a first upper limit and a first lower limit of the occupied ratio of the front port corresponding to the storage logic unit, and the storage resource usage information includes the occupied ratio of the front port corresponding to the storage logic unit;
when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool, including:
when the occupied ratio of the front port corresponding to the storage logic unit is smaller than a first lower limit value continuously in a preset time period, recovering the unoccupied front port;
and adding the front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information includes: storing occupied space ratio of the logic unit; the storage pool comprises a plurality of storage logical units;
when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool, including:
when the occupied space ratio of the storage logic unit is smaller than a second lower limit value continuously in a preset time period, recovering the unoccupied storage space of the storage pool;
and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in the preset time period, expanding the storage space of the storage pool.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a third upper limit value and a third lower limit value of a busy indicator of the logic unit; the storage resource usage information includes: storing a busy indicator of the logic unit; the storage pool comprises a plurality of storage logical units;
when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool, including:
acquiring performance information of a storage resource pool corresponding to each service type;
when the busy index of the storage logic unit is less than the third lower limit value continuously within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information;
and when the busy index of the storage logic unit is continuously greater than the third upper limit value within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
In a second aspect, an embodiment of the present application provides an apparatus for allocating storage resources, including:
the receiving module is used for receiving a storage space allocation application request sent by user equipment, wherein the storage space allocation application request comprises a service type of a service to be stored;
the determining module is used for determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored;
and the allocation module is used for allocating the storage resources for the service to be stored when the storage resource use information meets the preset storage resource index information of the storage pool.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; the storage pool comprises a plurality of storage logical units; the storage resource usage information includes: storing the occupied ratio of the front port corresponding to the logic unit and the occupied space ratio of the logic unit;
an allocation module specifically configured to:
and when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied space ratio of the storage logic unit is smaller than the second upper limit value, allocating storage resources for the service to be stored.
Further, in one embodiment, the apparatus further comprises:
the comparison module is used for comparing the storage resource use information with preset storage resource index information to obtain a comparison result representing the storage use degree of the storage pool;
and the adjusting module is used for adjusting the storage pool when the comparison result meets the preset storage pool adjusting condition.
Further, in an embodiment, the preset storage resource indicator information includes a first upper limit and a first lower limit of an occupied ratio of a front port corresponding to the storage logic unit, and the storage resource usage information includes an occupied ratio of a front port corresponding to the storage logic unit;
an adjustment module comprising a first adjustment unit for:
when the occupied ratio of the front port corresponding to the storage logic unit is smaller than a first lower limit value continuously in a preset time period, recovering the unoccupied front port;
and adding the front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information includes: storing occupied space ratio of the logic unit; the storage pool comprises a plurality of storage logical units;
an adjustment module comprising a second adjustment unit for:
when the occupied space ratio of the storage logic unit is smaller than a second lower limit value continuously in a preset time period, recovering the unoccupied storage space of the storage pool;
and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in the preset time period, expanding the storage space of the storage pool.
Further, in an embodiment, the presetting of the storage resource indicator information includes: storing a third upper limit value and a third lower limit value of a busy indicator of the logic unit; the storage resource usage information includes: storing a busy indicator of the logic unit; the storage pool comprises a plurality of storage logical units;
an adjustment module comprising a third adjustment unit for:
acquiring performance information of a storage resource pool corresponding to each service type;
when the busy index of the storage logic unit is less than the third lower limit value continuously within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information;
and when the busy index of the storage logic unit is continuously greater than the third upper limit value within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
In a third aspect, an embodiment of the present application provides an apparatus for allocating storage resources, including: the memory, the processor and the computer program stored on the memory and capable of running on the processor realize the allocation method of the storage resources when the computer program is executed by the processor.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where an implementation program for information transfer is stored, and when the program is executed by a processor, the method for allocating storage resources is implemented.
According to the method, the device, the equipment and the storage medium for allocating the storage resources, the storage resources are allocated to the services to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the services to be stored is determined according to the service type of the services to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the storage space resource is stored in a small storage space due to the fact that the large service to be stored is stored in the small storage space is also avoided, the storage failure is caused due to the fact that the large service to be stored is stored in the small storage space, and the application rate of the storage space resource is high is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings may be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for allocating storage resources according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an apparatus for allocating storage resources according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an allocation apparatus for storage resources according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The existing storage space allocation method has the following disadvantages:
when a new service storage space is allocated, the disk division is not combined with the performance index of the service requirement and the capacity requirement, so that the resource allocation is unreasonable, and the resource application rate of the storage space is low.
In order to solve the problem of the prior art, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for allocating storage resources. According to the method and the device, the storage resources are allocated to the services to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the services to be stored is determined according to the service type of the services to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the large service to be stored is stored in a small storage space is also avoided, the storage failure due to the fact that the large service to be stored is stored in the small storage space is avoided, and the application rate of the storage space resource is high. First, a method for allocating storage resources provided in the embodiment of the present application is described below.
Fig. 1 is a flowchart illustrating a method for allocating storage resources according to an embodiment of the present application, where the method may be applied to a storage server, such as a cloud host. As shown in fig. 1, the method may include the steps of:
s110, receiving a storage space allocation application request sent by user equipment.
The storage space allocation application request comprises the service type of the service to be stored, and the storage space allocation application request sent by the user equipment can be received through communication connection with the user equipment.
S120, determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored.
The storage pool corresponding to the database type service can be a Solid State Disk (SSD) pool, for example, the performance of a magnetic disk required by the database type service is higher; the performance of a disk required by the web application type service of the world wide web is general, and the storage pool corresponding to the web application type service can be a Serial Attached SCSI (SAS) pool; and if the performance of the magnetic disk required by the program backup service is lower, the storage pool corresponding to the program backup service can be a serial port hard disk SATA pool.
S130, when the storage resource use information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored.
When the storage resource use information meets the preset storage resource index information of the storage pool, the storage space of the storage pool can meet the storage requirement of the service to be stored, and therefore the storage resource is allocated to the service to be stored. And when the storage resource use information does not meet the preset storage resource index information of the storage pool, indicating that the storage space of the storage pool cannot meet the storage requirement of the service to be stored, and sending notification information which cannot be stored to the user equipment.
According to the method and the device, the storage resources are allocated to the services to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the services to be stored is determined according to the service type of the services to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the large service to be stored is stored in a small storage space is also avoided, the storage failure due to the fact that the large service to be stored is stored in the small storage space is avoided, and the application rate of the storage space resource is high.
In one embodiment, the presetting of the storage resource indicator information may include: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; a storage pool may include multiple storage logical units; the storage resource usage information may include: the occupied ratio of the front port corresponding to the storage logic unit and the occupied space ratio of the storage logic unit S130 may include:
and when the occupied ratio of the front port corresponding to the storage logic unit is smaller than a first upper limit value and the occupied space ratio of the storage logic unit is smaller than a second upper limit value, allocating storage resources for the service to be stored.
The first upper limit value is a preset index used for controlling the upper limit of the front port occupation corresponding to the storage logic unit, and may be set to 50% for example; the second upper limit value is a preset index for controlling the upper limit of the occupied space ratio of the storage logic unit, and may be set to 90%, for example. And when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied ratio of the storage logic unit is smaller than the second upper limit value, indicating that the storage pool still has resources and performing service storage.
In one embodiment, the method may further comprise:
and S140, comparing the storage resource use information with preset storage resource index information to obtain a comparison result representing the storage use degree of the storage pool.
S150, when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool.
Because the required storage resources may be different even for the same type of service to be stored, and the storage resources in the same type of storage pool may also be different, in order to make the correspondence between the service to be stored and the service pool more accurate, the storage pool is adjusted by comparing the storage resource usage information with the preset storage resource index information.
According to the embodiment of the application, the storage pool is adjusted by comparing the storage resource use information with the preset storage resource index information, so that the corresponding relation between the service to be stored and the storage pool is more accurate, and a more appropriate storage pool can be allocated for the service to be stored.
In an embodiment, the preset storage resource indicator information may include a first upper limit and a first lower limit of a front port occupied ratio corresponding to the storage logic unit, and the storage resource usage information may include the front port occupied ratio corresponding to the storage logic unit, S150 may include:
when the occupied ratio of the front port corresponding to the storage logic unit is less than a first lower limit value continuously in a preset time period, recovering the unoccupied front port; and adding the front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
The first lower limit is a preset index used for controlling the lower limit of the front port occupation corresponding to the storage logic unit, and may be set to 20% for example; when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first lower limit value continuously within a preset time period, the fact that the front port corresponding to the storage logic unit is too much idle is indicated, storage resource waste exists, and therefore the unoccupied front port is recycled; when the occupation ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within the preset time period, it indicates that the front port corresponding to the storage logic unit is busy in service, and the storage resource is deficient, so that the capacity expansion of the storage resource is performed, for example, the front port is added.
According to the embodiment of the application, the storage pool is adjusted by comparing the occupied ratio of the front port with the first upper limit value and the first lower limit value of the occupied ratio of the front port, so that the front port of the storage pool is more matched with the service to be stored, and the storage pool can store the service to be stored.
In one embodiment, the presetting of the storage resource index information may include: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information may include: storing occupied space ratio of the logic unit; the storage pool may include a plurality of storage logical units, and S150 may include:
when the occupied space ratio of the storage logic unit is smaller than a second lower limit value continuously in a preset time period, recovering the unoccupied storage space of the storage pool; and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in the preset time period, expanding the storage space of the storage pool.
Wherein, the second lower limit value is a preset index for controlling the lower limit of the occupied space ratio of the storage logic unit, and may be set to 20% for example; when the occupied space ratio of the storage logic unit is less than a second lower limit value continuously in a preset time period, indicating that the storage space of the storage pool is idle, and recovering the unoccupied storage space of the storage pool; when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously within the preset time period, the storage space of the storage pool is indicated to be deficient, and therefore the storage space of the storage pool is expanded.
According to the embodiment of the application, the storage pool is adjusted by comparing the occupied space ratio of the storage logic unit with the second upper limit value and the second lower limit value of the occupied space ratio of the storage logic unit, so that the storage space of the storage pool is more matched with the service to be stored, and the storage pool can store the service to be stored.
In one embodiment, the presetting of the storage resource indicator information may include: storing a third upper limit value and a third lower limit value of a busy index of the logic unit; the storage resource usage information may include: storing a busy indicator of the logic unit; the storage pool may include a plurality of storage logical units, and S150 may include:
and acquiring the performance information of the storage resource pool corresponding to each service type.
When the busy index of the storage logic unit is less than the third lower limit value continuously within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information; and when the busy index of the storage logic unit is continuously greater than the third upper limit value within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
The third upper limit value and the third lower limit value are preset indexes used for controlling the upper limit and the lower limit of a busy index of the storage logic unit. When the busy index of the storage logic unit is continuously smaller than a third lower limit value within a preset time period, the fact that a large storage resource is idle when the storage pool corresponding to the service type of the current service to be stored is used for storing the current service to be stored is indicated, and therefore the storage pool corresponding to the service type of the service to be stored is replaced by other storage pools with lower performance according to the performance information; when the busy index of the storage logic unit is continuously greater than the third upper limit value within the preset time period, it indicates that the storage pool corresponding to the service type of the current service to be stored cannot meet the storage requirement of the current service to be stored, and therefore, according to the performance information, the storage pool corresponding to the service type of the service to be stored is replaced by another storage pool with higher performance.
According to the embodiment of the application, the storage pool corresponding to the service type of the service to be stored is updated by comparing the busy index of the storage logic unit with the third upper limit value and the third lower limit value of the busy index of the storage logic unit, so that the storage space of the updated storage pool is more matched with the service to be stored, and the storage pool can store the service to be stored.
According to the method and the device, the storage resources are allocated to the services to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the services to be stored is determined according to the service type of the services to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the large service to be stored is stored in a small storage space is also avoided, the storage failure due to the fact that the large service to be stored is stored in the small storage space is avoided, and the application rate of the storage space resource is high.
Fig. 1 illustrates a method for allocating storage resources, and the following describes an apparatus provided in an embodiment of the present application with reference to fig. 2 and fig. 3.
Fig. 2 is a schematic structural diagram illustrating an apparatus for allocating storage resources according to an embodiment of the present application, where each module in the apparatus shown in fig. 2 has a function of implementing each step in fig. 1, and can achieve its corresponding technical effect. The apparatus may be applied to a storage server, such as a cloud host, and as shown in fig. 2, the apparatus may include:
the receiving module 210 is configured to receive a storage space allocation application request sent by a user equipment, where the storage space allocation application request includes a service type of a service to be stored.
The determining module 220 is configured to determine, according to the service type of the service to be stored, storage resource usage information of the storage pool corresponding to the service type of the service to be stored.
The allocating module 230 is configured to allocate a storage resource for the service to be stored when the storage resource usage information meets preset storage resource index information of the storage pool.
In the embodiment of the application, the storage resources are allocated to the service to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the service to be stored is determined according to the service type of the service to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the large service to be stored is stored in a small storage space is also avoided, the storage failure due to the fact that the large service to be stored is stored in the small storage space is avoided, and the application rate of the storage space resource is high.
In one embodiment, the preset storage resource indicator information includes: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; the storage pool comprises a plurality of storage logical units; the storage resource usage information includes: storing the occupied ratio of the front port corresponding to the logic unit and the occupied space ratio of the logic unit;
the allocating module 230 is specifically configured to:
and when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied space ratio of the storage logic unit is smaller than the second upper limit value, allocating storage resources for the service to be stored.
In one embodiment, the apparatus further comprises:
the comparison module 240 is configured to compare the storage resource usage information with preset storage resource index information to obtain a comparison result representing the storage usage degree of the storage pool;
and an adjusting module 250, configured to adjust the storage pool when the comparison result meets the preset storage pool adjustment condition.
In one embodiment, the preset storage resource index information includes a first upper limit and a first lower limit of an occupied ratio of a front port corresponding to the storage logic unit, and the storage resource usage information includes an occupied ratio of a front port corresponding to the storage logic unit;
the adjusting module 250 comprises a first adjusting unit for:
when the occupied ratio of the front port corresponding to the storage logic unit is smaller than a first lower limit value continuously in a preset time period, recovering the unoccupied front port;
and adding the front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
In one embodiment, the preset storage resource indicator information includes: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information includes: storing occupied space ratio of the logic unit; the storage pool comprises a plurality of storage logical units;
an adjusting module 250, comprising a second adjusting unit, configured to:
when the occupied space ratio of the storage logic unit is smaller than a second lower limit value continuously in a preset time period, recovering the unoccupied storage space of the storage pool;
and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in the preset time period, expanding the storage space of the storage pool.
In one embodiment, the preset storage resource indicator information includes: storing a third upper limit value and a third lower limit value of a busy index of the logic unit; the storage resource usage information includes: storing a busy indicator of the logic unit; the storage pool comprises a plurality of storage logical units;
an adjusting module 250, comprising a third adjusting unit, configured to:
acquiring performance information of a storage resource pool corresponding to each service type;
when the busy index of the storage logic unit is less than the third lower limit value continuously within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information;
and when the busy index of the storage logic unit is continuously greater than the third upper limit value within the preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
According to the method and the device, the storage resources are allocated to the services to be stored based on the storage space allocation application request sent by the user equipment, the storage resource use information of the storage pool corresponding to the service type of the services to be stored is determined according to the service type of the services to be stored in the storage space allocation application request, and different storage requirements of different services to be stored are fully considered; when the storage resource usage information meets the preset storage resource index information of the storage pool, the storage resources are allocated to the service to be stored, whether the storage resource usage information of the storage pool is matched with the preset storage resource index information or not is fully considered, and the storage resource allocation is performed only under the condition of matching, so that the allocated storage space is matched with the service to be stored, the condition that the storage space resource is idle due to the fact that a small service to be stored is stored in a large storage space resource is avoided, the condition that the large service to be stored is stored in a small storage space is also avoided, the storage failure due to the fact that the large service to be stored is stored in the small storage space is avoided, and the application rate of the storage space resource is high.
Fig. 3 illustrates a schematic structural diagram of an allocation apparatus for storage resources according to an embodiment of the present application. As shown in fig. 3, the apparatus may include a processor 301 and a memory 302 having stored computer program instructions.
Specifically, the processor 301 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Memory 302 may include mass storage for data or instructions. By way of example, and not limitation, memory 302 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. In one example, memory 302 can include removable or non-removable (or fixed) media, or memory 302 is non-volatile solid-state memory. The memory 302 may be internal or external to the integrated gateway disaster recovery device.
In one example, the Memory 302 may be a Read Only Memory (ROM). In one example, the ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement the method in the embodiment shown in fig. 1, and achieves the corresponding technical effect achieved by the embodiment shown in fig. 1 executing the method, which is not described herein again for brevity.
In one example, the memory resource allocation device may also include a communication interface 303 and a bus 310. As shown in fig. 3, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 to complete communication therebetween.
The communication interface 303 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiment of the present application.
Bus 310 includes hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus, FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) Bus, an infiniband interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a video electronics standards association local (VLB) Bus, or other suitable Bus or a combination of two or more of these. Bus 310 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The allocation apparatus of storage resources may execute the allocation method of storage resources in the embodiment of the present application, thereby achieving the corresponding technical effects of the allocation method of storage resources described in fig. 1.
In addition, in combination with the allocation method of storage resources in the foregoing embodiments, the embodiments of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the storage resource allocation methods of the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic Circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an Erasable ROM (EROM), a floppy disk, a CD-ROM, an optical disk, a hard disk, an optical fiber medium, a Radio Frequency (RF) link, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (14)

1. A method for allocating storage resources, comprising:
receiving a storage space allocation application request sent by user equipment, wherein the storage space allocation application request comprises a service type of a service to be stored;
determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored;
and when the storage resource use information meets the preset storage resource index information of the storage pool, allocating storage resources for the service to be stored.
2. The method for allocating storage resources according to claim 1, wherein the preset storage resource index information includes: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; the storage pool comprises a plurality of the storage logical units; the storage resource usage information includes: storing the occupied ratio of the front port corresponding to the logic unit and the occupied space ratio of the logic unit;
when the storage resource usage information meets preset storage resource index information of the storage pool, allocating storage resources for the service to be stored, including:
and when the occupied space ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied space ratio of the storage logic unit is smaller than the second upper limit value, allocating storage resources to the service to be stored.
3. The method for allocating storage resources of claim 1, wherein the method further comprises:
comparing the storage resource use information with preset storage resource index information to obtain a comparison result representing the storage use degree of the storage pool;
and when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool.
4. The method according to claim 3, wherein the preset storage resource index information includes a first upper limit and a first lower limit of a front port occupied ratio corresponding to the storage logic unit, and the storage resource usage information includes a front port occupied ratio corresponding to the storage logic unit;
when the comparison result meets the preset storage pool adjustment condition, adjusting the storage pool, including:
when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first lower limit value continuously in a preset time period, recovering the unoccupied front port;
and adding a front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
5. The method for allocating storage resources according to claim 3, wherein the preset storage resource index information comprises: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information includes: storing the occupied space ratio of the logic unit; the storage pool comprises a plurality of the storage logical units;
when the comparison result meets the preset storage pool adjustment condition, adjusting the storage pool, including:
when the occupied space ratio of the storage logic unit is smaller than the second lower limit value continuously within a preset time period, recovering the unoccupied storage space of the storage pool;
and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in a preset time period, expanding the storage space of the storage pool.
6. The method for allocating storage resources according to claim 3, wherein the preset storage resource index information comprises: storing a third upper limit value and a third lower limit value of a busy index of the logic unit; the storage resource usage information includes: storing a busy indicator of the logic unit; the storage pool comprises a plurality of the storage logical units;
when the comparison result meets the preset storage pool adjusting condition, adjusting the storage pool comprises:
acquiring performance information of a storage resource pool corresponding to each service type;
when the busy index of the storage logic unit is smaller than the third lower limit value continuously within a preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information;
and when the busy index of the storage logic unit is continuously greater than the third upper limit value within a preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
7. An apparatus for allocating storage resources, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a storage space allocation application request sent by user equipment, and the storage space allocation application request comprises a service type of a service to be stored;
the determining module is used for determining storage resource use information of a storage pool corresponding to the service type of the service to be stored according to the service type of the service to be stored;
and the allocation module is used for allocating the storage resources to the service to be stored when the storage resource use information meets the preset storage resource index information of the storage pool.
8. The apparatus for allocating storage resources according to claim 7, wherein the preset storage resource index information comprises: storing a first upper limit value of the occupied ratio of a front port corresponding to the logic unit and a second upper limit value of the occupied ratio of the logic unit; the storage pool comprises a plurality of the storage logical units; the storage resource usage information includes: storing the occupied ratio of the front port corresponding to the logic unit and the occupied space ratio of the logic unit;
the allocation module is specifically configured to:
and when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first upper limit value and the occupied space ratio of the storage logic unit is smaller than the second upper limit value, allocating storage resources for the service to be stored.
9. The apparatus for allocating storage resources of claim 7, wherein said apparatus further comprises:
the comparison module is used for comparing the storage resource use information with preset storage resource index information to obtain a comparison result representing the storage use degree of the storage pool;
and the adjusting module is used for adjusting the storage pool when the comparison result meets the preset storage pool adjusting condition.
10. The apparatus for allocating storage resources according to claim 9, wherein the preset storage resource index information includes a first upper limit and a first lower limit of a front port occupied ratio corresponding to a storage logic unit, and the storage resource usage information includes a front port occupied ratio corresponding to a storage logic unit;
the adjusting module comprises a first adjusting unit, and is used for:
when the occupied ratio of the front port corresponding to the storage logic unit is smaller than the first lower limit value continuously in a preset time period, recovering the unoccupied front port;
and adding a front port when the occupied ratio of the front port corresponding to the storage logic unit is larger than the first upper limit value continuously within a preset time period.
11. The apparatus for allocating storage resources according to claim 9, wherein the preset storage resource index information includes: storing a second upper limit value and a second lower limit value of occupied space ratio of the logic unit; the storage resource usage information includes: storing occupied space ratio of the logic unit; the storage pool comprises a plurality of the storage logical units;
the adjusting module comprises a second adjusting unit, and is used for:
when the occupied space ratio of the storage logic unit is less than the second lower limit value continuously in a preset time period, recovering the unoccupied storage space of the storage pool;
and when the occupied space ratio of the storage logic unit is larger than the second upper limit value continuously in a preset time period, expanding the storage space of the storage pool.
12. The apparatus for allocating storage resources according to claim 9, wherein the preset storage resource index information includes: storing a third upper limit value and a third lower limit value of a busy indicator of the logic unit; the storage resource usage information includes: storing a busy indicator of the logic unit; the storage pool comprises a plurality of the storage logical units;
the adjusting module comprises a third adjusting unit, configured to:
acquiring performance information of a storage resource pool corresponding to each service type;
when the busy index of the storage logic unit is smaller than the third lower limit value continuously within a preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with lower performance according to the performance information;
and when the busy index of the storage logic unit is continuously greater than the third upper limit value within a preset time period, replacing the storage pool corresponding to the service type of the service to be stored with other storage pools with higher performance according to the performance information.
13. An apparatus for allocating storage resources, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the method of allocation of storage resources according to any one of claims 1 to 6.
14. A computer-readable storage medium, on which an information transfer implementing program is stored, which, when executed by a processor, implements the method of allocating storage resources according to any one of claims 1 to 6.
CN202110730256.8A 2021-06-29 2021-06-29 Storage resource allocation method, device, equipment and storage medium Pending CN115543594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110730256.8A CN115543594A (en) 2021-06-29 2021-06-29 Storage resource allocation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110730256.8A CN115543594A (en) 2021-06-29 2021-06-29 Storage resource allocation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115543594A true CN115543594A (en) 2022-12-30

Family

ID=84705709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110730256.8A Pending CN115543594A (en) 2021-06-29 2021-06-29 Storage resource allocation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115543594A (en)

Similar Documents

Publication Publication Date Title
CN109951508B (en) Zookeeper-based request coordination method and device, computer equipment and storage medium
CN111381835A (en) Method, device, equipment and medium for registering and discovering technical service component
CN111224807A (en) Distributed log processing method, device, equipment and computer storage medium
US11936540B2 (en) System determination apparatus, system determination method and system determination program
CN115543594A (en) Storage resource allocation method, device, equipment and storage medium
CN115567448A (en) Flow control method, flow control device, flow control apparatus, flow control medium, and program product
CN116074209A (en) Data prediction method, device, equipment and computer storage medium
CN116069751A (en) Information processing method, apparatus, device and computer readable storage medium
CN111833608B (en) Road condition information processing method and device
CN114791912A (en) Data processing method, system, electronic equipment and storage medium
CN111831211A (en) Data transmission method, device, equipment and storage medium
CN114710450B (en) Flow control method, device, equipment and computer storage medium
CN116414539A (en) Management method, device, equipment, storage medium and product of application system
CN116781621A (en) Transaction flow limiting method, device, equipment and computer storage medium
CN115934313A (en) Method, device, equipment, medium and product for processing service request
CN116414897A (en) Database management method, device, equipment, medium and program product
CN117216113A (en) User determination method, device, equipment and computer storage medium
CN114140211A (en) General ledger data processing method, device, equipment, storage medium and program product
CN117172769A (en) Resource transfer method, device, equipment and storage medium
CN116938733A (en) Service function chain deployment method, device, equipment, medium and product
CN116629794A (en) Business approval method, device, equipment and computer storage medium
CN116151887A (en) Information pushing method, device, equipment and computer storage medium
CN116781726A (en) Information synchronization method and device, electronic equipment and storage medium
CN116775110A (en) Data synchronization method, device, equipment, medium and product
CN117934168A (en) Transaction request processing method, device, equipment and computer storage medium

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