Symmetric storage cluster directory quota management method, daemon device and system

By introducing daemon devices into a symmetric storage cluster, the quota update task is automatically processed, and the problems of low efficiency and high coupling of traditional quota updates are solved, achieving more efficient quota management and simplified storage software design.

CN113760850BActive Publication Date: 2025-04-29CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010486737.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-01
Publication Date
2025-04-29
Estimated Expiration
2040-06-01

AI Technical Summary

Technical Problem

The quota update efficiency of traditional symmetric storage clusters is low, and the quota function and storage software are highly logically coupled, which increases the difficulty of storage software design.

Method used

By introducing a daemon device, you receive operation instructions to set the cluster directory quota threshold, determine the target directory and quota threshold, calculate the target quota for each bucket, and send it to the execution module to update the quota of the target directory.

Benefits of technology

The quota management method is decoupled from the storage software logic, avoiding high concurrent writes, reducing the impact of the quota function on read and write flow at the directory level, and simplifying the storage software design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760850B_ABST
    Figure CN113760850B_ABST
Patent Text Reader

Abstract

The present application provides a symmetric storage cluster directory quota management method, daemon device and system, wherein the method includes: when receiving a first operation instruction for setting a quota threshold of a cluster directory, determining a target directory and the quota threshold corresponding to the first operation instruction; determining the used capacity of the target directory in the cluster; determining a target quota of the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold; sending the target quota to each execution device so that the file system of each storage bucket under each execution device updates the quota of the target directory according to the target quota.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and relates to but is not limited to a symmetric storage cluster directory quota management method, a daemon device, and a system. Background Art

[0002] In the information society, with the explosive growth of mobile communications, online video, e-commerce and other industries, data has become the most valuable asset. Traditional network storage systems use centralized storage servers to store all data, including Internet Protocol (IP), Storage Area Network (SAN), Fiber Channel (FC) and network-attached storage. Faced with massive amounts of data, traditional storage services can no longer meet the development needs of storage services, and distributed file storage has emerged. It not only improves the reliability, availability and access efficiency of the system, but also makes it easy to expand.

[0003] Distributed file storage includes: symmetric cluster systems, in which each node plays an equal role, jointly manages and maintains metadata, and nodes synchronize information and perform mutual exclusion locks through high-speed networks. Figure 1 It is a schematic diagram of the connection between the symmetric cluster system and the client in the related technology, such as Figure 1 As shown, the symmetric cluster system 120 includes multiple storage nodes 121, each storage node 121 includes several storage buckets 1211, each storage bucket 1211 is connected to a local file system, and the storage bucket 1211 is used to store the file data of the client 110 (exemplarily, storing the client 1 to the client M) and the metadata information of the symmetric cluster system. In the related art, each storage bucket 1211 has an equal role, jointly manages and maintains the metadata, and the nodes perform information synchronization and mutual exclusion lock operations through a high-speed network. The symmetric cluster system 120 is connected to the client 110 through a network, wherein the symmetric cluster system 120 belongs to the same namespace, and it provides a general file interface protocol for the client 110, such as the Network File System (NFS) protocol, the Common Internet File System (CIFS) protocol, etc. However, in the related art, the quota update efficiency of the symmetric cluster system is low, and the coupling between the quota function and the storage software logic of the symmetric cluster system is too high, which increases the difficulty of storage software design. Summary of the invention

[0004] In order to solve the problem of high coupling between quota function and storage software logic in the related art, the present application provides a symmetric storage cluster directory quota management method, daemon device and system.

[0005] The technical solution of this application is implemented as follows:

[0006] The present application provides a symmetric storage cluster directory quota management method, the method comprising:

[0007] When receiving a first operation instruction for setting a quota threshold of a cluster directory, determining a target directory and the quota threshold corresponding to the first operation instruction;

[0008] Determine the used capacity of the target directory in the cluster;

[0009] Determine a target quota for the target directory in each storage bucket under each execution module according to the used capacity of the target directory in the cluster and the quota threshold;

[0010] The target quota is sent to each execution module, so that the file system of each storage bucket under each execution module updates the quota of the target directory according to the target quota.

[0011] The present application provides a daemon device for symmetric storage cluster directory quota management, the device comprising:

[0012] A receiving module, configured to, upon receiving a first operation instruction for setting a quota threshold of a cluster directory, determine a target directory and the quota threshold corresponding to the first operation instruction;

[0013] A first determination module, configured to determine the used capacity of the target directory in the cluster;

[0014] A second determination module determines a target quota of the target directory in each storage bucket under each execution module according to the used capacity of the target directory in the cluster and the quota threshold;

[0015] The sending module is used to send the target quota to each execution module, so that the file system of each storage bucket under each execution module updates the quota of the target directory according to the target quota.

[0016] The present application provides a symmetric storage cluster directory quota management system, the system comprising:

[0017] A daemon device, configured to, when receiving a first operation instruction for setting a quota threshold of a cluster directory, determine a target directory and the quota threshold corresponding to the first operation instruction; determine a used capacity of the target directory in the cluster; determine a target quota of the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold; and send the target quota to each execution device;

[0018] Each execution device is used to receive the target quota and send the target quota to each storage bucket, so that the file system of each storage bucket updates the quota of the target directory according to the target quota.

[0019] The present application provides a computer-readable storage medium, wherein the computer storage medium stores computer-executable instructions, and the computer-executable instructions are configured to execute the steps of the symmetric storage cluster directory quota management method.

