CN107391045B - Directory space quota method and system - Google Patents

Directory space quota method and system Download PDF

Info

Publication number
CN107391045B
CN107391045B CN201710647358.7A CN201710647358A CN107391045B CN 107391045 B CN107391045 B CN 107391045B CN 201710647358 A CN201710647358 A CN 201710647358A CN 107391045 B CN107391045 B CN 107391045B
Authority
CN
China
Prior art keywords
space
directory
quota
target directory
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710647358.7A
Other languages
Chinese (zh)
Other versions
CN107391045A (en
Inventor
李旭东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710647358.7A priority Critical patent/CN107391045B/en
Publication of CN107391045A publication Critical patent/CN107391045A/en
Application granted granted Critical
Publication of CN107391045B publication Critical patent/CN107391045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

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

Abstract

The application discloses a directory space quota method, which comprises the following steps: when a data operation instruction aiming at a current target directory is received, determining the size of the local space allowance of the target directory to obtain a first numerical value, and determining the size of the directory space required by the data operation instruction to obtain a second numerical value; and judging whether the first numerical value is greater than or equal to the second numerical value, if so, executing the data operation instruction, and if not, applying a quota space for the target directory from a metadata server to perform corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction. By the directory space quota method, the quota of the directory space can be accurately carried out when the multiple clients carry out the operation of the directory. In addition, the application also correspondingly discloses a directory space quota system.

Description

Directory space quota method and system
Technical Field
The present invention relates to distributed file system technologies, and in particular, to a target space quota method and system.
Background
Distributed file systems are widely used in enterprise storage and management of files, for example, using ceph distributed file systems.
In the prior art, implementation means for quota of directory space capacity in a distributed file system is simple, and space usage is distributed depending on a metadata server of a directory when the directory performs data operation. In a distributed file system, generally, a client is used to operate a directory in the system, and if the directory needs more space to perform data operation during operation, a quota space needs to be acquired from a metadata server.
However, due to the separation of the client and the metadata service, there is hysteresis in the information of the requested quota space, and when multiple clients request space quotas for the operated directories, the total quota of the requested space may exceed the space of the metadata server, which may cause an error and may not accurately perform quota of the directory space.
Disclosure of Invention
In view of the above, the present invention provides a method and a system for quota allocation of directory space, so as to implement accurate quota allocation of directory space when a plurality of clients perform operations on a directory. The specific scheme is as follows:
a directory space quota method:
when a data operation instruction aiming at a current target directory is received, determining the size of the local space allowance of the target directory to obtain a first numerical value, and determining the size of the directory space required by the data operation instruction to obtain a second numerical value;
and judging whether the first numerical value is greater than or equal to the second numerical value, if so, executing the data operation instruction, and if not, applying a quota space for the target directory from a metadata server to perform corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction.
Preferably, the data operation instruction includes:
data write instructions and/or modify file size instructions and/or file rename instructions and/or truncate create file instructions and/or change property group instructions.
Preferably, the process of applying for a quota space for the target directory from the metadata server includes:
and applying for a quota space with a space size consistent with the second value for the target directory from the metadata server.
Preferably, the method further comprises the following steps:
after the instruction is executed, updating a space value in the target directory extension attribute;
and after the instruction execution is finished, updating the space usage amount in the metadata server.
Preferably, the method further comprises the following steps:
and when receiving a data operation instruction aiming at the current target directory, judging whether the space quota function of the target directory is started, and if not, directly executing the data operation instruction.
Preferably, the process of performing corresponding capacity expansion processing on the local space of the target directory according to the quota space includes:
adding the first numerical value and the space size of the quota space to obtain a third numerical value;
determining a minimum space threshold and a maximum space threshold of the target directory space;
and judging whether the third numerical value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, if so, performing corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space.
Preferably, the process of determining the minimum space threshold and the maximum space threshold of the target directory space includes:
traversing all the sub-directories of a target parent directory to obtain the space values of all the sub-directories, wherein the target parent directory is the parent directory of the target directory;
subtracting the space values of other sub-directories except the target directory in all the sub-directories by using the space value of the target parent directory to obtain the maximum space threshold;
and traversing the subdirectories of the target directory, and calculating the sum of the space values of all the subdirectories of the target directory to obtain the minimum space threshold.
The invention also discloses a directory space quota system, comprising:
the data operation instruction receiving module is used for determining the local space allowance size of the target directory to obtain a first numerical value and determining the directory space size required by the data operation instruction to obtain a second numerical value when receiving the data operation instruction aiming at the current target directory;
and the quota application module is used for judging whether the first numerical value is greater than or equal to the second numerical value, executing the data operation instruction if the first numerical value is greater than or equal to the second numerical value, applying for a quota space for the target directory from the metadata server if the first numerical value is not greater than the second numerical value, performing corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction.
Preferably, the method further comprises the following steps:
and the quota function judging module is used for judging whether the space quota function of the target directory is started or not when receiving the data operation instruction aiming at the current target directory, and directly executing the data operation instruction if the space quota function of the target directory is not started.
Preferably, the system further comprises a quota module, wherein the quota module comprises:
a third numerical value calculation unit, configured to add the first numerical value and the space size of the quota space to obtain a third numerical value;
a threshold calculation module for determining a minimum space threshold and a maximum space threshold of the target directory space;
and the third numerical value judging unit is used for judging whether the third numerical value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, and if so, performing corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space.
In the invention, the directory space quota method comprises the following steps: when a data operation instruction aiming at the current target directory is received, determining the local space allowance size of the target directory to obtain a first numerical value, and determining the directory space size required by the data operation instruction to obtain a second numerical value; and judging whether the first numerical value is larger than or equal to the second numerical value, if so, executing the data operation instruction, otherwise, applying a quota space for the target directory from the metadata server, performing corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction. Therefore, before the quota on the directory space, the invention detects whether the allowance of the directory space can complete the operation of the instruction in advance, thereby saving unnecessary space quota and performing quota more accurately when a plurality of clients use the quota function. When the catalog needs quota, a quota space is applied to the metadata server in an application mode, a subsequent metadata server can perform space quota according to the application, and when the quota is used by multiple clients, the problem that the total quota space exceeds the space of the metadata server to cause errors can be avoided. In general, by using the directory space quota method provided by the invention, the quota of the directory space can be accurately performed when a plurality of clients perform the operation of the directory.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a directory space quota method disclosed in an embodiment of the present invention;
fig. 2 is a flowchart of a specific directory space quota method disclosed in the embodiment of the present invention;
fig. 3 is a flowchart of a process of performing corresponding capacity expansion processing on a local space of a target directory according to a quota space, disclosed in the embodiment of the present invention;
FIG. 4 is a flowchart illustrating a process for determining a minimum space threshold and a maximum space threshold for a target directory space according to an embodiment of the present invention;
fig. 5 is a diagram of a directory space quota system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a directory space quota method, which is shown in figure 1 and comprises the following steps:
step S11: when a data operation instruction aiming at the current target directory is received, determining the local space allowance size of the target directory to obtain a first numerical value, and determining the directory space size required by the data operation instruction to obtain a second numerical value.
In the embodiment of the present invention, the target directory refers to a directory stored in a distributed file system, for example, a directory stored in a ceph distributed file system, where the directory has a multi-hierarchy characteristic, and a directory may have many child nodes and a parent node. The data operation instruction is sent by a client connected with the distributed file system, namely, the client sends the operation instruction to control when the data operation is carried out on the directory.
On the distributed file system, each directory has a specified space for storing data, and is a local space of the directory, the size information of the local space of the directory is marked in the extended attribute of the directory, and is sent to each client, so that the client can know the information of the size of the directory space in the distributed file system.
When the client performs the operation on the directory and the data in the directory through the operation instruction, the space for storing the data may be occupied, so that the space that can be stored is reduced, that is, the local space margin of the directory is reduced, for example, a newly added picture with a size of 80 is stored in a directory with a specified space size of 100, at this time, the storage space of the directory is reduced, and the margin is 20.
Step S12: and judging whether the first numerical value is larger than or equal to the second numerical value, if so, executing the data operation instruction, otherwise, applying a quota space for the target directory from the metadata server, performing corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction.
As can be seen from the above step S11, the first value refers to the size of the local space margin of the target directory, and the second value is the size of the directory space required by the data operation command, so the purpose of determining whether the first value is greater than the second value is to determine whether the local space of the target directory can support the completion of the operation command, for example, when the local space margin of the target directory is 20, and the target directory is to perform an operation of storing a picture with the size of 80, the target directory cannot complete the current operation, and therefore the capacity expansion process needs to be performed on the space of the target directory.
In the embodiment of the present invention, the metadata server has a main function of managing and organizing the space in the distributed file system, and the metadata server records information of used space and unused space in the current distributed file system, where the information of the unused space is used as the usage amount of the quota. The metadata server can expand the size of the directory space in the distributed file system, that is, the metadata server increases the directory space by using the usage of quota.
Therefore, before the quota on the directory space, the invention detects whether the allowance of the directory space can complete the operation of the instruction in advance, thereby saving unnecessary space quota and performing quota more accurately when a plurality of clients use the quota function. When the catalog needs quota, a quota space is applied to the metadata server in an application mode, a subsequent metadata server can perform space quota according to the application, and when the quota is used by multiple clients, the problem that the total quota space exceeds the space of the metadata server to cause errors can be avoided. In general, by using the directory space quota method provided by the invention, the quota of the directory space can be accurately performed when a plurality of clients perform the operation of the directory.
The embodiment of the present invention discloses a specific directory space quota method, and as shown in fig. 2, compared with the previous embodiment, this embodiment further describes and optimizes the technical solution. Specifically, the method comprises the following steps:
step S21: and when receiving a data operation instruction aiming at the current target directory, judging whether the space quota function of the target directory is started, and if not, directly executing the data operation instruction.
In the embodiment of the invention, when the directory is created in the distributed file system, a quota function can be started for the newly created directory, so that when the directory is operated, if the local space allowance of the directory is insufficient, a quota space can be applied. The function of opening quota for the directory is mainly to limit the size of storage space occupied by the directory in the distributed file system, that is, the size of the space can be uniformly divided by the directory in the distributed file management system, the quota function is opened, and quota is applied when capacity expansion is needed, so that the space can be more efficiently divided and used.
Certainly, some important directories may exist in the distributed file system, and the distributed file system is not divided into a predetermined space size, that is, the directory is given an authority to occupy a storage space indefinitely, so that a quota function does not need to be started, and when data operation can be directly performed on the directory, a quota space does not need to be applied.
Step S22: when a data operation instruction aiming at the current target directory is received, determining the local space allowance size of the target directory to obtain a first numerical value, and determining the directory space size required by the data operation instruction to obtain a second numerical value.
Step S23: and judging whether the first numerical value is larger than or equal to the second numerical value, if so, executing the data operation instruction, otherwise, applying a quota space for the target directory from the metadata server, performing corresponding capacity expansion processing on the local space of the target directory according to the quota space, and then executing the data operation instruction.
The process of applying for a quota space for a target directory from a metadata server includes:
and applying a quota space with the space size consistent with the second value for the target directory from the metadata server.
In the embodiment of the present invention, the quota space applied to the metadata base for the target directory may be a space that can just support completion of the operation instruction, and the size of the quota space is consistent with the second value. Of course, the size of the quota space may be preset in the metadata server, that is, a fixed space is divided in the metadata server, and the quota space is called after the metadata server receives the application.
Step S24: and after the instruction execution is finished, updating the space value in the target directory extension attribute.
In the embodiment of the present invention, when performing data operation on a target directory and completing the operation, that is, after an operation instruction is executed, if the target directory uses quota empty energy to expand a local space in the process of completing the operation instruction, a space value of an extended attribute in the target directory needs to be updated, where the extended attribute refers to information of the directory, such as a creation date of the directory, a size of the local space, and the like. The spatial value of the extended attribute in the target directory is updated to intuitively describe the size information of the directory.
Step S25: when the execution of the instruction is completed, the usage of space in the metadata server is updated.
In the embodiment of the present invention, when data operation is performed on a target directory and the operation is completed, that is, after an operation instruction is executed, if the target directory uses quota empty energy to expand a local space in the process of completing the operation instruction, and accordingly, a quota-capable space in a metadata server is reduced, a space usage in the metadata server needs to be updated, where the space usage refers to a usage of a storage space of a whole distributed file system, and the storage space of the distributed file system is organized and managed by the metadata server.
It should be noted that the data operation instruction includes: data write instructions and/or modify file size instructions and/or file rename instructions and/or truncate create file instructions and/or change property group instructions.
The data operation instruction may be issued by a client connected to the distributed file system, that is, when performing a data operation on the directory, the client sends the operation instruction to control the data operation. For example, a data write command refers to writing data into a directory, such as writing picture data and video data, and therefore, a data operation command needs to be supported by a local space of the directory.
The embodiment of the invention discloses another specific directory space quota method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Specifically, the method comprises the following steps:
a process of performing corresponding capacity expansion processing on the local space of the target directory according to the quota space, as shown in fig. 3, includes:
step S31: and adding the first numerical value and the space size of the quota space to obtain a third numerical value.
In the embodiment of the present invention, adding the first value, that is, the size of the local space of the target directory, and the size of the quota space is an operation process, after the addition, the quota space is not added to the local space for capacity expansion, and a third value obtained in the operation process is used to perform a judgment process of a next step. The addition process may be implemented using a computing program in a distributed file system.
At step S32, a minimum space threshold and a maximum space threshold for the target directory space are determined.
In the embodiment of the invention, the space of the target directory is required to satisfy a certain relationship when the distributed file system performs hierarchical layering on the directory and divides the size of the local space, so that the size of the space of the target directory also needs to be satisfied within a specified range after the target space obtains a quota for matching the space. Therefore, a minimum space threshold and a maximum space threshold of the target directory space need to be determined, and errors caused by the fact that the relationship is not satisfied after the quota space is obtained are avoided.
Step S33: and judging whether the third value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, if so, performing corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space.
In the embodiment of the present invention, the third value is a value of the local space size of the target directory after quota application, and at this time, the target directory does not actually complete the quota, and it is further necessary to determine whether the local space size of the target directory after quota application meets a specified range, and then complete the quota, so that the determination process can be performed by using the third value obtained by operation in the above step.
In step S32, the process of determining the minimum space threshold and the maximum space threshold of the target directory space, as shown in fig. 4, includes:
step S41: and traversing all the sub-directories of the target parent directory to obtain the space values of all the sub-directories, wherein the target parent directory is the parent directory of the target directory.
In the embodiment of the present invention, the traversal process may be implemented by a traversal program, for example, in a distributed file system, the traversal program is used to search all directories in the file system, find out a parent directory of a target directory, and count information of all sub directories of the target parent directory.
Step S42: and subtracting the space values of other sub-directories except the target directory in all the sub-directories by using the space value of the target parent directory to obtain a maximum space threshold value.
When the sub-directories are divided under the target parent directory, the division can be completed as long as the conditions that the space of the sub-directory is less than or equal to the space of the parent directory, the space of all the sub-directories is less than or equal to the space of the parent directory are met, namely, the other sub-directories except the target directory are removed from the target parent directory, and the maximum space which can be divided by the target directory can be obtained, namely, a maximum space threshold which can be reached by the local space after the target directory is subjected to quota.
Step S43: and traversing the subdirectories of the target directory, and calculating the sum of the space values of all the subdirectories of the target directory to obtain the minimum space threshold value.
Similarly, to obtain a minimum space threshold that the local space can reach after the target directory is subjected to quota, the size of all the subdirectory spaces divided under the target directory need only be added, and the target directory can be obtained.
The embodiment of the invention discloses a directory space quota system, which is shown in fig. 5 and comprises:
the data operation instruction receiving module 11 is configured to, when receiving a data operation instruction for a current target directory, determine a local space allowance size of the target directory to obtain a first numerical value, and determine a directory space size required by the data operation instruction to obtain a second numerical value;
and the quota applying module 12 is configured to determine whether the first value is greater than or equal to the second value, if so, execute the data operation instruction, and if not, apply for a quota space for the target directory from the metadata server, perform corresponding capacity expansion processing on a local space of the target directory according to the quota space, and then execute the data operation instruction.
The system of the embodiment of the invention further comprises:
and the quota function judging module is used for judging whether the space quota function of the target directory is started or not when receiving the data operation instruction aiming at the current target directory, and directly executing the data operation instruction if the space quota function of the target directory is not started.
The system of the embodiment of the invention further comprises a quota module, wherein the quota module comprises:
and the third numerical value calculation unit is used for adding the first numerical value and the space size of the quota space to obtain a third numerical value.
And the threshold value calculation module is used for determining a minimum space threshold value and a maximum space threshold value of the target directory space.
And the third value judging unit is used for judging whether the third value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, and if so, performing corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space.
For more detailed working processes of the modules and the units, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and system for quota of directory space provided by the present invention are described in detail above, and the principle and implementation of the present invention are explained herein by applying specific examples, and the description of the above embodiments is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. A method for quota on directory space, comprising:
when a data operation instruction aiming at a current target directory is received, determining the size of the local space allowance of the target directory to obtain a first numerical value, and determining the size of the directory space required by the data operation instruction to obtain a second numerical value;
judging whether the first numerical value is larger than or equal to the second numerical value, if so, executing the data operation instruction, and if not, applying a quota space for the target directory from a metadata server to perform corresponding capacity expansion processing on a local space of the target directory according to the quota space, and then executing the data operation instruction;
wherein, the process of applying for a quota space for the target directory from the metadata server includes:
applying a quota space with the space size consistent with the second value for the target directory from the metadata server;
and, the process of performing corresponding capacity expansion processing on the local space of the target directory according to the quota space includes:
adding the space size of the target directory and the space size of the quota space to obtain a third numerical value; determining a minimum space threshold and a maximum space threshold of the target directory space; judging whether the third value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, if so, performing corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space;
and, the process of determining the minimum space threshold and the maximum space threshold of the target directory space includes:
traversing all the sub-directories of a target parent directory to obtain the space values of all the sub-directories, wherein the target parent directory is the parent directory of the target directory; subtracting the space values of other sub-directories except the target directory in all the sub-directories by using the space value of the target parent directory to obtain the maximum space threshold; and traversing the subdirectories of the target directory, and calculating the sum of the space values of all the subdirectories of the target directory to obtain the minimum space threshold.
2. The method of claim 1, wherein the data manipulation instruction comprises:
data write instructions and/or modify file size instructions and/or file rename instructions and/or truncate create file instructions and/or change property group instructions.
3. The method of claim 1, further comprising:
after the instruction is executed, updating a space value in the target directory extension attribute;
and after the instruction execution is finished, updating the space usage amount in the metadata server.
4. The method of claim 1, further comprising:
and when receiving a data operation instruction aiming at the current target directory, judging whether the space quota function of the target directory is started, and if not, directly executing the data operation instruction.
5. A directory space quota system, comprising:
the data operation instruction receiving module is used for determining the local space allowance size of the target directory to obtain a first numerical value and determining the directory space size required by the data operation instruction to obtain a second numerical value when receiving the data operation instruction aiming at the current target directory;
a quota application module, configured to determine whether the first value is greater than or equal to the second value, if so, execute the data operation instruction, and if not, apply for a quota space for the target directory from a metadata server, so as to perform corresponding capacity expansion processing on a local space of the target directory according to the quota space, and then execute the data operation instruction;
the quota application module is specifically configured to:
applying a quota space with the space size consistent with the second value for the target directory from the metadata server;
and, the system further includes a quota module, the quota module comprising:
a third numerical value calculation unit, configured to add the space size of the target directory and the space size of the quota space to obtain a third numerical value;
a threshold calculation module for determining a minimum space threshold and a maximum space threshold of the target directory space;
a third value determining unit, configured to determine whether the third value is greater than or equal to the minimum space threshold and less than or equal to the maximum space threshold, and if so, perform corresponding capacity expansion processing on the local space of the target directory in the metadata server according to the quota space;
and the threshold calculation module is specifically configured to: traversing all the sub-directories of a target parent directory to obtain the space values of all the sub-directories, wherein the target parent directory is the parent directory of the target directory; subtracting the space values of other sub-directories except the target directory in all the sub-directories by using the space value of the target parent directory to obtain the maximum space threshold; and traversing the subdirectories of the target directory, and calculating the sum of the space values of all the subdirectories of the target directory to obtain the minimum space threshold.
6. The system of claim 5, further comprising:
and the quota function judging module is used for judging whether the space quota function of the target directory is started or not when receiving the data operation instruction aiming at the current target directory, and directly executing the data operation instruction if the space quota function of the target directory is not started.
CN201710647358.7A 2017-08-01 2017-08-01 Directory space quota method and system Active CN107391045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710647358.7A CN107391045B (en) 2017-08-01 2017-08-01 Directory space quota method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710647358.7A CN107391045B (en) 2017-08-01 2017-08-01 Directory space quota method and system

Publications (2)

Publication Number Publication Date
CN107391045A CN107391045A (en) 2017-11-24
CN107391045B true CN107391045B (en) 2021-02-19

Family

ID=60344606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710647358.7A Active CN107391045B (en) 2017-08-01 2017-08-01 Directory space quota method and system

Country Status (1)

Country Link
CN (1) CN107391045B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196787B (en) * 2017-12-21 2021-04-13 北京鲸鲨软件科技有限公司 Quota management method of cluster storage system and cluster storage system
CN108073723A (en) * 2018-01-03 2018-05-25 郑州云海信息技术有限公司 A kind of file in distributed type assemblies storage is from compressing method and equipment
CN109388614A (en) * 2018-09-27 2019-02-26 郑州云海信息技术有限公司 A kind of method, system and the equipment of catalogue file number quota
CN110674102A (en) * 2019-09-29 2020-01-10 北京浪潮数据技术有限公司 Method, system, device and storage medium for distributed file system directory quota
CN110795041A (en) * 2019-10-28 2020-02-14 柏科数据技术(深圳)股份有限公司 Quota method, quota device, server and storage medium of distributed file system
CN113076063B (en) * 2021-04-01 2023-01-06 山东英信计算机技术有限公司 Directory quota pre-application method, system, storage medium and equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064639A (en) * 2012-12-28 2013-04-24 华为技术有限公司 Method and device for storing data

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855093B (en) * 2012-08-16 2015-05-13 浪潮(北京)电子信息产业有限公司 System and method for realizing automatic thin provisioning dynamic capacity expansion of storage system
CN105468989B (en) * 2014-09-04 2018-10-12 中国石油化工股份有限公司 Cloud storage quota management method based on linux kernel monitoring
CN105072602A (en) * 2015-07-14 2015-11-18 深圳市斯凯荣科技有限公司 SIM/USIM distribution system, and card distribution, card release and card switching methods thereof
CN105159968A (en) * 2015-08-25 2015-12-16 浪潮(北京)电子信息产业有限公司 Directory management method for file system and client
CN106815232A (en) * 2015-11-27 2017-06-09 华为技术有限公司 Catalog management method, apparatus and system
CN106210026B (en) * 2016-07-05 2019-06-18 浪潮(北京)电子信息产业有限公司 The control method and system of distributed file system multi-client catalogue quota precision
CN106569741A (en) * 2016-10-18 2017-04-19 汉柏科技有限公司 Disk space expansion method and apparatus
CN106897442A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 A kind of distributed file system user quota method for pre-distributing and distribution system
CN106899676A (en) * 2017-02-28 2017-06-27 郑州云海信息技术有限公司 A kind of multi-client writes catalogue quota allotment approach

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064639A (en) * 2012-12-28 2013-04-24 华为技术有限公司 Method and device for storing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
有容乃大,Win 8平板"扩容"技巧;友文;《数字化生活》;20150930;全文 *

Also Published As

Publication number Publication date
CN107391045A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107391045B (en) Directory space quota method and system
US11799959B2 (en) Data processing method, apparatus, and system
US10896102B2 (en) Implementing secure communication in a distributed computing system
US10642694B2 (en) Monitoring containers in a distributed computing system
US7765189B2 (en) Data migration apparatus, method, and program for data stored in a distributed manner
CN102169507B (en) Implementation method of distributed real-time search engine
CN108196787B (en) Quota management method of cluster storage system and cluster storage system
CN103229173A (en) Metadata management method and system
CN109446177B (en) Method and device for realizing number quota of directory files of distributed file system
CN103605585A (en) Intelligent backup method based on data discovery
WO2020215580A1 (en) Distributed global data deduplication method and device
US20170109376A1 (en) Method for managing data using in-memory database and apparatus thereof
CN108255928A (en) Distributed system method for reading data and device
CN107506150A (en) Distributed storage devices, delete, write again, deleting, read method and system
CN113805816A (en) Disk space management method, device, equipment and storage medium
CN111382142B (en) Database operation method, server and computer storage medium
CN113157600A (en) Space allocation method of shingled hard disk, file storage system and server
CN109508140B (en) Storage resource management method and device, electronic equipment and system
CN115617577A (en) Virtual disk backup method, device, equipment and medium
CN115328859A (en) Metadata access method, device, equipment and medium
CN115562590A (en) Method, system, equipment and storage medium for using cloud hard disk by cloud host
CN111190863B (en) Catalog management method, device, equipment and medium
CN109213444A (en) File memory method and device, storage medium, terminal
CN114579061A (en) Data storage method, device, equipment and medium
CN108376104B (en) Node scheduling method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210105

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: Room 1601, floor 16, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant