Storage resource management method and device, electronic equipment and readable storage medium
By monitoring and managing the storage resource usage information in the distributed storage system on a central monitor and determining and adjusting the capacity of the storage directory, the storage resource quota management problem in the distributed storage system is solved, and reasonable and flexible resource management and waste avoidance for the majority of users are achieved.
Patent Information
- Application Number
- CN202411856266.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The prior art is difficult to effectively manage the storage resource quota of the majority of users in a distributed storage system, resulting in wasting storage resources.
By implementing the storage resource management method on the central monitor, the storage resource usage information of each storage directory in the storage system is monitored, the storage directory to be managed and the target user group are determined according to the usage rate, the user group information is obtained and the storage directory management strategy is determined, and the storage capacity is adjusted to meet the actual needs of the user group.
It realizes reasonable and flexible storage resource quota management for the majority of users, avoids waste of storage resources, and improves the utilization efficiency of storage resources.
Smart Images

Figure CN119597226A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a storage resource management method, and also to a storage resource management device, an electronic device, and a computer-readable storage medium. Background Art
[0002] In a distributed storage system, files and data are stored on multiple nodes. With the rapid growth of data volume and the diversification of user needs, effective storage resource quota management has become increasingly important. At present, most conventional quota management methods are difficult to cope with complex distributed environments and are not flexible enough. For example, user-based quota management requires setting limits for each user separately. This approach will bring management challenges when there are a large number of users or uneven workloads, and will also cause a certain amount of storage resource waste.
[0003] Therefore, how to perform reasonable and flexible storage resource quota management for a large number of users and further avoid the waste of storage resources is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0004] The purpose of this application is to provide a storage resource management method, which can perform reasonable and flexible storage resource quota management for a large number of users, further avoiding the problem of waste of storage resources; another purpose of this application is to provide a storage resource management device, electronic device, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.
[0005] In a first aspect, the present application provides a storage resource management method, which is applied to a central monitor, wherein the central monitor is connected to a storage system, wherein the storage system includes a plurality of storage directories, and each of the storage directories is bound to a user group, wherein the method includes:
[0006] Monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory;
[0007] Determine a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to each of the storage resource usage information;
[0008] Acquire user group information of the target user group, and determine a storage directory management strategy according to the user group information and the storage resource usage information;
[0009] The storage directory management policy is used to adjust the storage capacity of the storage directory to be managed, so as to obtain a new storage directory corresponding to the target user group.
[0010] Optionally, the storage directory to be managed includes a storage directory to be expanded and a management directory to be reduced; the storage resource usage information is specifically a storage resource usage rate;
[0011] Accordingly, determining the storage directory to be managed and the target user group corresponding to the storage directory to be managed according to each of the storage resource usage information includes:
[0012] The storage directory whose storage resource usage rate exceeds the first threshold is used as the storage directory to be expanded, and a first target user group corresponding to the storage directory to be expanded is determined;
[0013] A storage directory whose storage resource usage rate is lower than a second threshold is used as the storage directory to be shrunk, and a second target user group corresponding to the storage directory to be shrunk is determined.
[0014] Optionally, obtaining user group information of the target user group, and determining a storage directory management policy according to the user group information and the storage resource usage information includes:
[0015] Acquire user group information of the target user group, and determine the user group type of the target user group according to the user group information;
[0016] Determine the user group level corresponding to the user group type according to the first mapping relationship; wherein the first mapping relationship is a mapping relationship between the user group type and the user group level;
[0017] Determine the directory type of the corresponding storage directory to be managed according to the storage resource usage information; wherein the directory type includes the storage directory to be expanded and the storage directory to be reduced;
[0018] When the directory type of the storage directory to be managed is the storage directory to be expanded, determining the storage directory expansion strategy corresponding to the user group level according to the second mapping relationship; wherein the second mapping relationship is a mapping relationship between the user group level and the storage directory expansion strategy;
[0019] When the directory type of the storage directory to be managed is the storage directory to be shrunk, the storage directory shrinking policy corresponding to the user group level is determined according to a third mapping relationship; wherein the third mapping relationship is a mapping relationship between the user group level and the storage directory shrinking policy.
[0020] Optionally, the storage resource management method further includes:
[0021] For each storage directory in the storage system, collecting statistics on historical storage resource usage information of the storage directory within a preset historical time period;
[0022] Predicting future storage resource demand information of a corresponding storage directory based on the historical storage resource usage information;
[0023] The storage capacity of the corresponding storage directory is adjusted according to the future storage resource demand information to obtain an adjusted storage directory.
[0024] Optionally, the storage resource management method further includes:
[0025] When receiving the joining information of the new user group, determining the quota mode of the storage resources in the storage system;
[0026] When the quota mode is the default quota mode, creating a new storage directory with a default quota capacity, and binding the new user group to the new storage directory;
[0027] When the quota mode is a custom quota mode, creating a new storage directory with a preset quota capacity, and binding the new user group to the new storage directory;
[0028] When the quota mode is the automatic quota mode, the target quota capacity is determined according to the user group level of the new user group, a new storage directory with the target quota capacity is created, and the new user group is bound to the new storage directory.
[0029] Optionally, the storage resource management method further includes:
[0030] When deregistration information of an existing user group is received, storage resources under the storage directory bound to the existing user group are recycled;
[0031] The storage directory bound to the existing user group is deleted, and the registration information of the existing user group is cancelled.
[0032] Optionally, the storage resource management method further includes:
[0033] Obtaining the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory;
[0034] Generate a storage resource usage chart and / or a storage resource usage report of the storage system according to the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory;
[0035] Output the storage resource usage chart and / or the storage resource usage report to a display device for visual presentation.
[0036] In a second aspect, the present application further discloses a storage resource management device, which is applied to a central monitor, wherein the central monitor is connected to a storage system, wherein the storage system includes a plurality of storage directories, and each of the storage directories is bound to a user group, wherein the device includes:
[0037] A monitoring module, used to monitor each storage directory in the storage system and obtain storage resource usage information of each storage directory;
[0038] A determination module, used to determine a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to each of the storage resource usage information;
[0039] An acquisition module, used to acquire user group information of the target user group, and determine a storage directory management strategy according to the user group information and the storage resource usage information;
[0040] The adjustment module is used to adjust the storage capacity of the storage directory to be managed by using the storage directory management policy to obtain a new storage directory corresponding to the target user group.
[0041] In a third aspect, the present application further discloses an electronic device, comprising:
[0042] Memory for storing computer programs;
[0043] A processor is used to implement the steps of any one of the storage resource management methods described above when executing the computer program.
[0044] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the storage resource management methods described above are implemented.
[0045] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of any one of the storage resource management methods described above when executed by a processor.
[0046] The present application provides a storage resource management method, which is applied to a central monitor, wherein the central monitor is connected to a storage system, wherein the storage system includes multiple storage directories, and each storage directory is bound to a user group. The method includes: monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory; determining a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to each storage resource usage information; obtaining user group information of the target user group, and determining a storage directory management policy according to the user group information and the storage resource usage information; and adjusting the storage capacity of the storage directory to be managed using the storage directory management policy to obtain a new storage directory corresponding to the target user group.
[0047] By applying the technical solution provided by the present application, the storage resources in the storage system are divided according to storage directories and bound to various user groups to obtain the storage directories corresponding to each user group, and the storage resource usage of each storage directory is monitored by a central monitor, that is, the storage resource usage of each user group is monitored; on this basis, the storage directory that needs to be adjusted can be determined according to the storage resource usage information of each storage directory, that is, the above-mentioned storage directory to be managed, so that the storage resource capacity in the storage directory to be managed can be effectively adjusted in combination with the user group information of the corresponding user group and the specific storage resource usage information therein, so that the adjusted new storage directory is more adapted to the actual storage needs of the corresponding user group. It can be seen that the present technical solution can perform reasonable and flexible storage resource quota management for a large number of users, effectively avoiding the problem of storage resource waste.
[0048] In one embodiment of the present application, for each storage directory in the storage system, its storage resource usage in a preset historical time period can be counted, that is, the above-mentioned historical storage resource usage information, thereby predicting the storage resource demand of the corresponding storage directory in a future period of time based on the historical storage resource usage information, that is, the above-mentioned future storage resource demand information, so that the storage capacity of the corresponding storage directory can be adjusted based on the future storage resource demand information. It can be seen that the present technical solution helps to achieve more accurate and efficient storage resource management and avoid idleness and waste of storage resources.
[0049] The storage resource management device, electronic device, computer-readable storage medium and computer program product provided in this application also have the above-mentioned technical effects, and this application will not elaborate on them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.
[0051] Figure 1 A flowchart of a storage resource management method provided in this application;
[0052] Figure 2 A functional schematic diagram of a storage resource management method provided by this application;
[0053] Figure 3A flowchart of another storage resource management method provided by this application;
[0054] Figure 4 A schematic diagram of the structure of a storage resource management device provided by the present application;
[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0056] The core of this application is to provide a storage resource management method, which can perform reasonable and flexible storage resource quota management for a large number of users, further avoiding the problem of waste of storage resources; another core of this application is to provide a storage resource management device, electronic device, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.
[0057] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0058] An embodiment of the present application provides a storage resource management method.
[0059] It should be noted that the storage resource management method provided in the embodiment of the present application can be implemented based on a storage resource management system, which may include a central monitor and a storage system, and the central monitor is connected to the storage system, wherein the storage system includes multiple storage directories, and each storage directory is bound to a user group, that is, the storage directory corresponds to the user group one by one, and each storage directory corresponds to storage resources of the same or different capacity.
[0060] Please refer to Figure 1 , Figure 1 This is a flow chart of a storage resource management method provided in the present application. The storage resource management method is applied to the above-mentioned central monitor and may include the following S101 to S104.
[0061] S101: Monitor each storage directory in the storage system to obtain storage resource usage information of each storage directory.
[0062] This step aims to achieve effective monitoring of each storage directory in the storage system. Specifically, the central monitor can monitor each storage directory in the storage system and obtain the storage resource usage information of each storage directory. Here, the storage resource usage information mainly refers to the initial quota, actual usage quota, storage resource usage rate, etc. of the corresponding storage directory. For example, the initial quota of a storage directory is 100MB, and the actual usage quota of the storage resources of the user group corresponding to the storage directory is 60MB, then the storage resource usage rate of the storage directory is 60%.
[0063] Among them, the central monitor's management operations on storage resources in the storage system can respond to corresponding management instructions, which can be instructions actively initiated by the administrator or instructions automatically triggered in response to preset conditions (such as timing conditions). This application does not limit this.
[0064] S102: Determine a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to the usage information of each storage resource.
[0065] This step aims to determine the storage directory to be managed and its corresponding user group (i.e., the target user group mentioned above). Here, it can be determined based on the storage resource usage information of each storage directory. For example, when the storage resource usage of a storage directory reaches a certain limit, the storage directory can be used as a storage directory to be managed so as to facilitate its expansion; when the storage resource usage of a storage directory is lower than a certain limit, the storage directory can be used as a storage directory to be managed so as to facilitate its reduction.
[0066] In one embodiment of the present application, the storage directory to be managed may include a storage directory to be expanded and a management directory to be reduced; the storage resource usage information may specifically be a storage resource usage rate;
[0067] Accordingly, determining the storage directory to be managed and the target user group corresponding to the storage directory to be managed according to the usage information of each storage resource may include:
[0068] The storage directory whose storage resource usage rate exceeds the first threshold is used as the storage directory to be expanded, and a first target user group corresponding to the storage directory to be expanded is determined;
[0069] The storage directories whose storage resource usage rates are lower than the second threshold are used as the storage directories to be shrunk, and a second target user group corresponding to the storage directories to be shrunk is determined.
[0070] The embodiment of the present application provides an implementation method for determining a storage directory to be managed and its corresponding target user group based on the storage resource utilization rate. First of all, the management of the storage directory mainly includes expansion processing and reduction processing. As the name implies, the expansion processing is to expand the storage capacity of the storage directory and allocate more storage resources to it; the reduction processing is to reduce the storage capacity of the storage directory and allocate fewer storage resources to it. Furthermore, a storage directory whose storage resource utilization rate exceeds a first threshold value can be regarded as a storage directory to be expanded, so as to facilitate expansion processing thereof; a storage directory whose storage resource utilization rate is lower than a second threshold value can be regarded as a storage directory to be reduced, so as to facilitate reduction processing thereof.
[0071] It should be noted that the specific values of the first threshold and the second threshold do not affect the implementation of the present technical solution and can be set by technical personnel according to actual conditions, and this application does not impose any limitations on this.
[0072] S103: Obtain user group information of the target user group, and determine a storage directory management strategy according to the user group information and storage resource usage information.
[0073] This step aims to determine the storage directory management strategy. For the storage directory to be managed, the storage directory management strategy suitable for the storage directory to be managed can be determined based on the user group information of the corresponding target user group and the storage resource usage information. Among them, the storage directory management strategy can be divided into a storage directory expansion strategy and a storage directory reduction strategy, and the specific expansion size or reduction size can be determined based on the user group information and storage resource usage information of the target user group.
[0074] In one embodiment of the present application, obtaining user group information of a target user group and determining a storage directory management policy according to the user group information and storage resource usage information may include:
[0075] Acquire user group information of the target user group, and determine the user group type of the target user group according to the user group information;
[0076] Determine the user group level corresponding to the user group type according to the first mapping relationship; wherein the first mapping relationship is a mapping relationship between the user group type and the user group level;
[0077] Determine the directory type of the corresponding storage directory to be managed according to the storage resource usage information; wherein the directory type includes the storage directory to be expanded and the storage directory to be reduced;
[0078] When the directory type of the storage directory to be managed is a storage directory to be expanded, determining the storage directory expansion strategy corresponding to the user group level according to the second mapping relationship; wherein the second mapping relationship is a mapping relationship between the user group level and the storage directory expansion strategy;
[0079] When the directory type of the storage directory to be managed is a storage directory to be shrunk, the storage directory shrinking policy corresponding to the user group level is determined according to the third mapping relationship; wherein the third mapping relationship is a mapping relationship between the user group level and the storage directory shrinking policy.
[0080] The embodiment of the present application provides an implementation method for determining a storage directory management strategy based on user group information and storage resource usage information. First, the user group information can determine the user group type of the corresponding user group, such as the core business department user group, the general business department user group, etc. Different user group types correspond to different user group levels. Obviously, the core business department user group has a higher user group level than the general business department user group, and different user group levels can achieve different capacity adjustments; secondly, the storage resource usage information can be used to determine whether to use an expansion strategy or a reduction strategy. For example, the storage directory corresponding to the core business department user group can be expanded by 100MB at a time and reduced by 50MB at a time; the storage directory corresponding to the general business department user group can be expanded by 50MB at a time and reduced by 100MB at a time.
[0081] S104: Using the storage directory management policy, adjust the storage capacity of the storage directory to be managed, and obtain a new storage directory corresponding to the target user group.
[0082] This step aims to adjust the storage capacity of the storage directory to be managed. Specifically, after determining the storage directory management strategy, the storage capacity of the storage directory to be managed can be adjusted according to the storage directory management strategy, such as how much the storage capacity is to be expanded or how much the storage capacity is to be reduced, etc., so as to obtain a new storage directory corresponding to the target user group.
[0083] In one embodiment of the present application, the storage resource management method may further include:
[0084] Monitor the global resources of the storage system and obtain the global storage resource utilization rate;
[0085] When the global storage resource usage reaches a third threshold, the storage directory management policy is stopped and an alarm prompt is output.
[0086] The storage resource management method provided in the embodiment of the present application can further realize the monitoring of global resource usage in the storage system. It is understandable that the global storage resources in the storage system are limited. When it is in a high-load operation state, it will inevitably have an adverse impact on the system business therein. Based on this, the global resources of the storage system can be monitored in real time. Once its global storage resource utilization rate reaches the third threshold (such as 90%), the current storage directory management strategy can be directly stopped, and an alarm prompt can be output to promptly inform the technician that the current storage resources of the storage system are insufficient. Of course, the specific value of the third threshold does not affect the implementation of this technical solution. It can be set by the technician according to the actual situation, and this application does not limit this.
[0087] In one embodiment of the present application, the storage resource management method may further include:
[0088] Get the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory;
[0089] Generate a storage resource usage chart and / or storage resource usage report for the storage system based on the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory;
[0090] Output storage resource usage charts and / or storage resource usage reports to a display device for visual presentation.
[0091] The storage resource management method provided in the embodiment of the present application can further realize the visual display of the storage resource usage of each storage directory, wherein the storage resource usage that can be visualized can specifically include the initial quota capacity of each storage directory (the storage capacity configured at the initial stage of storage directory creation), the current quota capacity (the storage capacity currently configured when the storage directory is created), and the storage usage capacity (the capacity of storage resources used under the storage directory); further, the storage resource usage of each storage directory can be visualized in the form of charts and / or reports.
[0092] It can be seen that the storage resource management method provided by the embodiment of the present application divides the storage resources in the storage system according to the storage directory, and binds them with each user group to obtain the storage directory corresponding to each user group, and uses a central monitor to monitor the storage resource usage of each storage directory, that is, to monitor the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted can be determined according to the storage resource usage information of each storage directory, that is, the above-mentioned storage directory to be managed, so that the storage resource capacity in the storage directory to be managed can be effectively adjusted in combination with the user group information of the corresponding user group and the specific storage resource usage information therein, so that the adjusted new storage directory is more adapted to the actual storage needs of the corresponding user group. It can be seen that the technical solution can perform reasonable and flexible storage resource quota management for a large number of users, effectively avoiding the problem of storage resource waste.
[0093] Based on the above embodiments:
[0094] In one embodiment of the present application, the storage resource management method may further include:
[0095] For each storage directory in the storage system, statistics are collected on the historical storage resource usage information of the storage directory within a preset historical time period;
[0096] Predicting future storage resource demand information of the corresponding storage directory based on historical storage resource usage information;
[0097] The storage capacity of the corresponding storage directory is adjusted according to the future storage resource demand information to obtain the adjusted storage directory.
[0098] The storage resource management method provided in the embodiment of the present application can also predict the demand information of the corresponding user group for storage resources in the future based on the historical usage of the storage resources under each storage directory, thereby making corresponding capacity adjustments (such as expansion or reduction) to each storage directory with reference to the prediction information. It should be noted that the specific duration of the above-mentioned preset historical time period does not affect the implementation of the present technical solution. For example, it can be one month, which can be set by the technical staff according to the actual needs, and the present application does not limit this.
[0099] It can be seen that in the embodiment of the present application, for each storage directory in the storage system, its storage resource usage in a preset historical time period can be counted, that is, the above-mentioned historical storage resource usage information, thereby, the storage resource demand of the corresponding storage directory in a future period of time can be predicted based on the historical storage resource usage information, that is, the above-mentioned future storage resource demand information, so that the storage capacity of the corresponding storage directory can be adjusted based on the future storage resource demand information. It can be seen that the present technical solution helps to achieve more accurate and efficient storage resource management and avoid idleness and waste of storage resources.
[0100] In one embodiment of the present application, the storage resource management method may further include:
[0101] When receiving the joining information of a new user group, determining the quota mode of storage resources in the storage system;
[0102] When the quota mode is the default quota mode, create a new storage directory with the default quota capacity and bind the new user group to the new storage directory;
[0103] When the quota mode is the custom quota mode, create a new storage directory with a preset quota capacity and bind the new user group to the new storage directory;
[0104] When the quota mode is the automatic quota mode, the target quota capacity is determined according to the user group level of the new user group, a new storage directory with the target quota capacity is created, and the new user group is bound to the new storage directory.
[0105] The storage resource management method provided in the embodiment of the present application provides a processing method for a newly added user group. Specifically, for a newly added user group, a corresponding storage directory needs to be created for it, that is, the above-mentioned new storage directory and bound to it. Here, the embodiment of the present application provides three ways to create a new storage directory, namely, storage directory creation based on the default quota capacity, storage directory creation based on the custom quota capacity, and storage directory creation based on the quota capacity of the actual situation of the newly added user group. The three methods are convenient for users to choose and set at will, which effectively improves the user experience.
[0106] In one embodiment of the present application, the storage resource management method may further include:
[0107] When receiving the deregistration information of an existing user group, the storage resources under the storage directory bound to the existing user group are recycled;
[0108] Delete the storage directory bound to the existing user group and cancel the registration information of the existing user group.
[0109] The storage resource management method provided in the embodiment of the present application provides a processing method for deregistering a user group. Specifically, for a user group to be deregistered, the storage resources under its corresponding storage directory can be recycled, and the storage directory can be deleted and its registration information can be deregistered. It can be imagined that this storage resource recycling method can effectively reduce unnecessary storage resource waste and further improve the utilization rate of storage resources.
[0110] Based on the above embodiments, the present application provides another storage resource management method. The storage resource management method provided by the present application can be implemented in C++, Linux environment, and distributed system through algorithm design.
[0111] Please refer to Figure 2 and Figure 3 , Figure 2 A functional schematic diagram of a storage resource management method provided by this application. Figure 3 This is a flow chart of another storage resource management method provided by the present application. The implementation process of the storage resource management method provided by the embodiment of the present application is as follows:
[0112] 1. Directory structure design and quota setting.
[0113] 1. Directory structure design:
[0114] To implement the directory binding mechanism for user group quotas, you first need to design a reasonable directory structure, that is, in a storage system (such as a distributed file system), each user group corresponds to an independent storage directory. System administrators can bind quotas of different user groups to specific directories based on actual needs. For example, files of user group A can be stored in the directory / path / to / groupA / , while files of user group B can be stored in the directory / path / to / groupB / . This directory structure design has the following advantages:
[0115] (1) Clear management: The data of each user group is stored in its own independent directory, which is convenient for administrators to manage and maintain.
[0116] (2) Permission control: By setting storage permissions for different directories, you can effectively control user groups’ access to and use of storage resources.
[0117] (3) Resource allocation: According to the needs of different user groups, the corresponding storage quotas are bound to the corresponding directories to ensure reasonable allocation of resources and avoid resource waste or conflicts.
[0118] 2. Quota configuration:
[0119] After the directory structure is designed, the system administrator can set storage quotas for each user group. Quotas can be set through configuration files or management interfaces. For example, the following format can be used to define in the configuration file:
[0120] groupA_quota=100GB;
[0121] groupB_quota=200GB;
[0122] These quota information will be stored in the configuration center of the distributed file system so that the system can read and apply it at runtime. By setting quotas, administrators can flexibly adjust the storage quotas of different user groups to ensure the rational use of system resources.
[0123] 3. Quota application:
[0124] When a user group stores data in a distributed file system, the system will limit the storage capacity in the corresponding directory according to the quota information in the configuration file. For example, when user group A stores data in the directory / path / to / groupA / , the system will monitor its storage capacity in real time to ensure that it does not exceed the set quota of 100GB. Once the quota limit is approached or reached, the system will block further storage operations and notify the administrator.
[0125] 2. Intelligent monitoring mechanism.
[0126] In order to ensure effective management of user group quotas, the system needs to be able to monitor the storage usage of each user group in real time. The intelligent monitoring mechanism proposed in this application can comprehensively and real-timely grasp the storage dynamics in the system to ensure the accuracy and timeliness of quota management.
[0127] 1. Data collection:
[0128] The core of the intelligent monitoring mechanism is data collection. In a distributed file system, each storage node will regularly collect local storage usage and upload the collected data to the central monitor. This data includes information such as storage usage, number of files, and access frequency of each directory. By collecting data regularly, the system can fully understand the current storage status. For example, the system can collect data every certain period of time (such as 10 minutes) and transmit it to the central monitor. The central monitoring server will organize and classify this data and store it in the database for subsequent analysis.
[0129] 2. Data analysis:
[0130] In the intelligent monitoring mechanism, data analysis is one of the key links. The central monitor analyzes the collected data, calculates the storage usage of each user group in real time, and stores the results in the database. For example, if the current storage usage of a user group is 50GB, and its set quota is 100GB, the system will record this status so that it can be retrieved at any time.
[0131] The system can also set up an early warning mechanism. When a user group's storage usage approaches its quota limit, the system will issue a warning to notify the administrator. For example, when user group A's storage usage reaches 90GB, the system will automatically send an email or SMS to notify the administrator that the quota limit is about to be reached and timely processing is required.
[0132] 3. Monitoring display:
[0133] In order to facilitate administrators to check the storage status of the system at any time, the intelligent monitoring mechanism can also provide an intuitive monitoring display interface. Through charts, reports and other forms, administrators can clearly see the storage usage, historical data and warning information of each user group, which helps to discover and solve storage problems in a timely manner.
[0134] 3. Automatic adjustment mechanism.
[0135] In order to cope with the dynamic changes in the storage requirements of user groups, this application proposes an automatic adjustment mechanism, which can dynamically adjust the storage quota of user groups according to actual storage usage to ensure the flexibility and efficiency of the system.
[0136] 1. Quota adjustment strategy:
[0137] The core of the automatic adjustment mechanism is to formulate a reasonable quota adjustment strategy. Based on the system's monitoring data and preset adjustment strategies, the system can automatically adjust the storage quota of a user group. For example, when the storage usage of a user group continues to grow and approaches its quota limit, the system can automatically increase the quota of the user group. For example, when the storage usage of user group A reaches 95GB, the system can increase its quota from 100GB to 150GB.
[0138] Similarly, for user groups with less storage usage, the system can appropriately reduce their quotas, thereby allocating system resources reasonably. This ensures that resources can better serve user groups with actual needs and avoids idleness and waste of resources.
[0139] 2. Dynamic adjustment algorithm:
[0140] To achieve automatic adjustment, the system can use a dynamic adjustment algorithm that can predict future storage needs based on the user group's storage usage and historical data, and adjust the quota accordingly. For example, based on the user group's storage growth rate in the past month, the system can predict its storage needs in the next month and adjust the quota in advance.
[0141] In addition, the system can also consider the priority of user groups. For example, for important user groups (such as core business departments), the system can provide larger quotas to ensure the continued stable operation of their business. By incorporating priority into the adjustment algorithm, the system can allocate storage resources more reasonably and improve overall operating efficiency.
[0142] 3. Quota adjustment process:
[0143] (1) Monitoring data collection: The system regularly collects storage usage data of each user group and uploads it to the central monitor.
[0144] (2) Data analysis and prediction: The central monitoring server analyzes the data and predicts the future storage needs of each user group.
[0145] (3) Quota adjustment decision: Based on the forecast results and preset adjustment strategies, the system automatically generates quota adjustment decisions.
[0146] (4) Quota application: The system applies the quota adjustment decision to the storage directory of each user group and updates the quota settings.
[0147] (5) Notify the administrator: After adjusting the quota, the system will promptly notify the administrator for confirmation and processing.
[0148] It is conceivable that user group quota binding directory, intelligent monitoring and automatic adjustment mechanisms have a wide range of application scenarios in practical applications. For example, in the internal file management system of a large enterprise, these mechanisms can ensure that each department uses storage resources reasonably and improve overall operating efficiency; in a scientific research data center, these mechanisms can dynamically adjust the storage quota of the research team to meet the needs of projects at different stages. Through practical application, these mechanisms have significantly improved the management and maintenance of distributed file systems. For example, in the internal file management system of a large enterprise, after adopting these mechanisms, the system administrator can better monitor and manage the storage usage of each department, avoiding waste and conflict of storage resources. At the same time, the intelligent monitoring and automatic adjustment mechanisms improve the flexibility of the system, so that storage resources can better adapt to the rapidly changing needs of the enterprise.
[0149] It can be seen that the storage resource management method provided by the embodiment of the present application divides the storage resources in the storage system according to the storage directory, and binds them with each user group to obtain the storage directory corresponding to each user group, and uses a central monitor to monitor the storage resource usage of each storage directory, that is, to monitor the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted can be determined according to the storage resource usage information of each storage directory, that is, the above-mentioned storage directory to be managed, so that the storage resource capacity in the storage directory to be managed can be effectively adjusted in combination with the user group information of the corresponding user group and the specific storage resource usage information therein, so that the adjusted new storage directory is more adapted to the actual storage needs of the corresponding user group. It can be seen that the technical solution can perform reasonable and flexible storage resource quota management for a large number of users, effectively avoiding the problem of storage resource waste.
[0150] An embodiment of the present application provides a storage resource management device.
[0151] Please refer to Figure 4 , Figure 4 This is a structural diagram of a storage resource management device provided by the present application. The storage resource management device is applied to a central monitor, and the central monitor is connected to a storage system. The storage system includes multiple storage directories, and each storage directory is bound to a user group, which may include:
[0152] Monitoring module 1, used to monitor each storage directory in the storage system and obtain storage resource usage information of each storage directory;
[0153] Determination module 2, used to determine the storage directory to be managed and the target user group corresponding to the storage directory to be managed according to the usage information of each storage resource;
[0154] Acquisition module 3, used to acquire user group information of the target user group, and determine the storage directory management strategy according to the user group information and storage resource usage information;
[0155] The adjustment module 4 is used to adjust the storage capacity of the storage directory to be managed by using the storage directory management policy to obtain a new storage directory corresponding to the target user group.
[0156] It can be seen that the storage resource management device provided in the embodiment of the present application divides the storage resources in the storage system according to the storage directory, and binds them with each user group to obtain the storage directory corresponding to each user group, and uses a central monitor to monitor the storage resource usage of each storage directory, that is, to monitor the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted can be determined according to the storage resource usage information of each storage directory, that is, the above-mentioned storage directory to be managed, so that the storage resource capacity in the storage directory to be managed can be effectively adjusted in combination with the user group information of the corresponding user group and the specific storage resource usage information therein, so that the adjusted new storage directory is more adapted to the actual storage needs of the corresponding user group. It can be seen that the technical solution can perform reasonable and flexible storage resource quota management for a large number of users, effectively avoiding the problem of storage resource waste.
[0157] In one embodiment of the present application, the storage directory to be managed includes a storage directory to be expanded and a management directory to be reduced; the storage resource usage information is specifically a storage resource usage rate;
[0158] Correspondingly, the above-mentioned determination module 2 can be specifically used to take the storage directory whose storage resource utilization rate exceeds the first threshold as the storage directory to be expanded, and determine the first target user group corresponding to the storage directory to be expanded; take the storage directory whose storage resource utilization rate is lower than the second threshold as the storage directory to be shrunk, and determine the second target user group corresponding to the storage directory to be shrunk.
[0159] In one embodiment of the present application, the above-mentioned acquisition module 3 can be specifically used to obtain user group information of the target user group, and determine the user group type of the target user group based on the user group information; determine the user group level corresponding to the user group type based on the first mapping relationship; wherein the first mapping relationship is the mapping relationship between the user group type and the user group level; determine the directory type of the corresponding storage directory to be managed based on the storage resource usage information; wherein the directory type includes the storage directory to be expanded and the storage directory to be reduced; when the directory type of the storage directory to be managed is the storage directory to be expanded, determine the storage directory expansion policy corresponding to the user group level based on the second mapping relationship; wherein the second mapping relationship is the mapping relationship between the user group level and the storage directory expansion policy; when the directory type of the storage directory to be managed is the storage directory to be reduced, determine the storage directory reduction policy corresponding to the user group level based on the third mapping relationship; wherein the third mapping relationship is the mapping relationship between the user group level and the storage directory reduction policy.
[0160] In one embodiment of the present application, the storage resource management device may also include a prediction module, which is used to, for each storage directory in the storage system, count the historical storage resource usage information of the storage directory within a preset historical time period; predict the future storage resource demand information of the corresponding storage directory based on the historical storage resource usage information; adjust the storage capacity of the corresponding storage directory based on the future storage resource demand information to obtain an adjusted storage directory.
[0161] In one embodiment of the present application, the storage resource management device may also include an adding module, which is used to determine the quota mode for storage resources in the storage system when receiving the joining information of a new user group; when the quota mode is the default quota mode, create a new storage directory with a default quota capacity, and bind the new user group to the new storage directory; when the quota mode is the custom quota mode, create a new storage directory with a preset quota capacity, and bind the new user group to the new storage directory; when the quota mode is the automatic quota mode, determine the target quota capacity according to the user group level of the new user group, create a new storage directory with the target quota capacity, and bind the new user group to the new storage directory.
[0162] In one embodiment of the present application, the storage resource management device may also include a recycling module, which is used to recycle the storage resources under the storage directory bound to the existing user group when receiving the cancellation information of the existing user group; delete the storage directory bound to the existing user group, and cancel the registration information of the existing user group.
[0163] In one embodiment of the present application, the storage resource management device may also include a display module for obtaining the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory; generating a storage resource usage chart and / or storage resource usage report of the storage system based on the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory; and outputting the storage resource usage chart and / or storage resource usage report to a display device for visual display.
[0164] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0165] An embodiment of the present application provides an electronic device.
[0166] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:
[0167] A memory 11, used for storing computer programs;
[0168] The processor 10 can implement the steps of any one of the above storage resource management methods when executing a computer program.
[0169] like Figure 5 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.
[0170] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
[0171] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the storage resource management method.
[0172] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:
[0173] Monitor each storage directory in the storage system and obtain storage resource usage information of each storage directory;
[0174] Determine the storage directory to be managed and the target user group corresponding to the storage directory to be managed according to the usage information of each storage resource;
[0175] Obtain user group information of the target user group, and determine a storage directory management strategy based on the user group information and storage resource usage information;
[0176] The storage directory management policy is used to adjust the storage capacity of the storage directory to be managed, and a new storage directory corresponding to the target user group is obtained.
[0177] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0178] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0179] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
[0180] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.
[0181] An embodiment of the present application provides a computer-readable storage medium.
[0182] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned storage resource management methods can be implemented.
[0183] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.
[0184] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0185] An embodiment of the present application provides a computer program product.
[0186] The computer program product provided in the embodiments of the present application includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of any one of the above-mentioned storage resource management methods can be implemented.
[0187] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.
[0188] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0189] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0190] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0191] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0192] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed 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.
[0193] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A storage resource management method, characterized in that: Applied to a central monitor, the central monitor is connected to a storage system, the storage system includes a plurality of storage directories, and each storage directory is bound to a user group, the method includes: Monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory; Determine a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to each of the storage resource usage information; Acquire user group information of the target user group, and determine a storage directory management strategy according to the user group information and the storage resource usage information; The storage directory management policy is used to adjust the storage capacity of the storage directory to be managed, so as to obtain a new storage directory corresponding to the target user group.
2. The storage resource management method according to claim 1, characterized in that: The storage directory to be managed includes a storage directory to be expanded and a management directory to be reduced; the storage resource usage information is specifically the storage resource usage rate; Accordingly, determining the storage directory to be managed and the target user group corresponding to the storage directory to be managed according to each storage resource usage information includes: Taking a storage directory whose storage resource usage rate exceeds a first threshold as the storage directory to be expanded, and determining a first target user group corresponding to the storage directory to be expanded; A storage directory whose storage resource usage rate is lower than a second threshold is used as the storage directory to be shrunk, and a second target user group corresponding to the storage directory to be shrunk is determined.
3. The storage resource management method according to claim 2, characterized in that: Acquiring user group information of the target user group, and determining a storage directory management strategy according to the user group information and the storage resource usage information, including: Acquire user group information of the target user group, and determine the user group type of the target user group according to the user group information; Determine the user group level corresponding to the user group type according to the first mapping relationship; wherein the first mapping relationship is a mapping relationship between the user group type and the user group level; Determine the directory type of the corresponding storage directory to be managed according to the storage resource usage information; wherein the directory type includes the storage directory to be expanded and the storage directory to be reduced; When the directory type of the storage directory to be managed is the storage directory to be expanded, determining the storage directory expansion strategy corresponding to the user group level according to the second mapping relationship; wherein the second mapping relationship is a mapping relationship between the user group level and the storage directory expansion strategy; When the directory type of the storage directory to be managed is the storage directory to be shrunk, the storage directory shrinking policy corresponding to the user group level is determined according to a third mapping relationship; wherein the third mapping relationship is a mapping relationship between the user group level and the storage directory shrinking policy.
4. The storage resource management method according to any one of claims 1 to 3, characterized in that: Also includes: For each storage directory in the storage system, collecting statistics on historical storage resource usage information of the storage directory within a preset historical time period; Predicting future storage resource demand information of a corresponding storage directory based on the historical storage resource usage information; The storage capacity of the corresponding storage directory is adjusted according to the future storage resource demand information to obtain an adjusted storage directory.
5. The storage resource management method according to claim 1, characterized in that: Also includes: When receiving the joining information of the new user group, determining the quota mode of the storage resources in the storage system; When the quota mode is the default quota mode, creating a new storage directory with a default quota capacity, and binding the new user group to the new storage directory; When the quota mode is a custom quota mode, creating a new storage directory with a preset quota capacity, and binding the new user group to the new storage directory; When the quota mode is the automatic quota mode, the target quota capacity is determined according to the user group level of the new user group, a new storage directory with the target quota capacity is created, and the new user group is bound to the new storage directory.
6. The storage resource management method according to claim 5, characterized in that: Also includes: When deregistration information of an existing user group is received, storage resources under the storage directory bound to the existing user group are recycled; The storage directory bound to the existing user group is deleted, and the registration information of the existing user group is cancelled.
7. The storage resource management method according to claim 1, characterized in that: Also includes: Obtaining the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory; Generate a storage resource usage chart and / or a storage resource usage report of the storage system according to the initial quota capacity, current quota capacity, and storage usage capacity of each storage directory; Output the storage resource usage chart and / or the storage resource usage report to a display device for visual presentation.
8. A storage resource management device, characterized in that: Applied to a central monitor, the central monitor is connected to a storage system, the storage system includes a plurality of storage directories, and each storage directory is bound to a user group, the device includes: A monitoring module, used to monitor each storage directory in the storage system and obtain storage resource usage information of each storage directory; A determination module, used to determine a storage directory to be managed and a target user group corresponding to the storage directory to be managed according to each of the storage resource usage information; An acquisition module, used to acquire user group information of the target user group, and determine a storage directory management strategy according to the user group information and the storage resource usage information; The adjustment module is used to adjust the storage capacity of the storage directory to be managed by using the storage directory management policy to obtain a new storage directory corresponding to the target user group.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the storage resource management method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the storage resource management method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
File operating method and device
CN103136294A
Storage system suitable for multi-user scenario
CN106686123A
Quota management method for cluster storage system, and cluster storage system
CN108196787A
Data storage resource scheduling method and device
CN110333953A
Method and device for cluster capacity expansion and shrinkage
CN111782147A
Cited By
Resource allocation method and device, electronic equipment and computer readable medium
CN120162008A