[0020] The present application provides a symmetric storage cluster directory quota management method, daemon device and system, wherein when the daemon device obtains a quota threshold setting instruction, the target directory and the quota threshold are determined through the instruction, and the used capacity of the target directory in the cluster is determined, and the target quota of the target directory in each storage bucket under the execution device is determined according to the quota threshold and the used capacity, and the target quota is sent to each execution device, so that each storage bucket under each execution device updates the target directory according to the target quota. In the present application, by setting a daemon device to manage directory quotas, the control logic of the daemon device executing the quota management method is decoupled from the system storage software control logic of the symmetric storage cluster, avoiding high concurrent writing, the impact of the directory quota function on the read and write flow when the directory hierarchy is deep, and reducing the difficulty of storage software design. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views.The drawings generally illustrate, by way of example and not limitation, various embodiments discussed herein.

[0022] Figure 1 A schematic diagram of a symmetrical cluster system and a client connection in the related art;

[0023] Figure 2 A schematic diagram of the update process of directory quota in a storage bucket in a symmetric storage cluster in the related art;

[0024] Figure 3 A schematic diagram of a method flow chart of a symmetric storage cluster directory quota management device provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of the connection of the daemon device provided in an embodiment of the present application in a symmetric cluster directory quota management system;

[0026] Figure 5 A flowchart of a symmetric storage cluster directory quota management method provided in an embodiment of the present application;

[0027] Figure 6 A flowchart of a symmetric storage cluster directory quota management method provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of the structure of a daemon device provided in an embodiment of the present application;

[0029] Figure 8 A schematic diagram of the composition structure of the symmetric storage cluster directory quota management system provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram of the architecture of a symmetric storage cluster directory quota management system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0032] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0033] If similar descriptions of "first\second\third" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0034] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0035] In order to better understand the symmetric storage cluster directory quota management method, daemon device and system provided in the present application, firstly, the implementation method and existing problems of directory update of symmetric storage cluster in related technologies are analyzed and explained.

[0036] Figure 2 The following is a schematic diagram of the update process of the directory quota in the storage bucket in the related technology, such as Figure 2 As shown, the storage bucket includes: storage bucket a and storage bucket a ’ , in bucket a and bucket a ’ There is a directory hierarchy in the bucket. Directory A has directory B, and directory B has directory C. Files can be stored in each directory. For example, directory C stores file D and file E. When the quota in file D or file E is updated, the directories in the bucket will update the quota from bottom to top according to the hierarchy.

[0037] In the related art, each file and directory in a bucket has a contribution attribute, which indicates how much capacity the current file or directory contributes to the parent directory. Each directory in a bucket also has two other key values: a size attribute, which indicates the total capacity of all files, directories, and subdirectories under the current directory; and an exception (dirty) flag, which is used to handle abnormal situations during the bucket quota update process. It should be noted that since the root directory has no parent directory, it has no contri attribute.

[0038] The following describes the bottom-up quota update process when the size of file D in the / A / B / C directory changes. The update process can be achieved through the following steps:

[0039] Step S1: The storage bucket obtains that the size of file D has changed.

[0040] Step S2, the bucket sets the index node of D as inode.

[0041] Step S3: The index node of bucket C is set as pinode.

[0042] Step S4: If pinode is the root directory, jump to S18; if it is not the root directory, go to step S5.

[0043] Step S5: The bucket obtains a pinode lock.

[0044] Step S6, the bucket obtains the latest size of the inode.

[0045] Step S7: The bucket obtains the contri attribute value of the inode.

[0046] Step S8: The bucket calculates the difference delta=size-contri.

[0047] Step S9, if delta is 0, release the lock obtained in step S5 and jump to S18; if it is not 0, execute step 10.

[0048] Step S10, setting the dirty flag of the pinode.

[0049] Step S11, adding delta to the contri attribute of the inode.

[0050] Step S12, adding delta to the size attribute of pinode.

[0051] Step S13, clear the dirty flag of the pinode.

[0052] Step S14, releasing the lock obtained in step 5.

[0053] Step S15, setting inode=pinode.

[0054] Step S16, set pinode=parent(inode).

[0055] Step S17, jump to step S4.

[0056] Step S18, end.

[0057] From the above implementation process, it can be seen that in the relevant technology, when the file size is frequently updated (such as data appending and writing), a single read input / output (IO) will be accompanied by a large number of bottom-up metadata update flows, and the IO completion time is linearly related to the number of directory levels; secondly, to ensure the consistency of the quota for the directory, when updating multiple file quotas in the same directory at the same time, the mutex lock competition will inevitably further reduce the IO efficiency, which will eventually increase the directory quota update latency and reduce the cluster throughput. In some scenarios, the cluster throughput is reduced by more than 50%.

[0058] In addition, the quota function is too tightly coupled with the distributed file storage software logic, and the consistency of quotas, metadata repair, and handling of exceptions all require careful design. In practice, quota function exceptions often occur, causing the entire storage bucket to be unavailable, further affecting the IO of the entire cluster. In addition, the logic of the quota function is too tightly coupled with the logic of the distributed file storage software, which increases the difficulty of storage software design.

[0059] Based on the problems existing in the related art, an embodiment of the present application provides a symmetric storage cluster directory quota management method, which is applied to a daemon device, and the daemon device is used to manage the symmetric storage cluster directory quota. The method provided by this embodiment can be implemented by a computer program, and when the computer program is executed, each step of the method provided by this embodiment is completed. In some embodiments, the computer program can be executed by a processor in the daemon device. Figure 3 A schematic diagram of a method flow chart of a symmetric storage cluster directory quota management device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method includes:

[0060] Step S301: When the daemon process device receives a first operation instruction for setting a quota threshold of a cluster directory, it determines a target directory and the quota threshold corresponding to the first operation instruction.

[0061] In the embodiment of the present application, the daemon device is arranged in a symmetric cluster system. Figure 4 This is a schematic diagram of the connection of the daemon device in the symmetric cluster directory quota management system according to the embodiment of the present application. Figure 4 As shown, the daemon device 410 is connected to N execution devices 420, and each execution device 420 is respectively connected to multiple storage buckets 430. The daemon device 410 is used to control each execution device 420 in the symmetric cluster, and each execution device 420 is used to obtain instructions from the daemon device and send them to each storage bucket 430 under each execution device 420.

