A storage space capacity allocation method, device, equipment and medium

By setting capacity parameters and weight values ​​for storage space allocation, thin volumes with a minimum remaining storage space of 0 are selected, and the new storage space capacity is calculated. This solves the problem of individual thin volumes occupying a large amount of resources, and achieves reasonable allocation of storage resources and improved service quality.

CN115061629BActive Publication Date: 2026-02-17JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210753293.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2026-02-17
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

During the storage space capacity allocation process, some thin volumes occupy most of the storage resources of the entire storage pool, resulting in less writable space for other volumes and a poor user experience. How can this situation be avoided and resources be allocated reasonably to improve service quality?

Method used

By setting the capacity parameters of a pre-created thin volume for the client, calculating the weight value and allocating the minimum storage space capacity, the target weight value is selected from the target thin volumes with a minimum remaining storage space capacity of 0. The additional storage space capacity is calculated based on the remaining storage space capacity and the target weight value. QoS (Quality of Service) is used to ensure that the writing of high-priority thin volumes does not affect the normal writing of other volumes.

Benefits of technology

This effectively prevents individual thin volumes from consuming most of the storage pool's resources, ensuring a reasonable allocation of resources among multiple thin volumes and improving service quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061629B_ABST
    Figure CN115061629B_ABST
Patent Text Reader

Abstract

The application discloses a storage space capacity allocation method and device, equipment and medium, and relates to the technical field of computers, which comprises the following steps: setting the capacity parameter of a pre-created thin volume for a client, calculating a weight value according to the capacity parameter and the remaining storage space capacity of the client, and allocating the minimum storage space capacity for the thin volume according to the capacity parameter; selecting a target thin volume with a minimum remaining storage space capacity of 0 from each thin volume, and selecting a corresponding target weight value; calculating each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and allocating the new storage space capacity according to each new storage space capacity. Through the above technical scheme of the application, the situation that individual thin volumes occupy most of the storage resources of the entire storage pool can be effectively avoided, thereby effectively allocating resources reasonably and improving service quality guarantee.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a storage space capacity allocation method, device, equipment and medium. BACKGROUND

[0002] At present, the storage system is expanding year by year, in order to ensure the safety of the storage capacity, users often deploy more physical storage space than actual needs. But in the actual use process, the deployment capacity is often not fully utilized. Industry research organizations find that in some projects, the actual use capacity accounts for only 20%-30% of the deployment capacity. Therefore, the automatic thin provisioning technology emerges as the times require, aiming to achieve higher storage capacity utilization and bring greater investment returns. Automatic thin provisioning is a kind of volume capacity virtualization technology. The core of automatic thin provisioning is write-before allocation. The traditional volume allocates all physical space when creating. If the user creates a volume, the actual amount of data written is small or the actual amount of data written is slowly increasing, and the allocated space will still be fully occupied, and cannot be shared with other volumes. Unlike traditional volumes, thin volumes are virtual volumes. When creating a thin volume, the user will not be allocated all the physical capacity, and only when the user performs a write operation on the volume will the write-before allocation be allocated to the address to be written. In this way, automatic thin provisioning can reduce early physical storage deployment and maximize storage space utilization. However, when multiple thin volumes are created and used for a period of time, the actual remaining capacity in the storage pool gradually approaches the full write condition, and when multiple volumes write at the same time, the remaining space seen by each other is large, which can cause the storage pool to be written full, resulting in each volume being unable to write normally. In addition, individual thin volumes occupy a large part of the storage resources of the entire storage pool, resulting in small writeable space for other volumes, poor user experience, and other problems. In some application scenarios, more storage resources need to be reserved for some important volumes to provide better services.

[0003] From the above, in the process of storage space capacity allocation, how to avoid the situation that individual thin volumes occupy a large part of the storage resources of the entire storage pool, so as to effectively allocate resources reasonably and improve service quality guarantee is a problem to be solved in the field. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a storage space capacity allocation method, device, equipment and medium, which can effectively avoid the situation that individual thin volumes occupy a large part of the storage resources of the entire storage pool, so as to effectively allocate resources reasonably and improve service quality guarantee. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a storage space capacity allocation method, comprising:

