Storage resource management method and device, electronic equipment and readable storage medium
By using a central monitor to monitor and adjust policies for the storage system, the problem of resource waste in distributed storage systems is solved, and the rational allocation and efficient management of storage resources are achieved.
Patent Information
- Application Number
- CN202411856266.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Existing storage resource quota management methods are difficult to cope with the complex environment of distributed storage systems, leading to resource waste and management challenges, especially when the number of users is large or the load is uneven.
By monitoring the storage catalog in the storage system through a central monitor, resource usage information is obtained, the catalog to be managed and its target user groups are identified, management strategies are formulated based on user group information and resource usage information, storage capacity is adjusted, including expansion and reduction, and future demand is predicted by combining historical usage information to achieve flexible storage resource management.
It enables the rational allocation of storage resources, avoids resource waste, improves management efficiency, adapts to the actual needs of user groups, and ensures efficient use of resources.
Smart Images

Figure CN119597226B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage, in particular to a storage resource management method, and relates to a storage resource management device, an electronic device and a computer readable storage medium. BACKGROUND
[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 demand, effective storage resource quota management becomes increasingly important. Currently, the conventional quota management method is mostly difficult to cope with complex distributed environments and is not flexible enough. For example, user-based quota management requires setting a limit for each user individually. This approach can bring management challenges and cause certain storage resource waste in the case of a large number of users or uneven workloads.
[0003] Therefore, how to reasonably and flexibly manage the storage resource quota of a large number of users and further avoid the waste of storage resources is a problem to be solved by those skilled in the art. SUMMARY
[0004] The purpose of the present application is to provide a storage resource management method that can reasonably and flexibly manage the storage resource quota of a large number of users and further avoid the waste of storage resources. Another purpose of the present application is to provide a storage resource management device, an electronic device, a computer readable storage medium and a 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 applied to a central monitor, wherein 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, and the method comprises:
[0006] monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory;
[0007] determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to each storage resource usage information;
[0008] obtaining 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;
[0009] adjusting the storage capacity of the to-be-managed storage directory by using the storage directory management strategy to obtain a new storage directory corresponding to the target user group.
[0010] Optionally, the storage directories to be managed include storage directories to be expanded and storage directories to be contracted; and the storage resource usage information is specifically a storage resource usage rate.
[0011] Correspondingly, determining the storage directories to be managed and the target user groups corresponding to the storage directories to be managed according to the storage resource usage information includes:
[0012] a storage directory with a storage resource usage rate exceeding a first threshold value is taken 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 with a storage resource usage rate lower than a second threshold value is taken as the storage directory to be contracted, and a second target user group corresponding to the storage directory to be contracted is determined.
[0014] Optionally, user group information of the target user groups is acquired, and a storage directory management strategy is determined according to the user group information and the storage resource usage information, including:
[0015] user group information of the target user groups is acquired, and a user group type of the target user groups is determined according to the user group information;
[0016] a user group level corresponding to the user group type is determined according to a first mapping relationship; the first mapping relationship is a mapping relationship between a user group type and a user group level;
[0017] a directory type of a corresponding storage directory to be managed is determined according to the storage resource usage information; the directory type includes the storage directory to be expanded and the storage directory to be contracted;
[0018] when the directory type of the storage directory to be managed is the storage directory to be expanded, a storage directory expansion strategy corresponding to the user group level is determined according to a second mapping relationship; the second mapping relationship is a mapping relationship between a user group level and a storage directory expansion strategy;
[0019] when the directory type of the storage directory to be managed is the storage directory to be contracted, a storage directory contraction strategy corresponding to the user group level is determined according to a third mapping relationship; the third mapping relationship is a mapping relationship between a user group level and a storage directory contraction strategy.
[0020] Optionally, the storage resource management method further includes:
[0021] for each storage directory in the storage system, historical storage resource usage information of the storage directory in a preset historical time period is counted;
[0022] predicting future storage resource requirement information of the corresponding storage directory according to the historical storage resource usage information;
[0023] adjusting storage capacity of the corresponding storage directory according to the future storage resource requirement information, and obtaining an adjusted storage directory.
[0024] Optionally, the storage resource management method further comprises:
[0025] when receiving joining information of a new user group, determining a quota mode of the storage system with respect to storage resources;
[0026] when the quota mode is a default quota mode, creating a new storage directory with a default quota capacity, and binding the new user group with 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 with the new storage directory;
[0028] when the quota mode is an automatic quota mode, determining a target quota capacity according to a user group level of the new user group, and creating a new storage directory with the target quota capacity, and binding the new user group with the new storage directory.
[0029] Optionally, the storage resource management method further comprises:
[0030] when receiving logoff information of an existing user group, recycling storage resources under a storage directory bound by the existing user group;
[0031] deleting the storage directory bound by the existing user group, and logging off registration information of the existing user group.
[0032] Optionally, the storage resource management method further comprises:
[0033] obtaining initial quota capacities, current quota capacities and storage usage capacities of each of the storage directories;
[0034] generating a storage resource usage chart and / or a storage resource usage report of the storage system according to the initial quota capacities, the current quota capacities and the storage usage capacities of each of the storage directories;
[0035] outputting the storage resource usage chart and / or the storage resource usage report to a display device for visual display.
[0036] In a second aspect, the application further discloses a storage resource management device applied to a central monitor, wherein the central monitor is connected to a storage system, the storage system comprises a plurality of storage directories, and each of the storage directories is bound with a user group, and the device comprises:
[0037] a monitoring module, configured to monitor each of the storage directories in the storage system to obtain storage resource usage information of each of the storage directories;
[0038] a determination module, configured to determine a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information;
[0039] an acquisition module, configured 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] an adjustment module, configured to adjust storage capacity of the to-be-managed storage directory by using the storage directory management strategy, and obtain a new storage directory corresponding to the target user group.
[0041] In a third aspect, the present application also discloses an electronic device, comprising:
[0042] a memory, configured to store a computer program;
[0043] a processor, configured to execute the computer program to implement the steps of any of the storage resource management methods described above.
[0044] In a fourth aspect, the present application also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of any of the storage resource management methods described above.
[0045] In a fifth aspect, the present application also discloses a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of any of the storage resource management methods described above.
[0046] The present application provides a storage resource management method, which is applied to a central monitor, the central monitor is connected to a storage system, the storage system comprises a plurality of storage directories, and each of the storage directories is bound to a user group, and the method comprises the following steps: monitoring each of the storage directories in the storage system to obtain storage resource usage information of each of the storage directories; determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information; 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; and adjusting storage capacity of the to-be-managed storage directory by using the storage directory management strategy, and obtaining a new storage directory corresponding to the target user group.
[0047] According to the technical solution provided in the application, the storage resources in the storage system are divided according to the storage directories, and are bound to each user group to obtain the storage directory corresponding to each user group, and the central monitor is used to monitor the storage resource usage of each storage directory, that is, the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted, that is, the above-mentioned to-be-managed storage directory, can be determined according to the storage resource usage information of each storage directory, so that the effective adjustment of the storage resource capacity in the to-be-managed storage directory can be realized 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 suitable for the actual storage demand of the corresponding user group. As can be seen, the technical solution can reasonably and flexibly manage the storage resource quota of the general public, effectively avoiding the problem of waste of storage resources.
[0048] In an embodiment of the application, for each storage directory in the storage system, the storage resource usage thereof in a preset historical time period, that is, the above-mentioned historical storage resource usage information, can be counted, and thus the storage resource demand of the corresponding storage directory in a future period of time, that is, the above-mentioned future storage resource demand information, can be predicted according to the historical storage resource usage information, so that the adjustment of the storage capacity of the corresponding storage directory can be realized according to the future storage resource demand information. As can be seen, the technical solution is helpful to realize more accurate and efficient storage resource management, avoiding the idle and waste of storage resources.
[0049] The storage resource management device, the electronic device, the computer readable storage medium and the computer program product provided in the application also have the above technical effects, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the prior art and the technical solutions in the embodiments of the application, the drawings used in the description of the prior art and the embodiments of the application will be briefly introduced. Of course, the following description of the drawings of the embodiments of the application is only a part of the embodiments of the application, and those skilled in the art can obtain other drawings according to the provided drawings without creating any creative labor, and the obtained other drawings also belong to the protection scope of the application.
[0051] Figure 1 A flowchart of a storage resource management method provided in the application;
[0052] Figure 2 A function diagram of a storage resource management method provided in the application;
[0053] Figure 3A flowchart of another storage resource management method provided in the present application is shown in FIG. 1.
[0054] Figure 4 A structural diagram of a storage resource management device provided in the present application is shown in FIG. 2.
[0055] Figure 5 A structural diagram of an electronic device provided in the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0056] The core of the present application is to provide a storage resource management method, which can perform reasonable and flexible storage resource quota management on a large number of users, and further avoid the problem of waste of storage resources. Another core of the present application is to provide a storage resource management device, an electronic device, a computer readable storage medium and a computer program product, all of which have the above beneficial effects.
[0057] In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0058] The present application provides a storage resource management method.
[0059] It should be noted that the storage resource management method provided in the embodiments of the present application can be implemented based on a storage resource management system, which can include a central monitor and a storage system, and the central monitor is connected to the storage system, wherein the storage system includes a plurality of storage directories, and each storage directory is bound to a user group, that is, the storage directory and the user group are one-to-one corresponding, and each storage directory corresponds to the same or different capacity of storage resources.
[0060] Please refer to Figure 1 , Figure 1 A flowchart of a storage resource management method provided in the present application is shown in FIG. 1, which is applied to the above-mentioned central monitor, and can include the following S101 to S104.
[0061] S101: Monitor each storage directory in the storage system to obtain the storage resource usage information of each storage directory.
[0062] The step is to realize effective monitoring of each storage directory in the storage system. Specifically, the central monitor can monitor each storage directory in the storage system to obtain storage resource usage information of each storage directory. Here, the storage resource usage information mainly refers to 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 100 MB, and the actual usage quota of the storage resource of the user group corresponding to the storage directory is 60 MB. Therefore, the storage resource usage rate of the storage directory is 60%.
[0063] The management operation of the central monitor on the storage resource in the storage system can be in response to a corresponding management instruction. The management instruction can be an instruction initiated by an administrator or an instruction triggered automatically in response to a preset condition (such as a timing condition). The present application does not limit this.
[0064] S102: Determine the to-be-managed storage directory and the target user group corresponding to the to-be-managed storage directory according to the storage resource usage information.
[0065] The step is to realize the determination of the to-be-managed storage directory and the user group (i.e. the target user group) corresponding thereto. Here, the to-be-managed storage directory and the target user group corresponding thereto can be determined according to 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 regarded as a to-be-managed storage directory for expansion processing. When the storage resource usage of a storage directory is lower than a certain limit, the storage directory can be regarded as a to-be-managed storage directory for contraction processing.
[0066] In an embodiment of the present application, the to-be-managed storage directory can include a to-be-expanded storage directory and a to-be-contracted storage directory; and the storage resource usage information can be a storage resource usage rate.
[0067] Correspondingly, determining the to-be-managed storage directory and the target user group corresponding to the to-be-managed storage directory according to the storage resource usage information can include:
[0068] regarding a storage directory with a storage resource usage rate exceeding a first threshold as a to-be-expanded storage directory, and determining a first target user group corresponding to the to-be-expanded storage directory;
[0069] regarding a storage directory with a storage resource usage rate lower than a second threshold as a to-be-contracted storage directory, and determining a second target user group corresponding to the to-be-contracted storage directory.
[0070] The embodiment of the present application provides an implementation method for determining a to-be-managed storage directory and a corresponding target user group according to a storage resource usage rate. First, the management of the storage directory mainly includes expansion processing and contraction processing. As the name implies, the expansion processing means expanding the storage capacity of the storage directory, and allocating more storage resources to the storage directory; the contraction processing means reducing the storage capacity of the storage directory, and allocating less storage resources to the storage directory. Further, the storage directory with a storage resource usage rate exceeding a first threshold value can be regarded as a to-be-expanded storage directory, so as to perform expansion processing on the to-be-expanded storage directory; the storage directory with a storage resource usage rate lower than a second threshold value can be regarded as a to-be-contracted storage directory, so as to perform contraction processing on the to-be-contracted storage directory.
[0071] It should be noted that the specific values of the first threshold value and the second threshold value do not affect the implementation of the technical solution, and can be set by the technical personnel according to the actual situation, and the present application does not limit 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 the storage resource usage information.
[0073] This step aims to determine the storage directory management strategy. For the to-be-managed storage directory, the storage directory management strategy suitable for the to-be-managed storage directory can be determined according to the user group information of the corresponding target user group and the storage resource usage information. The storage directory management strategy can be divided into a storage directory expansion strategy and a storage directory contraction strategy, and the specific expansion size or contraction size can be determined according to the user group information of the target user group and the storage resource usage information.
[0074] In an embodiment of the present application, obtaining the user group information of the target user group and determining the storage directory management strategy according to the user group information and the storage resource usage information can include:
[0075] Obtaining the user group information of the target user group and determining the user group type of the target user group according to the user group information;
[0076] Determining the user group level corresponding to the user group type according to a first mapping relationship; wherein the first mapping relationship is a mapping relationship between the user group type and the user group level;
[0077] Determining the directory type of the corresponding to-be-managed storage directory according to the storage resource usage information; wherein the directory type includes a to-be-expanded storage directory and a to-be-contracted storage directory;
[0078] When the directory type of the to-be-managed storage directory is the to-be-expanded storage directory, determining the storage directory expansion strategy corresponding to the user group level according to a 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 scaled down, a storage directory scaling strategy corresponding to the user group level is determined according to a third mapping relationship; the third mapping relationship is a mapping relationship between the user group level and the storage directory scaling strategy.
[0080] The embodiment of the present application provides an implementation method for determining a storage directory management strategy according to 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 a core business department user group, an ordinary business department user group, and the like. 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 ordinary business department user group, and different user group levels can realize adjustment of different capacity orders. Second, the storage resource usage information can be used to determine whether to use a scaling-up strategy or a scaling-down strategy. For example, the storage directory corresponding to the core business department user group can be scaled up by 100 MB at a time and scaled down by 50 MB at a time; the storage directory corresponding to the ordinary business department user group can be scaled up by 50 MB at a time and scaled down by 100 MB at a time.
[0081] S104: Adjusting the storage capacity of the storage directory to be managed by using the storage directory management strategy to obtain a new storage directory corresponding to the target user group.
[0082] This step is intended to realize the adjustment of the storage capacity of the storage directory to be managed. Specifically, after the storage directory management strategy is determined, the storage capacity of the storage directory to be managed can be adjusted according to the storage directory management strategy, such as specifically expanding the storage capacity or specifically reducing the storage capacity, and the like, so as to obtain a new storage directory corresponding to the target user group.
[0083] In an embodiment of the present application, the storage resource management method can further include:
[0084] Monitoring the global resources of the storage system to obtain a global storage resource usage rate;
[0085] When the global storage resource usage rate reaches a third threshold value, stopping the execution of the storage directory management strategy and outputting an alarm prompt.
[0086] The storage resource management method provided by the embodiments of the present application can further realize monitoring of the global resource usage in the storage system. It can be understood that the global storage resource in the storage system is limited, and when it is in a high-load running state, it will inevitably have an adverse effect on the system service therein. Therefore, the global resource of the storage system can be monitored in real time, and once the global storage resource usage reaches a third threshold (for example, 90%), the current storage directory management strategy can be directly stopped, and an alarm prompt can be output to timely inform the technical personnel that the current storage resource of the storage system is insufficient. Of course, the specific value of the third threshold does not affect the implementation of the technical solution, and can be set by the technical personnel according to the actual situation. The present application does not limit this.
[0087] In an embodiment of the present application, the storage resource management method can further include:
[0088] obtaining the initial quota capacity, the current quota capacity and the storage usage capacity of each storage directory;
[0089] generating a storage resource usage chart and / or a storage resource usage report of the storage system according to the initial quota capacity, the current quota capacity and the storage usage capacity of each storage directory;
[0090] outputting the storage resource usage chart and / or the storage resource usage report to a display device for visual display.
[0091] The storage resource management method provided by the embodiments of the present application can further realize visual display of the storage resource usage of each storage directory, wherein the storage resource usage that can be visually displayed can include the initial quota capacity (the storage capacity configured at the initial stage of the creation of the storage directory), the current quota capacity (the storage capacity currently configured for the storage directory) and the storage usage capacity (the capacity of the storage resource used under the storage directory). Further, the storage resource usage of each storage directory can be visually displayed through a chart and / or a report.
[0092] It can be seen that the storage resource management method provided in the embodiments of the present application divides the storage resources in the storage system according to the storage directories, and binds each user group to obtain the storage directory corresponding to each user group, and uses the central monitor to monitor the storage resource usage of each storage directory, that is, the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted, that is, the above-mentioned to-be-managed storage directory, can be determined according to the storage resource usage information of each storage directory, so that the effective adjustment of the storage resource capacity in the to-be-managed storage directory can be realized 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 suitable for the actual storage demand of the corresponding user group. It can be seen that the technical solution can reasonably and flexibly manage the storage resource quota for the general public, and effectively avoids the problem of waste of storage resources.
[0093] On the basis of the above-mentioned embodiments:
[0094] In an embodiment of the present application, the storage resource management method can further include:
[0095] For each storage directory in the storage system, the historical storage resource usage information of the storage directory in a preset historical time period is counted;
[0096] According to the historical storage resource usage information, the future storage resource demand information of the corresponding storage directory is predicted;
[0097] According to the future storage resource demand information, the storage capacity of the corresponding storage directory is adjusted to obtain the adjusted storage directory.
[0098] The storage resource management method provided in the embodiments of the present application can also predict the demand information of the corresponding user group for the storage resources in a future period of time according to the historical usage of the storage resources under each storage directory, and thus the capacity of each storage directory can be adjusted (such as expansion or contraction) according to the prediction information. It should be noted that the specific length of the above-mentioned preset historical time period does not affect the implementation of the technical solution, for example, it can be one month, which can be set by the technical personnel according to the actual demand, and the present application does not limit this.
[0099] It can be seen that, in the embodiment of the present application, the storage resource usage of each storage directory in the storage system in a preset historical time period, i.e., the historical storage resource usage information, can be counted, and thus the storage resource demand of the corresponding storage directory in a future period of time, i.e., the future storage resource demand information, can be predicted according to the historical storage resource usage information, so that the adjustment of the storage capacity of the corresponding storage directory can be realized according to the future storage resource demand information. It can be seen that the technical solution helps to realize more accurate and efficient storage resource management and avoid the idling and waste of storage resources.
[0100] In an embodiment of the present application, the storage resource management method can further include:
[0101] When receiving the joining information of the new user group, determining the quota mode of the storage system with respect to the storage resource;
[0102] 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 with the new storage directory;
[0103] When the quota mode is the custom quota mode, creating a new storage directory with a preset quota capacity and binding the new user group with the new storage directory;
[0104] When the quota mode is the automatic quota mode, determining a target quota capacity according to the user group level of the new user group, creating a new storage directory with the target quota capacity, and binding the new user group with the new storage directory.
[0105] The storage resource management method provided by the embodiment of the present application provides a processing mode for a newly joined user group. Specifically, for a newly joined user group, a corresponding storage directory, i.e., the new storage directory, needs to be created and bound with it. Here, the embodiment of the present application provides three creation modes of the new storage directory, i.e., the storage directory creation based on the default quota capacity, the storage directory creation based on the custom quota capacity, and the storage directory creation based on the quota capacity according to the actual situation of the newly joined user group, which can be arbitrarily selected and set by the user, effectively improving the user experience.
[0106] In an embodiment of the present application, the storage resource management method can further include:
[0107] When receiving the logout information of the existing user group, recycling the storage resource under the storage directory bound with the existing user group;
[0108] Deleting the storage directory bound with the existing user group and logging out the registration information of the existing user group.
[0109] The storage resource management method provided by the embodiments of the present application provides a processing manner for logging out a user group. Specifically, for a user group to be logged out, the storage resources under the storage directory corresponding to the user group can be recycled, and the storage directory can be deleted, and the registration information thereof can be logged out. It can be conceived that the storage resource recycling manner can effectively reduce unnecessary storage resource waste, and further improve the utilization rate of storage resources.
[0110] On the basis of the above embodiments, the embodiments of the present application provide another storage resource management method. The storage resource management method provided by the embodiments of the present application can be implemented by algorithm design in C++, linux environment, and distributed system.
[0111] Please refer to Figure 2 and Figure 3 , Figure 2 for the functional schematic diagram of a storage resource management method provided by the present application, Figure 3 for the flow schematic diagram of another storage resource management method provided by the present application, the implementation process of the storage resource management method provided by the embodiments of the present application is as follows:
[0112] I. Directory structure design and quota setting.
[0113] 1. Directory structure design:
[0114] To realize the directory binding mechanism of the user group quota, a reasonable directory structure needs to be designed first, that is, in the storage system (such as a distributed file system), each user group corresponds to an independent storage directory, and the system administrator can bind the quotas of different user groups to specific directories according to actual needs. For example, the files of user group A can be stored in directory / path / to / groupA / , and the files of user group B can be stored in directory / path / to / groupB / . The design of such directory structure has the following advantages:
[0115] (1) Clear management: the data of each user group is stored in a separate directory, which facilitates the administrator to manage and maintain.
[0116] (2) Permission control: by setting the storage permissions of different directories, the access and use of storage resources by user groups can be effectively controlled.
[0117] (3) Resource allocation: according to the needs of different user groups, the corresponding storage quota is bound to the corresponding directory, ensuring reasonable allocation of resources and avoiding resource waste or conflict.
[0118] 2. Quota configuration:
[0119] After the directory structure is designed, the system administrator can set storage quotas for each user group. Quota settings can be made through configuration files or management interfaces. For example, the following format can be used 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 during runtime. By setting quotas, administrators can flexibly adjust the storage limits of different user groups, ensuring the rational use of system resources.
[0123] 3. Quota Application:
[0124] When user groups store data in the distributed file system, the system will limit their storage amount 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 amount in real time to ensure that it does not exceed the set 100GB quota. Once the quota limit is approached or reached, the system will prevent further storage operations and notify the administrator.
[0125] II. Intelligent Monitoring Mechanism
[0126] 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-time monitor the storage dynamics in the system, ensuring the accuracy and timeliness of quota management.
[0127] 1. Data Collection:
[0128] The core of the intelligent monitoring mechanism is data collection. In the distributed file system, each storage node will periodically collect local storage usage and upload the collected data to the central monitor. These data include the storage usage, file quantity and access frequency of each directory. By regularly collecting data, 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 sort, classify and store these data 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 to calculate the storage usage of each user group in real time and stores the results in the database. For example, if a user group currently uses 50GB of storage and its quota is set to 100GB, the system will record this status for future retrieval.
[0131] The system can also set up an early warning mechanism. When the storage usage of a user group approaches its quota limit, the system will send a warning to the administrator. For example, when the storage usage of user group A reaches 90GB, the system will automatically send an email or SMS to the administrator, reminding them to handle the situation in time.
[0132] 3. Monitoring display:
[0133] To facilitate the administrator's timely review of the system's storage status, the intelligent monitoring mechanism can also provide an intuitive monitoring display interface. Through charts, reports, and other forms, the administrator can clearly see the storage usage, historical data, and warning information of each user group, which helps to timely discover and solve storage problems.
[0134] Three, automatic adjustment mechanism.
[0135] To cope with the dynamic changes in user group storage needs, this application proposes an automatic adjustment mechanism that can dynamically adjust the storage quota of user groups based on actual storage usage, ensuring the flexibility and efficiency of the system.
[0136] 1. Quota adjustment strategy:
[0137] The core of the automatic adjustment mechanism is to develop a reasonable quota adjustment strategy. Based on the system's monitoring data and preset adjustment strategy, the system can automatically adjust the storage quota of user groups. For example, if the storage usage of a user group continues to grow and approaches its quota limit, the system can automatically increase the quota of that user group. For example, when the storage 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 quota to reasonably allocate system resources. This ensures that resources can better serve user groups with actual needs, avoiding the idling and waste of resources.
[0139] 2. Dynamic adjustment algorithm:
[0140] To achieve automatic adjustment, the system can employ 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 the user group. For example, for important user groups (such as core business departments), the system can provide larger quotas to ensure the continuous and stable operation of their business. By incorporating priority into the adjustment algorithm, the system can more reasonably allocate storage resources and improve overall operational 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 prediction results and preset adjustment strategy, the system automatically generates quota adjustment decisions.
[0146] (4) Quota application: The system applies the quota adjustment decisions to the storage directories of each user group and updates the quota settings.
[0147] (5) Notify administrator: After adjusting the quota, the system promptly notifies the administrator for confirmation and processing.
[0148] It is conceivable that the user group quota binding directory, intelligent monitoring and automatic adjustment mechanism 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 reasonably uses storage resources and improve overall operational efficiency; in a research data center, these mechanisms can dynamically adjust the storage quota of research teams to meet the needs of different stages of projects. Through practical application, these mechanisms significantly improve the management and maintenance of distributed file systems. For example, in the internal file management system of a large enterprise, after adopting these mechanisms, system administrators can better monitor and manage the storage usage of each department, avoiding waste and conflicts of storage resources. At the same time, intelligent monitoring and automatic adjustment mechanisms improve the flexibility of the system, enabling storage resources to 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 application divides the storage resources in the storage system according to the storage directories, and binds each user group to obtain the storage directory corresponding to each user group, and monitors the storage resource usage of each storage directory by using the central monitor, that is, monitors the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted, that is, the above-mentioned to-be-managed storage directory, can be determined according to the storage resource usage information of each storage directory, so that the effective adjustment of the storage resource capacity in the to-be-managed storage directory can be realized 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 suitable for the actual storage demand of the corresponding user group. It can be seen that the technical solution can reasonably and flexibly manage the storage resource quota for the general public, and effectively avoids the problem of waste of storage resources.
[0150] The embodiment of the application provides a storage resource management device.
[0151] Please refer to Figure 4 , Figure 4 Fig. 1 is a structural schematic diagram of a storage resource management device provided by the application, which is 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, which can include:
[0152] A monitoring module 1 is used for monitoring each storage directory in the storage system to obtain the storage resource usage information of each storage directory;
[0153] A determination module 2 is used for determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information;
[0154] An acquisition module 3 is used for acquiring the 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;
[0155] An adjustment module 4 is used for adjusting the storage capacity of the to-be-managed storage directory by using the storage directory management strategy to obtain a new storage directory corresponding to the target user group.
[0156] It can be seen that the storage resource management apparatus provided by the embodiments of the present application divides the storage resources in the storage system according to the storage directories, and binds each user group to obtain the storage directory corresponding to each user group, and monitors the storage resource usage of each storage directory by using the central monitor, that is, monitors the storage resource usage of each user group; on this basis, the storage directory that needs to be adjusted, that is, the above-mentioned to-be-managed storage directory, can be determined according to the storage resource usage information of each storage directory, so that the effective adjustment of the storage resource capacity in the to-be-managed storage directory can be realized 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 suitable for the actual storage requirements of the corresponding user group. It can be seen that the technical solution can reasonably and flexibly manage the storage resource quota for the general public, and effectively avoids the problem of waste of storage resources.
[0157] In an embodiment of the present application, the to-be-managed storage directory includes a to-be-expanded storage directory and a to-be-shrunk storage directory; and the storage resource usage information is specifically a storage resource usage rate.
[0158] Correspondingly, the above-mentioned determination module 2 can be specifically configured to determine the storage directory with a storage resource usage rate exceeding a first threshold value as a to-be-expanded storage directory, and determine the first target user group corresponding to the to-be-expanded storage directory; and determine the storage directory with a storage resource usage rate lower than a second threshold value as a to-be-shrunk storage directory, and determine the second target user group corresponding to the to-be-shrunk storage directory.
[0159] In an embodiment of the present application, the above-mentioned acquisition module 3 can be specifically configured to acquire the 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 to-be-managed storage directory according to the storage resource usage information; wherein the directory type includes a to-be-expanded storage directory and a to-be-shrunk storage directory; when the directory type of the to-be-managed storage directory is the to-be-expanded storage directory, determine 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; and when the directory type of the to-be-managed storage directory is the to-be-shrunk storage directory, determine the storage directory shrinkage strategy corresponding to the user group level according to the third mapping relationship; wherein the third mapping relationship is a mapping relationship between the user group level and the storage directory shrinkage strategy.
[0160] In an embodiment of the present application, the storage resource management apparatus can further comprise a prediction module configured to: for each storage directory in the storage system, count historical storage resource usage information of the storage directory in a preset historical time period; predict future storage resource requirement information of the corresponding storage directory according to the historical storage resource usage information; and perform storage capacity adjustment on the corresponding storage directory according to the future storage resource requirement information to obtain an adjusted storage directory.
[0161] In an embodiment of the present application, the storage resource management apparatus can further comprise an adding module configured to: when receiving joining information of a new user group, determine a quota mode of the storage system with respect to the storage resource; when the quota mode is a default quota mode, create a new storage directory with a default quota capacity and bind the new user group with the new storage directory; when the quota mode is a self-defined quota mode, create a new storage directory with a preset quota capacity and bind the new user group with the new storage directory; and when the quota mode is an automatic quota mode, determine a target quota capacity according to a user group level of the new user group, create a new storage directory with the target quota capacity, and bind the new user group with the new storage directory.
[0162] In an embodiment of the present application, the storage resource management apparatus can further comprise a recycling module configured to: when receiving logoff information of an existing user group, recycle storage resources under a storage directory bound by the existing user group; delete the storage directory bound by the existing user group; and log off registration information of the existing user group.
[0163] In an embodiment of the present application, the storage resource management apparatus can further comprise a display module configured to: obtain 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, the current quota capacity and the storage usage capacity of each storage directory; and output the storage resource usage chart and / or the storage resource usage report to a display device for visual display.
[0164] The apparatus provided in the embodiments of the present application is introduced above with reference to the method embodiments, and thus the present application will not be described here in detail.
[0165] An electronic device is provided in the embodiments of the present application.
[0166] Please refer to Figure 5 , Figure 5 A structure diagram of an electronic device provided in the present application, which can comprise:
[0167] A memory 11 configured to store a computer program.
[0168] The processor 10 can implement the steps of any one of the above storage resource management methods when executing a computer program.
[0169] As shown in FIG. 1, a schematic diagram of a structure of an electronic device is shown, which can 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 can communicate with each other through the communication bus 13. Figure 5
[0170] In the embodiments of the present application, the processor 10 can be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
[0171] The processor 10 can call a program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiments of the storage resource management method.
[0172] The memory 11 can store one or more programs. The program can include program code, and the program code can include computer operation instructions. In the embodiments of the present application, the memory 11 at least stores a program for implementing the following functions:
[0173] monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory;
[0174] determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information;
[0175] obtaining 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;
[0176] adjusting the storage capacity of the to-be-managed storage directory by using the storage directory management strategy, and obtaining a new storage directory corresponding to the target user group.
[0177] In a possible implementation, the memory 11 can include a storage program area and a storage data area. The storage program area can store an operating system and at least one application required by a function, etc. The storage data area can store data created during use.
[0178] In addition, the memory 11 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device or other volatile solid-state storage device.
[0179] The communication interface 12 can be an interface of a communication module, and is used to connect with other devices or systems.
[0180] Of course, it should be noted that Figure 5 The structures shown do not constitute a limitation on the electronic device in the embodiments of the present application, and in actual applications, the electronic device can include more or fewer components than Figure 5 shown, or combine certain components.
[0181] The embodiments of the present application provide a computer readable storage medium.
[0182] The computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the storage resource management methods described above.
[0183] The computer readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets, for example, it can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk) and various media that can store computer program codes.
[0184] For the computer readable storage medium provided by the embodiments of the present application, please refer to the above method embodiments, which will not be repeated here.
[0185] The embodiments of the present application provide a computer program product.
[0186] The computer program product provided by the embodiments of the present application includes computer programs / instructions, which can implement the steps of any one of the storage resource management methods described above when executed by a processor.
[0187] Specifically, in the above embodiments, all or part of them can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of them can be realized in the form of a computer program product.
[0188] The computer program product can include one or more computer programs / instructions, which when loaded and executed on a computer, can generate all or part of the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, computer instructions can be transferred from one website, computer, server or data center to another through wired (such as coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (such as infrared, wireless, microwave, etc.) mode.
[0189] For the computer program product provided by the embodiments of the present application, refer to the above method embodiments, which will not be repeated here.
[0190] The various embodiments described in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.
[0191] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0192] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs or any other form of storage medium known in the art.
[0193] The above describes the technical solutions provided by the present application in detail. The principles and implementation methods of the present application are described by applying specific examples. The above description of the embodiments is only to help understand the method and its core idea of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, some 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 by comprising: The application is applied to a central monitor connected to a storage system including a plurality of storage directories, each of which is bound to a user group, and the method comprises: monitoring each of the storage directories in the storage system to obtain storage resource usage information of each of the storage directories; determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information; obtaining 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; adjusting the storage capacity of the to-be-managed storage directory by using the storage directory management strategy to obtain a new storage directory corresponding to the target user group; wherein the to-be-managed storage directory includes a to-be-expanded storage directory and a to-be-shrunk storage directory; and the storage resource usage information is specifically a storage resource usage rate; Accordingly, determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to each of the storage resource usage information comprises: regarding a storage directory with a storage resource usage rate exceeding a first threshold value as the to-be-expanded storage directory and determining a first target user group corresponding to the to-be-expanded storage directory; and regarding a storage directory with a storage resource usage rate lower than a second threshold value as the to-be-shrunk storage directory and determining a second target user group corresponding to the to-be-shrunk storage directory; obtaining 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 comprises: obtaining user group information of the target user group and determining a user group type of the target user group according to the user group information; determining a user group level corresponding to the user group type according to a first mapping relationship; wherein the first mapping relationship is a mapping relationship between a user group type and a user group level; determining a directory type of a corresponding to-be-managed storage directory according to the storage resource usage information; wherein the directory type includes the to-be-expanded storage directory and the to-be-shrunk storage directory; when the directory type of the to-be-managed storage directory is the to-be-expanded storage directory, determining a storage directory expansion strategy corresponding to the user group level according to a second mapping relationship; wherein the second mapping relationship is a mapping relationship between a user group level and a storage directory expansion strategy; and when the directory type of the to-be-managed storage directory is the to-be-shrunk storage directory, determining a storage directory shrinkage strategy corresponding to the user group level according to a third mapping relationship; wherein the third mapping relationship is a mapping relationship between a user group level and a storage directory shrinkage strategy.
2. The storage resource management method of claim 1, wherein, Further comprising: for each storage directory in the storage system, statistically obtaining historical storage resource usage information of the storage directory in a preset historical time period; predicting future storage resource demand information of a corresponding storage directory according to the historical storage resource usage information; adjusting the storage capacity of the corresponding storage directory according to the future storage resource demand information to obtain an adjusted storage directory.
3. The storage resource management method of claim 1, wherein, Further comprising: When receiving the joining information of a new user group, determine a quota mode of a storage resource in the storage system; When the quota mode is a default quota mode, create a new storage directory with a default quota capacity, and bind the new user group with the new storage directory; When the quota mode is a custom quota mode, create a new storage directory with a preset quota capacity, and bind the new user group with the new storage directory; When the quota mode is an automatic quota mode, determine a target quota capacity according to a user group level of the new user group, and create a new storage directory with the target quota capacity, and bind the new user group with the new storage directory.
4. The storage resource management method of claim 3, wherein, Further comprising: When receiving the unregistration information of an existing user group, recycle the storage resource under the storage directory bound with the existing user group; Delete the storage directory bound with the existing user group, and unregister the registration information of the existing user group.
5. The storage resource management method of claim 1, wherein, Further comprising: Obtain the initial quota capacity, the current quota capacity, and the 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, the current quota capacity, and the 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 display.
6. A storage resource management apparatus characterized by comprising: Applied to a central monitor connected to a storage system, the storage system comprising a plurality of storage directories, and each storage directory being bound with a user group, the device comprising: A monitoring module for monitoring each storage directory in the storage system to obtain storage resource usage information of each storage directory; A determination module for determining a to-be-managed storage directory and a target user group corresponding to the to-be-managed storage directory according to the storage resource usage information; An acquisition module for 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; An adjustment module for adjusting the storage capacity of the to-be-managed storage directory by using the storage directory management strategy, and obtaining a new storage directory corresponding to the target user group; The to-be-managed storage directory comprises a to-be-expanded storage directory and a to-be-shrunk storage directory; and the storage resource usage information is specifically a storage resource usage rate; Correspondingly, the determination module is specifically configured to determine a first target user group corresponding to the to-be-expanded storage directory when the storage resource usage rate of a storage directory exceeds a first threshold value, and determine a second target user group corresponding to the to-be-shrunk storage directory when the storage resource usage rate of a storage directory is lower than a second threshold value. The acquisition module is specifically configured to acquire user group information of the target user group, and determine a user group type of the target user group according to the user group information; determine a user group level corresponding to the user group type according to a first mapping relationship; the first mapping relationship is a mapping relationship between a user group type and a user group level; determine a directory type of a corresponding to-be-managed storage directory according to the storage resource usage information; the directory type includes the to-be-expanded storage directory and the to-be-shrunk storage directory; when the directory type of the to-be-managed storage directory is the to-be-expanded storage directory, determine a storage directory expansion strategy corresponding to the user group level according to a second mapping relationship; the second mapping relationship is a mapping relationship between a user group level and a storage directory expansion strategy; when the directory type of the to-be-managed storage directory is the to-be-shrunk storage directory, determine a storage directory shrinkage strategy corresponding to the user group level according to a third mapping relationship; the third mapping relationship is a mapping relationship between a user group level and a storage directory shrinkage strategy.
7. An electronic device, comprising: The computer readable storage medium has a computer program stored thereon, and the computer program is executed by the processor to implement the steps of the storage resource management method according to any one of claims 1 to 5. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by the processor to implement the steps of the storage resource management method according to any one of claims 1 to 5. 8. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Data storage resource scheduling method and device
CN110333953A
Resource quota management method and device based on database
CN112445857A
Managing distributed storage quotas
US20140149475A1