[0062] In some embodiments, Figure 4 As shown, the daemon device 410 is connected to the input device 440, and the daemon device 410 is used to receive a first operation instruction for setting a quota threshold of a cluster directory from the input device 440. In the embodiment of the present application, the input device 440 can be integrated with the daemon device 410, or it can be two independent devices. Exemplarily, the input device 440 and the daemon device 410 are two independent devices. When the input device 440 receives the first operation instruction, the first operation instruction is sent to the daemon device 410, and then the daemon device 410 receives the first operation instruction. In the embodiment of the present application, the input device 440 includes a command line interface, and the command line interface usually does not support a mouse. The user inputs instructions through the keyboard. The use of the command line interface can save the system resources of the input device. In the embodiment of the present application, the input device 440, the daemon device 410 and the execution device 420 can be integrated together or can be independent devices.

[0063] In the embodiment of the present application, when the daemon device 410 receives a first operation instruction for setting a quota threshold of a cluster directory, the daemon device 410 can parse the first operation instruction to obtain the target directory and the quota threshold carried by the first operation instruction. Exemplarily, the first operation instruction is: set(A, limit(A)), at which time it can be determined that the target directory is directory A and the quota threshold is limit(A).

[0064] Step S302: the daemon device determines the used capacity of the target directory in the cluster.

[0065] In an embodiment of the present application, after the target directory is determined, the daemon device 410 can send a request to each execution device 420 to obtain the used capacity of the target directory in each storage bucket 430. When the daemon device 410 receives the used capacity of the target directory in each storage bucket, the used capacity of the target directory in the cluster can be calculated.

[0066] Exemplarily, the used capacity is represented by usage, the node is represented by node, the bucket is represented by bucket, there are m buckets in total, the used capacity of each bucket 430 under each execution device 420 can be represented by usage(A, node(bucket(a…m))), the directory limit capacity of each bucket under each execution device 420 can be represented by limit(A, node(bucket(a…m))), and the cluster directory limit capacity can be represented by limit(A). After obtaining the used capacity usage(A, node(bucket(a…m))) of each bucket 430, the used capacity usage(A) of the cluster target directory is calculated according to the volume information.

[0067] For example, usage(A, node(bucket(a))) = 5 gigabytes (GB), usage(A, node(bucket(b))) = 4GB, usage(A, node(bucket(c))) = 5GB, usage(A, node(bucket(m))) = 7GB, so the used capacity usage(A) = 21GB.

[0068] Step S303: The daemon device determines the target quota of the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold.

[0069] In the embodiment of the present application, after the daemon device 410 determines the used capacity of the target directory in the cluster and the quota threshold, it can determine whether the used capacity of the target directory in the cluster is less than the quota threshold. If the used capacity of the target directory is less than the quota threshold, the daemon device 410 can calculate the difference between the quota threshold and the used capacity of the target directory in the cluster, and distribute the difference according to a preset method to obtain the target quota of the target directory in each storage bucket 430 under each execution device 420. The target quota of the target directory in each storage bucket 430 carries a storage bucket identifier, which can be a name, an IP address, etc.

[0070] In some embodiments, if the used capacity of the target directory is greater than the quota threshold, the process ends.

[0071] Continuing with the above example, the target quota of each bucket under each execution device 420 is determined by usage(A) and limit(A) (ie, the new limit(A, node(bucket(a…m)))).

[0072] Step S304: The daemon device sends the target quota to each execution device, so that the file system of each storage bucket under each execution device updates the quota of the target directory according to the target quota.

[0073] In an embodiment of the present application, the daemon device 410 gives the target quota to each execution device 420, and each execution device 420 sends the target quota to each storage bucket 430. When each storage bucket 430 receives the target quota with its own identifier, it updates the target quota corresponding to its own identifier according to its own file system.

[0074] The symmetric storage cluster directory quota management method provided by the embodiment of the present application, when the daemon device obtains the quota threshold setting instruction, determines the target directory and the quota threshold through the instruction, and determines the used capacity of the target directory in the cluster, determines the target quota of the target directory in each storage bucket under the execution device according to the quota threshold and the used capacity, and sends the target quota to each execution device, so that each storage bucket under each execution device updates the target directory according to the target quota. By setting the daemon device to manage the directory quota, the control logic of the daemon device executing the quota management method is decoupled from the system storage software control logic of the symmetric storage cluster, avoiding the impact of high concurrent writing and the directory quota function on the read and write flow when the directory hierarchy is deep, and reducing the difficulty of storage software design.

[0075] In some embodiments, the step S302 of "determining the used capacity of the target directory in the cluster" can be implemented by the following steps:

[0076] Step S3021: The daemon device sends an acquisition request to each of the execution devices, so that each of the execution devices acquires the used capacity of the target directory in each storage bucket.

[0077] In an embodiment of the present application, the acquisition request is used to obtain the used capacity of the target directory in each storage bucket. Exemplarily, the acquisition request is: get(A). When each execution device receives get(A), each execution device obtains the used capacity usage(A, node(bucket(a…m))) of each storage bucket. In some embodiments, it also includes obtaining the directory limit capacity limit(A, node(bucket(a…m))) and the cluster directory limit capacity limit(A) of each storage bucket. In an embodiment of the present application, each execution device obtains the used capacity of the target directory of each storage bucket. It can be achieved in the following way. Each storage bucket uses the directory quota function of its own local file system to determine the metadata. If the number of files is small, the metadata of the target directory in each storage bucket can also be obtained by obtaining the attributes of each file in turn. Each storage bucket sends the metadata to each execution device. In an embodiment of the present application, the metadata includes: the used capacity usage(A, node(bucket(a…m))) of each storage bucket under each execution device, the directory limit capacity limit(A, node(bucket(a…m))) of each storage bucket under each execution device, and the cluster directory limit capacity limit(A).