[0006] setting a capacity parameter of the pre-created thin volume for the client, and calculating a weight value according to the capacity parameter and a remaining storage space capacity of the client, and performing a minimum storage space capacity allocation for the thin volume according to the capacity parameter;

[0007] selecting a target thin volume with a minimum remaining storage space capacity of 0 from the thin volumes, and selecting a corresponding target weight value;

[0008] calculating each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and performing a new storage space capacity allocation according to the new storage space capacities.

[0009] Optionally, the step of setting the capacity parameter of the pre-created thin volume for the client comprises:

[0010] detecting whether a local storage function is triggered;

[0011] if the local storage function is triggered, triggering the step of setting the capacity parameter of the pre-created thin volume for the client.

[0012] Optionally, the step of setting the capacity parameter of the pre-created thin volume for the client comprises:

[0013] determining a local storage space capacity;

[0014] setting a minimum storage space capacity value, an initial weight value and an upper limit capacity value for the pre-created thin volume of the client based on the storage space capacity.

[0015] Optionally, the step of calculating the weight value according to the capacity parameter and the remaining storage space capacity of the client comprises:

[0016] determining a current remaining storage space capacity of the client;

[0017] calculating the weight value according to a pre-designed calculation rule and based on the initial weight value, the remaining storage space capacity and the storage space capacity.

[0018] Optionally, the step of selecting the target thin volume with the minimum remaining storage space capacity of 0 from the thin volumes comprises:

[0019] judging whether there is the thin volume which has not been allocated with a capacity;

[0020] if there is no thin volume which has not been allocated with a capacity, selecting the target thin volume with the minimum remaining storage space capacity of 0 from the thin volumes.

[0021] Optionally, after judging whether there is the thin volume without capacity allocation, the method further comprises:

[0022] If there is the thin volume without capacity allocation, all the thin volumes without capacity allocation are filtered out from the thin volumes;

[0023] An unallocated weight value is calculated according to the thin volume without capacity allocation, the corresponding capacity parameter and the current remaining storage space capacity, and the minimum storage space capacity allocation is performed for the thin volume without capacity allocation according to the unallocated weight value.

[0024] Optionally, the calculation of the new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value comprises:

[0025] A priority allocation level is added to each thin volume based on the quality of service being local;

[0026] The new storage space capacity for the target thin volume is calculated based on the priority allocation level and according to the remaining storage space capacity and the target weight value.

[0027] In a second aspect, the present application discloses a storage space capacity allocation device, comprising:

[0028] A weight value calculation module is configured to set a capacity parameter of a pre-created thin volume for a client, calculate a weight value according to the capacity parameter and a remaining storage space capacity of the device, and perform the minimum storage space capacity allocation for the thin volume according to the capacity parameter;

[0029] A target weight value determination module is configured to filter out a target thin volume with a minimum remaining storage space capacity of 0 from the thin volumes, and filter out a corresponding target weight value;

[0030] A capacity allocation module is configured to calculate the new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and perform the new storage space capacity allocation according to the new storage space capacity.

[0031] In a third aspect, the present application discloses an electronic device, comprising:

[0032] A memory is configured to save a computer program;

[0033] A processor is configured to execute the computer program to implement the storage space capacity allocation method.

[0034] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed storage space capacity allocation method.

[0035] As can be seen, this application provides a storage space capacity allocation method, including setting capacity parameters for a pre-created thin volume for the client, calculating a weight value based on the capacity parameters and its own remaining storage space capacity, and allocating the minimum storage space capacity for the thin volume according to the capacity parameters; selecting target thin volumes with a minimum remaining storage space capacity of 0 from the thin volumes, and selecting corresponding target weight values; calculating each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight values, and allocating new storage space capacity according to each new storage space capacity. This application calculates weight values ​​by creating thin volume capacity parameters, then performs minimum storage space capacity allocation, selects thin volumes with a minimum storage space capacity of 0, calculates target weight values, and then allocates new storage space capacity. This application uses QoS (Quality of Service) to ensure that the write speed of the thin volume with the highest priority is prioritized among multiple thin volumes in the same storage pool, avoiding the situation where all volumes are affected and blocked when they are about to be full, thus ensuring that the service quality of the thin volume is met. With multiple thin volumes competing for storage resources, this avoids situations where a single thin volume occupies the majority of the storage pool's resources, thus effectively allocating resources rationally and improving service quality assurance. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0037] Figure 1 This is a flowchart of a storage space capacity allocation method disclosed in this application;

[0038] Figure 2 This is a flowchart of a storage space capacity allocation method disclosed in this application;

[0039] Figure 3 This is a schematic diagram of a storage space capacity allocation device disclosed in this application;

[0040] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation

[0041] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0042] At present, storage systems are expanding year by year, and in order to ensure that the storage capacity is sufficient for use, users often deploy more physical storage space than actual needs. However, in the actual use process, the deployed capacity is often not fully utilized. Industry research organizations find that in some projects, the actual used capacity only accounts for 20%-30% of the deployed capacity. Therefore, automatic thin provisioning technology emerges as the times require, aiming to achieve higher storage capacity utilization and bring greater investment returns. Automatic thin provisioning is a kind of volume capacity virtualization technology. The core of automatic thin provisioning is write-before-allocate. The traditional volume allocates all physical space when it is created. If the user creates a volume, the actual amount of data written is small or the actual amount of data written is slowly growing, and the allocated space will still be fully occupied, and cannot be shared with other volumes. Unlike traditional volumes, thin volumes are virtual volumes. When creating a thin volume, the user will not be allocated all the physical capacity, and only when the user performs a write operation on the volume will the write-before-allocate be allocated to the address to be written. In this way, automatic thin provisioning can reduce early physical storage deployment and maximize storage space utilization. However, when multiple storage space capacities are created and allocated over time, the actual remaining capacity in the storage pool gradually approaches the full write condition, and when multiple volumes are simultaneously written, each other sees a lot of remaining space, which can cause the storage pool to be written to full capacity, resulting in each volume being unable to write normally. In addition, individual storage space capacity allocation occupies a large part of the storage resources of the entire storage pool, resulting in small writeable space for other volumes, poor user experience, and other problems. In some application scenarios, more storage resources need to be reserved for some important volumes to provide better services. As can be seen from the above, in the process of storage space capacity allocation, how to avoid the situation that individual storage space capacity allocation occupies a large part of the storage resources of the entire storage pool, so as to effectively allocate resources reasonably and improve the quality of service guarantee is a problem to be solved in the field.

[0043] Referring to Figure 1 The embodiment of the present application discloses a storage space capacity allocation method, which can specifically include:

[0044] Step S11: setting the capacity parameters of the pre-created thin volumes for the clients, and calculating the weight values according to the capacity parameters and the remaining storage space capacities of the clients, and performing the minimum storage space capacity allocation for the thin volumes according to the capacity parameters.

[0045] In this embodiment, it is detected whether the local storage function is triggered, and if the local storage function is triggered, the step of setting the capacity parameters of the pre-created thin volumes for the clients is triggered. The local storage space capacity is determined, and the minimum storage space capacity value, the initial weight value and the upper limit capacity value are set for the pre-created thin volumes of the clients based on the storage space capacity.

[0046] In this embodiment, after setting the capacity parameters of the pre-created thin volumes for the clients, the current local remaining storage space capacity is determined, and then the weight values are calculated according to the pre-designed calculation rules and based on the initial weight values, the remaining storage space capacity and the storage space capacity.

[0047] Among them, the server calculates the minimum storage space capacity value, the upper limit capacity value and the relative available space size (the value changes with the remaining space) available for each client. It is stipulated that the sum of the minimum storage space capacity values of all clients cannot exceed the actual available storage space of the storage pool. The sum of the initial weight values of all clients is equal to 1. The relative available space = the remaining space of the storage pool * the initial weight value, so the initial weight value <= 1, and the larger the initial weight value, the larger the available space allocated.

[0048] In this embodiment, it is applied to both the client and the server. The server is the storage pool server, which is the core part of the capacity allocation scheduling. The client is mainly used to issue the capacity parameters of the QoS template of a certain thin volume and collect the completion information of the request.

[0049] Step S12: selecting the target thin volume with the minimum storage space remaining capacity of 0 from each of the thin volumes, and selecting the corresponding target weight value.

[0050] Step S13: calculating each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and performing the new storage space capacity allocation according to each of the new storage space capacities.

[0051] In this embodiment, after selecting the corresponding target weight value, the priority allocation level is added to each thin volume of the local based on the quality of service, and then each new storage space capacity for the target thin volume is calculated based on the priority allocation level and according to the remaining storage space capacity and the target weight value. Finally, the new storage space capacity allocation is performed according to each of the new storage space capacities.

[0052] It can be understood that the client creates a thin volume on the server, and then the server detects whether the local storage function is triggered. If the local storage function is triggered, the step of setting the capacity parameters of the pre-created thin volume for the client is triggered, that is, the local storage space capacity is first determined, and then the minimum storage space capacity value, the initial weight value and the upper capacity value are set for the pre-created thin volume of the client based on the storage space capacity. The weight value is calculated according to the capacity parameters and the pre-determined current local remaining storage space capacity. Then, the forced stage is entered, that is, the minimum storage space capacity allocation for the thin volume is performed according to the capacity parameters. Only after all the client requests that meet the reserved space are processed, the weight-based processing stage is entered, that is, it is judged whether there is a thin volume that has not been allocated capacity. If there is no thin volume that has not been allocated capacity, the target thin volume whose minimum storage space remaining capacity is 0 is selected from the thin volumes. If there is a thin volume that has not been allocated capacity, the weight stage is entered, all thin volumes that have not been allocated capacity are selected from the thin volumes, and then the unallocated weight value is calculated according to the thin volumes that have not been allocated capacity, the corresponding capacity parameters and the current remaining storage space capacity. The respective new storage space capacity for the target thin volume is calculated based on the remaining storage space capacity and the target weight value, and then the new storage space capacity allocation is performed according to the respective new storage space capacity. Compared with the original space usage method without control constraints, the method can allocate reasonable expected resources to each volume, reasonably allocate storage resources when multiple thin volumes compete for storage resources, and ensure the expected stable service quality when there is no timely expansion. When the resources are sufficient, the minimum capacity of each thin volume is pre-allocated. When the resources are tight, the write of the thin volume with low priority is appropriately limited or suspended. Through the method, the basic capacity space reservation problem of each thin volume, the maximum space usage limitation problem and the capacity space allocation problem between different thin volumes can be solved. The effect of reasonable resource allocation and important service quality guarantee is achieved.

[0053] The application provides a storage space capacity allocation method. Compared with the original space usage method without control constraints, the method can allocate storage resources reasonably for each volume in the competition for storage resources among multiple storage space capacities and ensure the provision of expected stable service quality when there is no timely expansion. When resources are sufficient, the minimum capacity of pre-allocation is executed for each storage space capacity, and when resources are scarce, the write of the storage space capacity with low priority is appropriately limited or suspended to ensure the service operation of the storage space capacity with high priority. In the embodiment, a client creates a thin volume on a server, and then the server detects whether the local storage function is triggered. If the local storage function is triggered, the capacity parameters of the thin volume pre-created for the client are set, that is, the local storage space capacity is determined, and then the minimum storage space capacity value, the initial weight value and the upper limit capacity value are set for the thin volume pre-created for the client based on the storage space capacity. The weight value is calculated according to the capacity parameters and the pre-determined current local remaining storage space capacity, and then the forced stage is entered, that is, the minimum storage space capacity allocation for the thin volume is performed according to the capacity parameters. Only after all the client requests meeting the reserved space are processed, the weight-based processing stage is entered, that is, whether there is a thin volume without capacity allocation is judged. If there is no thin volume without capacity allocation, the target thin volume with the minimum storage space remaining capacity of 0 is selected from the thin volumes. If there is a thin volume without capacity allocation, the weight stage is entered, all the thin volumes without capacity allocation are selected from the thin volumes, and then the unallocated weight value is calculated according to the thin volumes without capacity allocation, the corresponding capacity parameters and the current remaining storage space capacity. The new storage space capacity for the target thin volume is calculated based on the remaining storage space capacity and the target weight value, and then the new storage space capacity allocation is performed according to the new storage space capacity. Compared with the original space usage method without control constraints, the method can allocate storage resources reasonably for each volume in the competition for storage resources among multiple thin volumes and ensure the provision of expected stable service quality when there is no timely expansion. When resources are sufficient, the minimum capacity of pre-allocation is executed for each thin volume, and when resources are scarce, the write of the thin volume with low priority is appropriately limited or suspended. The method can solve the problems of basic capacity space reservation, maximum space usage limitation and capacity space allocation among different thin volumes. The effect of reasonable resource allocation and important service quality guarantee is achieved.

