WO2013097618A1 - 存储虚拟化的装置、存储***及数据存储方法及*** - Google Patents
存储虚拟化的装置、存储***及数据存储方法及*** Download PDFInfo
- Publication number
- WO2013097618A1 WO2013097618A1 PCT/CN2012/086624 CN2012086624W WO2013097618A1 WO 2013097618 A1 WO2013097618 A1 WO 2013097618A1 CN 2012086624 W CN2012086624 W CN 2012086624W WO 2013097618 A1 WO2013097618 A1 WO 2013097618A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- logical
- storage
- module
- block
- resource block
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0665—Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
Definitions
- the invention name is “storage virtualization device, storage system and data storage method and system” and submitted to the Chinese Patent Office on February 9, 2012, application number 201210028862.6, the invention name is "storage virtualization device, storage system The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference.
- TECHNICAL FIELD The present invention relates to data storage technologies, and in particular, to a storage virtualization device, a data storage method, and a system, and belongs to the field of storage technologies.
- NAND Flash memory has been widely used due to its large capacity and fast rewriting speed, which has promoted the rapid development of solid-state memory.
- solid-state storage can be mainly divided into two categories, one is small-size solid-state memory, including memory cards, 1.0-3.5" solid-state memory; the other is large-size solid-state memory, including high-speed external device interconnect bus (PCIE) card and Rack-mount arrays
- PCIE peripheral device interconnect bus
- Rack-mount arrays include both open architecture and closed architecture.
- the open architecture is similar to traditional arrays with dual controllers, built-in standard form of solid-state memory, and hardware and software optimization for higher performance and functionality.
- SSD solid state memory
- DIMM dual in-line memory module
- PCIE SSD cards custom PCIE SSD cards
- CPU central processing unit
- solid-state storage mainly pursues high speed, using NAND's high random input / output (I / O) storage capacity to push the speed of the array to the limit
- I / O random input / output
- the conventional array fixed mapping method is generally used, that is, a Redundant Array of Independent Disk (RAID) group is established, and RAID is set.
- RAID Redundant Array of Independent Disk
- the storage space on the group is allocated to different users. Therefore, the storage space is isolated by different users, in which case there may be some users
- the storage space allocation is too small and other users' storage space is idle, the physical storage space cannot be effectively utilized, and the performance advantages of solid-state storage cannot be maximized.
- the present invention provides a storage virtualization device, a data storage method and system for improving the utilization of a physical storage space.
- an apparatus for storing virtualization includes:
- a logical storage unit module configured to form at least one logical storage unit by performing independent redundant disk array RAID group division on the at least two solid state memories;
- a resource block module configured to perform striping processing on the logical storage unit, and form a separate mapping module, configured to receive a write request message sent by the host, and obtain, according to the logical address carried in the write request message, for writing a logical block number of the data to be written; obtaining an idle storage resource block, and calculating a physical block number of the obtained free storage resource block according to the obtained logical storage unit offset and the logical strip number of the free storage resource block Establishing a mapping relationship between the logical block number and the physical block number;
- a data writing module configured to write the to-be-written data into a storage space corresponding to the physical block number according to the mapping relationship.
- a data storage method including:
- a data storage system including:
- a physical storage module comprising at least two solid state memories
- a logical storage unit module configured to form at least one logical storage unit by performing independent redundant disk array RAID group division on the at least two solid state memories;
- a resource block module configured to perform striping processing on the logical storage unit, and form a separate mapping module, configured to receive a write request message sent by the host, and obtain, according to the logical address carried in the write request message, for writing a logical block number of the data to be written; obtaining an idle storage resource block, and calculating a physical block number of the obtained free storage resource block according to the obtained logical storage unit offset and the logical strip number of the free storage resource block Establishing a mapping relationship between the logical block number and the physical block number;
- the physical storage module is further configured to write the to-be-written data into a storage space corresponding to the physical block number according to the mapping relationship.
- the storage virtualization apparatus, data storage method and system according to the present invention allocate only logical block numbers by not requiring a fixed storage resource to be allocated to the user or the host in advance.
- the storage resource block based on the resource block module establishes a mapping relationship between the logical block number and the real physical storage resource, that is, realizes storage resource allocation, and is rid of the resource allocation based on the storage resource block.
- the limitation of the RAID group Therefore, dynamic and flexible mapping between users and physical storage resources is realized, thereby maximizing the utilization of physical storage space.
- FIG. 1 is a block diagram of a data storage system for applying an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of a data storage system according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a striping process of a logical storage unit
- Figure 4 is a schematic diagram of the mapping relationship between LBN and PBN
- FIG. 5 is a schematic structural diagram of a user applying to establish an LU
- FIG. 6 is a schematic structural diagram of an apparatus for storing virtualization according to an embodiment of the present invention.
- FIG. 7 is a schematic flowchart diagram of a data storage method according to an embodiment of the present invention. detailed description
- FIG. 1 is a block diagram of a data storage system for applying an embodiment of the present invention. As shown in FIG. 1, the data storage system is connected to at least one host for storing host data.
- the data storage system includes a physical storage module 21, a logical storage unit module 22, a resource block module 23, and a mapping module 24, wherein:
- the physical storage module 21 includes at least two solid state memories
- the logical storage unit module 22 is configured to form at least one logical storage unit by performing RAID group division on the at least two solid state memories;
- the resource block module 23 is configured to perform striping processing on the logical storage unit to form respectively
- the mapping module 24 is configured to receive a write request message sent by the host, obtain a logical block number for writing the data to be written according to the logical address carried in the write request message, and obtain an idle storage resource block, according to the acquired idle
- the logical storage unit offset of the storage resource block and the logical strip number calculate the physical block number of the obtained free storage resource block, and establish a mapping relationship between the logical block number and the physical block number;
- the physical storage module 21 is further configured to write the to-be-written data into a storage space corresponding to the physical block number according to the mapping relationship.
- the data storage system is divided into four layers, and the physical storage module 21, the logical storage unit module 22, the resource block module 23, and the mapping module 24 respectively correspond to one layer of the storage system, that is, the physical storage module 21 corresponds to the physical layer.
- the storage layer, the logical storage unit module 22 corresponds to the logical storage unit layer, the resource block module 23 corresponds to the resource block layer, and the mapping module 24 corresponds to the mapping layer.
- the lowest layer is the physical storage layer, and the physical storage layer includes the physical storage medium that actually exists.
- the physical storage medium is, for example, an SSD, a direct attached storage device (DAS), a network attached storage (NAS), or a storage area network (SAN), etc., and is preferably an SSD.
- the upper layer of the physical storage layer is the logical storage unit layer.
- the logical storage unit layer divides the physical storage medium of the physical storage layer into RAID groups.
- RAID groups can be divided into several common RAID levels, such as RAID 1, RAID 3, RAID 5, and RAID 10.
- the physical storage medium is an SSD disc
- the RAID group is divided into RAID 10 levels as an example.
- the physical storage layer includes 2N SSD disks, where N is a natural number.
- 2N SSD discs are divided into two RAID groups, and a total of N RAID1 groups are formed.
- One RAID1 group is a logical storage unit of the logical storage unit layer, and each logical storage unit exists in a RAID0 manner. .
- the logical storage unit is striped.
- FIG. 3 is a schematic diagram of a striping process of a logical storage unit, as shown in FIG. 3. Assuming that the host I/O is randomly distributed in 4KB, the 4KB stripe depth of the logical storage unit is stripped, and a spare device can be stored in a H, ⁇ .
- Each CHUNK identifier has a logical storage unit offset (Disk Offset) and a logical strip number (Logic Strip No) corresponding to the CHUNK.
- the mapping layer Above the CHUNK layer is the mapping layer.
- the logical block number (LBN) is stored in the mapping layer, and the number of LBNs is equal to the number of CHUNKs included in the CHUNK layer.
- the mapping layer establishes a logical unit number (LUN) for the user according to the storage space allocation instruction sent by the user through the host, and allocates a certain number of LBN according to the storage space required by the user.
- LUN logical unit number
- PBN physical block number
- the structure of PBN is "Disk Offset" + "Logic Strip No". Assuming a stripe depth of 4 KB, for a SSD disc with a storage capacity of 400 GB, 27 logical bits are required to identify the logical strip number; assuming that the logical storage unit layer includes 24 logical storage units, 5 bits are required. To identify the logical storage unit offset, then each PBN has a length of 32 bits.
- the mapping layer establishes and stores the mapping relationship between the user's LBN and the calculated PBN. For example, as shown in Figure 4, Figure 4 is a schematic diagram of the mapping between LBN and PBN.
- mapping layer responds to the write request message and completes the mapping between the LBN and the PBN of the user
- allocation of the storage resource is completed for the data to be written of the write request message
- the data to be written is written into the physical storage layer according to the PBN. Corresponding storage location. At this point, the data storage is completed.
- mapping layer When the mapping layer receives the read request command sent by the user through the host, by querying the mapping relationship between the LBN and the PBN of the user, the real storage location of the data to be read in the physical storage layer can be obtained, thereby reading out the data.
- the CHUNK corresponding to the PBN is released, and the mapping relationship between the LBN and the PBN of the user is deleted.
- the data storage system of the above embodiment by dividing into a physical storage module, a logical storage unit module, a resource block module, and a mapping module, it is not necessary to allocate a fixed storage resource to the user or the host in advance, and only the logical block number is allocated.
- a write request message based on the resource block layer Storage resource allocation, and since resource allocation based on storage resource blocks, is free from the limitations of RAID groups. Therefore, dynamic and flexible mapping between users and physical storage resources is realized, thereby maximizing the utilization of physical storage space.
- the mapping module is further configured to receive a storage space allocation instruction that is sent by the host and that carries a request allocation space length, and establish a logical unit number on the host in response to the storage space allocation instruction. Calculating a first number of logical block numbers to be allocated according to the request allocation space length and a space length of each logical block number, allocating a first number of logical block numbers on the host, and establishing the logical unit number of the first data A write request operation is performed in correspondence with the assigned logical block number.
- the performing the write request operation is the corresponding operation performed when the mapping module receives the write request message sent by the host in the foregoing embodiment, that is, obtaining the write request to be written according to the logical address carried in the write request message.
- Obtaining a logical block number of the data obtaining an idle storage resource block, calculating a physical block number of the obtained free storage resource block according to the obtained logical storage unit offset and the logical strip number of the free storage resource block, and establishing a mapping relationship between the logical block number and the physical block number.
- the first number may, for example, be a multiple of the space length of the request allocation space length relative to each logical block number.
- FIG. 5 is a schematic structural diagram of a user applying for establishing a LUN.
- the mapping layer creates a LUN in response to the storage space allocation instruction of user 1, for example, identifying the LUN as LUN 1.
- the mapping layer draws four LBNs from the LBN as the LBN of the LUN 1, for example, the logic of LBN0-LBN3 and LBN0-LBN3 in FIG.
- the address has a corresponding relationship with the host logical address.
- the LUN corresponding to the user 1 is LUN1, and the LBN corresponding to the user is LBN0-LBN3. Since the write request message further carries a host logical address for storing the data to be written, for example, the start address is
- the data length to be written is 4M, then the logical address of the host can be selected from LBN0-LBN3?
- Ten T T / RN for example, T, N7 ⁇ fc THTT K , i+ The PBN of CHUNK, and establishes the mapping relationship between LBN2 and PBN.
- the mapping module is further configured to receive a capacity expansion instruction that is sent by the host and that carries the length of the request extension space, and calculate the space length according to the request and the space length of each logical block number. a second number of logical block numbers to be extended, selecting the calculated second number of logical block numbers from the idle logical block numbers, and adding a correspondence between the second number of the logical unit numbers and the selected logical block numbers , to expand the capacity of the logical unit number.
- the idle logical block number is a logical block number in which the correspondence with any LUN is not established.
- the second number is, for example, a multiple of the spatial length of the request extension space length relative to each logical block number.
- LUN1 when LUN1 needs to be extended, user 1 can send a capacity extension instruction to the mapping layer.
- the mapping layer After receiving the capacity expansion command sent by user 1, the mapping layer creates another LUN for user 1, for example, LUN5, and continues to divide a contiguous area in the idle LBN, for example, LBN11-LBN14 in Figure 5, then LUN5 and LUN1 starts as the logical storage space of User 1.
- the LUN is allocated to the user
- the LBN is allocated to the user LUN
- the mapping relationship between the LBN and the PBN is implemented by using the mapping module. Therefore, the LUN allocation can be freely restricted by the RAID group. Expansion, which makes it easy to allocate resources across RAID groups.
- the resource block module is further configured to group each storage resource block according to a logical storage unit, and set corresponding to each storage resource block, and record the storage resource. a write count value of the number of write operations of the block; correspondingly, when the mapping module acquires an idle storage resource block from the resource block module in response to the write request message, it is further used to compare writes of each idle storage resource block The count value and the average number of write operations of the storage system to obtain a storage resource block whose write count value is lower than the average number of write operations of the storage system.
- global wear leveling can also be achieved using the data storage system of the above embodiments.
- the wear level of the whole system is carried out in units of CHUNK. For each CHUNK, one writes the Woot, and is prepared;: ⁇ 10, ⁇ ⁇ jH thousand condensed days, ⁇ ⁇ . ⁇ ⁇ ⁇ % ik Add 1 to the value.
- a global write operation count value (Gent) is also set, that is, the system performs a write operation, and the global write operation count value is incremented by 1, by dividing the global write operation count value by the number of logical storage units of the system. Get the average number of write operations for the system. Therefore, it is possible to distinguish between higher or lower than the average number of write operations of the system by traversing all logical storage units in the system.
- CHUNK sorting and moving operations to achieve wear leveling.
- load balancing can also be implemented in the data storage system of the above embodiment.
- the CHUNK is grouped according to the logical storage unit to which it belongs, and the CHU K in the next logical storage unit is sequentially allocated each time the write request message arrives. For example, in response to the first write request message, CHUNK is selected from the first logical storage unit; in response to the second write request message, CHUNK is selected from the second logical storage unit, and so on.
- the write request message can be sent to the CHUNK of different logical storage units to implement load balancing of each logical storage unit in the system.
- the method further includes:
- the mapping module is further configured to send an alarm signal when the number of idle storage resource blocks in the resource block module is lower than a preset threshold, so that the user responds to the alarm signal to the logical unit number corresponding to the user.
- a preset threshold may be arbitrarily set by the user according to requirements, for example, the number of storage resource blocks set to be idle is 1/10 of the total storage resource block.
- FIG. 6 is a schematic structural diagram of an apparatus for storing virtualization according to an embodiment of the present invention.
- the device for storing virtualization includes:
- a logical storage unit module 61 configured to form at least one logical storage unit by performing independent redundant disk array RAID group division on the at least two solid state memories;
- a resource block module 62 configured to perform striping processing on the logical storage unit to form storage resource blocks respectively corresponding to the strips of the logical storage unit;
- the mapping module 63 is configured to receive a write request message sent by the host, obtain a logical block number for writing the data to be written according to the logical address carried in the write request message, and obtain an idle storage resource block, according to the obtained Logical storage unit offset and logic strip for free storage resource blocks
- the data writing module 64 is configured to write the to-be-written data into a storage space corresponding to the physical block number according to the mapping relationship.
- the device for storing virtualization in the above embodiment may be implemented in the foregoing data storage system to perform an operation on the physical storage module according to a request of a user.
- the logical storage unit module 61 divides 2N SSD disks into one RAID group according to the RAID 10 level, and forms a total of N RAID 1 groups, and one RAID 1 group is a logical storage unit of the logical storage unit layer.
- Logical storage units exist as RAID0. Further, the logical storage unit is striped. Each stripe acts as a storable resource and becomes CHUNK. These CHUNKs are placed in a resource pool to form the CHUNK layer 62.
- Each CHUNK logo has a corresponding Disk Offset and Logic Strip No.
- the mapping module 63 stores the LBN, and the number of LBNs is equal to the number of CHUNKs included in the CHUNK module.
- the mapping module 63 establishes an LU for the user according to the storage space allocation instruction sent by the user through the host, and allocates a certain number of LBNs according to the space required by the user.
- the available CHUNK is taken out in the CHUNK module 62, and the PBN of the CHUNK is calculated according to the logical storage unit offset and the logical strip number of the CHUNK.
- the structure of PBN is "Disk Offset" + "Logic Strip No".
- the mapping module 63 establishes and stores a mapping relationship between the user's LBN and the calculated PBN, as shown in FIG.
- mapping module 63 After the mapping module 63 completes the mapping of the LBN and the PBN of the user in response to the write request message, after the storage resource is allocated for the data to be written of the write request message, according to the PBN, the storage is to be stored in the H 0 3 ⁇ 4 storage. Jh, Weng
- the mapping module 63 receives the read request command sent by the user through the host, by querying the mapping relationship between the LBN and the PBN of the user, the real storage location of the data to be read in the solid state memory can be obtained, thereby reading out the data.
- the CHUNK corresponding to the PBN is released, and the mapping relationship between the LBN and the PGN of the user is deleted.
- the storage virtualization device of the above embodiment by dividing into a logical storage unit module, a resource block module, and a mapping module, it is not necessary to allocate a fixed storage resource to the user or the host in advance, and only the logical block number is allocated.
- the resource block based on the resource block layer establishes a mapping relationship between the logical block number and the real physical storage resource, that is, implements storage resource allocation, and realizes resource allocation based on the storage resource block, thereby getting rid of The limitation of the RAID group. Therefore, dynamic and flexible mapping between users and physical storage resources is implemented, thereby maximizing the utilization of physical storage space.
- the mapping module is further configured to receive a storage space allocation instruction that is sent by the host and that carries a request allocation space length, and establish logic on the host in response to the storage space allocation instruction.
- a unit number calculating a first number of logical block numbers to be allocated according to the request allocation space length and a space length of each logical block number, allocating the calculated first number of logical block numbers on the host, and establishing the A write request operation is performed by a correspondence between a number of logical unit numbers and the assigned logical block number.
- the mapping module is further configured to receive a capacity expansion instruction that is sent by the host and that carries a request extension space length, and expand the space length and the space of each logical block number according to the request.
- the length calculates a second number of logical block numbers to be expanded, selects the calculated second number of logical block numbers from the idle logical block numbers, and adds a second number for capacity expansion.
- the resource block module is further configured to set, for each storage resource block, a corresponding ik ⁇ for recording the number of write operations of the storage resource block: ⁇ ⁇ ⁇ , ⁇ mapping; ⁇ block ⁇ ⁇ ⁇ elimination from the i ⁇ ' ⁇ block;
- the idle storage resource block is also used to compare the write count value of each idle storage resource block with the average write operation count of the storage system to obtain an idle storage resource block whose write count value is lower than the average write operation count of the storage system.
- the storage resource block with a lower write count value can be effectively used for reading and writing operations to avoid excessive read and write operations on some storage resource blocks.
- the solid state memory can be realized. Wear-balanced, increasing the life of solid-state memory.
- the mapping module is further configured to: send an alarm when the number of idle storage resource blocks in the resource block module is lower than a preset threshold a signal to enable the user to perform capacity expansion in response to the alert signal.
- FIG. 7 is a schematic flowchart diagram of a data storage method according to an embodiment of the present invention. As shown in FIG. 7, the data storage method includes the following steps:
- Step S701 receiving a write request message sent by the host, and acquiring a logical block number for writing the data to be written according to the logical address carried in the write request message;
- Step S702 Obtain an idle storage resource block, where the storage resource block is formed by performing striping processing on the logical storage unit, where the logical storage unit is formed by performing RAID group division on at least two solid-state memories;
- Step S703 calculating a physical block number of the obtained free storage resource block according to the obtained logical storage unit offset and the logical strip number of the idle storage resource block, and establishing the logical block number and the physical block number.
- Step S704 Write the to-be-written data into a storage space corresponding to the physical block number according to the mapping relationship.
- the data storage method of the above embodiment is implemented by the storage virtualization device of any of the foregoing embodiments.
- the mapping module establishes an LU for the user according to the storage space allocation instruction sent by the user through the host, and allocates a certain number of LBNs according to the space required by the user.
- the CHUNK logical storage unit offset and the logical strip number calculate the PBN of the CHUNK.
- the mapping module establishes and stores a mapping relationship between the user's LBN and the calculated PBN.
- the mapping module responds to the write request message and completes the mapping between the LBN and the PBN of the user, that is, after the allocation of the storage resource is completed for the data to be written of the write request message, the data to be written is written into the solid-state memory according to the PBN. Corresponding storage location. At this point, the data storage is completed.
- the storage resource block based on the resource block module establishes a mapping relationship between the logical block number and the real physical storage resource, that is, realizes storage resource allocation, and realizes resource allocation based on the storage resource block, thereby getting rid of The limitation of the RAID group. Therefore, dynamic and flexible mapping between users and physical storage resources is realized, thereby maximizing the utilization of physical storage space.
- the method before receiving the write request message sent by the host, the method further includes:
- a storage space allocation instruction carrying a request allocation space length
- establishing a logical unit number on the host and calculating a space length according to the request and a spatial length of each logical block number to be allocated.
- a first number of logical block numbers allocating the calculated first number of logical block numbers on the host, and establishing a correspondence between the first number of the logical unit numbers and the allocated logical block numbers;
- obtaining a logical block number for writing data to be written according to the logical address carried in the write request message includes:
- a logical block number corresponding to the logical address for writing data to be written is obtained from a logical block number corresponding to the logical unit number.
- the receiving host sends the piggyback Receiving, by the host, a capacity expansion instruction carrying a request extension space length, calculating a second quantity of the logical block number to be extended according to the request extension space length and a space length of each logical block number, and selecting the calculated from the idle logical block number The second number of logical block numbers, and the second number is added for capacity expansion.
- the LUN is allocated to the user, the LBN is allocated to the user LUN, and the mapping relationship between the LBN and the PBN is implemented by using the mapping module. Therefore, the LUN allocation can be arbitrarily expanded without being restricted by the RAID group. , which is convenient for resource allocation across RAID groups.
- each storage resource block is provided with a corresponding write count value for recording the number of write operations of the storage resource block
- the obtaining the idle storage resource block from the resource block module specifically includes: comparing a write count value of each idle storage resource block with an average write operation time of the storage system; determining that the write count value is lower than an average write operation time of the storage system
- the free storage resource block is the obtained free storage resource block.
- the wear leveling in the storage system can be effectively realized.
- the method further includes:
- an alarm signal is sent to enable the user to perform capacity expansion in response to the alarm signal.
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
本发明实施例提供存储虚拟化的装置、数据存储方法及***。该存储虚拟化的装置包括:逻辑存储单元模块,用于通过对至少两个固态存储器进行 RAID组划分形成至少一个逻辑存储单元;资源块模块,用于对逻辑存储单元进行条带化处理,形成分别与逻辑存储单元的各条带对应的存储资源块;映射模块,用于接收主机发送的写请求消息,根据写请求消息中携带的逻辑地址获取用于写入待写入数据的逻辑块号;获取空闲的存储资源块,计算所获取的空闲存储资源块的物理块号,建立逻辑块号与物理块号的映射关系;数据写入模块用于根据映射关系将待写入数据写入与物理块号对应的存储空间。该存储虚拟化的装置、数据存储方法及***能够提高物理存储空间的利用率。
Description
存储虚拟化的装置、 存储***及数据存储方法及*** 本申请要求于 2011年 12月 31 日提交中国专利局、 申请号为
201110459589.8、 发明名称为 "存储虚拟化的装置、 存储***及数据存储方法 及***" 以及 2012年 2月 9日提交中国专利局、 申请号为 201210028862.6、 发明名称为 "存储虚拟化的装置、 存储***及数据存储方法及***" 的中国专 利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及数据存储技术, 尤其涉及一种存储虚拟化的装置、 数据存储 方法及***, 属于存储技术领域。
背景技术 与非门闪存 ( NAND Flash )存储器因其容量大、 改写速度快等优点而得到 了越来越广泛的应用, 相应推动了固态存储器的飞速发展。 目前固态存储主要 可分为两大类,一类是小尺寸固态存储器,包括存储卡, 1.0-3.5"的固态存储器; 一类是大尺寸固态存储器, 包括高速外部设备互联总线(PCIE )卡与机架式阵 列。 机架式阵列包含开放式架构与封闭式架构两种, 开放式架构类似传统阵列 釆用双控制器, 内置标准形态的固态存储器, 软硬件优化达到较高的性能与功 能。 封闭式架构大多内部釆用私有协议或非标准形态的存储介质, 如双列直插 式存储模块( DIMM )接口的固态存储器( SSD )卡, 自定义的 PCIE SSD卡 等, 目的在于降低协议开销, 减少中央处理单元(CPU )终结, 提供极高的性 能。 从目前情况而言, 固态存储主要追求高速, 利用 NAND的高随机输入 /输 出 (I/O )存储能力将阵列的速度推向极限。 追求高速的基础在于拥有高速的 软硬件架构。
目前利用 NAND的高随机 I/O能力在固态存储器中进行数据存储时,一般 釆用传统阵列的固定映射方法, 即建立独立冗余磁盘阵列 (Redundant Array of Independent Disk, RAID )组, 并将 RAID组上的存储空间分配给不同用户。 因此, 使得存储空间因不同用户而隔离, 在这种情况下, 可能存在一些用户的
存储空间分配的过小而另一些用户的存储空间空闲的情况, 不能有效利用物理 存储空间, 无法最大限度的发挥固态存储的性能优势。 发明内容
本发明提供一种存储虚拟化的装置、数据存储方法及***,用以提高物 理存储空间的利用率。
根据本发明的一方面, 提供一种存储虚拟化的装置, 包括:
逻辑存储单元模块, 用于通过对所述至少两个固态存储器进行独立冗 余磁盘阵列 RAID组划分, 形成至少一个逻辑存储单元;
资源块模块, 用于对所述逻辑存储单元进行条带化处理, 形成分别与 映射模块, 用于接收主机发送的写请求消息, 根据所述写请求消息中 携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存储资 源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带 号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号与所述 物理块号的映射关系;
数据写入模块, 用于根据所述映射关系将所述待写入数据写入与所述 物理块号对应的存储空间。
根据本发明的另一方面, 还提供一种数据存储方法, 包括:
接收主机发送的写请求消息, 根据所述写请求消息中携带的逻辑地址 获取用于写入待写入数据的逻辑块号; 条带化处理形成的, 所述逻辑存储单元是通过对至少两个固态存储器进行 RAID组划分形成的;
根据获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带号计 算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号与所述物理
块号的映射关系;
根据所述映射关系将所述待写入数据写入与所述物理块号对应的存储 空间。
根据本发明的再一方面, 还提供一种数据存储***, 包括:
物理存储模块, 包括至少两个固态存储器;
逻辑存储单元模块, 用于通过对所述至少两个固态存储器进行独立冗 余磁盘阵列 RAID组划分, 形成至少一个逻辑存储单元;
资源块模块, 用于对所述逻辑存储单元进行条带化处理, 形成分别与 映射模块, 用于接收主机发送的写请求消息, 根据所述写请求消息中 携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存储资 源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带 号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号与所述 物理块号的映射关系;
所述物理存储模块还用于根据所述映射关系将所述待写入数据写入与 所述物理块号对应的存储空间。
根据本发明的存储虚拟化的装置、 数据存储方法及***, 通过不需要预先为 用户或主机分配固定的存储资源, 仅分配逻辑块号。 在接收到写请求消息时, 基于资源块模块的存储资源块建立逻辑块号与真实的物理存储资源之间的映 射关系, 即实现存储资源分配, 并且由于基于存储资源块实现资源分配, 摆脱 了 RAID组的限制。 因此, 实现了用户与物理存储资源之间的动态、灵活映射, 从而能够最大限度地提升物理存储空间利用率。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述
中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为用于应用本发明实施例的数据存储***的架构图;
图 2为本发明实施例的数据存储***的结构示意图;
图 3为逻辑存储单元条带化处理示意图;
图 4为 LBN与 PBN映射关系示意图;
图 5为用户申请建立 LU 的结构示意图;
图 6为本发明实施例的存储虚拟化的装置的结构示意图;
图 7为本发明实施例的数据存储方法的流程示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
图 1为用于应用本发明实施例的数据存储***的架构图。 如图 1所示, 数据存储***与至少一台主机连接, 用于对主机数据进行存储。
图 2为本发明实施例的数据存储***的结构示意图。 如图 2所示, 该 数据存储***包括物理存储模块 21、 逻辑存储单元模块 22、 资源块模块 23 和映射模块 24 , 其中:
物理存储模块 21包括至少两个固态存储器;
逻辑存储单元模块 22用于通过对所述至少两个固态存储器进行 RAID 组划分, 形成至少一个逻辑存储单元;
资源块模块 23用于对所述逻辑存储单元进行条带化处理, 形成分别与
映射模块 24用于接收主机发送的写请求消息, 根据所述写请求消息中 携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存储资 源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带 号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号与所述 物理块号的映射关系;
所述物理存储模块 21还用于根据所述映射关系将所述待写入数据写入 与所述物理块号对应的存储空间。
具体地, 该数据存储***一共划分为四层, 物理存储模块 21、 逻辑存 储单元模块 22、资源块模块 23和映射模块 24分别对应于存储***的一层, 即: 物理存储模块 21对应于物理存储层, 逻辑存储单元模块 22对应于逻 辑存储单元层, 资源块模块 23对应于资源块层, 映射模块 24对应于映射 层。 在该存储***中, 最底层为物理存储层, 物理存储层包括实际存在的 物理存储介质。 该物理存储介质例如为 SSD、 直连式存储设备(DAS ) 、 网络附属存储 (Network Attached Storage , NAS ) 或存储区域网络(SAN ) 等, 优选为 SSD。 物理存储层的上一层是逻辑存储单元层。 逻辑存储单元 层将物理存储层的物理存储介质划分为 RAID组。 RAID组可以划分为常用 的几种 RAID级别, 例如为 RAID 1、 RAID3、 RAID5和 RAID 10等。
下文中以物理存储介质为 SSD盘片, 并且 RAID组划分为 RAID10级 别为例进行说明。
在本实施例中, 例如物理存储层包括 2N个 SSD盘片, 其中 N为自然 数。 按照 RAID10级别, 将 2N个 SSD盘片两两划分为一个 RAID组, 一共 形成 N个 RAID1组, 一个 RAID1组即为逻辑存储单元层的一个逻辑存储 单元, 各逻辑存储单元间以 RAID0的方式存在。 进一步地, 对逻辑存储单 元进行条带化处理。 图 3为逻辑存储单元条带化处理示意图, 如图 3所示。 假设主机 I/O以 4KB随机分布,则对逻辑存储单元 4KB分条深度进行分条, 备一个备 可以 一 H储 淤, ^. ^i ^^ k ( Γ,ΗΤΤΝΚ ) , 将
这些 CHUNK放入一个资源池,组成了资源块( CHUNK )层 23。每个 CHUNK 标识有该 CHUNK对应的逻辑存储单元偏移量( Disk Offset )和逻辑条带号 ( Logic Strip No ) 。
CHUNK层之上是映射层。 映射层中存放逻辑块号 (LBN ) , LBN的 数量与 CHUNK层所包括的 CHUNK的数量相等。 映射层根据用户通过主 机发送的存储空间分配指令为用户建立逻辑单元号 (LUN ) , 并按照用户 需要的存储空间大小分配一定数量的 LBN。 当接收到用户通过主机下发的 写请求消息时, 在 CHUNK层内取出可用的 CHUNK, 根据该 CHUNK的逻 辑存储单元偏移量和逻辑条带号计算该 CHUNK的物理块号 (PBN ) 。 其 中, PBN的结构为 "Disk Offset" + "Logic Strip No"。假设分条深度为 4KB , 则对于存储容量为 400GB的 SSD盘片, 需以 27个比特位来标识逻辑条带 号; 假设逻辑存储单元层包括 24个逻辑存储单元, 则需以 5个比特位来标 识逻辑存储单元偏移量, 则此时每个 PBN的长度为 32个比特位。 映射层 建立并存储用户的 LBN与计算获得的 PBN之间的映射关系 ,例如图 4所示, 图 4为 LBN与 PBN映射关系示意图。
当映射层响应写请求消息, 完成用户的 LBN与 PBN的映射之后, 即为 该写请求消息的待写入数据完成存储资源的分配后, 根据 PBN, 将待写入 数据写入物理存储层中的对应存储位置。 至此, 完成了数据存储。
当映射层接收到用户通过主机发送的读请求指令时, 通过查询该用户 的 LBN与 PBN的映射关系,即可获知待读取数据在物理存储层中的真实存 储位置, 从而读取出数据, 释放该 PBN对应的 CHUNK, 并删除该用户的 LBN与 PBN的映射关系。
根据上述实施例的数据存储***, 通过划分为物理存储模块、 逻辑存 储单元模块、 资源块模块和映射模块, 不需要预先为用户或主机分配固定 的存储资源, 仅分配逻辑块号。 在接收到写请求消息时, 基于资源块层的
存储资源分配, 并且由于基于存储资源块实现资源分配, 所以摆脱了 RAID 组的限制。 因此, 实现了用户与物理存储资源之间的动态、 灵活映射, 从 而能够最大限度地提升物理存储空间利用率。
进一步地, 在上述实施例的数据存储***中, 所述映射模块还用于接 收主机发送的携带请求分配空间长度的存储空间分配指令, 响应所述存储 空间分配指令在主机上建立逻辑单元号, 根据所述请求分配空间长度和各 逻辑块号的空间长度计算需分配的逻辑块号的第一数量, 在主机上分配第 一数量的逻辑块号, 并建立第一数据的所述逻辑单元号与所分配的逻辑块 号的对应关系, 执行写请求操作。
其中, 执行写请求操作即为上述实施例中映射模块接收到主机发送的 写请求消息时所执行的相应操作, 即: 根据所述写请求消息中携带的逻辑 地址获取用于写入待写入数据的逻辑块号; 获取空闲的存储资源块, 根据 所获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带号计算所获 取的空闲的存储资源块的物理块号, 并建立所述逻辑块号与所述物理块号 的映射关系。 第一数量例如可以为请求分配空间长度相对于各逻辑块号的 空间长度的倍数。
具体地, 图 5为用户申请建立 LUN的结构示意图。 如图 5所示, 映射 层响应用户 1的存储空间分配指令建立一个 LUN, 例如将该 LUN标识为 LUN 1。 假设用户 1所申请的存储空间需要 4个 LBN的空间大小, 则映射 层从空闲的 LBN中划出 4个 LBN作为 LUN 1的 LBN, 例如为图 5中的 LBN0-LBN3 , LBN0-LBN3的逻辑地址与主机逻辑地址具有对应关系。 当接 收到用户 1通过主机发送的写请求消息时, 获知该用户 1对应的 LUN为 LUN1 , 从而获知该用户所对应的 LBN为 LBN0-LBN3。 由于写请求消息中 还携带有主机用于存储待写入数据的主机逻辑地址, 例如起始地址为
500M, 待写入数据长度为 4M, 则可从 LBN0-LBN3中选取出与该主机逻辑 址?十 0 T /RN, 例如 之 , T , N7 ^fc THTT K , i+ 所公配
CHUNK的 PBN, 并建立 LBN2与 PBN之间的映射关系。
进一步地, 在上述实施例的数据存储***中, 所述映射模块还用于接 收主机发送的携带请求扩展空间长度的容量扩充指令, 根据所述请求扩展 空间长度和各逻辑块号的空间长度计算需扩展的逻辑块号的第二数量, 从 空闲逻辑块号中选取所计算的第二数量的逻辑块号, 并添加第二数量的所 述逻辑单元号与所选取的逻辑块号的对应关系, 以对所述逻辑单元号进行 容量扩充。
其中, 空闲逻辑块号为未建立与任意 LUN的对应关系的逻辑块号。 第 二数量例如为请求扩展空间长度相对于各逻辑块号的空间长度的倍数。
具体地, 当 LUN1需要扩展时, 用户 1可向映射层发送容量扩充指令。 映射层接收到用户 1发送的容量扩充指令后, 为用户 1再新建一个 LUN, 例如为 LUN5 , 并在空闲的 LBN中继续划分一段连续区域, 例如为图 5中 的 LBN11-LBN14 , 则 LUN5与 LUN1—起作为用户 1的逻辑存储空间。
根据上述实施例的数据存储***, 由于为用户建立 LUN、 为用户 LUN 分配 LBN, 以及建立 LBN与 PBN之间的映射关系均通过映射模块来实现 , 因此可以使 LUN分配不受 RAID组的限制任意扩展,即方便地实现跨 RAID 组的资源分配。
进一步地, 在上述实施例的数据存储***中, 所述资源块模块还用于 将各存储资源块按照逻辑存储单元进行分组, 并为各存储资源块设置对应 的、 用于记录所述存储资源块的写操作次数的写计数值; 相应地, 所述映 射模块响应所述写请求消息从所述资源块模块中获取空闲的存储资源块 时, 还用于比较各空闲的存储资源块的写计数值与存储***平均写操作次 数, 以获取写计数值低于存储***平均写操作次数的存储资源块。
具体地, 利用上述实施例的数据存储***还可实现全局的磨损均衡。 全***的磨损均衡以 CHUNK为单位进行, 对每个 CHUNK增设一个写计 翁俏 ( Wont ) , 备;: ^十该 Γ,ΗΤΤ Κ jH千 凝 日十, ^ Γ.ΗΤΤ Κ ^ % i k
值加 1。 此外, 还设立一个全局写操作计数值(Gent ) , 即***执行一次写 操作, 则该全局写操作计数值加 1 , 通过将全局写操作计数值除以该***的 逻辑存储单元数量, 即可获取***平均写操作次数。 因此可以通过遍历系 统中的全部逻辑存储单元来区分高于或低于***平均写操作次数的
CHUNK, 进行分类并进行搬移操作, 从而实现磨损均衡。
此外, 还可在上述实施例的数据存储***中实现负载均衡。 具体地, 将 CHUNK按照所归属的逻辑存储单元进行分组存放, 每次写请求消息到 来时依次分配下一个逻辑存储单元中的 CHU K。 例如, 响应第一写请求消 息, 从第一逻辑存储单元中选取 CHUNK; 响应第二写请求消息, 从第二逻 辑存储单元中选取 CHUNK, 以此类推。 按此方式, 可将写请求消息发送到 不同的逻辑存储单元的 CHUNK, 实现***内各逻辑存储单元的负载均衡。
进一步地, 在上述实施例的数据存储***中, 还包括:
所述映射模块还用于当所述资源块模块中的空闲的存储资源块的数量 低于预设阔值时发出告警信号, 以使用户响应所述告警信号对用户所对应 的逻辑单元号进行容量扩充。 其中, 该预设阔值可以由用户根据需要任意 设定, 例如设置为空闲的存储资源块的数量为总存储资源块的数量的 1/10。
图 6为本发明实施例的存储虚拟化的装置的结构示意图。 如图 6所示, 该存储虚拟化的装置包括:
逻辑存储单元模块 61 , 用于通过对所述至少两个固态存储器进行独立 冗余磁盘阵列 RAID组划分, 形成至少一个逻辑存储单元;
资源块模块 62 , 用于对所述逻辑存储单元进行条带化处理, 形成分别 与所述逻辑存储单元的各条带对应的存储资源块;
映射模块 63 , 用于接收主机发送的写请求消息, 根据所述写请求消息 中携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存储 资源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条
储奢 'Ά块 ό^ι物 块寻, L ^ k-^ ^
述物理块号的映射关系;
数据写入模块 64 , 用于根据所述映射关系将所述待写入数据写入与所 述物理块号对应的存储空间。
上述实施例的存储虚拟化的装置可以实施于前述的数据存储***根据 用户的请求, 执行对上述物理存储模块的操作。
具体地, 逻辑存储单元模块 61例如按照 RAID10级别, 将 2N个 SSD 盘片两两划分为一个 RAID组, 一共形成 N个 RAID1组, 一个 RAID1组 即为逻辑存储单元层的一个逻辑存储单元, 各逻辑存储单元间以 RAID0的 方式存在。 进一步地, 对逻辑存储单元进行条带化处理。 每一个条带都作 为一个可以存储的资源, 成为 CHUNK, 将这些 CHUNK放入一个资源池, 组成了 CHUNK层 62。每个 CHUNK标识有对应的 Disk Offset和 Logic Strip No。
映射模块 63中存放 LBN, LBN的数量与 CHUNK模块所包括的 CHUNK 的数量相等。 映射模块 63根据用户通过主机发送的存储空间分配指令为用 户建立 LU , 并按照用户需要的空间分配一定数量的 LBN。 当接收到用户 通过主机下发的写请求消息时,在 CHUNK模块 62内取出可用的 CHUNK, 根据该 CHUNK的逻辑存储单元偏移量和逻辑条带号计算该 CHUNK的 PBN。 其中, PBN的结构为 "Disk Offset" + "Logic Strip No" 。 £设分条 深度为 4KB , 则对于存储容量为 400GB的 SSD盘片, 需以 27个比特位来 标识逻辑条带号; 假设逻辑存储单元层 61包括 24个逻辑存储单元, 则需 以 5个比特位来标识逻辑存储单元偏移量, 则此时每个 PBN的长度为 32 个比特位。 映射模块 63建立并存储用户的 LBN与计算获得的 PBN之间的 映射关系, 例如图 4所示。
当映射模块 63响应写请求消息,完成用户的 LBN与 PBN的映射之后, 即为该写请求消息的待写入数据完成存储资源的分配后, 根据 PBN, 将待 入翁 入 储 H 0 ¾ 储 jh, 了翁
当映射模块 63接收到用户通过主机发送的读请求指令时, 通过查询该 用户的 LBN与 PBN的映射关系,即可获知待读取数据在固态存储器中的真 实存储位置, 从而读取出数据, 释放该 PBN对应的 CHUNK, 并删除该用 户的 LBN与 PGN的映射关系。
根据上述实施例的存储虚拟化的装置, 通过划分为逻辑存储单元模块、 资源块模块和映射模块, 不需要预先为用户或主机分配固定的存储资源, 仅分配逻辑块号。 在接收到写请求消息时, 基于资源块层的存储资源块建 立逻辑块号与真实的物理存储资源之间的映射关系, 即实现存储资源分配, 并且由于基于存储资源块实现资源分配, 所以摆脱了 RAID组的限制。 因 此, 实现了用户与物理存储资源之间的动态、 灵活映射, 从而能够最大限 度地提升物理存储空间利用率。
进一步地, 在上述实施例的存储虚拟化的装置中, 所述映射模块还用 于接收主机发送的携带请求分配空间长度的存储空间分配指令, 响应所述 存储空间分配指令, 在主机上建立逻辑单元号, 根据所述请求分配空间长 度和各逻辑块号的空间长度计算需分配的逻辑块号的第一数量, 在主机上 分配所计算的第一数量的逻辑块号, 并建立所述第一数量的逻辑单元号与 所分配的逻辑块号的对应关系, 执行写请求操作。
进一步地, 在上述实施例的存储虚拟化的装置中, 所述映射模块还用 于接收主机发送的携带请求扩展空间长度的容量扩充指令, 根据所述请求 扩展空间长度和各逻辑块号的空间长度计算需扩展的逻辑块号的第二数 量, 从空闲逻辑块号中选取所计算的第二数量的逻辑块号, 并添加第二数 号进行容量扩充。
进一步地, 在上述实施例的存储虚拟化的装置中, 所述资源块模块还用 于为各存储资源块设置对应的、 用于记录所述存储资源块的写操作次数的 i k^ : ΐ ί^ , 所 ^映射;^块响 旮炎消 从所 i^' 淤块; ^块
中获取空闲的存储资源块时, 还用于比较各空闲的存储资源块的写计数值 与存储***平均写操作次数, 以获取写计数值低于存储***平均写操作次 数的空闲的存储资源块, 可以有效的利用写计数值较低的存储资源块进行 读写操作, 避免对某些存储资源块过多的进行读写操作, 根据上述实施例 的存储虚拟化的装置, 能够实现固态存储器的磨损均衡, 增加固态存储器 的使用寿命。
进一步地, 在上述实施例的存储虚拟化的装置中, 其特征在于, 所述 映射模块还用于当所述资源块模块中的空闲的存储资源块的数量低于预设 阔值时发出告警信号, 以使用户响应所述告警信号进行容量扩充。
图 7为本发明实施例的数据存储方法的流程示意图。 如图 7所示, 该 数据存储方法包括以下步骤:
步骤 S701 , 接收主机发送的写请求消息, 根据所述写请求消息中携带 的逻辑地址获取用于写入待写入数据的逻辑块号;
步骤 S702 , 获取空闲的存储资源块, 其中存储资源块是通过对逻辑存 储单元进行条带化处理形成的, 所述逻辑存储单元是通过对至少两个固态 存储器进行 RAID组划分形成的;
步骤 S703 , 根据获取的空闲的存储资源块的逻辑存储单元偏移量和逻 辑条带号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号 与所述物理块号的映射关系;
步骤 S704 , 根据所述映射关系将所述待写入数据写入与所述物理块号 对应的存储空间。
上述实施例的数据存储方法由前述任一实施例的存储虚拟化的装置来 实现。
具体地, 映射模块根据用户通过主机发送的存储空间分配指令为用户 建立 LU , 并按照用户需要的空间分配一定数量的 LBN。 当接收到用户通
该 CHUNK的逻辑存储单元偏移量和逻辑条带号计算该 CHUNK的 PBN。 映射模块建立并存储用户的 LBN与计算获得的 PBN之间的映射关系。 当映射模块响应写请求消息, 完成用户的 LBN与 PBN的映射之后, 即为该 写请求消息的待写入数据完成存储资源的分配后, 根据 PBN, 将待写入数 据写入固态存储器中的对应存储位置。 至此, 完成了数据存储。
根据上述实施例的数据存储方法, 由于不需要预先为用户或主机分配 固定的存储资源, 仅分配逻辑块号。 在接收到写请求消息时, 基于资源块 模块的存储资源块建立逻辑块号与真实的物理存储资源之间的映射关系, 即实现存储资源分配, 并且由于基于存储资源块实现资源分配, 所以摆脱 了 RAID组的限制。 因此, 实现了用户与物理存储资源之间的动态、 灵活 映射, 从而能够最大限度地提升物理存储空间利用率。
进一步地, 在上述实施例的数据存储方法中, 接收主机发送的写请求 消息之前还包括:
接收主机发送的携带请求分配空间长度的存储空间分配指令, 响应所 述存储空间分配指令, 在主机上建立逻辑单元号, 根据所述请求分配空间 长度和各逻辑块号的空间长度计算需分配的逻辑块号的第一数量, 在主机 上分配所计算的第一数量的逻辑块号, 并建立第一数量的所述逻辑单元号 与所分配的逻辑块号的对应关系;
相应地, 根据所述写请求消息中携带的逻辑地址获取用于写入待写入 数据的逻辑块号具体包括:
从与所述逻辑单元号所对应的逻辑块号中, 获取与所述逻辑地址对应 的用于写入待写入数据的逻辑块号。
上述用户建立 LUN的具体流程与前述实施例的存储***相同, 故此处 不再赘述。
进一步地, 在上述实施例的数据存储方法中, 所述接收主机发送的携
接收主机发送的携带请求扩展空间长度的容量扩充指令, 根据所述请 求扩展空间长度和各逻辑块号的空间长度计算需扩展的逻辑块号的第二数 量, 从空闲逻辑块号中选取所计算的第二数量的逻辑块号, 并添加第二数 号进行容量扩充。
上述用户扩展 LUN的具体流程与前述实施例的存储***相同, 故此处 不再赘述。
根据上述实施例的数据存储方法, 由于为用户建立 LUN、 为用户 LUN 分配 LBN以及建立 LBN与 PBN之间的映射关系均通过映射模块来实现, 因此可以使 LUN分配不受 RAID组的限制任意扩展,即方便地实现跨 RAID 组的资源分配。
进一步地, 在上述实施例的数据存储方法中, 各存储资源块设置有对 应的、 用于记录所述存储资源块的写操作次数的写计数值;
相应地, 所述从资源块模块中获取空闲的存储资源块具体包括: 比较各空闲的存储资源块的写计数值与存储***平均写操作次数; 确定写计数值低于存储***平均写操作次数的空闲的存储资源块为所 获取的空闲的存储资源块。
根据上述实施例的数据存储方法, 能够有效实现存储***中的磨损均 衡。
进一步地, 在上述实施例的数据存储方法中, 还包括:
若检测获知所述资源块模块中的空闲的存储资源块的数量低于预设阔 值, 则发出告警信号, 以使用户响应所述告警信号进行容量扩充。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者
应技术方案的本质脱离本发明各实施例技术方案的范围。
Claims
1、 一种存储虚拟化的装置, 其特征在于, 包括:
逻辑存储单元模块, 用于通过对所述至少两个固态存储器进行独立 冗余磁盘阵列 RAID组划分, 形成至少一个逻辑存储单元;
资源块模块, 用于对所述逻辑存储单元进行条带化处理, 形成分别 与所述逻辑存储单元的各条带对应的存储资源块;
映射模块, 用于接收主机发送的写请求消息, 根据所述写请求消息 中携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存 储资源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻 辑条带号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块 号与所述物理块号的映射关系;
数据写入模块, 用于根据所述映射关系将所述待写入数据写入与所 述物理块号对应的存储空间。
2、 根据权利要求 1所述的存储虚拟化的装置, 其特征在于, 所述映射模块还用于在所述根据所述写请求消息中携带的逻辑地址 获取用于写入待写入数据的逻辑块号之前接收主机发送的携带请求分配 空间长度的存储空间分配指令在主机上建立逻辑单元号 LU ,根据所述 请求分配空间长度和各逻辑块号的空间长度计算需分配的逻辑块号的第 一数量, 在主机上分配第一数量的逻辑块号, 并建立第一数量的所述 LUN与所分配的逻辑块号的对应关系,按照所述对应关系执行写请求操 作。
3、 根据权利要求 2所述的存储虚拟化的装置, 其特征在于, 所述映 射模块还用于接收主机发送的携带请求扩展空间长度的容量扩充指令, 根据所述请求扩展空间长度和各逻辑块号的空间长度计算需扩展的逻辑 块号的第二数量, 从空闲逻辑块号中选取第二数量的逻辑块号, 并添加 第二数量的所述 LUN与所选取的逻辑块号的对应关系 , 以对所述 LUN 进行容量扩充。
4、 根据权利要求 1-3任一所述的存储虚拟化的装置, 其特征在于, 所述资源块模块还用于记录各所述存储资源块的写操作次数的写计 数值;
相应地, 所述映射模块获取空闲的存储资源块具体包括: 用于比较 各空闲的存储资源块的写计数值与存储***平均写操作次数, 以获取写 计数值低于存储***平均写操作次数的空闲的存储资源块。
5、 根据权利要求 1-3任一所述的存储虚拟化的装置, 其特征在于, 所述映射模块还用于当所述资源块模块中的空闲的存储资源块的数量低 于预设阔值时发出告警信号, 以使用户响应所述告警信号对所述逻辑单 元号进行容量扩充。
6、一种基于权利要求 1-5任一所述的存储虚拟化的装置实现的数据 存储方法, 其特征在于, 包括:
接收主机发送的写请求消息, 根据所述写请求消息中携带的逻辑地 址获取用于写入待写入数据的逻辑块号;
获取空闲的存储资源块, 其中存储资源块是通过对逻辑存储单元进 行条带化处理形成的, 所述逻辑存储单元是通过对至少两个固态存储器 进行 RAID组划分形成的;
根据获取的空闲的存储资源块的逻辑存储单元偏移量和逻辑条带号 计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块号与所述 物理块号的映射关系;
根据所述映射关系将所述待写入数据写入与所述物理块号对应的存 储空间。
7、 根据权利要求 6所述的数据存储方法, 其特征在于, 接收主机发 送的写请求消息之前还包括: 接收主机发送的携带请求分配空间长度的存储空间分配指令, 在主 机上建立 LUN,根据所述请求分配空间长度和各逻辑块号的空间长度计 算需分配的逻辑块号的第一数量, 在主机上分配所计算的第一数量的逻 辑块号, 并建立第一数量的所述 LUN与所分配的逻辑块号的对应关系; 相应地, 根据所述写请求消息中携带的逻辑地址获取用于写入待写 入数据的逻辑块号具体包括:
从与所述第一数量的 LUN所对应的逻辑块号中,获取与所述逻辑地 址对应的用于写入待写入数据的逻辑块号。
8、 根据权利要求 7所述的数据存储方法, 其特征在于, 所述接收主 机发送的携带请求分配空间长度的存储空间分配指令之后还包括:
接收主机发送的携带请求扩展空间长度的容量扩充指令, 根据所述 请求扩展空间长度和各逻辑块号的空间长度计算需扩展的逻辑块号的第 二数量, 从空闲逻辑块号中选取所计算的第二数量的逻辑块号, 并添加 第二数量的所述 LUN与逻辑块号的对应关系, 以对所述 LUN进行容量 扩充。
9、 根据权利要求 6-8任一所述的数据存储方法, 其特征在于, 还包 括: 记录各所述存储资源块的写操作次数的写计数值;
相应地, 所述获取空闲的存储资源块具体包括:
比较各空闲的存储资源块的写计数值与存储***平均写操作次数; 确定写计数值低于存储***平均写操作次数的空闲的存储资源块为 所获取的空闲的存储资源块。
10、 根据权利要求 6-8任一所述的数据存储方法, 其特征在于, 还 包括:
若检测获知所述资源块模块中的空闲的存储资源块的数量低于预设 阔值, 则发出告警信号, 以使用户响应所述告警信号对所述逻辑单元号 进行容量扩充。
11、 一种数据存储***, 其特征在于, 包括:
物理存储模块, 包括至少两个固态存储器;
逻辑存储单元模块, 用于通过对所述至少两个固态存储器进行独立 冗余磁盘阵列 RAID组划分, 形成至少一个逻辑存储单元;
资源块模块, 用于对所述逻辑存储单元进行条带化处理, 形成分别 与所述逻辑存储单元的各条带对应的存储资源块;
映射模块, 用于接收主机发送的写请求消息, 根据所述写请求消息 中携带的逻辑地址获取用于写入待写入数据的逻辑块号; 获取空闲的存 储资源块, 根据所获取的空闲的存储资源块的逻辑存储单元偏移量和逻 辑条带号计算所获取的空闲的存储资源块的物理块号, 建立所述逻辑块 号与所述物理块号的映射关系;
所述物理存储模块还用于根据所述映射关系将所述待写入数据写入 与所述物理块号对应的存储空间。
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110459589 | 2011-12-31 | ||
CN201110459589.8 | 2011-12-31 | ||
CN201210028862.6 | 2012-02-09 | ||
CN201210028862.6A CN102622189B (zh) | 2011-12-31 | 2012-02-09 | 存储虚拟化的装置、数据存储方法及*** |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013097618A1 true WO2013097618A1 (zh) | 2013-07-04 |
Family
ID=46562125
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/086624 WO2013097618A1 (zh) | 2011-12-31 | 2012-12-14 | 存储虚拟化的装置、存储***及数据存储方法及*** |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102622189B (zh) |
WO (1) | WO2013097618A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019127490A1 (zh) * | 2017-12-29 | 2019-07-04 | 华为技术有限公司 | 一种数据访问方法及存储阵列 |
Families Citing this family (33)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102622189B (zh) * | 2011-12-31 | 2015-11-25 | 华为数字技术(成都)有限公司 | 存储虚拟化的装置、数据存储方法及*** |
CN104102586B (zh) * | 2013-04-15 | 2019-02-22 | 中兴通讯股份有限公司 | 一种地址映射处理的方法、装置 |
CN104239227B (zh) * | 2013-06-20 | 2017-06-06 | 新华三技术有限公司 | 一种虚拟化存储管理装置、本地虚拟存储管理装置及方法 |
CN103530066B (zh) * | 2013-09-16 | 2016-05-18 | 华为技术有限公司 | 一种数据存储方法、装置及*** |
CN103645932A (zh) * | 2013-11-21 | 2014-03-19 | 华为技术有限公司 | 处理数据的方法、装置和存储虚拟化控制装置 |
CN104050014B (zh) * | 2014-05-23 | 2017-12-29 | 上海爱数信息技术股份有限公司 | 基于虚拟化平台的高效存储管理方法 |
CN105786732B (zh) * | 2014-12-26 | 2019-02-12 | 华为技术有限公司 | 数据访问方法及装置 |
CN104994135B (zh) * | 2015-05-25 | 2018-09-21 | 华为技术有限公司 | 存储***中融合san及nas存储架构的方法及装置 |
CN105183390B (zh) * | 2015-09-17 | 2018-09-07 | 华为数字技术(成都)有限公司 | 数据访问方法及装置 |
CN105607868A (zh) * | 2015-12-14 | 2016-05-25 | 华为数字技术(成都)有限公司 | 扩容存储阵列的方法及装置 |
WO2018000300A1 (zh) * | 2016-06-30 | 2018-01-04 | 华为技术有限公司 | 一种电子设备的数据操作方法及电子设备 |
CN107665090B (zh) * | 2016-07-27 | 2021-09-03 | 北京忆恒创源科技有限公司 | 实现全局磨损均衡的方法 |
CN107704194B (zh) * | 2016-08-08 | 2020-07-31 | 北京忆恒创源科技有限公司 | 无锁io处理方法及其装置 |
CN106227472A (zh) * | 2016-08-19 | 2016-12-14 | 浪潮(北京)电子信息产业有限公司 | 一种自精简卷扩容方法及*** |
CN108228085A (zh) * | 2016-12-21 | 2018-06-29 | 伊姆西Ip控股有限责任公司 | 用于管理存储***的方法和设备 |
CN106775481B (zh) * | 2016-12-23 | 2019-11-05 | 华为技术有限公司 | 数据读取方法及设备 |
CN108268380A (zh) * | 2016-12-30 | 2018-07-10 | 北京兆易创新科技股份有限公司 | 一种读写数据的方法和装置 |
CN106802775A (zh) * | 2017-01-18 | 2017-06-06 | 郑州云海信息技术有限公司 | 一种数据存储方法及装置 |
JP7105870B2 (ja) * | 2017-08-10 | 2022-07-25 | 華為技術有限公司 | データアクセス方法、装置およびシステム |
CN109558236B (zh) * | 2017-09-27 | 2023-07-25 | 北京忆恒创源科技股份有限公司 | 访问条带的方法及其存储*** |
CN109558070B (zh) * | 2017-09-27 | 2023-09-15 | 北京忆恒创源科技股份有限公司 | 可扩展存储***架构 |
CN110321061A (zh) * | 2018-03-31 | 2019-10-11 | 深圳忆联信息***有限公司 | 数据存储方法及装置 |
KR102620255B1 (ko) * | 2018-05-18 | 2024-01-04 | 에스케이하이닉스 주식회사 | 저장 장치 및 그 동작 방법 |
CN110968577B (zh) * | 2018-09-27 | 2023-04-07 | 阿里巴巴集团控股有限公司 | 一种写入、读取资源的方法和***以及时序存储*** |
CN109542625A (zh) * | 2018-11-29 | 2019-03-29 | 郑州云海信息技术有限公司 | 一种存储资源控制方法、装置及电子设备 |
CN109960569B (zh) * | 2019-03-26 | 2021-04-13 | 联想(北京)有限公司 | 一种虚拟化处理方法及装置 |
CN111026336A (zh) * | 2019-12-26 | 2020-04-17 | 中国建设银行股份有限公司 | 一种san存储***的自动化运维方法及运维*** |
CN112181300B (zh) * | 2020-09-25 | 2022-02-22 | 杭州宏杉科技股份有限公司 | 数据处理方法及分布式存储集群 |
CN112466379B (zh) * | 2020-11-23 | 2024-07-02 | 海光信息技术股份有限公司 | 存储器位映射关系确定方法、装置、处理器芯片及服务器 |
CN115495008A (zh) * | 2021-06-18 | 2022-12-20 | 华为技术有限公司 | 一种数据管理方法、存储空间管理方法及装置 |
CN113568582B (zh) * | 2021-07-30 | 2023-05-26 | 重庆紫光华山智安科技有限公司 | 数据管理方法、装置和存储设备 |
CN114415968B (zh) * | 2022-01-26 | 2023-04-07 | 南京晓庄学院 | 存储***及其数据写入方法 |
CN116540949B (zh) * | 2023-07-04 | 2024-01-12 | 苏州浪潮智能科技有限公司 | 一种独立冗余磁盘阵列存储空间动态分配方法和装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097270A1 (en) * | 2003-11-03 | 2005-05-05 | Kleiman Steven R. | Dynamic parity distribution technique |
CN101620518A (zh) * | 2009-08-21 | 2010-01-06 | 杭州华三通信技术有限公司 | 一种磁盘冗余阵列raid的创建方法及装置 |
CN101783814A (zh) * | 2009-12-29 | 2010-07-21 | 上海交通大学 | 海量存储***的元数据存储方法 |
CN101984400A (zh) * | 2010-11-05 | 2011-03-09 | 成都市华为赛门铁克科技有限公司 | 一种raid控制方法、装置及*** |
CN102622189A (zh) * | 2011-12-31 | 2012-08-01 | 成都市华为赛门铁克科技有限公司 | 存储虚拟化的装置、数据存储方法及*** |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8266367B2 (en) * | 2003-12-02 | 2012-09-11 | Super Talent Electronics, Inc. | Multi-level striping and truncation channel-equalization for flash-memory system |
CN101526882B (zh) * | 2008-03-03 | 2011-06-22 | 中兴通讯股份有限公司 | 独立磁盘冗余阵列子***中逻辑单元重建的方法及装置 |
CN101957729B (zh) * | 2010-09-27 | 2014-07-02 | 中兴通讯股份有限公司 | 逻辑块变换方法及基于该方法兼容用户读写的方法和装置 |
-
2012
- 2012-02-09 CN CN201210028862.6A patent/CN102622189B/zh active Active
- 2012-12-14 WO PCT/CN2012/086624 patent/WO2013097618A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097270A1 (en) * | 2003-11-03 | 2005-05-05 | Kleiman Steven R. | Dynamic parity distribution technique |
CN101620518A (zh) * | 2009-08-21 | 2010-01-06 | 杭州华三通信技术有限公司 | 一种磁盘冗余阵列raid的创建方法及装置 |
CN101783814A (zh) * | 2009-12-29 | 2010-07-21 | 上海交通大学 | 海量存储***的元数据存储方法 |
CN101984400A (zh) * | 2010-11-05 | 2011-03-09 | 成都市华为赛门铁克科技有限公司 | 一种raid控制方法、装置及*** |
CN102622189A (zh) * | 2011-12-31 | 2012-08-01 | 成都市华为赛门铁克科技有限公司 | 存储虚拟化的装置、数据存储方法及*** |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019127490A1 (zh) * | 2017-12-29 | 2019-07-04 | 华为技术有限公司 | 一种数据访问方法及存储阵列 |
CN110214305A (zh) * | 2017-12-29 | 2019-09-06 | 华为技术有限公司 | 一种数据访问方法及存储阵列 |
CN110214305B (zh) * | 2017-12-29 | 2020-09-08 | 华为技术有限公司 | 一种数据访问方法及存储阵列 |
US11301157B2 (en) | 2017-12-29 | 2022-04-12 | Huawei Technologies Co., Ltd. | Data access method and storage array |
Also Published As
Publication number | Publication date |
---|---|
CN102622189B (zh) | 2015-11-25 |
CN102622189A (zh) | 2012-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013097618A1 (zh) | 存储虚拟化的装置、存储***及数据存储方法及*** | |
JP5823469B2 (ja) | 低電力・低遅延・大容量ストレージ・クラス・メモリのための装置および方法 | |
KR102170539B1 (ko) | 저장 장치에 의해 데이터를 저장하기 위한 방법 및 저장 장치 | |
JP5090941B2 (ja) | ストレージサブシステム及びストレージシステム | |
US9792073B2 (en) | Method of LUN management in a solid state disk array | |
US20150095555A1 (en) | Method of thin provisioning in a solid state disk array | |
CN109791522B (zh) | 数据迁移的方法、***及智能网卡 | |
US10146435B2 (en) | Storage system and data write method | |
WO2020037986A1 (zh) | 数据迁移方法及装置 | |
US10795599B2 (en) | Data migration method, host and solid state disk | |
US10866743B2 (en) | Storage control device using index indicating order of additional writing of data, storage control method using index indicating order of additional writing of data, and recording medium recording program using index indicating order of additional writing of data | |
CN108064374B (zh) | 一种数据访问方法、装置和*** | |
KR20160117420A (ko) | 스토리지 모듈 디프래그먼트화를 위한 스토리지 모듈 및 호스트 디바이스 | |
WO2017149592A1 (ja) | ストレージ装置 | |
US8954658B1 (en) | Method of LUN management in a solid state disk array | |
US11301157B2 (en) | Data access method and storage array | |
JP2018532166A (ja) | 記憶システムにおける重複排除のための方法、記憶システムおよびコントローラ | |
US9720608B2 (en) | Storage system | |
US20190243758A1 (en) | Storage control device and storage control method | |
US11093134B2 (en) | Storage device, management method, and program in tiered storage system | |
WO2015089798A1 (zh) | 一种数据迁移方法和装置 | |
WO2023065654A1 (zh) | 一种数据写入方法以及相关设备 | |
KR20150127434A (ko) | 메모리제어장치 및 메모리제어장치의 동작 방법 | |
WO2023102784A1 (zh) | 数据存取方法、装置、磁盘控制器、磁盘和数据存储*** | |
KR101117390B1 (ko) | 비휘발성 메모리 장치의 데이터 접근 방법 및 이를 수행하는 프로그램을 기록한 기록매체 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12862431 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12862431 Country of ref document: EP Kind code of ref document: A1 |