CN103064639B - Date storage method and device - Google Patents

Date storage method and device Download PDF

Info

Publication number
CN103064639B
CN103064639B CN201210587373.4A CN201210587373A CN103064639B CN 103064639 B CN103064639 B CN 103064639B CN 201210587373 A CN201210587373 A CN 201210587373A CN 103064639 B CN103064639 B CN 103064639B
Authority
CN
China
Prior art keywords
file destination
quota
data
written
described file
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
CN201210587373.4A
Other languages
Chinese (zh)
Other versions
CN103064639A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210587373.4A priority Critical patent/CN103064639B/en
Publication of CN103064639A publication Critical patent/CN103064639A/en
Application granted granted Critical
Publication of CN103064639B publication Critical patent/CN103064639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of date storage method and device, relate to technical field of data storage.The method includes: receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;Judge whether the size of the data of described described file destination to be written meets the size of remaining space in quota object set;When the size of the data of described described file destination to be written is less than the size of remaining space in quota object set, the data of described described file destination to be written being write in the object of described file destination, described quota object set is for the specified quota of administrative directory.The method and device that the embodiment of the present invention provides is suitable for that memory space is very big, it is more to run type of service and needs the storage system of more flexible quota control way to manage.

Description

Date storage method and device
Technical field
The present invention relates to technical field of data storage, particularly relate to a kind of date storage method and device.
Background technology
Along with high-performance calculation is developed to networking cluster by traditional host mode, traditional Host Based storage architecture is the most gradually to networking storage development, and the trend calculating and storing separation is more and more obvious.Object storage file system can effectively combine storage area network (SAN) and the advantage of network attached storage (NAS) system, support directly to access disk to improve performance, and carry out streamlining management by shared file and metadata, it is all significantly increased at aspects such as extensibility, performance, ease for use, along with the continuous maturation of networking memory technology, object storage file system has become important developing direction.
To liking the ultimate unit of data storage in object storage file system, one object is actually file data and the combination of one group of attribute, these attributes can define raid-array (RedundantArrayofInexpensiveDisks based on file, RAID) parameter, data distribution and service quality etc., object by safeguarding the attribute of oneself with storage system communication.In storage device, all objects have an object identity, by this object of object identity command access.
Quota is an optional function of operating system, and it allows manager to limit and is dispatched to user or disk space size that catalogue is used, to prevent certain user or catalogue from taking the most available disk space.When user copies in disk partition or stores a new file, he just has the proprietary rights to this file, at this moment the size of this file is just counted the Disk Quotas space of this user by Disk Quotas program.
User is typically limited in terms of " taking disk size " and " quantity of All Files " two by traditional Disk Quotas mechanism.The number of blocks at most used in subregion by arranging user just can reach to control the purpose that disk takies, it is impossible to the quota control being correlated with catalogue.And the memory space of file system management in the last few years constantly increases.Particularly in distributed memory system, the most a set of storage system can manage the memory space of tens of petabyte (Petabyte, PB), can run multiple business above.Therefore the control to quota needs the abundantest, and the quotas administered motility of single user class is relatively low, cannot meet the quotas administered demand of modern file system.
Summary of the invention
In view of this, the invention provides a kind of date storage method and device, it is adaptable to very big for memory space, to run type of service more and need the storage system of more flexible quota control way to manage.
In order to solve the problems referred to above, first aspect, embodiments provide a kind of date storage method, including:
Receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
Judging whether the size of the data of described described file destination to be written meets the size of the remaining space of quota object set record, described quota object set is for the specified quota of administrative directory;
When the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record, the data of described described file destination to be written are write in the object of described file destination.
In conjunction with first aspect, in the first implementation, described file destination is made up of the object setting quantity;
The object that the data of described described file destination to be written write described file destination is included:
In the object of the corresponding size that the data of described described file destination to be written are write described file destination by the size of the data according to described described file destination to be written.
In conjunction with first aspect, in the second implementation, described file destination is made up of the object of preseting length;
The object that the data of described described file destination to be written write described file destination is included:
Create the object that the data of described described file destination to be written are corresponding, and in the object created, write the data of described described file destination to be written;
Judge whether the length of the data written into described file destination reaches the preseting length of described object;
When the length of the data written into described file destination reaches the preseting length of described object, continue to create the object corresponding to data of described described file destination to be written until the data of described described file destination to be written are all write described file destination.
In conjunction with any one in the above-mentioned implementation of first aspect or first aspect, in the third implementation, before receiving the write request to file destination, also include:
Receive the request that target directory is carried out quota control;
According to the described request that target directory is carried out quota control, specified quota is set for described target directory and creates quota object set, described quota object set have recorded statistical information that the object that under described target directory, All Files and subdirectory have used takes up room, object and file and the belonging relation of subdirectory and described target directory and the belonging relation of all subdirectories thereof;
Check whether described target directory is empty, and not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
In conjunction with the third implementation of first aspect, in the 4th kind of implementation, also include:
Receiving the request of removal target directory, described target directory is included in the catalogue with specified quota;
In corresponding quota object set, search all relevant objects of described target directory, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, reclaim taking up room of described target directory.
The 3rd or the 4th kind of implementation in conjunction with first aspect, in the 5th kind of implementation, described quota object set includes object allocation table and form of catalogue relation table, statistical information, object and file and the belonging relation of subdirectory that described object allocation table takes up room for recording the object that under described target directory, All Files and subdirectory have used;Described form of catalogue relation table is for recording described target directory and the belonging relation of all subdirectories thereof.
In conjunction with any one in the above-mentioned implementation of first aspect or first aspect, in the 6th kind of implementation, described quota object set includes at least two quota object subset, described quota object subset part quota in the specified quota of administrative directory.
Second aspect, embodiments provides a kind of data storage device, including:
Receiving unit, for receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
Judging unit, for judging whether the size of the data of described described file destination to be written meets the size of the remaining space of quota object set record, described quota object set is for the specified quota of administrative directory;
Memory element, is used for, when the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record, the data of described described file destination to be written being write in the object of described file destination.
In conjunction with second aspect, in the first implementation, in the object of the corresponding size that the data of described described file destination to be written are write described file destination by described memory element according to the size of the data of described described file destination to be written.
In conjunction with second aspect, in the second implementation, described memory element is additionally operable to create the object that the data of described described file destination to be written are corresponding, and writes the data of described described file destination to be written in the object created;
Described judging unit is additionally operable to judge the preseting length whether length of the data of described file destination to be written reaches described object;
Described memory element, when the length of the data of described file destination to be written reaches the preseting length of described object, continues to create the object corresponding to data of described described file destination to be written until the data of described described file destination to be written are all write described file destination.
In conjunction with any one in the above-mentioned implementation of second aspect or second aspect, in the third implementation,
Described reception unit is additionally operable to receive the request that target directory carries out quota control;
Described system also includes:
Quota control unit, for according to the described request that target directory carries out quota control, arranges specified quota for described target directory and creates quota object set;And at described target directory not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
In conjunction with the third implementation of second aspect, in the 4th kind of implementation,
Described reception unit is additionally operable to after receiving the write request to file destination also include receiving the request of removal file destination;
Described quota control unit is additionally operable to search all relevant objects of described file destination in described quota object set, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, reclaim taking up room of described file destination.
The method and device of the embodiment of the present invention carries out the storage of data on the premise of using quota object set to realize the management to catalogue quota of the object-based file system, is more suitable for that memory space is very big, it is more to run type of service and needs the storage system of more flexible quota control way to manage.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, further feature and the aspect of the present invention will be clear from.
Accompanying drawing explanation
The Figure of description of the part comprising in the description and constituting description together illustrates the exemplary embodiment of the present invention, feature and aspect with description, and for explaining the principle of the present invention.
Fig. 1 is the application scenarios schematic diagram of the method and device of the embodiment of the present invention;
Fig. 2 is the flow chart of a kind of date storage method of the embodiment of the present invention;
Fig. 3 is the flow chart of the another kind of date storage method of the embodiment of the present invention;
Fig. 4 be the embodiment of the present invention date storage method in the application schematic diagram of quota object set;
Fig. 5 is the object allocation table schematic diagram in the date storage method of the embodiment of the present invention;
Fig. 6 is that the catalogue relational representation in the date storage method of the embodiment of the present invention is intended to;
Fig. 7 is file destination date storage method schematic diagram of embodiment of the present invention when being made up of the object of preseting length;
Fig. 8 is file destination date storage method schematic diagram of embodiment of the present invention when being made up of the object of preseting length;
Fig. 9 is the flow chart of another date storage method of the embodiment of the present invention;
The another kind of application schematic diagram of quota object set in the date storage method of Figure 10 embodiment of the present invention;
Figure 11 is the structural representation of the data storage device of a kind of structure of the embodiment of the present invention;
Figure 12 is the structural representation of the data storage device of embodiment of the present invention another kind structure;
Figure 13 is the structural representation of the data storage device of another structure of the embodiment of the present invention.
Detailed description of the invention
Various exemplary embodiments, feature and the aspect of the present invention is described in detail below with reference to accompanying drawing.Reference identical in accompanying drawing represents the same or analogous element of function.Although the various aspects of embodiment shown in the drawings, but unless otherwise indicated, it is not necessary to accompanying drawing drawn to scale.
The most special word " exemplary " means " as example, embodiment or illustrative ".The here as any embodiment illustrated by " exemplary " should not necessarily be construed as preferred or advantageous over other embodiments.
It addition, in order to better illustrate the present invention, detailed description of the invention below gives numerous details.It will be appreciated by those skilled in the art that do not have these details, the present invention equally implements.In other example, known method, means, element and circuit are not described in detail, in order to highlight the purport of the present invention.
The application scenarios of the method for the embodiment of the present invention is object storage system, and in this object storage system, file system manager carries out quotas administered to the catalogue of file system, and in restriction file system, catalogue takes up room.This application scenarios is as shown in Figure 1.
In FIG, incoming end i.e. user terminal, any calculating equipment known to current techniques can be included, such as server, desk computer etc..Therein, being provided with operating system and other application programs, file system i.e. operates on incoming end, and the file operation (read-write etc.) of user is explained by file system, and communicate between meta data server with object storage server, complete asked operation.
Meta data server for providing the logical view of metadata, mainly file for incoming end, including file and the storage medium etc. corresponding to the membership credentials of catalogue, each file.
Object storage server (also referred to as object storage device (Object-basedStorageDevice, OSD) equipment using object that the data preserved are managed) is referred to, each object storage server is a smart machine, there are oneself storage medium and network system etc., it is responsible for the object of this locality, data are stored in magnetic track and the sector of the disk as storage medium by it, get up to constitute object by some magnetic tracks and sector combination, and outwardly provide the access to data by this object.Object is by user data, the physical location of the magnetic track of the disk constituting object) and attribute composition.
Storage medium is a part for object storage server, is used for storing data.
As in figure 2 it is shown, the date storage method that the embodiment of the present invention provides, including:
S201. receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
S202. judge whether the size of the data of described described file destination to be written meets the size of the remaining space of quota object set record;
S203. when the size of data of described described file destination to be written is less than the size of remaining space of quota object set record, the data of described described file destination to be written are write in the object of described file destination, described quota object set for the specified quota of administrative directory, wherein have recorded statistical information that the object that under described target directory, All Files and subdirectory have used takes up room, object and file and the belonging relation of subdirectory and described target directory and the belonging relation of all subdirectories thereof.
The method of the embodiment of the present invention carries out the storage of data on the premise of using quota object set to realize the management to catalogue quota of the object-based file system, be more suitable for very big for memory space, to run type of service more and need the storage system of more flexible quota control way to manage.
As it is shown on figure 3, in the method for the embodiment of the present invention, before step S201,
Also include:
S301. the request that target directory is carried out quota control is received;
S302. according to the described request that target directory is carried out quota control, specified quota is set for described target directory and creates quota object set;
S303. check whether described target directory is empty, and not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
This quota object set can carry out the management in the space of specified quota by some list structures to target directory, can quickly calculate the capacity moved into/move out when subdirectory is moved into/moved out.In the method for the embodiment of the present invention, this quota object set includes object allocation table and form of catalogue relation table, this object allocation table comprises following information: the statistical information that the object used in existing object allocation table takes up room, and object and file and the belonging relation of subdirectory.Wherein, if in the design of this document system, file is made up of some isometric objects, then this statistics taken up room can be reduced to number of objects statistics of variables;If in File system design, file is made up of the object setting quantity, then this statistics taken up room can be reduced to the statistics of object length.It should be noted that file can corresponding multiple objects, in the method for the embodiment of the present invention, the length of object represents that it is used for the size of the physical space of storage, namely represents the size of its data that may store.Generally, when file is made up of isometric object, the quantity of the object of composition this document is not limited;When file is made up of the object setting quantity, the length of the object of composition this document is not limited.
Record object can facilitate when catalogue moves with the belonging relation of file and subdirectory (ID of the parent directory that the most each object is corresponding), adds up the size in the space that its all objects used are occupied.Form of catalogue relation table have recorded the filiation information of each subdirectory in described target directory.Object allocation table and form of catalogue relation table can take various forms, and include but not limited to the different organizational forms such as data base, bitmap, B-tree.
As a example by the directory A (DIRA) shown in Fig. 4, the specified quota of 95G is set for it, and sets up the quota object set (content recorded take up room size be 24M) of 24M, the All Files under the catalogue managing and recording this 95G and subdirectory.File under this directory A is made up of the object of preseting length, therefore the statistics taken up room can will be reduced to number of objects statistics of variables, the object allocation table of such as this quota object set has 10000 objects of record and file and the designated space of the belonging relation of subdirectory, as shown in Figure 4,24 objects and file and the belonging relation of subdirectory have the most been have recorded.This is to the belonging relation of the object recorded in allocation table and file and subdirectory as shown in Figure 5.The form of catalogue relation table of this quota object set is as shown in Figure 6.
In the method for the embodiment of the present invention, will be provided with specified quota and establish the catalogue of quota object set and be hereinafter referred to as quota catalogue.When increasing file under quota catalogue newly or add content (writing data) in existing file, it is required to check whether object allocation table reaches quota restrictions (space is the fullest).If reaching quota restrictions, then refusal new content write, thus reach the purpose of quotas administered.When this quota catalogue has subdirectory to move out, need form of catalogue relation table is scanned, it is quickly found out relevant object and removes, filiation according to each catalogue described in this form of catalogue relation table, quickly count the size removing subdirectory, reclaim the space shared by related object, thus adjust the quota information of quota catalogue.
Tool speech, in step s 201, if this file destination is made up of the object of preseting length, namely size one timing of data that each object may store, the most as shown in Figure 7, in step S203, the step data of described described file destination to be written write in the object of described file destination specifically includes:
S701. for data creation to be written, there is the object of this preseting length equally, space that the object that record is created takies and with file and the belonging relation of subdirectory;
S702. in the object created, write data to be written;
S703. judge written into data whether reach this preseting length, if reaching, then perform step S704, otherwise, continue executing with step S702;
S704. judge that data to be written the most all write, if not writing, then return and perform step S701, continuing as data creation object to be written, if writing, then terminating.
Such as, the object being 1M by multiple corresponding memory spaces when file forms, and when needing the data writing 3M in file destination, needs for 3 objects of data creation to be written, to write the data of 1M in each object.
When increasing file destination, object-based file system performs step S701 in above-mentioned steps to step S704, the data that write file destination is corresponding.
In step s 201, if this file destination is made up of the object setting quantity, i.e. the length of object not necessarily time, the most as shown in Figure 8, in step S203, the step data of described described file destination to be written write in the object of described file destination specifically includes:
S801. judge that the object that described file destination is corresponding reaches to set quantity the most, the most then perform step S803, otherwise perform step S802;
S802. it is the object of data creation correspondence length to be written, and in the object that the data write that this is to be written is created;
S803. to the length of quota object set application change either objective object, a length of physical space corresponding to object made after changing of change is large enough to hold this data to be written;
S804. revise the length of described destination object, and the space that the destination object after record modification takies, be written into data and write this destination object.
Such as, when needing the data writing 3M in file destination, if the length constituting the object of file destination all can not meet the data that its corresponding physical space accommodates 3M the most again, then may select any object as destination object, change its length so that it is physical space corresponding after change is large enough to hold the data of this 3M.
In the method for the embodiment of the present invention, also include step as shown in Figure 9:
S901. receiving the request of removal target directory, shown target directory is included in the catalogue with specified quota;
S902. in corresponding quota object set, search all relevant objects of described target directory, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, add up and reclaim taking up room of target directory.
Wherein, step S902 may particularly include:
Recursive lookup form of catalogue relation table, finds the subdirectory of all target directories;
Search object allocation table, the size of statistics target directory, the object that all subdirectories are relevant is removed this object allocation table.
To sum up, the method for the embodiment of the present invention passes through form of catalogue relation table and object allocation table, can add up the space that under quota catalogue, under anyon catalogue, All Files takies, and accelerates the moving into of file in quota catalogue, operation of moving out.
Additionally, in order to avoid performance bottleneck, the quota object set in the method for the embodiment of the present invention can be Distributed Design, as shown in Figure 10, each quota object set includes at least two subset.Each subset is respectively used to record statistical information, object and file and/or the belonging relation etc. of subdirectory that the partial objects used under quota catalogue takes up room, and the quota corresponding to each subset can be identical or not all the same.As shown in Figure 10, each quota object subset includes an object allocation table;All quota object subset share a catalogue relation table.
As shown in figure 11, the embodiment of the present invention additionally provides a kind of data storage device 1100, and this device includes: receive unit 1110, judging unit 1120 and memory element 1130.
Wherein, unit 1110 is received for receiving the write request to file destination.The data of described described file destination to be written, for judging that described write request includes whether the size of the data of described file destination to be written meets the size of the remaining space of quota object set record, are write in the object of described file destination by judging unit 1120;Memory element 1130 is used for when the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record.
The device of the embodiment of the present invention carries out the storage of data on the premise of using quota object set to realize the management to catalogue quota of the object-based file system, be more suitable for very big for memory space, to run type of service more and need the storage system of more flexible quota control way to manage.
In addition, in the data storage device of the embodiment of the present invention, when file destination is made up of the object setting quantity, in the object of the corresponding size that the data of described described file destination to be written are write described file destination by memory element 1130 according to the size of the data of described described file destination to be written.When file destination is made up of the object of preseting length, memory element 1130 is additionally operable to create the object that the data of described described file destination to be written are corresponding, and writes the data of described described file destination to be written in the object created;Judging unit 1120 is additionally operable to judge the preseting length whether length of the data of described file destination to be written reaches described object;Memory element 1130, when the length of the data of described file destination to be written reaches the preseting length of described object, continues to create the object corresponding to data of described described file destination to be written until the data of described described file destination to be written are all write described file destination.
It is additionally operable to receive the request that target directory carries out quota control additionally, receive unit 1120.Now, as shown in figure 12, the data storage device 1200 of the another kind of structure of the embodiment of the present invention also includes quota control unit 1210 on the basis of each unit shown in Figure 11, for according to the described request that target directory is carried out quota control, arranging specified quota for described target directory and create quota object set;And at described target directory not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
Receive unit 1120 and be additionally operable to after receiving the write request to file destination also include receiving the request of removal file destination.Now, quota control unit 1210 is additionally operable to search all relevant objects of described file destination in described quota object set, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, reclaim taking up room of described file destination.
Such as the structural representation of another data storage device 1300 that Figure 13 provides for the embodiment of the present invention, this device is not implemented and limits by the specific embodiment of the invention.As shown in figure 13, this device 1300 may include that
Processor (processor) 1310, communication interface (CommunicationsInterface) 1320, memorizer (memory) 1330 and communication bus 1340.Wherein:
Processor 1310, communication interface 1320 and memorizer 1330 complete mutual communication by communication bus 1240.
Communication interface 1320, for the net element communication with such as client etc..
Processor 1310, is used for the program that performs 1332, specifically can perform the correlation step in the embodiment of the method shown in above-mentioned Fig. 2 to Fig. 9.
Specifically, program 1332 can include that program code, described program code include computer-managed instruction.
Processor 1310 is probably a central processor CPU, or specific integrated circuit ASIC(ApplicationSpecificIntegratedCircuit), or it is configured to implement one or more integrated circuits of the embodiment of the present invention.
Memorizer 1330, is used for program of depositing 1332.Memorizer 1330 may comprise high-speed RAM memorizer, it is also possible to also includes nonvolatile memory (non-volatilememory), for example, at least one disk memory.Program 1332 specifically may include that
Receiving unit, for receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
The data of described described file destination to be written, for judging that described write request includes whether the size of the data of described file destination to be written meets the size of the remaining space of quota object set record, are write in the object of described file destination by judging unit;
Memory element, is used for, when the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record, the data of described described file destination to be written being write in the object of described file destination.
In program 1332 each unit implement the corresponding units that may refer in Figure 10 to 11 illustrated embodiment, be not repeated herein.Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, the equipment of foregoing description and the specific works process of module, the corresponding process being referred in preceding method embodiment describes, do not repeats them here.
Those of ordinary skill in the art are it is to be appreciated that combine the unit of each example and the method step that the embodiments described herein describes, it is possible to being implemented in combination in of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use different methods to realize described function to each specifically should being used for, but this realization is it is not considered that beyond the scope of this invention.
If described function is using the form realization of SFU software functional unit and as independent production marketing or use, can be stored in a computer read/write memory medium.Based on such understanding, part or the part of this technical scheme that prior art is contributed by technical scheme the most in other words can embody with the form of software product, this computer software product is stored in a storage medium, including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium includes: the various media that can store program code such as USB flash disk, portable hard drive, read only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CDs.
Embodiment of above is merely to illustrate the present invention; and not limitation of the present invention; those of ordinary skill about technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; the technical scheme of the most all equivalents falls within scope of the invention, and the scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. a date storage method, it is characterised in that including:
Receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
Judge whether the size of the data of described described file destination to be written meets the size of the remaining space of quota object set record, described quota object set for the specified quota of administrative directory, have recorded statistical information that the object that under described catalogue, All Files and subdirectory have used takes up room, object and file and the belonging relation of subdirectory and described catalogue and the belonging relation of all subdirectories thereof in described quota object set;
When the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record, the data of described described file destination to be written are write in the object of described file destination,
Wherein, before receiving the write request to file destination, also include: receive the request that target directory is carried out quota control;
According to the described request that target directory is carried out quota control, specified quota is set for described target directory and creates described quota object set;
Check whether described target directory is empty, and not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
Method the most according to claim 1, it is characterised in that described file destination is made up of the object setting quantity;
The object that the data of described described file destination to be written write described file destination is included:
In the object of the corresponding size that the data of described described file destination to be written are write described file destination by the size of the data according to described described file destination to be written.
Method the most according to claim 1, it is characterised in that described file destination is made up of the object of preseting length;
The object that the data of described described file destination to be written write described file destination is included:
Create the object that the data of described described file destination to be written are corresponding, and in the object created, write the data of described described file destination to be written;
Judge whether the length of the data written into described file destination reaches the preseting length of described object;
When the length of the data written into described file destination reaches the preseting length of described object, continue to create the object corresponding to data of described described file destination to be written until the data of described described file destination to be written are all write described file destination.
4. according to the method described in claim 1, it is characterised in that also include:
Receiving the request of removal target directory, described target directory is included in the catalogue with specified quota;
In corresponding quota object set, search all relevant objects of described target directory, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, reclaim taking up room of described target directory.
Method the most according to claim 4, it is characterized in that, described quota object set includes object allocation table and form of catalogue relation table, statistical information, object and file and the belonging relation of subdirectory that described object allocation table takes up room for recording the object that under described target directory, All Files and subdirectory have used;Described form of catalogue relation table is for recording described target directory and the belonging relation of all subdirectories thereof.
Method the most according to any one of claim 1 to 5, it is characterised in that described quota object set includes at least two quota object subset, described quota object subset part quota in the specified quota of administrative directory.
7. a data storage device, it is characterised in that including:
Receiving unit, for receiving the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request includes the data of described file destination to be written;
Judging unit, for judging whether the size of the data of described described file destination to be written meets the size of the remaining space of quota object set record, described quota object set for the specified quota of administrative directory, have recorded statistical information that the object that under described catalogue, All Files and subdirectory have used takes up room, object and file and the belonging relation of subdirectory and described catalogue and the belonging relation of all subdirectories thereof in described quota object set;
Memory element, is used for, when the size of the remaining space that the size of the data of described described file destination to be written is less than quota object set record, the data of described described file destination to be written being write in the object of described file destination,
Wherein, described reception unit is additionally operable to receive the request that target directory carries out quota control;
Described device also includes:
Quota control unit, for according to the described request that target directory carries out quota control, arranges specified quota for described target directory and creates quota object set;And at described target directory not for traveling through described target directory, by the relevant information record of All Files and subdirectory under described target directory in described quota object set time empty.
Device the most according to claim 7, it is characterised in that in the object of the corresponding size that the data of described described file destination to be written are write described file destination by described memory element according to the size of the data of described described file destination to be written.
Device the most according to claim 7, it is characterised in that described memory element is additionally operable to create the object that the data of described described file destination to be written are corresponding, and writes the data of described described file destination to be written in the object created;
Described judging unit is additionally operable to judge the preseting length whether length of the data of described file destination to be written reaches described object;
Described memory element, when the length of the data of described file destination to be written reaches the preseting length of described object, continues to create the object corresponding to data of described described file destination to be written until the data of described described file destination to be written are all write described file destination.
10. according to the device described in claim 7, it is characterised in that
Described reception unit is additionally operable to after receiving the write request to file destination also include receiving the request of removal file destination;
Described quota control unit is additionally operable to search all relevant objects of described file destination in described quota object set, delete the data corresponding to all related objects, and delete all relevant objects record in described quota object set, reclaim taking up room of described file destination.
CN201210587373.4A 2012-12-28 2012-12-28 Date storage method and device Active CN103064639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210587373.4A CN103064639B (en) 2012-12-28 2012-12-28 Date storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210587373.4A CN103064639B (en) 2012-12-28 2012-12-28 Date storage method and device