[0054] In the embodiment, the capacity parameters of the pre-created thin volumes of the client are set, the weight values are calculated according to the capacity parameters and the remaining storage space capacities of the client, and the minimum storage space capacities of the thin volumes are allocated according to the capacity parameters; the target thin volumes with the minimum remaining storage space capacities of 0 are filtered from the thin volumes, and the corresponding target weight values are filtered; and the respective newly added storage space capacities of the target thin volumes are calculated based on the remaining storage space capacities and the target weight values, and the newly added storage space capacities are allocated according to the respective newly added storage space capacities. The application calculates the weight values through the capacity parameters of the created thin volumes, then allocates the minimum storage space capacities, filters the thin volumes with the minimum storage space capacities of 0, calculates the target weight values, and then allocates the newly added storage space capacities. The application ensures that the write of the thin volume with the high priority is preferentially met under the same storage pool, avoids the situation that all the volumes are affected and blocked when the thin volume is about to be full, and ensures that the service quality of the thin volume is met. Under the competition of the storage resources of multiple thin volumes, the situation that an individual thin volume occupies most of the storage resources of the entire storage pool is avoided, so that the resources are reasonably allocated and the service quality is improved.

[0055] Referring to Figure 2 The embodiment of the application discloses a storage space capacity allocation method, which can specifically include the following steps:

[0056] Step S21: The capacity parameters of the pre-created thin volumes of the client are set, and the weight values are calculated according to the capacity parameters and the remaining storage space capacities of the client, and the minimum storage space capacities of the thin volumes are allocated according to the capacity parameters.

[0057] Step S22: It is judged whether there is the thin volume which has not been allocated the capacity, if there is no thin volume which has not been allocated the capacity, the target thin volume with the minimum remaining storage space capacity of 0 is filtered from the thin volumes.

[0058] In the embodiment, it is judged whether there is the thin volume which has not been allocated the capacity, if there is the thin volume which has not been allocated the capacity, all the thin volumes which have not been allocated the capacity are filtered from the thin volumes, and then the unallocated weight values are calculated according to the thin volumes which have not been allocated the capacity, the corresponding capacity parameters and the current remaining storage space capacities, and the minimum storage space capacities of the thin volumes which have not been allocated the capacity are allocated according to the unallocated weight values.

[0059] Step S23: The respective newly added storage space capacities of the target thin volumes are calculated based on the remaining storage space capacities and the target weight values, and the newly added storage space capacities are allocated according to the respective newly added storage space capacities.

