CN102650931B - Method and system for writing data - Google Patents

Method and system for writing data Download PDF

Info

Publication number
CN102650931B
CN102650931B CN201210095935.3A CN201210095935A CN102650931B CN 102650931 B CN102650931 B CN 102650931B CN 201210095935 A CN201210095935 A CN 201210095935A CN 102650931 B CN102650931 B CN 102650931B
Authority
CN
China
Prior art keywords
simplifying
storage space
written
logical address
pond
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
CN201210095935.3A
Other languages
Chinese (zh)
Other versions
CN102650931A (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 CN201210095935.3A priority Critical patent/CN102650931B/en
Publication of CN102650931A publication Critical patent/CN102650931A/en
Priority to PCT/CN2013/071975 priority patent/WO2013149524A1/en
Application granted granted Critical
Publication of CN102650931B publication Critical patent/CN102650931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

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

Abstract

The embodiment of the invention provides a method and system for writing data. The method comprises the following steps of: receiving a command for requesting to write data; judging whether a compacted cell storage space is completely allocated for a logic address to be written in a compacted LUN (Logic Unit Number) or not, if so, writing the data to be written into a storage space allocated by the compacted cell and otherwise, determining the length of the data which can be written by a continuous logic address for which the compacted cell storage space is not allocated in the logic address and applying the storage space which is greater than or equal to the length of the data which can be written into the continuous logic address for the compacted cell according to the magnitude of integral multiple of a minimum storage unit provided by a memory; and receiving information responding to the storage space allocated by the application by the compacted cell and writing the data to be written into the corresponding storage space. According to the method and system disclosed by the invention, effective utilization of system resources is realized.

Description

A kind of method and system writing data
Technical field
The present invention relates to technical field of data storage, more particularly, relate to a kind of method and system writing data.
Background technology
Along with the development of science and technology and the widespread use of the Internet, the data volume that the office such as enterprise, government produces is increasing, for these data storage space of making rational planning for becomes the task of top priority of current storage solution.At present in numerous storage solutions, simplifying configuration (thin provisioning) due to its demand assigned storage space management mode is widely used.
What prior art provided simplify configuration-system comprises: simplify pond, simplify LUN (Logical UnitNumber, logical unit number) and mapping table; Wherein, simplifying pond is the amount of physical memory of simplifying configuration-system bottom, and its partition size is fixing; Simplify LUN and be based upon the logic hard disk of simplifying on pond; Mapping table comprises multiple map tag, and this map tag simplifies the physical address of the data that pond stores for recording, the corresponding relation of simplifying LUN logical address corresponding with these data.Simplify configuration-system by as follows for the process of data write storage: the order of simplifying the request write data that LUN issues according to main frame, to simplify the integral multiple size of pond fixed allocation granularity to simplifying pond application storage space, simplify memory allocated space, pond, write in the storage space of simplifying and distributing in pond to make data to be written, after the storage space distributed in pond is simplified in data write to be written, these data to be written of mapping table record are simplifying logical address corresponding on LUN, with simplifying physical address corresponding in pond, to represent the storage space of this data actual allocated to be written.Due in prior art, the storage size that a map tag of mapping table can record simplifies the partition size in pond for standard, therefore when the partition size of simplifying pond is fixed, a map tag can only record the storage space that a size is this fixed allocation granularity, if the storage space of application be the N of this fixed allocation granularity doubly (N be greater than 1 positive integer), so will produce N number of map tag.
Existing pond of simplifying of simplifying configuration-system is with self fixing partition size memory allocated space, and be the demand of comprehensive large data service and small data business, the value of fixed allocation granularity is comparatively moderate (being generally million grades), therefore there is waste system resource, the phenomenon that resource utilization ratio is low, even if partition size is too small, multiple map tag also can be used to carry out record to this large storage demand business, and this just causes the waste of system memory resource.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and system writing data, to solve existing configuration-system of simplifying owing to simplifying pond with self fixing partition size memory allocated space, and the waste system resource caused, problem that resource utilization ratio is low.
For achieving the above object, the invention provides following technical scheme:
Write a method for data, comprising:
Receive the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
Judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space;
If so, then described data write to be written is simplified in the storage space distributed in pond;
If not, determine in described logical address, not to be assigned with the length that the continuous print logical address of simplifying pond storage space can write data, the integral multiple size of the minimum memory unit that can provide with storer, applies for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying;
Receive and simplify the information that pond responds the storage space that above-mentioned application distributes, data to be written are write in corresponding storage space.
The present invention also provides a kind of system writing data, comprising:
Receiver module, for receiving the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
Judge module, simplifies pond storage space for judging whether to distribute completely to the logical address of the described LUN of simplifying to be written;
Determination module, for when the judged result of described judge module is no, determines in described logical address, is not assigned with the length that the continuous print logical address of simplifying pond storage space can write data;
Application module, for the integral multiple size of minimum memory unit that can provide with storer, applies for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying;
Store information receiving module, for receiving the information of simplifying the storage space that application that pond responds described application module distributes;
Writing module, for when the judged result of described judge module is for being, described data write to be written is simplified in the storage space distributed in pond, or after described storage information receiving module receives the storage space information of simplifying and distributing in pond, data to be written are write in corresponding storage space.
Based on technique scheme, the method of the write data that the embodiment of the present invention provides eliminates of the prior artly simplifies pond fixed allocation granularity, the integral multiple size of the minimum memory unit that can provide with storer, to simplifying pond application storage space, because the storage space of application is based on the minimum memory unit that can provide by storer, therefore the storage space of simplifying in pond applied for can be made to be infinitely close to storage size needed for data, to avoid wasting the system resource of simplifying in pond as far as possible; Secondly, simplify storage space that pond distributes as an integral dispensing granularity of simplifying pond, no longer distinguish with the pond fixed allocation granularity of simplifying of prior art, make logical address of simplifying LUN to be written, physical address corresponding on pond is being simplified with it, can a map tag form record in the mapping table, save memory source.The invention solves existing configuration-system of simplifying owing to simplifying pond with self fixing partition size memory allocated space, and the waste system resource caused, problem that resource utilization ratio is low, achieve effective utilization of system resource.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
A kind of process flow diagram writing the method for data that Fig. 1 provides for the embodiment of the present invention;
The method flow diagram of the determination logic continuation address that Fig. 2 provides for the embodiment of the present invention;
A kind of structured flowchart writing the system of data that Fig. 3 provides for the embodiment of the present invention;
The structured flowchart of the judge module that Fig. 4 provides for the embodiment of the present invention;
The structured flowchart of the determination module that Fig. 5 provides for the embodiment of the present invention;
The structured flowchart of the application module that Fig. 6 provides for the embodiment of the present invention;
Another structured flowchart of the system of the write data that Fig. 7 provides for the embodiment of the present invention;
The hardware structure figure of the system of the write data that Fig. 8 provides for the embodiment of the present invention;
Another hardware structure figure of the system of the write data that Fig. 9 provides for the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of method and system of write data based on simplifying configuration-system, removal is arranged at the fixed allocation granularity of simplifying in pond, according to the length of the logical address continuous print data of unallocated storage space in the request write data command that main frame issues, the integral multiple size of the minimum memory unit that can provide with storer, to simplifying pond application storage space, the resource of simplifying configuration-system is effectively utilized.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
A kind of process flow diagram writing the method for data that Fig. 1 provides for the embodiment of the present invention, with reference to Fig. 1, the method can comprise:
Step S100, receive the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
The order of request write data is issued by main frame, comprise data to be written, the length of described data to be written and logical address of simplifying LUN to be written, the length of wherein said data to be written is for representing the storage capacity information needed for data to be written, and the logical address of the LUN of simplifying to be written is used to indicate data to be written needs the correspondence of write to simplify pond physical space.The method receiving the order of request write data can be same as the prior art, completed by production volume; Also predeterminable receiving trap, the order of the request write data that direct Receiving Host issues; The receive mode of the order of the request write data that the embodiment of the present invention is concrete is not limited.
Step S200, judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, if so, perform step S300, if not, perform step S400;
The logical address of the described LUN of simplifying to be written is distributed the situation of simplifying pond storage space and is comprised three kinds of situations: the first, the logical address part of the described LUN of simplifying to be written has been distributed and simplified pond storage space; The second, the logical address of the described LUN of simplifying to be written is all distributed and is simplified pond storage space; Three, the logical address of the described LUN of simplifying to be written is all unallocated simplifies pond storage space.Wherein, the second situation is the judged result situation that is yes, performs step S300, first and the third situation be the situation that judged result is no, perform step S400.
Step S300, described data to be written write is simplified in the storage space distributed in pond;
Simplify pond storage space when the logical address of the described LUN of simplifying to be written is all distributed, then with reference to the disposal route of prior art, described data to be written are write direct in the storage space distributed.
Step S400, determine in described logical address, not to be assigned with the length that the continuous print logical address of simplifying pond storage space can write data, the integral multiple size of the minimum memory unit that can provide with storer, applies for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying;
Here storer can be disk, tape or solid state hard disc.
The situation that step S200 judged result is no comprise following both: the logical address of the described LUN of simplifying to be written is completely unallocated simplifies pond storage space; The logical address part distribution of the described LUN of simplifying to be written is simplified pond storage space part and is distributed.In actual applications, both of these case only there will be one wherein, after determining situation corresponding in practical application, determines not to be assigned with the length that the continuous print logical address of simplifying pond storage space can write data in the logical address in corresponding situation.
Determining after described continuous print logical address can write the length of data, can according to formula: the size × N of the minimum memory unit that storer can provide, is more than or equal to the length that described continuous print logical address can write data; Draw N value, the size of the minimum memory unit that can provide with described N number of storer, to simplifying pond application storage space.
Preferably, when meeting described continuous print logical address and can writing the storage demand of data, level off to described continuous print logical address can write the storage space of the length of data to simplifying pond application size.
Preferably, can perform by simplifying LUN to simplifying pond application storage space, concrete, can in the minimum value of simplifying pre-defined partition size on LUN, the size of the minimum memory unit that described partition size minimum value can provide for described storer, in units of described integral multiple of simplifying the minimum value of LUN partition size, apply for being more than or equal to the length that described continuous print logical address can write data to described pond of simplifying, the difference between the size of simplifying the storage space in pond of described application and the length of described data to be written is less than predetermined threshold value.
At present, the minimum memory unit that storer can provide is sector, and size is 512 bytes.
The information that pond responds the storage space that above-mentioned application distributes is simplified in step S500, reception, data to be written is write in corresponding storage space.
Simplify after pond receives storage space application, respond described application, distribute the storage space identical with the storage size of described application, send the information of the storage space distributed, the information of the storage space of this distribution records the positional information and size information of simplifying the storage space that pond is distributed; After the information of storage space obtaining described distribution, just can obtain position and the size of the storage space that the data in described continuous print logical address should write from this information, the data to be written corresponding to described continuous print logical address are write in corresponding storage space.
The method of the write data shown in Fig. 1, after the order receiving request write data, judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, if, then directly data to be written are write in memory allocated space, if not, determine in described logical address, not to be assigned with the length that the continuous print logical address of simplifying pond storage space can write data, the integral multiple size of the minimum memory unit that can provide with storer, apply for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying, after the information obtaining the storage space of simplifying pond distribution, by in data write respective stored space to be written.
Existing pond of simplifying of simplifying configuration-system is with self fixing partition size memory allocated space, and be the demand of comprehensive large data service and small data business, the value of fixed allocation granularity is comparatively moderate (being generally million grades), therefore there is waste system resource, the phenomenon that resource utilization ratio is low is concrete:
(1) fixed allocation Relative Size is excessive in small data business; Doubly storage space can only be applied for the positive integer of simplifying the predetermined fixed allocation granularity in pond owing to simplifying LUN, so for small data business, as depositor's document data base etc. of bank, simplify the data to be written that minimized storage space (storage space of a fixed allocation granularity) that LUN applies for issues relative to main frame also much larger, this just cause simplify the storage space distributed in pond cannot Appropriate application, there is the situation that pond storage resources is simplified in waste;
(2) for the storage space that large data service distributes, multiple map tag need be used to carry out record; For large data service, as video library etc., the allocation space of simplifying LUN application is many times of described fixed allocation granularity, then need to use multiple map tag to carry out record to this large storage demand business, this just causes the waste of system memory resource.
And present invention eliminates pond fixed allocation granularity of simplifying of the prior art, the integral multiple size of the minimum memory unit that can provide with storer, to simplifying pond application storage space, because the storage space of application is based on the minimum memory unit that can provide by storer, therefore the storage space of simplifying in pond applied for can be made to be infinitely close to storage size needed for data, to avoid the waste of simplifying system resource in pond as far as possible; Secondly, simplify storage space that pond distributes as an integral dispensing granularity of simplifying pond, no longer distinguish with the pond fixed allocation granularity of simplifying of prior art, make logical address of simplifying LUN to be written, physical address corresponding on pond is being simplified with it, can a map tag form record in the mapping table, save memory source.The invention solves existing configuration-system of simplifying owing to simplifying pond with self fixing partition size memory allocated space, and the waste system resource caused, problem that resource utilization ratio is low, achieve effective utilization of system resource.
Judge whether in step S200 shown in Fig. 1 to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, can be realized by the logical address record case in the mapping table detecting the described LUN of simplifying to be written, concrete grammar can as shown in Figure 2, and the method comprising the steps of:
Step S210, detect the described record of logical address in described mapping table of simplifying LUN to be written;
If the logical address of the described LUN of simplifying to be written of step S220 is recorded in described mapping table completely, then judge to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space;
If the logical address part of the described LUN of simplifying to be written of step S230 or be not recorded in described mapping table, then judge not distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space.
Determine in described logical address in step S400 shown in Fig. 1, be not assigned with the continuous print logical address of simplifying pond storage space can write the concrete grammar of the length of data can according to as described below:
The situation of simplifying pond storage space is distributed for not giving the logical address of the described LUN of simplifying to be written, namely the logical address of the described LUN of simplifying to be written is completely unallocated simplifies pond storage space, be not then assigned with the length that length that the continuous print logical address of simplifying pond storage space can write data is the data to be written in the order of described request write data described in;
The situation of simplifying pond storage space is distributed for not giving the logical address of the described LUN of simplifying to be written completely, namely pond storage space part distribution is simplified in the logical address part distribution of the described LUN of simplifying to be written, need split whole data to be written, be specifically as follows: with logic continuation address corresponding to memory allocated space for splitting point, the logical address of the described LUN of simplifying to be written is split, the logical address of the LUN of simplifying described to be written after fractionation comprises: be assigned with the continuous print logical address of storage space and be not assigned with the continuous print logical address of storage space, wherein, there is record in the mapping table in the continuous print logical address being assigned with storage space, there is not record in the mapping table in the continuous print logical address not being assigned with storage space, the continuous print logical address not being assigned with storage space calculated after splitting can write the length of data, and circular can refer to existing data length computing method, repeats no more herein, the length that the continuous print logical address of simplifying pond storage space can write data that is not assigned with after splitting is defined as not being assigned with the length that the continuous print logical address of simplifying pond storage space can write data.
The situation of simplifying pond storage space is distributed for not giving the logical address of the described LUN of simplifying to be written completely, because the logical address of the LUN of simplifying described to be written after fractionation comprises: be assigned with the continuous print logical address of storage space and be not assigned with the continuous print logical address of storage space, therefore step S500 shown in Fig. 1 is by data write corresponding for the described continuous print logical address not being assigned with storage space, while simplifying the storage space distributed in pond, can also step be comprised:
By be assigned with storage space continuous print logical address corresponding to data to be written, write in the storage space distributed.
Can also step be comprised after step S500 shown in Fig. 1:
By described logical address of simplifying LUN to be written, simplifying physical address corresponding on pond with it, with the form record of map tag in the mapping table;
Preferably, can the form record of a map tag.
Inventor finds in practice process of the present invention, the integral multiple size of the minimum memory unit that can provide with storer, apply for being more than or equal to described pond of simplifying, described continuous print logical address can write the storage space of the length of data, can be preferably: the power side with 2 of memory sectors doubly, is more than or equal to simplifying pond application the storage space that described continuous print logical address can write the length of data.Such numerical value is arranged based on general binary data recording mode, therefore for existing storage, as hard disk etc., can record data comparatively easily.
The integral multiple size of the minimum memory unit that the present invention can provide with storer, to simplifying pond application storage space, relative to small data business, the minimum memory unit that a storer can provide by the present invention distributes to this small data business, thus improve storage space utilization factor to greatest extent, simplify for the fixed allocation granularity of million grades, pond relative to existing, the present invention can reduce the space of simplifying pond and wasting in small data business greatly.
The present invention unloads except being arranged at the fixed allocation granularity of simplifying pond, simplify the storage space of pond distribution no longer with the segmentation of existing fixed allocation granularity, but will storage space that pond distributes be simplified as an integral dispensing granularity of simplifying pond, distribute complete storage space, thus make the corresponding storage space of simplifying pond and distributing of in mapping table of the present invention map tag, relative to prior art, present invention greatly reduces the use number of map tag, avoid the waste of system memory resource.
For illustrate above based on the method for write data of simplifying configuration-system, the system of corresponding write data hereafter will be shown.
Fig. 3 is a kind of structured flowchart writing the system of data of the present invention.With reference to Fig. 3, this system can comprise:
Receiver module 100, for receiving the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
Judge module 200, simplifies pond storage space for judging whether to distribute completely to the logical address of the described LUN of simplifying to be written;
Determination module 300, for when the judged result of described judge module is no, determines in described logical address, is not assigned with the length that the continuous print logical address of simplifying pond storage space can write data;
Application module 400, for the integral multiple size of minimum memory unit that can provide with storer, applies for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying;
Store information receiving module 500, for receiving the information of simplifying the storage space that application that pond responds described application module distributes;
Writing module 600, for when the judged result of described judge module is for being, described data write to be written is simplified in the storage space distributed in pond, or after described storage information receiving module receives the storage space information of simplifying and distributing in pond, data to be written are write in corresponding storage space.
Wherein, the structure of judge module 200 can as shown in Figure 4, comprise:
Detecting unit 210, for detecting the described record of logical address in described mapping table of simplifying LUN to be written;
Identifying unit 220, during for detecting that the logical address of the described LUN of simplifying to be written is recorded in described mapping table completely at described detecting unit, judge to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, or, when described detecting unit detects the logical address part of the described LUN of simplifying to be written or is not recorded in described mapping table, judge not distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space.
The structure of determination module 300 can as shown in Figure 5, comprise:
First determining unit 310, for when simplifying pond storage space to the distribution of the logical address of the described LUN of simplifying to be written, the length of described data to be written is defined as, is not describedly assigned with the length that the continuous print logical address of simplifying pond storage space can write data;
Split cells 320, for simplifying pond storage space, with logical address corresponding to memory allocated space for splitting point, splitting the logical address of the described LUN of simplifying to be written distributing to completely the logical address of the described LUN of simplifying to be written;
Second determining unit 330, for the length that the continuous print logical address of simplifying pond storage space can write data that is not assigned with after splitting being defined as, is not describedly assigned with the length that the continuous print logical address of simplifying pond storage space can write data.
Writing module 600 can also be used for, the continuous print logical address in the space of memory allocated after being split by split cells 320, corresponding data, writes in memory allocated space.
The structure of application module 400 can as shown in Figure 6, comprise:
Predefine unit 410, for simplifying the minimum value of LUN partition size described in pre-defined, the size of the minimum memory unit that the minimum value of described partition size can provide for described storer;
Application unit 420, for by the positive integer of simplifying the minimum value of LUN partition size described in the definition of described predefine unit doubly in units of, apply for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying, the difference between the size of simplifying the storage space in pond of described application and the length of described data to be written is less than predetermined threshold value.
Another structured flowchart of the system of the write data that Fig. 7 provides for the embodiment of the present invention.Composition graphs 3 and system shown in Figure 7, system shown in Figure 7 also comprises:
Mapping table module 700, for by described logical address of simplifying LUN to be written, is simplifying the corresponding physical address on pond with it, with the form record of map tag in the mapping table.
Foregoing illustrates the software module composition of the system that the present invention is based on the write data of simplifying configuration, it should be noted that, the system of write data of the present invention also can exist in the form of hardware, will enumerate several the present invention and write the embodiment of the hardware state of the system of data below.
The hardware structure figure of the system of the write data that Fig. 8 provides for the embodiment of the present invention, common with reference to Fig. 7 and Fig. 8.
Interface module 100 can interface 01 form exist, by receive request write data order stored in the first database 02;
First database 02 stores the order of described request write data;
First processor 03 is for being built-in with the processor of judge module 200 and determination module 300 functional software, first processor 03 extracts the first order of fetching data the reception request write data stored in storehouse 02, judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, when judged result is no, determine in described logical address, be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data, when wherein relating to the fractionation to data, data to be written after fractionation can be deposited in the first database 02 by first processor 03 again,
Simplify the function that LUN 04 is built-in with application module 400, the integral multiple size of its minimum memory unit that can provide with storer, apply for being more than or equal to described pond of simplifying, described continuous print logical address can write the storage space of the length of data;
Simplify the application that LUN 04 is simplified in pond 05 response, distribute corresponding storage space, send the information about memory allocated locus and size;
The function storing information receiving module 500 can be built in input media 06 in a software form, or simplifies in LUN 04;
Input media 06 is built-in with the software of writing module 600 function, and when it is also built-in with the software storing information receiving module 500 function, the data corresponding to be written that can store in extracting directly first database 02, writes in the storage space of simplifying pond distribution; When the function setting of storage information receiving module 500 is in other hardware devices, as simplified LUN 04, by obtaining the information in the memory allocated space that other hardware devices forward, extract the data corresponding to be written stored in the first database 02 again, write in the storage space of simplifying and distributing in pond;
Second database 07 is built-in with the software of mapping table module 700 function, second database 07 comprises the mapping table be made up of multiple map tag, physical address corresponding on pond can be simplified described by simplifying the storage space distributed in pond, with simplifying logical address corresponding on logical block LUN, with in the form record of map tag mapping table within it;
It should be noted that, interface 01 and the first database 02 can be integrated, as occurred with the production roll form of prior art.
Fig. 9 is another hardware structure figure that the present invention writes the system of data, with reference to Fig. 7 and Fig. 9.
Produce the order of the request write data that volume 012 Receiving Host issues;
First processor 03, for being built-in with the processor of judge module 200 and determination module 300 functional software, from generating volume 012 order of extracting request write data, processes accordingly;
Simplify the software that LUN 04 is built-in with application module 400 function simultaneously, store the software of information receiving module 500 function, and the software of writing module 600 function;
Simplify the application that LUN 04 is simplified in pond 05 response, distribute corresponding storage space, and send the information stored about memory allocated;
Second database 07 is built-in with the function of mapping table module 700, and the second database 07 comprises the mapping table be made up of multiple map tag.
It should be noted that, Fig. 8 and hardware structure figure illustrated in fig. 9, just the optimal way of hardware structure of the present invention, it should not become the restriction to hardware structure system of the present invention.Those skilled in the art completely can by the technology enlightenment given by the specific embodiment of the invention; in conjunction with shown by corresponding software principle and hardware form; software restraint of the present invention is made corresponding distortion and integrated; and draw similar or corresponding software restraint; be worth be explanatorily; this distortion does not depart from technological thought of the present invention with integration, should in protection scope of the present invention yet.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.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 distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (8)

1. write a method for data, it is characterized in that, comprising:
Receive the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
Judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space;
If so, then described data write to be written is simplified in the storage space distributed in pond;
If distribute to completely the logical address of the described LUN of simplifying to be written simplify pond storage space, then to be assigned with logical address corresponding to storage space for splitting point, the logical address of the described LUN of simplifying to be written is split, determine split after be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data, the integral multiple size of the minimum memory unit that can provide with storer and level off to and be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data after described fractionation, apply for being more than or equal to the storage sky news that described continuous print logical address can write the length of data to described pond of simplifying,
Receive and simplify the information that pond responds the storage space that above-mentioned application distributes, data to be written are write in corresponding storage space.
2. method according to claim 1, is characterized in that, also comprises:
By described logical address of simplifying LUN to be written, simplifying physical address corresponding on pond with it, with the form record of map tag in the mapping table.
3. method according to claim 2, is characterized in that, described in judge whether to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space and comprise:
Detect the described record of logical address in described mapping table of simplifying LUN to be written;
If the logical address of the described LUN of simplifying to be written is recorded in described mapping table completely, then judge to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space;
If the logical address part of the described LUN of simplifying to be written or be not recorded in described mapping table, then judge not distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space.
4. method according to claim 1, it is characterized in that, the integral multiple size of the described minimum memory unit that can provide with storer and level off to and be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data after described fractionation, simplify pond application and be more than or equal to the storage space that described continuous print logical address can write the length of data to described and comprise:
The minimum value of LUN partition size is simplified, the size of the minimum memory unit that described partition size minimum value can provide for described storer described in pre-defined;
Not being assigned with the continuous print logical address of simplifying pond storage space and can writing in units of the length of data after described fractionation is leveled off to by the integral multiple size of the minimum value of the described LUN of simplifying partition size, apply for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying, the difference of the news of the size of simplifying the storage space in pond of described application and the length of described data to be written is less than predetermined threshold value.
5. write a system for data, it is characterized in that, comprising:
Receiver module, for receiving the order of request write data, the order of described request write data comprises data to be written, the length of described data to be written and logical address of simplifying logical unit number LUN to be written;
Judge module, simplifies pond storage space for judging whether to distribute completely to the logical address of the described LUN of simplifying to be written;
Determination module, for when simplifying pond storage space to completely the distribution of the logical address of the described LUN of simplifying to be written, to be assigned with logical address corresponding to storage space for splitting point, the logical address of the described LUN of simplifying to be written is split, determine split after be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data;
Application module, level off to and be not assigned with the length that the continuous print logical address of simplifying pond storage space can write data for the integral multiple size of minimum memory unit that can provide with storer after described fractionation, simplify pond application and be more than or equal to described the storage space that described continuous print logical address can write the length of data;
Store information receiving module, for receiving the information of simplifying the storage space that application that pond responds described application module distributes;
Writing module, for when the judged result of described judge module is for being, described data write to be written is simplified in the storage space distributed in pond, or after described storage information receiving module receives the storage space information of simplifying and distributing in pond, data to be written are write in corresponding storage space.
6. system according to claim 5, is characterized in that, also comprises:
Mapping table module, for by described logical address of simplifying LUN to be written, is simplifying the corresponding physical address on pond with it, with the form record of map tag in the mapping table.
7. system according to claim 6, is characterized in that, described judge module comprises:
Detecting unit, for detecting the described record of logical address in described mapping table of simplifying LUN to be written;
Identifying unit, during for detecting that the logical address of the described LUN of simplifying to be written is recorded in described mapping table completely at described detecting unit, judge to distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space, or, when described detecting unit detects the logical address part of the described LUN of simplifying to be written or is not recorded in described mapping table, judge not distribute completely to the logical address of the described LUN of simplifying to be written to simplify pond storage space.
8. system according to claim 5, is characterized in that, described application module comprises:
Predefine unit, for simplifying the minimum value of LUN partition size described in pre-defined, the size of the minimum memory unit that the minimum value of described partition size can provide for described storer;
Application unit, for leveling off to not being assigned with the continuous print logical address of simplifying pond storage space and can writing in units of the length of data after described fractionation by the positive integer times size of simplifying the minimum value of LUN partition size described in the definition of described predefine unit, apply for being more than or equal to the storage space that described continuous print logical address can write the length of data to described pond of simplifying, the value between the size of simplifying the storage space in pond of described application and the length of described data to be written is less than predetermined threshold value.
CN201210095935.3A 2012-04-01 2012-04-01 Method and system for writing data Active CN102650931B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210095935.3A CN102650931B (en) 2012-04-01 2012-04-01 Method and system for writing data
PCT/CN2013/071975 WO2013149524A1 (en) 2012-04-01 2013-02-28 Method and system for writing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210095935.3A CN102650931B (en) 2012-04-01 2012-04-01 Method and system for writing data

Publications (2)

Publication Number Publication Date
CN102650931A CN102650931A (en) 2012-08-29
CN102650931B true CN102650931B (en) 2015-07-08

Family

ID=46692940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210095935.3A Active CN102650931B (en) 2012-04-01 2012-04-01 Method and system for writing data

Country Status (2)

Country Link
CN (1) CN102650931B (en)
WO (1) WO2013149524A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102650931B (en) * 2012-04-01 2015-07-08 华为技术有限公司 Method and system for writing data
CN103793386B (en) 2012-10-29 2017-12-12 腾讯科技(深圳)有限公司 The method and system of data processing
CN104915146A (en) * 2014-03-14 2015-09-16 中兴通讯股份有限公司 Resource distribution method and device based on automatic thin provisioning
CN104407936B (en) * 2014-11-18 2017-08-18 华为数字技术(成都)有限公司 A kind of data snapshot method and device
CN105786724B (en) * 2014-12-24 2018-12-25 华为技术有限公司 Space management and device
WO2016127291A1 (en) * 2015-02-09 2016-08-18 华为技术有限公司 Memory management device and method
CN106326132B (en) * 2015-06-29 2020-03-27 华为技术有限公司 Storage system, storage management device, memory, hybrid storage device, and storage management method
CN105049178A (en) * 2015-07-23 2015-11-11 柳州易旺科技有限公司 Multi-user information screening method
CN107533435B (en) * 2015-12-21 2020-04-28 华为技术有限公司 Storage space allocation method and storage equipment
CN106897031A (en) * 2017-03-01 2017-06-27 深圳市博信诺达经贸咨询有限公司 It is applied to the storage method and system of big data
CN107122131B (en) * 2017-04-18 2020-08-14 杭州宏杉科技股份有限公司 Thin provisioning method and device
CN107220184B (en) * 2017-05-10 2019-07-09 杭州宏杉科技股份有限公司 A kind of management method and device of LUN storage unit
CN109671458A (en) * 2017-10-17 2019-04-23 联发科技股份有限公司 The method of management flash memory module and relevant flash controller
CN108023963B (en) * 2017-12-15 2019-03-12 北京明朝万达科技股份有限公司 A kind of data processing method and device
CN109669640B (en) 2018-12-24 2023-05-23 浙江大华技术股份有限公司 Data storage method, device, electronic equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976223A (en) * 2010-10-09 2011-02-16 成都市华为赛门铁克科技有限公司 Thin provisioning method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7130960B1 (en) * 2005-04-21 2006-10-31 Hitachi, Ltd. System and method for managing disk space in a thin-provisioned storage subsystem
US7444489B2 (en) * 2005-05-13 2008-10-28 3Par, Inc. Applications for non-disruptively moving data between logical disk regions in a data storage system
CN101382877A (en) * 2008-10-15 2009-03-11 青岛海信移动通信技术股份有限公司 FAT file data reading/writing method, system and mobile communication terminal
CN101477447A (en) * 2009-01-21 2009-07-08 杭州华三通信技术有限公司 Disk snap method and apparatus
CN101625627B (en) * 2009-08-05 2012-03-21 成都市华为赛门铁克科技有限公司 Data read-in method, disc redundant array and controller thereof
CN101719052B (en) * 2009-12-22 2012-05-02 成都市华为赛门铁克科技有限公司 Method, device and system for writing data
CN102289510B (en) * 2011-08-31 2013-10-09 华为数字技术(成都)有限公司 Method and device for writing data to production volume
CN102650931B (en) * 2012-04-01 2015-07-08 华为技术有限公司 Method and system for writing data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976223A (en) * 2010-10-09 2011-02-16 成都市华为赛门铁克科技有限公司 Thin provisioning method and device

Also Published As

Publication number Publication date
WO2013149524A1 (en) 2013-10-10
CN102650931A (en) 2012-08-29

Similar Documents

Publication Publication Date Title
CN102650931B (en) Method and system for writing data
US10223010B2 (en) Dynamic storage device provisioning
CN110663019B (en) File system for Shingled Magnetic Recording (SMR)
CN102255962B (en) Distributive storage method, device and system
CN102185929A (en) Storage area network (SAN)-resource-based video monitoring data storage method and device
CN101373445B (en) Method and apparatus for scheduling memory
CN103761053A (en) Data and method for data processing
WO2017107015A1 (en) Storage space allocation method, and storage device
CN103399823A (en) Method, equipment and system for storing service data
CN104536903A (en) Mixed storage method and system for conducting classified storage according to data attributes
CN109753361A (en) A kind of EMS memory management process, electronic equipment and storage device
CN115421651A (en) Data processing method of solid state disk, electronic device and medium
CN109683830A (en) A kind of method for writing data, system and the associated component of full flash memory array
CN105404691A (en) File storage method and apparatus
CN114138193A (en) Data writing method, device and equipment for solid state disk with partitioned name space
CN107193693A (en) A kind of online data storage optimization method based on storage system
WO2015135281A1 (en) Resource allocation method and device based on thin provisioning
CN115437579B (en) Metadata management method and device, computer equipment and readable storage medium
CN104426965A (en) Self-management storage method and system
CN102520879A (en) Priority-based file information storage method, device and system
CN109725844B (en) Disk allocation method, device and storage system
CN107632944B (en) Method and device for reading data
CN115562595A (en) Volume creating method and device, volume reading and writing method and device, and electronic equipment
CN102063383A (en) Method for recording mapping relation between logical extents (LE) and physical extents (PE)
CN112631518B (en) Data storage method and equipment

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