[0078] In step S3032, the daemon device obtains the used capacity of the target directory in each storage bucket from each execution device, so as to determine the used capacity of the target directory in the cluster.

[0079] When each execution device obtains the metadata of each storage bucket under each execution device, each execution device sends the metadata to the daemon device, and the used capacity usage(A, node(bucket(a…m))) of each storage bucket of the daemon device is summed to obtain the used capacity of the target directory in the cluster.

[0080] In the embodiment of the present application, the daemon device obtains metadata of the target directory in each storage bucket from the execution device, thereby calculating the used capacity of the target directory in the cluster according to the metadata of the target directory in each storage bucket. When the daemon device determines the used capacity, the target quota of each storage bucket under each execution device can be determined according to the quota threshold and the used capacity carried in the first operation instruction.

[0081] In some embodiments, step S303 "the daemon device determines the target quota of the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold" can be implemented by the following steps:

[0082] Step S3031, the daemon device determines the unused capacity of the target directory in the cluster after the quota threshold is set according to the used capacity of the target directory in the cluster and the quota threshold.

[0083] In the embodiment of the present application, the unused capacity of the target directory in the cluster after the quota threshold is set can be determined by the difference between the quota threshold and the used capacity of the target directory.

[0084] In step S3032, the daemon device determines the target quota of the target directory in each storage bucket under each execution device based on the unused capacity and the used capacity of the target directory in each storage bucket under each execution device, wherein when each storage bucket is updated according to the target quota, the unused capacity of the target directory in each storage bucket is balanced.

[0085] In the embodiment of the present application, the target quota of the target directory in each storage can be set according to the balancing strategy, and the balancing strategy is that the unused capacity of the target directory in each storage bucket is not much different. The daemon device determines the quota to be allocated in the cluster by the difference between the original quota threshold and the set quota threshold, and then determines the target quota of the target directory in each storage bucket under each execution device according to the quota to be allocated and the used capacity in the cluster. When each storage bucket is updated according to the target quota, the unused capacity of the target directory in each storage bucket is balanced. Exemplarily, the used capacity of storage bucket A is 5GB, and the used capacity of storage bucket B is 4GB. The limited capacity of storage bucket A and storage bucket B before setting is 6GB. The quota threshold in the first operation instruction is 13GB. At this time, the quota to be allocated can be calculated to be 1GB. In order to balance the unused capacity of storage bucket A and storage bucket B, the quota to be allocated 1GB is directly allocated to storage bucket A, and the quota threshold allocated to storage bucket B is 0GB. The target quota for bucket A is 7 GB, and the target quota for bucket B is 6 GB. When bucket A and bucket B receive their target quotas, bucket A updates its quota threshold to 7 GB, while bucket B does not need to be updated.

[0086] Based on the above method, the present application embodiment further provides a symmetric storage cluster directory quota management method. Figure 5 A flow chart of a symmetric storage cluster directory quota management method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the method includes:

[0087] Step S501: When receiving a second operation instruction for obtaining a directory quota in a cluster, the daemon device determines a target directory corresponding to the second operation instruction.

[0088] In the embodiment of the present application, the second operation instruction is issued by the input device. When the daemon device receives the second operation instruction, the target directory can be determined according to the second operation instruction. Exemplarily, the daemon device receives get(A), that is, determines that the target directory is the A directory.

[0089] Step S502: The daemon device sends the second operation instruction to each of the execution devices, so that each of the execution devices obtains the quota threshold of the target directory in the cluster and the used capacity of the target directory in each storage bucket.

[0090] Continuing with the above example, the daemon device sends get(A) to each execution device. When each execution device receives the get(A) instruction, each execution device obtains the quota threshold of the target directory in the cluster and the used capacity of the target directory in each storage bucket.

[0091] Step S503: The daemon device determines the used capacity of the target directory in the cluster according to the used capacity of the target directory in each storage bucket.

[0092] In the embodiment of the present application, the daemon module sums the used capacity of the target directory in each storage bucket to determine the used capacity of the target directory in the cluster.

[0093] Step S504: the daemon device outputs the used capacity of the target directory in the cluster and the quota threshold.

[0094] In the embodiment of the present application, the daemon device sends the used capacity of the target directory in the cluster and the quota threshold to the input device, so that the input device outputs the used capacity of the target directory in the cluster and the quota threshold.

[0095] The method provided in the embodiment of the present application, when receiving an instruction to obtain a quota from an input device, obtains the quota threshold and used capacity of the target directory in the cluster through a daemon device, and the daemon device outputs the quota threshold and used capacity of the target directory in the cluster to the input device, thereby allowing the user to obtain the quota of the target directory, making it convenient for network administrators to manage the cluster directory.

[0096] In some embodiments, the method further comprises:

[0097] Step S505: The daemon device sends the used capacity of the target directory and the quota threshold to the marking device, so that the marking device provides a quota view of the target directory according to the quota threshold and the used capacity.

[0098] In the present application, see Figure 4 The daemon device 410 sends the used capacity of the target directory and the quota threshold to the marking device 450. The marking device 450 is used to provide an interface for querying the file system (statfs). When receiving the used capacity of the target directory and the quota threshold, the marking device 450 changes the information of the tatfs interface according to the used capacity of the target directory and the quota threshold, so that the client connected to the tatfs interface obtains a capacity view.

[0099] In some embodiments, the method further comprises:

[0100] Step S507: the daemon device periodically determines the used capacity of the target directory.