[0060] In this embodiment, the client creates a thin volume on the server, and then the server detects whether the local storage function is triggered. If the local storage function is triggered, the step of setting the capacity parameters of the pre-created thin volume for the client is triggered, that is, the local storage space capacity is first determined, and then the minimum storage space capacity value, the initial weight value and the upper capacity value of the pre-created thin volume for the client are set based on the storage space capacity. The weight value is calculated according to the capacity parameters and the pre-determined current local remaining storage space capacity. Then, the forced stage is entered, that is, the minimum storage space capacity allocation for the thin volume is performed according to the capacity parameters. Only after all the client requests that meet the reserved space are processed, the weight-based processing stage is entered, that is, it is judged whether there is a thin volume that has not been allocated capacity. If there is no thin volume that has not been allocated capacity, the target thin volume whose minimum storage space remaining capacity is 0 is selected from the thin volumes. If there is a thin volume that has not been allocated capacity, the weight stage is entered, all thin volumes that have not been allocated capacity are selected from the thin volumes, and then the unallocated weight value is calculated according to the thin volumes that have not been allocated capacity, the corresponding capacity parameters and the current remaining storage space capacity. The respective new storage space capacity for the target thin volume is calculated based on the remaining storage space capacity and the target weight value, and then the new storage space capacity allocation is performed according to the respective new storage space capacity. Compared with the original space usage method without control constraints, the method can allocate reasonable expected resources to each volume, reasonably allocate storage resources when multiple thin volumes compete for storage resources, and ensure the provision of predictable and stable service quality when there is no timely expansion. When the resources are sufficient, the minimum capacity of each thin volume is pre-allocated. When the resources are tight, the write of the thin volume with low priority is appropriately limited or suspended. Through this method, the basic capacity space reservation problem of each thin volume, the maximum space usage limitation problem, and the capacity space allocation problem between different thin volumes can be solved. The effect of reasonable resource allocation and important service quality guarantee is achieved.

[0061] In the embodiment, the capacity parameter of the pre-created thin volume is set for the client, a weight value is calculated according to the capacity parameter and the remaining storage space capacity of the client, and the minimum storage space capacity allocation is performed according to the capacity parameter; it is judged whether there is the thin volume which has not been allocated with the capacity, if there is no thin volume which has not been allocated with the capacity, the target thin volume with the minimum remaining storage space capacity of 0 is selected from the thin volumes; and each new storage space capacity for the target thin volume is calculated based on the remaining storage space capacity and the target weight value, and the new storage space capacity allocation is performed according to each new storage space capacity. The weight value is calculated by the capacity parameter of the pre-created thin volume, then the minimum storage space capacity allocation is performed, the thin volume with the minimum storage space capacity of 0 is selected, the target weight value is calculated, and then the new storage space capacity allocation is performed. The QoS is used to ensure that the write of the thin volume with high priority is preferentially met under the same storage pool, and the situation that all volumes are affected and blocked when the storage is almost full is avoided, so that the service quality of the thin volume is ensured to be met. Under the condition that multiple thin volumes compete for storage resources, the situation that an individual thin volume occupies most of the storage resources of the entire storage pool is avoided, so that the resource is reasonably allocated and the service quality is improved.

[0062] Referring to Figure 3 The embodiment of the application discloses a storage space capacity allocation device, which can specifically include:

[0063] The weight value calculation module 11 is configured to set the capacity parameter of the pre-created thin volume for the client, calculate a weight value according to the capacity parameter and the remaining storage space capacity of the client, and perform the minimum storage space capacity allocation for the thin volume according to the capacity parameter.

[0064] The target weight value determination module 12 is configured to select the target thin volume with the minimum remaining storage space capacity of 0 from the thin volumes, and select the corresponding target weight value.

[0065] The capacity allocation module 13 is configured to calculate each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and perform the new storage space capacity allocation according to each new storage space capacity.

