CN103064639A - Method and device for storing data - Google Patents

Method and device for storing data Download PDF

Info

Publication number
CN103064639A
CN103064639A CN2012105873734A CN201210587373A CN103064639A CN 103064639 A CN103064639 A CN 103064639A CN 2012105873734 A CN2012105873734 A CN 2012105873734A CN 201210587373 A CN201210587373 A CN 201210587373A CN 103064639 A CN103064639 A CN 103064639A
Authority
CN
China
Prior art keywords
file destination
quota
data
written
directory
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.)
Granted
Application number
CN2012105873734A
Other languages
Chinese (zh)
Other versions
CN103064639B (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

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for storing data and relates to the technical field of data storing. The method includes: step 1, receiving a write request for object files, wherein a content with rating quotas includes the object files and the write request includes a data to be written into the object files, step 2, judging whether the size of the data to be written into the object files satisfy the size of free space of a rating quota object set and step 3, writing the data to be written into the object files into objects of the object files and managing the rating quotas of the content by the rating quota set when the size of the data to be written into the object files is not more than the size of free space of the rating quota object set. The embodiment of the invention provides the method and the device which apply to a storage system of large storage space, a variety of types of operation business and the need of flexible rating quota control management mode.

Description

Date storage method and device
Technical field
The present invention relates to technical field of data storage, relate in particular to a kind of date storage method and device.
Background technology
Along with high-performance calculation is developed to networked cluster by traditional host mode, to networking storage development, it is more and more obvious to calculate the trend of separating with storage gradually for traditional Host Based storage architecture.Object storage file system can be effectively in conjunction with storage area network (SAN) and network attached storage (NAS) advantage of system, support that directly the access disk is to improve performance, and come streamlining management by file and the metadata shared, it all is significantly increased at aspects such as extensibility, performance, ease for use, along with the continuous maturation of networked memory technology, object storage file system has become important developing direction.
To liking the base unit of data storage in the object storage file system, in fact an object is exactly the combination of file data and one group of attribute, these attributes can define raid-array (the Redundant Array of Inexpensive Disks based on file, RAID) parameter, data distribution and service quality etc., object is safeguarded the attribute of oneself by communicating by letter with storage system.In memory device, all objects have an object identity, by this object of object identity command access.
Quota is an optional function of operating system, and its permission keeper restriction divides tasks user or the employed disk space size of catalogue, takies too much available disk space to prevent certain user or catalogue.When the user at disk partition copy or when storing a new file, he just has the entitlement to this file, at this moment the Disk Quotas program just counts the size of this file in this user's the Disk Quotas space.
Traditional Disk Quotas mechanism is generally come the user is limited from " taking disk size " and " quantity of All Files " two aspects.Just can reach and control the purpose that disk takies by numbers of blocks that the user uses at most in subregion are set, the quota control that can't be correlated with to catalogue.And the storage space of in the last few years file system management constantly increases.Particularly in distributed memory system, a cover storage system can be managed the storage space of tens of petabytes (Petabyte, PB) often, and the above can move multiple business.Therefore need to be also abundanter to the control of quota, the quotas administered dirigibility of single user class is lower, can't satisfy 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, be applicable to as storage space is very large, the operation type of service is more and the storage system of more flexibly quota control way to manage of needs.
In order to address the above problem, first aspect, the embodiment of the invention provide a kind of date storage method, comprising:
Reception is to the write request of file destination, and described file destination is included in the catalogue with specified quota, and described write request comprises the data of described file destination to be written;
Judge whether the size of the data of described described file destination to be written satisfies the size of the remaining space of quota object set record, and described quota object set is used for the specified quota of administrative directory;
When the size of the data of described described file destination to be written is no more than remaining space big or small of 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 comprised of the object of setting quantity;
The data of described described file destination to be written are write in the object of described file destination and comprise:
Write according to the data of the described described file destination to be written of large young pathbreaker of the data of described described file destination to be written in the object of corresponding size of described file destination.
In conjunction with first aspect, in the second implementation, described file destination is comprised of the object of preseting length;
The data of described described file destination to be written are write in the object of described file destination and comprise:
Create the object corresponding to data of described described file destination to be written, and write the data of described described file destination to be written in the object that creates;
Judge whether the length of the data that write described file destination reaches the preseting length of described object;
When the length of the data that write 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 in the above-mentioned implementation of first aspect or first aspect any, in the third implementation, before the write request that receives file destination, also comprise:
The request of quota control is carried out in reception to target directory;
According to the described request of target directory being carried out quota control, for described target directory arranges specified quota and creates the quota object set, described quota object centralized recording the object that All Files and sub-directory have used under the described target directory statistical information, object and the file and the affiliated relation of sub-directory and the affiliated relation of described target directory and all sub-directories thereof that take up room;
Check that whether described target directory is empty, and do not traveling through described target directory when empty, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
In conjunction with the third implementation of first aspect, in the 4th kind of implementation, also comprise:
The request of target directory is shifted out in reception, and described target directory is included in the catalogue with specified quota;
In the quota object set of correspondence, search all relevant objects of described target directory, delete the corresponding data of all related objects, and delete all relevant object records 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 comprises object allocation table and form of catalogue relation table, and described object allocation table is used for recording statistical information, object and file that All Files and sub-directory have used under the described target directory object takes up room and the affiliated relation of sub-directory; Described form of catalogue relation table is used for recording the affiliated relation of described target directory and all sub-directories thereof.
In conjunction with in the above-mentioned implementation of first aspect or first aspect any, in the 6th kind of implementation, described quota object set comprises at least two quota object subsets, and described quota object subset is used for the part quota of the specified quota of administrative directory.
Second aspect, the embodiment of the invention provide a kind of data storage device, comprising:
Receiving element is used for receiving the write request to file destination, and described file destination is included in the catalogue with specified quota, and described write request comprises the data of described file destination to be written;
Judging unit is used for judging whether the size of the data of described described file destination to be written satisfies the size of the remaining space of quota object set record, and described quota object set is used for the specified quota of administrative directory;
Storage unit when being used for size in the data of described described file destination to be written and being no more than remaining space big or small of quota object set record, writes the data of described described file destination to be written in the object of described file destination.
In conjunction with second aspect, in the first implementation, described storage unit writes in the corresponding big or small object of described file destination according to the data of the described described file destination to be written of large young pathbreaker of the data of described described file destination to be written.
In conjunction with second aspect, in the second implementation, described storage unit also is used for creating the object corresponding to data of described described file destination to be written, and writes the data of described described file destination to be written in the object that creates;
Whether described judging unit also reaches the preseting length of described object for the length of the data of judging described file destination to be written;
When described storage unit reaches the preseting length of described object in the length of the data of described file destination to be written, 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 in the above-mentioned implementation of second aspect or second aspect any, in the third implementation,
Described receiving element also is used for receiving the request of target directory being carried out quota control;
Described system also comprises:
The quota control unit is used for according to described target directory being carried out the request of quota control, for described target directory arranges specified quota and creates the quota object set; And do not travel through described target directory when empty at described target directory, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
In conjunction with the third implementation of second aspect, in the 4th kind of implementation,
Described receiving element also is used for also comprising the request of shifting out file destination that receives after receiving the write request of file destination;
Described quota control unit also is used for searching all relevant objects of described file destination at described quota object set, delete the corresponding data of all related objects, and delete all relevant object records in described quota object set, reclaim taking up room of described file destination.
The method of the embodiment of the invention and device are realizing carrying out data storage under object-based file system is to the prerequisite of the management of catalogue quota with the quota object set, be applicable to more that storage space is very large, the operation type of service is more and the storage system of more flexibly quota control way to manage of needs.
According to below with reference to accompanying drawing to detailed description of illustrative embodiments, it is clear that further feature of the present invention and aspect will become.
Description of drawings
The Figure of description that is included in the instructions and consists of the part of instructions shows exemplary embodiment of the present invention, feature and aspect with instructions, and is used for explaining principle of the present invention.
Fig. 1 is the method for the embodiment of the invention and the application scenarios synoptic diagram of device;
Fig. 2 is the process flow diagram of a kind of date storage method of the embodiment of the invention;
Fig. 3 is the process flow diagram of the another kind of date storage method of the embodiment of the invention;
Fig. 4 is the application synoptic diagram of quota object set in the date storage method of the embodiment of the invention;
Fig. 5 is the object allocation table synoptic diagram in the date storage method of the embodiment of the invention;
Fig. 6 is the catalogue relation table synoptic diagram in the date storage method of the embodiment of the invention;
The date storage method synoptic diagram of Fig. 7 embodiment of the invention when to be file destination by the object of preseting length form;
The date storage method synoptic diagram of Fig. 8 embodiment of the invention when to be file destination by the object of preseting length form;
Fig. 9 is the process flow diagram of another date storage method of the embodiment of the invention;
The another kind of quota object set is used synoptic diagram in the date storage method of Figure 10 embodiment of the invention;
Figure 11 is the structural representation of the data storage device of a kind of structure of the embodiment of the invention;
Figure 12 is the structural representation of the data storage device of the another kind of structure of the embodiment of the invention;
Figure 13 is the structural representation of the data storage device of another structure of the embodiment of the invention.
Embodiment
Describe various exemplary embodiment of the present invention, feature and aspect in detail below with reference to accompanying drawing.The identical same or analogous element of Reference numeral presentation function in the accompanying drawing.Although accompanying drawing unless otherwise indicated, needn't be drawn in proportion in the various aspects of embodiment shown in the drawings.
Here special-purpose word " exemplary " means " as example, embodiment or illustrative ".Here needn't be interpreted as being better than or being better than other embodiment as " exemplary " illustrated any embodiment.
In addition, for better explanation the present invention, provided numerous details in the embodiment hereinafter.It will be appreciated by those skilled in the art that does not have these details, and the present invention can implement equally.In the other example, method, means, element and the circuit known for everybody are not described in detail, so that highlight purport of the present invention.
The application scenarios of the method for the embodiment of the invention is object storage system, and this object storage system File system manager carries out quotas administered to the catalogue of file system, and catalogue takes up room in the restriction file system.This application scenarios as shown in Figure 1.
In Fig. 1, incoming end is user terminal, can comprise any computing equipment that current techniques is known, such as server, desk-top computer etc.Section within it, operating system and other application programs are installed, and file system namely operates on the incoming end, and file system makes an explanation to user's file operation (read-write etc.), and between meta data server and object storage server, communicate by letter, finish the operation of asking.
Meta data server is used to incoming end that metadata is provided, and mainly is the logical view of file, comprises membership credentials, the corresponding storage medium of each file of file and catalogue etc.
The object storage server (also claims object storage device (Object-based Storage Devic e, OSD)) refer to the equipment that uses object that the data of preserving are managed, each object storage server is a smart machine, storage medium and network system etc. with oneself, be in charge of local object, it with deposit data to magnetic track and sector as the disk of storage medium, some magnetic tracks and sector combination are got up to consist of object, and provide access to data to the external world by this object.Object by user data, consist of the physical location of magnetic track of the disk of object) and attribute consist of.
Storage medium is the part of object storage server, is used for the storage data.
As shown in Figure 2, the date storage method that the embodiment of the invention provides comprises:
S201. receive the write request to file destination, described file destination is included in the catalogue with specified quota, and described write request comprises 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 satisfies the size of the remaining space of quota object set record;
S203. when the size of the data of described described file destination to be written is no more than remaining space big or small 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 is used for the specified quota of administrative directory, has wherein recorded statistical information, object and file and the affiliated relation of sub-directory and the affiliated relation of described target directory and all sub-directories thereof that All Files and sub-directory have used under the described target directory object takes up room.
The method of the embodiment of the invention is realizing carrying out data storage under object-based file system is to the prerequisite of the management of catalogue quota with the quota object set, more be applicable to as storage space is very large, the operation type of service is more and the storage system of more flexibly quota control way to manage of needs.
As shown in Figure 3, in the method for the embodiment of the invention, before the step S201,
Also comprise:
S301. receive the request of target directory being carried out quota control;
S302. according to described target directory is carried out the request of quota control, for described target directory arranges specified quota and creates the quota object set;
S303. check that whether described target directory is empty, and do not traveling through described target directory when empty, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
This quota object set can carry out the management in the space of specified quota to target directory by some list structures, with move at sub-directory/can calculate fast the capacity of moving into/moving out when moving out.In the method for the embodiment of the invention, this quota object set comprises object allocation table and form of catalogue relation table, comprise following information in this object allocation table: the statistical information that the object that has used in the current object allocation table takes up room, and the affiliated relation of object and file and sub-directory.Wherein, if in the design of this document system, file is comprised of some isometric objects, and then this statistics that takes up room can be reduced to the number of objects quantitative statistics; If in File system design, file is comprised of the object of setting quantity, and then this statistics that takes up room can be reduced to the statistics of object length.Need to prove that file can corresponding a plurality of objects, in the method for the embodiment of the invention, the length of object represents the size of the physical space that it is used to store, and also namely represents the size of the data that it can be stored.Usually, when file is comprised of isometric object, the quantity of the object that forms this document is not limited; When file is comprised of the object of setting quantity, the length of the object of composition this document is not limited.
The affiliated relation (ID of the parent directory that for example each object is corresponding) of record object and file and sub-directory can be conveniently when catalogue moves, and adds up the size in the space that its employed all objects occupy.Form of catalogue relation table has recorded the set membership information of each sub-directory in the described target directory.Object allocation table and form of catalogue relation table can adopt various ways, include but not limited to the different organizational forms such as database, bitmap, B tree.
Take directory A shown in Figure 4 (DIR A) as example, for it arranges the specified quota of 95G, and set up the quota object set (content that records take up room size for 24M) of 24M, be used for management and record All Files and sub-directory under the catalogue of this 95G.File under this directory A is comprised of the object of preseting length, therefore can will be reduced to the number of objects quantitative statistics to the statistics that takes up room, for example the object allocation table of this quota object set has the specified space of the affiliated relation of 10000 objects of record and file and sub-directory, as shown in Figure 4, the current affiliated relation that has recorded 24 objects and file and sub-directory.This to the affiliated relation of the object that records in the allocation table and file and sub-directory as shown in Figure 5.The form of catalogue relation table of this quota object set as shown in Figure 6.
In the method for the embodiment of the invention, the catalogue that is provided with specified quota and has set up the quota object set is called the quota catalogue hereinafter.Newly-increased file or when appending content (writing data) in the existing file under the quota catalogue needs all to check whether the object allocation table reaches quota restrictions (space is full).If reach quota restrictions, then refuse new content and write, thereby reach the purpose of quotas administered.When having sub-directory to move out in this quota catalogue, need to scan form of catalogue relation table, find fast relevant object and remove, the set membership of each catalogue of putting down in writing according to this form of catalogue relation table, the very fast size that removes sub-directory that counts, reclaim the shared space of related object, thereby adjust the quota information of quota catalogue.
Tool is sayed it, in step S201, if this file destination is comprised of the object of preseting length, also be the size one of the data that can store of each object regularly, then as shown in Figure 7, in step S203, the step that the data of described described file destination to be written is write in the object of described file destination specifically comprises:
S701. for data creation to be written has the object of this preseting length equally, the space that the object that record creates takies and with the affiliated relation of file and sub-directory;
S702. in the object that creates, write data to be written;
S703. judge whether the data write reach this preseting length, if reach, execution in step S704 then, otherwise, continue execution in step S702;
S704. judge whether data to be written all write, if do not write, then return execution in step S701, continue as data creation object to be written, if write, then finish.
For example, when file is comprised of the object that a plurality of corresponding stored space is 1M, and need to write the data of 3M in the file destination time, need to be 3 objects of data creation to be written, write the data of 1M in each object.
When need increased file destination, the step S701 in the object-based file system execution above-mentioned steps write data corresponding to file destination to step S704.
In step S201, if this file destination is comprised of the object of setting quantity, namely the length of object is not necessarily the time, then as shown in Figure 8, in step S203, the step that the data of described described file destination to be written is write in the object of described file destination specifically comprises:
S801. judge whether object corresponding to described file destination has reached setting quantity, if, execution in step S803 then, otherwise execution in step S802;
S802. be the object of the corresponding length of data creation to be written, and these data to be written are write in the object that creates;
S803. change the length of arbitrary destination object to the application of quota object set, the length of change is so that the corresponding physical space of object after changing is large enough to hold this data to be written;
S804. revise the length of described destination object, and the space that takies of the destination object after the record modification, data to be written are write this destination object.
For example, in the time of need to writing the data of 3M in the file destination, all can not satisfy the data that its corresponding physical space is enough held 3M again if consist of the length of the object of file destination, then can select arbitrary object as destination object, change its length, make its after changing corresponding physical space be large enough to hold the data of this 3M.
In the method for the embodiment of the invention, also comprise step as shown in Figure 9:
S901. receive the request shift out target directory, shown in target directory be included in the catalogue with specified quota;
S902. in the quota object set of correspondence, search all relevant objects of described target directory, delete the corresponding data of all related objects, and delete all relevant object records in described quota object set, statistics also reclaims taking up room of target directory.
Wherein, can specifically comprise among the step S902:
Recursive lookup form of catalogue relation table finds the sub-directory of all target directories;
Search the object allocation table, the size of statistics target directory, the object that all sub-directories are relevant shifts out this object allocation table.
To sum up, the method for the embodiment of the invention can be added up the space that All Files takies under the anyon catalogue under the quota catalogue by form of catalogue relation table and object allocation table, and accelerates the operation of moving into, move out of quota catalogue File.
In addition, for fear of performance bottleneck, the quota object set in the method for the embodiment of the invention can be Distributed Design, and as shown in figure 10, each quota object set comprises at least two subsets.Every subset is respectively applied to record statistical information, object and file that the part object that used under the quota catalogue takes up room and/or affiliated relation of sub-directory etc., and the corresponding quota of every subset can be identical or entirely not identical.As shown in Figure 10, each quota object subset comprises an object allocation table; All quota object subsets are shared a catalogue relation table.
As shown in figure 11, the embodiment of the invention also provides a kind of data storage device 1100, and this device comprises: receiving element 1110, judging unit 1120 and storage unit 1130.
Wherein, receiving element 1110 is used for receiving the write request to file destination.Judging unit 1120 is used for judging described write request comprises whether the size of the data of described file destination to be written satisfies the size of the remaining space of quota object set record, and the data of described described file destination to be written are write in the object of described file destination; When storage unit 1130 is used for size in the data of described described file destination to be written and is no more than remaining space big or small of quota object set record.
The device of the embodiment of the invention is realizing carrying out data storage under object-based file system is to the prerequisite of the management of catalogue quota with the quota object set, more be applicable to as storage space is very large, the operation type of service is more and the storage system of more flexibly quota control way to manage of needs.
In addition, in the data storage device of the embodiment of the invention, when file destination was comprised of the object of setting quantity, storage unit 1130 write in the corresponding big or small object of described file destination according to the data of the described described file destination to be written of large young pathbreaker of the data of described described file destination to be written.When file destination was comprised of the object of preseting length, storage unit 1130 also was used for creating the object corresponding to data of described described file destination to be written, and write the data of described described file destination to be written in the object that creates; Whether judging unit 1120 also reaches the preseting length of described object for the length of the data of judging described file destination to be written; When storage unit 1130 reaches the preseting length of described object in the length of the data of described file destination to be written, 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 addition, receiving element 1120 also is used for receiving the request of target directory being carried out quota control.At this moment, as shown in figure 12, the data storage device 1200 of the another kind of structure of the embodiment of the invention also comprises quota control unit 1210 on the basis of each unit shown in Figure 11, be used for according to described target directory being carried out the request of quota control, for described target directory arranges specified quota and creates the quota object set; And do not travel through described target directory when empty at described target directory, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
Receiving element 1120 also is used for also comprising the request of shifting out file destination that receives after receiving the write request of file destination.At this moment, quota control unit 1210 also is used for searching all relevant objects of described file destination at described quota object set, delete the corresponding data of all related objects, and delete all relevant object records in described quota object set, reclaim taking up room of described file destination.
The structural representation of another data storage device 1300 that provides for the embodiment of the invention such as Figure 13, the specific embodiment of the invention is not done restriction to the specific implementation of this device.As shown in figure 13, this device 1300 can comprise:
Processor (processor) 1310, communication interface (Communications Interface) 1320, storer (memory) 1330 and communication bus 1340.Wherein:
Processor 1310, communication interface 1320 and storer 1330 are finished mutual communication by communication bus 1240.
Communication interface 1320 is used for and net element communication such as client etc.
Processor 1310 is used for executive routine 1332, specifically can carry out the correlation step of above-mentioned Fig. 2 to the embodiment of the method shown in Figure 9.
Particularly, program 1332 can comprise program code, and described program code comprises computer-managed instruction.
Processor 1310 may be a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuit of the embodiment of the invention.
Storer 1330 is used for depositing program 1332.Storer 1330 may comprise the high-speed RAM storer, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disk memory.Program 1332 specifically can comprise:
Receiving element is used for receiving the write request to file destination, and described file destination is included in the catalogue with specified quota, and described write request comprises the data of described file destination to be written;
Judging unit is used for judging described write request comprises whether the size of the data of described file destination to be written satisfies the size of the remaining space of quota object set record, and the data of described described file destination to be written are write in the object of described file destination;
Storage unit when being used for size in the data of described described file destination to be written and being no more than remaining space big or small of quota object set record, writes the data of described described file destination to be written in the object of described file destination.
The specific implementation of each unit can referring to the corresponding units in Figure 10 to 11 illustrated embodiment, be not repeated herein in the program 1332.The those skilled in the art can be well understood to, and is the convenience described and succinct, and the specific works process of the equipment of foregoing description and module can be described with reference to the corresponding process among the preceding method embodiment, does not repeat them here.
Those of ordinary skills can recognize, unit and the method step of each example of describing in conjunction with embodiment disclosed herein can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are carried out with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.The professional and technical personnel can specifically should be used for realizing described function with distinct methods to each, but this realization should not thought and exceeds scope of the present invention.
If described function realizes with the form of SFU software functional unit and during as independently production marketing or use, can be stored in the computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or the part of this technical scheme can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out all or part of step of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: the various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD.
Above embodiment only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; in the situation that does not break away from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (12)