[0101] Step S508: The daemon device sends the used capacity to the marking device, so that the marking device provides a quota view of the target directory according to the used capacity of the target directory and the quota threshold determined by the marking device itself.

[0102] In the embodiment of the present application, the period for the marking device to obtain the quota threshold is the same as the period for the daemon device to determine the used capacity of the target directory. In the embodiment of the present application, the quota threshold determined by the marking device itself can be implemented in the following way: the marking device obtains the directory attributes of the storage bucket directly from the storage bucket, and determines the quota threshold of the cluster from the directory attributes.

[0103] Based on the above embodiments, the present application further provides a symmetric storage cluster directory quota management. Figure 6 A flow chart of a symmetric storage cluster directory quota management method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the method includes:

[0104] Step S601: the daemon device obtains the used capacity of all subdirectories under the parent directory of the target directory.

[0105] Exemplarily, directory A is a parent directory, and subdirectories under directory A include: subdirectory B, subdirectory C, and subdirectory D.

[0106] The quota thresholds of subdirectory B, subdirectory C, and subdirectory D are all 11 GB. The used capacity of subdirectory B is 10 GB, the used capacity of subdirectory C is 6 GB, and the used capacity of subdirectory D is 5 GB.

[0107] Step S602: When it is determined that the data of each sub-directory is unbalanced according to the used capacity of all sub-directories, the daemon device obtains the quota threshold of each sub-directory.

[0108] Continuing with the above example, it is obvious that the data in subdirectory B is more, while the data in subdirectories C and D is relatively less, so the data is obviously unbalanced.

[0109] Step S603: the daemon device adjusts the quota threshold of the target directory according to the used capacity and quota threshold of each sub-directory.

[0110] Since the data is not balanced, the daemon module can adjust the quota threshold of the directory. Continuing with the above example, the daemon determines to reduce the quota of subdirectory C and increase the quota of subdirectory B. At this time, the daemon module determines the target quota of subdirectory C and subdirectory B of each bucket according to reducing the quota of subdirectory C and increasing the quota of subdirectory B, and sends the target quota of subdirectory C and subdirectory B of each bucket to the execution device, so that the execution device sends the target quota of subdirectory C and subdirectory B of each bucket to each bucket, so that each bucket updates its own quota of subdirectory C and subdirectory B, so that the quota threshold of each subdirectory is balanced.

[0111] The method provided in the embodiment of the present application determines whether the data of each subdirectory is balanced by obtaining the used capacity of each subdirectory under the parent directory. When unbalanced, the quota threshold of each subdirectory is adjusted to balance the quota threshold of each subdirectory.

[0112] Based on the foregoing embodiments, the embodiments of the present application provide a daemon device for symmetric storage cluster directory quota management. The modules included in the device and the units included in the modules can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Microprocessor Unit), a digital signal processor (DSP, Digital Signal Processing) or a field programmable gate array (FPGA, Field Programmable Gate Array), etc.

[0113] The embodiment of the present application further provides a daemon process device, Figure 7 A schematic diagram of the structure of the daemon device provided in the embodiment of the present application is shown in FIG. Figure 7 As shown, the daemon device 700 includes:

[0114] A first receiving module 701 is used to determine a target directory and the quota threshold corresponding to the first operation instruction when receiving a first operation instruction for setting a quota threshold of a cluster directory;

[0115] A first determination module 702, configured to determine the used capacity of the target directory in the cluster;

[0116] A second determination module 703 determines a target quota of the target directory in each storage bucket under each execution module according to the used capacity of the target directory in the cluster and the quota threshold;

[0117] The first sending module 704 is used to send the target quota to each execution module, so that the file system of each storage bucket under each execution module updates the quota of the target directory according to the target quota.

[0118] In some embodiments, the first determining module 702 includes:

[0119] A first sending unit, configured to send an acquisition request to each of the execution devices, so that each of the execution devices acquires the used capacity of the target directory in each of the storage buckets, wherein the acquisition request is used to acquire the used capacity of the target directory in each of the storage buckets;

[0120] The first acquisition unit is used to acquire the used capacity of the target directory in each storage bucket from each execution device, so as to determine the used capacity of the target directory in the cluster.

[0121] In some embodiments, the second determining module 703 includes:

[0122] A first determining unit, configured to determine, according to the used capacity of the target directory in the cluster and the quota threshold, the unused capacity of the target directory in the cluster after the quota threshold is set;

[0123] The second determination unit is used to determine the target quota of the target directory in each storage bucket under each execution device based on the unused capacity and the used capacity of the target directory in each storage bucket under each execution device, wherein when each storage bucket is updated according to the target quota, the unused capacity of the target directory in each storage bucket is balanced.

[0124] In some embodiments, the daemon device 700 further includes:

[0125] A second receiving module is used to determine a target directory corresponding to a second operation instruction when receiving the second operation instruction for obtaining a directory quota in the cluster;

[0126] a second sending module, configured to send the second operation instruction to each of the execution devices, so that each of the execution devices obtains a quota threshold of the target directory in the cluster and a used capacity of the target directory in each storage bucket;

[0127] A third determination module, configured to determine the used capacity of the target directory in the cluster according to the used capacity of the target directory in each storage bucket;

[0128] The output module is used to output the used capacity of the target directory in the cluster and the quota threshold.

[0129] In some embodiments, the daemon device 700 further includes:

[0130] A third sending module, configured to send the used capacity of the target directory and the quota threshold to a marking device, so that the marking device provides a quota view of the target directory according to the quota threshold and the used capacity;

[0131] or, a fourth determination module, configured to periodically determine the used capacity of the target directory;

[0132] The fourth sending module is used to send the used capacity to the marking device, so that the marking device provides a quota view of the target directory according to the used capacity of the target directory and the quota threshold determined by the marking device itself.

[0133] In some embodiments, the daemon device 700 further includes:

[0134] A first acquisition module, used to acquire the used capacity of all subdirectories under the parent directory of the target directory;

[0135] A second acquisition module is used to acquire a quota threshold of each subdirectory when it is determined that the data of each subdirectory is unbalanced according to the used capacity of all subdirectories;

[0136] The adjustment module is used to adjust the quota threshold of the target directory according to the used capacity and quota threshold of each sub-directory.

[0137] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0138] The present application embodiment further provides a symmetric storage cluster directory quota management system. Figure 8 The schematic diagram of the composition structure of the symmetric storage cluster directory quota management system provided in the embodiment of the present application is as follows: Figure 8 As shown, the system 800 includes:

[0139] The daemon device 810 is used to, when receiving a first operation instruction for setting a quota threshold of a cluster directory, determine a target directory and the quota threshold corresponding to the first operation instruction; determine a used capacity of the target directory in the cluster; determine a target quota of the target directory in each storage bucket 830 under each execution device 820 according to the used capacity of the target directory in the cluster and the quota threshold; and send the target quota to each execution device 820;

[0140] Each execution device 820 is used to receive the target quota and send the target quota to each storage bucket 830, so that the file system of each storage bucket 830 updates the quota of the target directory according to the target quota.

[0141] In some embodiments, the system further comprises:

[0142] The input device 840 is used to send a first operation instruction for setting a quota threshold of a cluster directory to the daemon device 810 in response to an input operation of a user.

[0143] In some embodiments, the system further comprises:

[0144] The marking device 850 is used to obtain the used capacity and the quota threshold of the target directory in the cluster from the daemon device 810, so as to provide a quota view of the target directory according to the quota threshold and the used capacity; or,

[0145] It is used to periodically obtain the used capacity of the target directory in the cluster and the quota threshold determined by itself from the daemon device 810 to provide a quota view of the target directory.

[0146] In some embodiments, the marking device 850 is also used to determine whether the ratio of the used capacity of the target directory in the cluster to the quota threshold meets a preset condition when receiving a read-write stream that changes the file size in the target directory. When the ratio of the used capacity of the target directory in the cluster to the quota threshold meets the preset condition, the read-write stream is directly written into the storage bucket.

[0147] In an embodiment of the present application, when the ratio of the used capacity of the target directory in the cluster to the quota threshold is less than a preset threshold, it is determined that the preset condition is met. For example, when the ratio of the used capacity of the target directory in the preset cluster to the quota threshold is less than 10%, it means that there is still a lot of space under the target directory in the cluster. At this time, the read-write stream can be directly written into the storage bucket 830.

[0148] In some embodiments, the marking device 850 is also used to determine whether the difference between the capacity of the read-write stream and the available capacity of the target directory is less than 0 when the ratio of the used capacity of the target directory of the cluster to the quota threshold does not meet a preset condition; when the capacity of the read-write stream and the available capacity of the cluster are less than 0, write the read-write stream into the storage bucket.

[0149] In the embodiment of the present application, if the ratio of the used capacity of the target directory of the cluster to the quota threshold is greater than the preset threshold, it is necessary to determine whether the target directory in the cluster can store the read-write stream. When the difference between the capacity of the read-write stream and the available capacity of the target directory is less than 0, the data is directly written into the storage bucket.

[0150] Based on the symmetric storage cluster directory quota management systems provided in the aforementioned embodiments, an embodiment of the present application further provides a symmetric storage cluster directory quota management system, the system comprising: a quota command line interface module (Quota Cli) (i.e., the input device mentioned above), a quota daemon module (Quota Daemon) (i.e., the daemon device mentioned above), a quota execution module (Quota Enforcer) (i.e., the execution device mentioned above) and a quota marking module (Quota Marker) (i.e., the marking device mentioned above). Fig. 9 The schematic diagram of the architecture of the symmetric storage cluster directory quota management system provided in the embodiment of the present application is as follows: Fig. 9 As shown, the system includes: Quota Cli 901, Quota Daemon 902, Quota Enforcer 903, Quota Marker 904, wherein,

[0151] Quota Cli 901 is used to obtain and set the quota information of the distributed file storage directory. Taking directory A as an example, get(A) is the command for obtaining the directory quota, and set(A, limit(A)) is the command for setting the directory quota.

[0152] Quota Daemon 902 is used to control N nodes. There can be multiple Quota Daemon 902, but only one Quota Daemon 902 works at the same time. When one Quota Daemon 902 fails, another Quota Daemon 902 takes over the work, thereby reducing downtime and maintaining high availability of its services.

[0153] In the embodiment of the present application, Quota Daemon 902 has the following functions:

[0154] Function 1: Receive the Quota Cli 901 request, forward the information to Quota Enforcer 903, and then collect the used capacity usage(A, node(bucket(a…m…m))), directory limit capacity limit(A, node(bucket(a…m))) and cluster directory limit capacity limit(A) of directory A from all storage buckets. Then calculate the used capacity usage(A) of the distributed file storage directory based on the volume information. If it is a request to obtain quota, return usage(A) and limit(A). If it is a request to set quota, calculate the new directory limit capacity limit(A, node(bucket(a…m))), send the new limit(A) and new limit(A, node(bucket(a…m))) to Quota Enforcer 903; and send the new usage(A) and limit(A) to Quota Marker 904.

[0155] Function 2: Periodically check the cluster status and repair the data to be repaired.

[0156] Function 3: Periodically calculate usage (A) and send it to Quota Marker 904.

[0157] Function 4: Periodically check the data balance of the quota directory, and decide whether to reset the directory capacity limit (A, node (bucket (a…m))) according to the balance strategy.

[0158] Quota Enforcer 903: Each storage node has one. Each storage node has at least one storage bucket. It is used to maintain the following information of all storage buckets on the node:

[0159] The used capacity of directory A in each bucket is usage(A, node(bucket(a))). By default, the directory quota function of the local file system is used. If the number of files is small, the traversal and accumulation method can also be used to obtain the capacity.

[0160] Directory A limits its capacity limit(A, node(bucket(a))).

[0161] The capacity limit (A) of the A directory in the cluster.

[0162] Quota Marker 904 is used to modify the statfs interface of the IO service process of the distributed file system through usage (A) and limit (A) to provide a correct capacity view for the mount point; Quota Marker 904 is also used to periodically obtain limit (A) from the directory attributes of the bucket.

[0163] Continue to see Fig. 9 , where a, b, c, d, and f are interaction paths between modules. The interaction paths of modules are described below when the target directory is managed by the symmetric storage cluster directory quota management system. The following embodiments are described with the target directory being directory A.

[0164] The directory quota acquisition process can be achieved through the following steps:

[0165] In step SA1, Quota Cli 901 sends get(A) to Quota Daemon 902 via a.

[0166] In step SA2, after receiving get(A), Quota Daemon 902 collects the used capacity usage(A, node(bucket(a…m))) and limit(A) of directory A from all storage buckets through b. Then, the used capacity usage(A) of the distributed file storage directory is calculated based on the volume information.

[0167] Step SA3, returns usage(A) and limit(A) to Quota Cli 901 through a.

[0168] Step SA4, completed.

[0169] The directory quota setting process can be achieved through the following steps:

[0170] In step SB1, Quota Cli 901 sends set(A, limit(A)) to Quota Daemon 902 via a.

[0171] Step SB2, after receiving set(A, limit(A)), Quota Daemon 902 collects the used capacity usage(A, node(bucket(a…m))) of directory A from all storage buckets through b. Then, the used capacity usage(A) of the distributed file storage directory is calculated according to the volume information.

[0172] Step SB3, Quota Daemon 902 calculates the new directory capacity limit (limit(A, node(bucket(a...m))), and sends the new limit(A) and the new limit(A, node(bucket(a...m))) to Quota Enforcer 903 via b.

[0173] Step SB4, after step 3 succeeds, new usage (A) and limit (A) are sent to Quota Marker 904 via d.

[0174] Step SB5, directory quota setting is completed.

[0175] The directory quota update process can be achieved through the following steps:

[0176] Step SC1, Quota Daemon 903 periodically checks the cluster status and repairs the data to be repaired. After the repair is completed, proceed to the next step.

[0177] In step SC2, Quota Daemon 903 collects the used capacity usage(A, node(bucket(a…m))), directory limit capacity limit(A, node(bucket(a…m))) and cluster directory limit capacity limit(A) of directory A from all storage buckets through b. Then, the used capacity usage(A) of the distributed file storage directory is calculated based on the volume information.

[0178] Step SC3, evaluate the data balance in the directory, and decide whether to reset the directory capacity limit limit(A, node(bucket(a…m))) according to the balance strategy.

[0179] Step SC4, sending new usage (A) and limit (A) to Quota Marker 904 through d.

[0180] Step SC5: Directory quota update is completed.

[0181] The capacity view update process can be achieved through the following steps:

[0182] Step SD1, based on the usage(A) and limit(A) received from d, or the limit(A) obtained periodically from the directory attributes of the bucket by Quota Marker 904 and the periodically received usage(A), the statfs interface is modified to provide a correct capacity view for the mount point.

[0183] Step SD2, end.

[0184] The business IO process can be implemented through the following steps:

[0185] Step SE1, the IO for changing the file size is sent to Quota Marker 904 via e.

[0186] In step SE2, if the ratio of usage(A) / limit(A) is less than the threshold, go directly to step 4.

[0187] Step SE3, Quota Marker 904 calculates delta=size(IO)-(limit(A)-usage(A)). If delta<0 or limit(A)-usage(A)<0, return directly.

[0188] Step SE4, calculate the actual IO based on the volume information and send it to the storage bucket.

[0189] Step SE5: After receiving the IO, the storage bucket directly writes it into the local file system. In this step, the storage bucket directory quota capacity may be insufficient. If this happens, the process returns directly.

[0190] Step SE6, completed.

[0191] It can be seen that the entire directory quota update process completely relies on the capabilities of the local file system on the bucket, greatly shortening the business IO process.

[0192] The embodiment of the present application introduces a symmetric distributed file storage directory quota architecture, which provides a directory quota implementation method that is highly decoupled from the distributed file storage itself through the four major components of Quota Cli901, Quota Daemon 902, Quota Enforcer 903 and Quota Marker 904. The main implementation of the cluster directory quota mainly relies on the quota function of the local file system itself. It is highly customizable and simple to implement, which greatly reduces the impact of traditional implementation methods on the distributed file storage itself. It avoids the impact of high-concurrency writes and the directory quota function on business IO when the directory hierarchy is deep; by sinking the directory quota update process to the file system on the storage bucket, the distributed directory quota is actually guaranteed by the quota of the local file system, which greatly simplifies the design of distributed storage software.

[0193] It should be noted that in the embodiment of the present application, if the above-mentioned image recognition method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, ReadOnly Memory), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0194] Accordingly, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps in the symmetric storage cluster directory quota management method provided in the above embodiment are implemented.

[0195] The description of the above storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the image recognition device and storage medium embodiments of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0196] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0197] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0198] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0200] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0201] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0202] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read Only Memory), disks or optical disks, etc. Various media that can store program codes.

[0203] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for an AC to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0204] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A symmetric storage cluster directory quota management method, characterized in that: The method comprises: When receiving a first operation instruction for setting a quota threshold of a cluster directory, determining a target directory and the quota threshold corresponding to the first operation instruction; Determine the used capacity of the target directory in the cluster; Determine a target quota for the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold; The target quota is sent to each execution device, so that the file system of each storage bucket under each execution device updates the quota of the target directory according to the target quota; the file system represents the local file system of the storage bucket itself; wherein, The execution device is used to receive metadata sent by each storage bucket under the execution device, and determine the used capacity of the target directory in each storage bucket according to the metadata; the execution device is also used to send the target quota to each storage bucket under the execution device.

2. The method according to claim 1, characterized in that Determining the used capacity of the target directory in the cluster includes: Sending an acquisition request to each of the execution devices so that each of the execution devices acquires the used capacity of the target directory in each of the storage buckets, wherein the acquisition request is used to acquire the used capacity of the target directory in each of the storage buckets; The used capacity of the target directory in each storage bucket is obtained from each execution device, so as to determine the used capacity of the target directory in the cluster.

3. The method according to claim 1, characterized in that The determining, according to the used capacity of the target directory in the cluster and the quota threshold, the target quota of the target directory in each storage bucket under each execution device comprises: Determine, according to the used capacity of the target directory in the cluster and the quota threshold, the unused capacity of the target directory in the cluster after the quota threshold is set; The target quota of the target directory in each storage bucket under each execution device is determined according to the unused capacity and the used capacity of the target directory in each storage bucket under each execution device, wherein when each storage bucket is updated according to the target quota, the unused capacity of the target directory in each storage bucket is balanced.

4. The method according to claim 1, characterized in that: The method further comprises: When receiving a second operation instruction for obtaining a directory quota in the cluster, determining a target directory corresponding to the second operation instruction; Sending the second operation instruction to each of the execution devices, so that each of the execution devices obtains the quota threshold of the target directory in the cluster and the used capacity of the target directory in each storage bucket; Determine the used capacity of the target directory in the cluster according to the used capacity of the target directory in each storage bucket; The used capacity of the target directory in the cluster and the quota threshold are output.

5. The method according to claim 1, characterized in that The method further comprises: Sending the used capacity of the target directory and the quota threshold to a marking device, so that the marking device provides a quota view of the target directory according to the quota threshold and the used capacity; or, periodically determining the used capacity of the target directory; The used capacity is sent to a marking device so that the marking device provides a quota view of the target directory according to the used capacity of the target directory and a quota threshold determined by the marking device itself.

6. The method according to claim 1, characterized in that The method further comprises: Obtain the used capacity of all subdirectories under the parent directory of the target directory; When it is determined that the data of each subdirectory is unbalanced according to the used capacity of all subdirectories, the quota threshold of each subdirectory is obtained; The quota threshold of the target directory is adjusted according to the used capacity and quota threshold of each subdirectory.

7. A daemon device, characterized in that: For symmetric storage cluster directory quota management, the device includes: A first receiving module, configured to, when receiving a first operation instruction for setting a quota threshold of a cluster directory, determine a target directory and the quota threshold corresponding to the first operation instruction; A first determination module, configured to determine the used capacity of the target directory in the cluster; A second determination module determines a target quota of the target directory in each storage bucket under each execution module according to the used capacity of the target directory in the cluster and the quota threshold; The first sending module is used to send the target quota to each execution module, so that the file system of each storage bucket under each execution module updates the quota of the target directory according to the target quota; the file system represents the local file system of the storage bucket itself; wherein, The execution module is used to receive metadata sent by each storage bucket under the execution module, and determine the used capacity of the target directory in each storage bucket according to the metadata; the execution module is also used to send the target quota to each storage bucket under the execution module.

8. A symmetric storage cluster directory quota management system, characterized in that: The system comprises: A daemon device, configured to, when receiving a first operation instruction for setting a quota threshold of a cluster directory, determine a target directory and the quota threshold corresponding to the first operation instruction; determine a used capacity of the target directory in the cluster; determine a target quota of the target directory in each storage bucket under each execution device according to the used capacity of the target directory in the cluster and the quota threshold; and send the target quota to each execution device; Each execution device is used to receive the target quota and send the target quota to each storage bucket, so that the file system of each storage bucket updates the quota of the target directory according to the target quota; the file system represents the local file system of the storage bucket itself; Each execution device is also used to receive metadata sent by each storage bucket under the execution device, and determine the used capacity of the target directory in each storage bucket according to the metadata.

9. The system according to claim 8, characterized in that The system further comprises: The input device is used to send a first operation instruction for setting a quota threshold of the cluster directory to the daemon process device in response to an input operation of a user.

10. The system according to claim 8, characterized in that The system further comprises: a marking device, configured to obtain the used capacity and the quota threshold of the target directory in the cluster from a daemon device, so as to provide a quota view of the target directory according to the quota threshold and the used capacity; or, The system is used for periodically obtaining the used capacity of the target directory in the cluster from the daemon device and the quota threshold determined by itself to provide a quota view of the target directory.

11. The system according to claim 10, characterized in that The marking device is also used to determine whether the ratio of the used capacity of the target directory in the cluster to the quota threshold meets the preset conditions when receiving a read-write stream that changes the file size in the target directory. When the ratio of the used capacity of the target directory in the cluster to the quota threshold meets the preset conditions, the read-write stream is directly written into the storage bucket.

12. The system according to claim 11, characterized in that The marking device is also used to determine whether the difference between the capacity of the read-write stream and the available capacity of the target directory is less than 0 when the ratio of the used capacity of the target directory of the cluster to the quota threshold does not meet a preset condition; when the difference between the capacity of the read-write stream and the available capacity of the cluster is less than 0, write the read-write stream into the storage bucket.

13. A computer-readable storage medium, wherein the computer storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute the steps of the symmetric storage cluster directory quota management method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for storing data

    CN103064639A