[0066] In the embodiment, the capacity parameters of the pre-created thin volumes are set for the clients, the weight values are calculated according to the capacity parameters and the remaining storage space capacities of the clients, and the minimum storage space capacities are allocated to the thin volumes according to the capacity parameters; the target thin volumes with the minimum remaining storage space capacities of 0 are filtered from the thin volumes, and the corresponding target weight values are filtered; and the new storage space capacities for the target thin volumes are calculated based on the remaining storage space capacities and the target weight values, and the new storage space capacities are allocated according to the new storage space capacities. The application calculates the weight values through the capacity parameters of the created thin volumes, then allocates the minimum storage space capacities, filters the thin volumes with the minimum storage space capacities of 0, calculates the target weight values, and then allocates the new storage space capacities. The application ensures that the write of the thin volume with high priority is preferentially met under the same storage pool, avoids the situation that all the volumes are affected and blocked when the thin volume is about to be full, and ensures that the service quality of the thin volume is met. In the competition of storage resources among multiple thin volumes, the situation that an individual thin volume occupies most of the storage resources of the entire storage pool is avoided, so that the resources are reasonably allocated and the service quality is improved.

[0067] In some specific embodiments, the weight value calculation module 11 can specifically include:

[0068] The detection module is configured to detect whether the local storage function is triggered.

[0069] The triggering module is configured to trigger the step of setting the capacity parameters of the pre-created thin volumes for the clients if the local storage function is triggered.

[0070] In some specific embodiments, the weight value calculation module 11 can specifically include:

[0071] The capacity determination module is configured to determine the local storage space capacity.

[0072] The setting module is configured to set the minimum storage space capacity value, the initial weight value, and the upper limit capacity value for the pre-created thin volumes of the clients based on the storage space capacity.

[0073] In some specific embodiments, the weight value calculation module 11 can specifically include:

[0074] The remaining storage space capacity determination module is configured to determine the current remaining storage space capacity of the local storage.

[0075] The weight value calculation module is configured to calculate the weight value according to a pre-designed calculation rule and based on the initial weight value, the remaining storage space capacity, and the storage space capacity.

[0076] In some embodiments, the target weight value determination module 12 can specifically include:

[0077] A judgment module is configured to judge whether there is the thin volume without capacity allocation.

[0078] A screening module is configured to screen the target thin volume with the lowest remaining storage space capacity of 0 from the thin volumes if there is no thin volume without capacity allocation.

[0079] In some embodiments, the target weight value determination module 12 can specifically include:

[0080] A screening thin volume without allocation module is configured to screen all thin volumes without capacity allocation from the thin volumes if there is the thin volume without capacity allocation.

[0081] A lowest storage space capacity allocation module is configured to calculate the unallocated weight value according to the thin volume without capacity allocation, the corresponding capacity parameter and the current remaining storage space capacity, and perform the lowest storage space capacity allocation for the thin volume without capacity allocation according to the unallocated weight value.

[0082] In some embodiments, the capacity allocation module 13 can specifically include:

[0083] A priority allocation level adding module is configured to add the priority allocation level to each thin volume based on the quality of service.

[0084] A new storage space capacity calculation module is configured to calculate each new storage space capacity for the target thin volume based on the priority allocation level and according to the remaining storage space capacity and the target weight value.

[0085] Figure 4 A structural schematic diagram of an electronic device is provided in the embodiments of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is configured to store a computer program, the computer program is loaded and executed by the processor 21 to implement the related steps in the storage space capacity allocation method executed by the electronic device disclosed in any of the foregoing embodiments.

[0086] In this embodiment, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 is configured to create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which will not be specifically limited herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which will not be specifically limited herein.

[0087] In addition, the memory 22 as a carrier of resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon include an operating system 221, a computer program 222 and data 223, etc., and the storage mode can be temporary storage or permanent storage.

[0088] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to realize the operation and processing of the processor 21 on the data 223 in the memory 22, and the operating system 221 can be Windows, Unix, Linux, etc. In addition to the computer program capable of completing the storage space capacity allocation method executed by the electronic device 20 disclosed in any one of the preceding embodiments, the computer program 222 can further include a computer program capable of completing other specific work. In addition to the data transmitted from the external device and received by the storage space capacity allocation device, the data 223 can also include the data collected by the input / output interface 25, etc.

[0089] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module can be located in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0090] Further, the present embodiment also discloses a computer readable storage medium, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to realize the steps of the storage space capacity allocation method disclosed in any one of the preceding embodiments.

[0091] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant 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 can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.