Publications (2)

Publication Number Publication Date
CN103064639A CN103064639A (en) 2013-04-24
CN103064639B true CN103064639B (en) 2016-08-03

Family

ID=48107283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210587373.4A Active CN103064639B (en) 2012-12-28 2012-12-28 Date storage method and device

Country Status (1)

Country Link
CN (1) CN103064639B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500077B (en) * 2013-10-16 2016-08-10 北京国双科技有限公司 File memory method and device
WO2015109483A1 (en) * 2014-01-23 2015-07-30 华为技术有限公司 Data storage method and device
CN104158858A (en) * 2014-07-29 2014-11-19 浪潮(北京)电子信息产业有限公司 Method and system for accessing distributed cluster file system
CN105608089A (en) * 2014-11-19 2016-05-25 珠海金山办公软件有限公司 File storage method and device
CN104778016B (en) * 2015-04-23 2018-06-22 深圳市美贝壳科技有限公司 A kind of automatic storage controlling method under multiple storage devices environment
CN106815232A (en) * 2015-11-27 2017-06-09 华为技术有限公司 Catalog management method, apparatus and system
CN105677789A (en) * 2015-12-31 2016-06-15 浪潮(北京)电子信息产业有限公司 Method and system for managing directory capacity of distributed file system
CN106210026B (en) * 2016-07-05 2019-06-18 浪潮(北京)电子信息产业有限公司 The control method and system of distributed file system multi-client catalogue quota precision
CN107870874B (en) * 2016-09-23 2020-12-15 华为数字技术(成都)有限公司 Data write-in control method and storage device
CN107391045B (en) * 2017-08-01 2021-02-19 苏州浪潮智能科技有限公司 Directory space quota method and system
CN107506440A (en) * 2017-08-24 2017-12-22 郑州云海信息技术有限公司 A kind of quota method and device of distributed system catalogue
CN107562386A (en) * 2017-09-13 2018-01-09 郑州云海信息技术有限公司 A kind of method for writing data and device of distributed storage cluster
CN107918527B (en) * 2017-11-01 2021-04-23 北京小米移动软件有限公司 Storage space allocation method and device and file storage method and device
CN107958079A (en) * 2017-12-14 2018-04-24 郑州云海信息技术有限公司 Aggregate file delet method, system, device and readable storage medium storing program for executing
CN109086002A (en) * 2018-06-28 2018-12-25 平安科技(深圳)有限公司 Space management, device, computer installation and the storage medium of storage object
CN110837479B (en) * 2018-08-17 2023-09-01 华为云计算技术有限公司 Data processing method, related equipment and computer storage medium
CN109446177B (en) * 2018-11-02 2022-03-22 郑州云海信息技术有限公司 Method and device for realizing number quota of directory files of distributed file system
CN111611193B (en) * 2019-02-22 2023-06-20 阿里巴巴集团控股有限公司 Event processing method, device and equipment
CN110750211B (en) * 2019-09-05 2021-05-04 华为技术有限公司 Storage space management method and device
CN112486404A (en) * 2019-09-12 2021-03-12 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing memory blocks
CN111552438B (en) * 2020-04-23 2023-07-28 广州市百果园信息技术有限公司 Method, device, server and storage medium for writing object
CN113342746A (en) * 2021-08-06 2021-09-03 联想凌拓科技有限公司 File management system, file management method, electronic device, and storage medium
CN113687971B (en) * 2021-08-24 2023-06-27 杭州迪普科技股份有限公司 Method and device for generating memory map file
CN114327292B (en) * 2021-12-31 2024-02-02 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium
CN115617747B (en) * 2022-12-16 2023-03-28 新华三信息技术有限公司 File storage method, device and equipment
CN116185965B (en) * 2023-05-04 2023-08-04 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5713013A (en) * 1996-01-25 1998-01-27 Apple Computer, Inc. System for establishing and enforcing maximum size of directory by preventing the size of the directory from exceeding the set quota size of the directory
CN101446984A (en) * 2009-01-09 2009-06-03 成都市华为赛门铁克科技有限公司 Method and device for storing files and method and device for deleting files
US8131784B1 (en) * 2007-09-26 2012-03-06 Network Appliance, Inc. Multiple node quota filter
CN102447736A (en) * 2011-11-17 2012-05-09 华中科技大学 Management and control method for user quota in multi-network storage system
CN102567427A (en) * 2010-12-30 2012-07-11 中国移动通信集团公司 Method and device for processing object data
CN102799583A (en) * 2011-05-23 2012-11-28 上海爱数软件有限公司 Object-oriented access method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5713013A (en) * 1996-01-25 1998-01-27 Apple Computer, Inc. System for establishing and enforcing maximum size of directory by preventing the size of the directory from exceeding the set quota size of the directory
US8131784B1 (en) * 2007-09-26 2012-03-06 Network Appliance, Inc. Multiple node quota filter
CN101446984A (en) * 2009-01-09 2009-06-03 成都市华为赛门铁克科技有限公司 Method and device for storing files and method and device for deleting files
CN102567427A (en) * 2010-12-30 2012-07-11 中国移动通信集团公司 Method and device for processing object data
CN102799583A (en) * 2011-05-23 2012-11-28 上海爱数软件有限公司 Object-oriented access method and system
CN102447736A (en) * 2011-11-17 2012-05-09 华中科技大学 Management and control method for user quota in multi-network storage system