1. a date storage method is characterized in that, comprising:
Reception is to the write request of file destination, and described file destination is included in the catalogue with specified quota, and described write request comprises the data of described file destination to be written;
Judge whether the size of the data of described described file destination to be written satisfies the size of the remaining space of quota object set record, and described quota object set is used for the specified quota of administrative directory;
When the size of the data of described described file destination to be written is no more than remaining space big or small of quota object set record, the data of described described file destination to be written are write in the object of described file destination.
2. method according to claim 1 is characterized in that, described file destination is comprised of the object of setting quantity;
The data of described described file destination to be written are write in the object of described file destination and comprise:
Write according to the data of the described described file destination to be written of large young pathbreaker of the data of described described file destination to be written in the object of corresponding size of described file destination.
3. method according to claim 1 is characterized in that, described file destination is comprised of the object of preseting length;
The data of described described file destination to be written are write in the object of described file destination and comprise:
Create the object corresponding to data of described described file destination to be written, and write the data of described described file destination to be written in the object that creates;
Judge whether the length of the data that write described file destination reaches the preseting length of described object;
When the length of the data that write 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. each described method in 3 according to claim 1 is characterized in that, before the write request that receives file destination, also comprises:
The request of quota control is carried out in reception to target directory;
According to the described request of target directory being carried out quota control, for described target directory arranges specified quota and creates the quota object set, described quota object centralized recording the object that All Files and sub-directory have used under the described target directory statistical information, object and the file and the affiliated relation of sub-directory and the affiliated relation of described target directory and all sub-directories thereof that take up room;
Check that whether described target directory is empty, and do not traveling through described target directory when empty, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
5. the method described in according to claim 4 is characterized in that, also comprises:
The request of target directory is shifted out in reception, and described target directory is included in the catalogue with specified quota;
In the quota object set of correspondence, search all relevant objects of described target directory, delete the corresponding data of all related objects, and delete all relevant object records in described quota object set, reclaim taking up room of described target directory.
6. according to claim 4 or 5 described methods, it is characterized in that, described quota object set comprises object allocation table and form of catalogue relation table, and described object allocation table is used for recording statistical information, object and file that All Files and sub-directory have used under the described target directory object takes up room and the affiliated relation of sub-directory; Described form of catalogue relation table is used for recording the affiliated relation of described target directory and all sub-directories thereof.
7. according to claim 1 to 6 each described methods, it is characterized in that described quota object set comprises at least two quota object subsets, described quota object subset is used for the part quota of the specified quota of administrative directory.
8. a data storage device is characterized in that, comprising:
Receiving element is used for receiving the write request to file destination, and described file destination is included in the catalogue with specified quota, and described write request comprises the data of described file destination to be written;
Judging unit is used for judging whether the size of the data of described described file destination to be written satisfies the size of the remaining space of quota object set record, and described quota object set is used for the specified quota of administrative directory;
Storage unit when being used for size in the data of described described file destination to be written and being no more than remaining space big or small of quota object set record, writes the data of described described file destination to be written in the object of described file destination.
9. device according to claim 8 is characterized in that, described storage unit writes in the corresponding big or small object of described file destination according to the data of the described described file destination to be written of large young pathbreaker of the data of described described file destination to be written.
10. device according to claim 8 is characterized in that, described storage unit also is used for creating the object corresponding to data of described described file destination to be written, and writes the data of described described file destination to be written in the object that creates;
Whether described judging unit also reaches the preseting length of described object for the length of the data of judging described file destination to be written;
When described storage unit reaches the preseting length of described object in the length of the data of described file destination to be written, 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.
11. each described device in 10 is characterized in that according to claim 8,
Described receiving element also is used for receiving the request of target directory being carried out quota control;
Described system also comprises:
The quota control unit is used for according to described target directory being carried out the request of quota control, for described target directory arranges specified quota and creates the quota object set; And do not travel through described target directory when empty at described target directory, the relevant information of All Files and sub-directory under the described target directory is recorded in the described quota object set.
12. the device according to claim 11 is characterized in that,
Described receiving element also is used for also comprising the request of shifting out file destination that receives after receiving the write request of file destination;
Described quota control unit also is used for searching all relevant objects of described file destination at described quota object set, delete the corresponding data of all related objects, and delete all relevant object records 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 true CN103064639A (en) 2013-04-24
CN103064639B 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)

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device
CN104158858A (en) * 2014-07-29 2014-11-19 浪潮(北京)电子信息产业有限公司 Method and system for accessing distributed cluster file system
CN104205780A (en) * 2014-01-23 2014-12-10 华为技术有限公司 Data storage method and device
CN104778016A (en) * 2015-04-23 2015-07-15 深圳市美贝壳科技有限公司 Automatic storage control method for multi-storage equipment environments
CN105608089A (en) * 2014-11-19 2016-05-25 珠海金山办公软件有限公司 File storage method and device
CN105677789A (en) * 2015-12-31 2016-06-15 浪潮(北京)电子信息产业有限公司 Method and system for managing directory capacity of distributed file system
CN106210026A (en) * 2016-07-05 2016-12-07 浪潮(北京)电子信息产业有限公司 The control method of distributed file system multi-client catalogue quota precision and system
CN106815232A (en) * 2015-11-27 2017-06-09 华为技术有限公司 Catalog management method, apparatus and system
CN107391045A (en) * 2017-08-01 2017-11-24 郑州云海信息技术有限公司 A kind of 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
CN107918527A (en) * 2017-11-01 2018-04-17 北京小米移动软件有限公司 Memory allocation method and device and file memory 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
CN109446177A (en) * 2018-11-02 2019-03-08 郑州云海信息技术有限公司 A kind of implementation method and device of distributive catalogue of document system file number quota
CN110750211A (en) * 2019-09-05 2020-02-04 华为技术有限公司 Storage space management method and device
WO2020034729A1 (en) * 2018-08-17 2020-02-20 华为技术有限公司 Data processing method, related device, and computer storage medium
CN111552438A (en) * 2020-04-23 2020-08-18 广州市百果园信息技术有限公司 Object writing method, device, server and storage medium
WO2020168928A1 (en) * 2019-02-22 2020-08-27 阿里巴巴集团控股有限公司 Event processing method, apparatus, and device
CN112486404A (en) * 2019-09-12 2021-03-12 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing memory blocks
CN112559390A (en) * 2016-09-23 2021-03-26 华为数字技术(成都)有限公司 Data write-in control method and storage device
CN113342746A (en) * 2021-08-06 2021-09-03 联想凌拓科技有限公司 File management system, file management method, electronic device, and storage medium
CN113687971A (en) * 2021-08-24 2021-11-23 杭州迪普科技股份有限公司 Method and device for generating memory mapping file
CN114327292A (en) * 2021-12-31 2022-04-12 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium
CN115617747A (en) * 2022-12-16 2023-01-17 新华三信息技术有限公司 File storage method, device and equipment
CN116185965A (en) * 2023-05-04 2023-05-30 联想凌拓科技有限公司 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

Cited By (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500077A (en) * 2013-10-16 2014-01-08 北京国双科技有限公司 File storage method and device
CN103500077B (en) * 2013-10-16 2016-08-10 北京国双科技有限公司 File memory method and device
CN104205780A (en) * 2014-01-23 2014-12-10 华为技术有限公司 Data storage method and device
WO2015109483A1 (en) * 2014-01-23 2015-07-30 华为技术有限公司 Data storage method and device
CN104205780B (en) * 2014-01-23 2017-06-27 华为技术有限公司 A kind of method and apparatus of data storage
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
CN104778016A (en) * 2015-04-23 2015-07-15 深圳市美贝壳科技有限公司 Automatic storage control method for multi-storage equipment environments
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
CN106210026A (en) * 2016-07-05 2016-12-07 浪潮(北京)电子信息产业有限公司 The control method of distributed file system multi-client catalogue quota precision and system
CN106210026B (en) * 2016-07-05 2019-06-18 浪潮(北京)电子信息产业有限公司 The control method and system of distributed file system multi-client catalogue quota precision
CN112559390B (en) * 2016-09-23 2023-06-06 成都华为技术有限公司 Data writing control method and storage device
CN112559390A (en) * 2016-09-23 2021-03-26 华为数字技术(成都)有限公司 Data write-in control method and storage device
CN107391045A (en) * 2017-08-01 2017-11-24 郑州云海信息技术有限公司 A kind of directory space quota method and system
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
CN107918527A (en) * 2017-11-01 2018-04-17 北京小米移动软件有限公司 Memory allocation method and device and file memory 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
WO2020034729A1 (en) * 2018-08-17 2020-02-20 华为技术有限公司 Data processing method, related device, and computer storage medium
CN109446177A (en) * 2018-11-02 2019-03-08 郑州云海信息技术有限公司 A kind of implementation method and device of distributive catalogue of document system file number quota
CN109446177B (en) * 2018-11-02 2022-03-22 郑州云海信息技术有限公司 Method and device for realizing number quota of directory files of distributed file system
WO2020168928A1 (en) * 2019-02-22 2020-08-27 阿里巴巴集团控股有限公司 Event processing method, apparatus, and device
CN110750211B (en) * 2019-09-05 2021-05-04 华为技术有限公司 Storage space management method and device
CN110750211A (en) * 2019-09-05 2020-02-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
CN111552438A (en) * 2020-04-23 2020-08-18 广州市百果园信息技术有限公司 Object writing method, device, server and storage medium
CN113342746A (en) * 2021-08-06 2021-09-03 联想凌拓科技有限公司 File management system, file management method, electronic device, and storage medium
CN113687971A (en) * 2021-08-24 2021-11-23 杭州迪普科技股份有限公司 Method and device for generating memory mapping file
CN114327292A (en) * 2021-12-31 2022-04-12 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium
CN114327292B (en) * 2021-12-31 2024-02-02 上海移为通信技术股份有限公司 File management method, system, electronic device and storage medium
CN115617747A (en) * 2022-12-16 2023-01-17 新华三信息技术有限公司 File storage method, device and equipment
CN115617747B (en) * 2022-12-16 2023-03-28 新华三信息技术有限公司 File storage method, device and equipment
CN116185965A (en) * 2023-05-04 2023-05-30 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control
CN116185965B (en) * 2023-05-04 2023-08-04 联想凌拓科技有限公司 Method, apparatus, device and medium for quality of service control

Also Published As

Publication number Publication date
CN103064639B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN103064639A (en) Method and device for storing data
CN1295591C (en) Moving data among storage units
CN107180092B (en) File system control method and device and terminal
CN108628753B (en) Memory space management method and device
CN103020174A (en) Similarity analysis method, device and system
CN107315533A (en) A kind of date storage method and device
CN109558084B (en) Data processing method and related equipment
CN109445713A (en) A kind of storage state recording method, system and the associated component of metadata volume
US20060212495A1 (en) Method and system for storing data into a database
CN103838853B (en) Mixed file system based on different storage media
US20140019706A1 (en) System and method of logical object management
CN103064765A (en) Method and device for data recovery and cluster storage system
CN101488153A (en) Method for implementing high-capacity flash memory file system in embedded type Linux
US8499131B2 (en) Capping a number of locations referred to by chunk references
CN101976181A (en) Management method and device of storage resources
CN107239569A (en) A kind of distributed file system subtree storage method and device
CN103019887A (en) Data backup method and device
CN103279532A (en) Filtering system and filtering method for removing duplication of elements of multiple sets and identifying belonged sets
CN103473298A (en) Data archiving method and device and storage system
CN104536903A (en) Mixed storage method and system for conducting classified storage according to data attributes
US7752206B2 (en) Method and data processing system for managing a mass storage system
US10802726B2 (en) Optimized placement of data contained in a garbage collected storage system
CN102253985B (en) File system data management method and system
JP6037469B2 (en) Information management system, information management method and program
KR100907477B1 (en) Apparatus and method for managing index of data stored in flash memory

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