[0092] The above describes in detail the storage space capacity allocation method, device, equipment and storage medium provided by the present application. The principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A storage space capacity allocation method characterized by, The application is applied to a server, comprising: setting capacity parameters of pre-created thin volumes for clients, calculating weight values according to the capacity parameters and remaining storage space capacities of the clients, and performing minimum storage space capacity allocation for the thin volumes according to the capacity parameters; the capacity parameters include minimum storage space capacity values, initial weight values and upper limit capacity values; selecting target thin volumes with 0 minimum storage space remaining capacity from the thin volumes, and selecting corresponding target weight values; calculating each new storage space capacity for the target thin volumes based on the remaining storage space capacities and the target weight values, and performing new storage space capacity allocation according to the new storage space capacities; calculating weight values according to capacity parameters and remaining storage space capacities of the clients, comprising: determining the current local remaining storage space capacity; calculating weight values according to pre-design calculation rules and based on initial weight values, remaining storage space capacities and storage space capacities.

2. The storage space capacity allocation method according to claim 1, characterized by, The step of setting capacity parameters of pre-created thin volumes for clients comprises: detecting whether the local storage function is triggered; if the local storage function is triggered, triggering the step of setting capacity parameters of pre-created thin volumes for clients.

3. The storage space capacity allocation method according to claim 1, characterized by, The step of setting capacity parameters of pre-created thin volumes for clients comprises: determining the local storage space capacity; setting minimum storage space capacity values, initial weight values and upper limit capacity values for pre-created thin volumes of the clients based on the storage space capacity.

4. The storage space capacity allocation method according to claim 1, characterized by, The step of selecting target thin volumes with 0 minimum storage space remaining capacity from the thin volumes comprises: judging whether there are the thin volumes without capacity allocation; if there are no thin volumes without capacity allocation, selecting target thin volumes with 0 minimum storage space remaining capacity from the thin volumes.

5. The storage space capacity allocation method according to claim 4, wherein, After the step of judging whether there are the thin volumes without capacity allocation, further comprising: if there are the thin volumes without capacity allocation, selecting all the thin volumes without capacity allocation from the thin volumes; calculating unallocated weight values according to the thin volumes without capacity allocation, corresponding capacity parameters and current remaining storage space capacities, and performing minimum storage space capacity allocation for the thin volumes without capacity allocation according to the unallocated weight values.

6. The storage space capacity allocation method according to any one of claims 1 to 5, characterized by, The step of calculating each new storage space capacity for the target thin volumes based on the remaining storage space capacities and the target weight values comprises: adding priority allocation levels to each thin volume of the local based on quality of service; calculating each new storage space capacity for the target thin volumes based on the priority allocation levels, the remaining storage space capacities and the target weight values.

7. A storage space capacity allocation apparatus characterized by comprising: comprising: a weight value calculation module, configured to set capacity parameters of pre-created thin volumes for clients, calculate weight values according to the capacity parameters and remaining storage space capacities of the clients, and perform minimum storage space capacity allocation for the thin volumes according to the capacity parameters; the capacity parameters include minimum storage space capacity values, initial weight values and upper limit capacity values; The target weight value determination module is configured to filter out a target thin volume with the lowest remaining storage space capacity of 0 from each of the thin volumes and filter out a corresponding target weight value; The capacity allocation module is configured to calculate each new storage space capacity for the target thin volume based on the remaining storage space capacity and the target weight value, and allocate the new storage space capacity according to the new storage space capacity. The weight value is calculated according to the capacity parameter and the remaining storage space capacity of the local device, including: determining the current remaining storage space capacity of the local device; The weight value is calculated according to a pre-designed calculation rule and based on the initial weight value, the remaining storage space capacity and the storage space capacity.

8. An electronic device, comprising: The computer program is stored in the memory and executed by the processor to implement the storage space capacity allocation method according to any one of claims 1 to 6. The computer program is stored in the memory and executed by the processor to implement the storage space capacity allocation method according to any one of claims 1 to 6. ​ 9. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Storage system QoS (quality of service) control method and device

    CN107133100A