Also Published As

Publication number Publication date
CN103064639A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103064639B (en) Date storage method and device
US9448927B1 (en) System and methods for removing obsolete data in a distributed system of hybrid storage and compute nodes
CN101268449B (en) Data recording device and data recoding method
JP4733461B2 (en) Computer system, management computer, and logical storage area management method
CN1295591C (en) Moving data among storage units
US20060212495A1 (en) Method and system for storing data into a database
US20160350302A1 (en) Dynamically splitting a range of a node in a distributed hash table
CN109558084B (en) Data processing method and related equipment
CN103544156B (en) File memory method and device
US9442694B1 (en) Method for storing a dataset
US10540095B1 (en) Efficient garbage collection for stable data
CN102915278A (en) Data deduplication method
CN101976181A (en) Management method and device of storage resources
CN106682186A (en) File access control list (ACL) management method and related device and system
CN104054071A (en) Method for accessing storage device and storage device
US20210011634A1 (en) Methods and systems for managing key-value solid state drives (kv ssds)
CN102253985B (en) File system data management method and system
US9177034B2 (en) Searchable data in an object storage system
CN104461384B (en) A kind of method for writing data and storage device
CN108304142A (en) A kind of data managing method and device
CN110147203A (en) A kind of file management method, device, electronic equipment and storage medium
JP2016099723A (en) Information management system, information management method and program
CN108563586A (en) A kind of method of garbage reclamation data and user data in separation solid-state disk
CN101997919A (en) Storage resource management method and device
CN104133970A (en) Data space management method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant