CN105808171A - Storage balancing method, device and system - Google Patents
Storage balancing method, device and system Download PDFInfo
- Publication number
- CN105808171A CN105808171A CN201610202611.3A CN201610202611A CN105808171A CN 105808171 A CN105808171 A CN 105808171A CN 201610202611 A CN201610202611 A CN 201610202611A CN 105808171 A CN105808171 A CN 105808171A
- Authority
- CN
- China
- Prior art keywords
- raid group
- storage
- data
- target
- raid
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
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组扩展至少一个新RAID组;确定所述至少一个原有RAID组中每个原有RAID组的存储容量及所述至少一个新RAID组中每个新RAID组的存储容量;根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,所述各个RAID组包括:每个原有RAID组和每个新RAID组;确定所述至少一个原有RAID组存储的存储数据,并根据所述各个RAID组间的容量比例,重新为所述各个RAID组分配所述存储数据。本方案实现了均衡存储。
The present invention provides a method, device and system for balancing storage. The method includes: expanding at least one new RAID group for at least one original RAID group; Storage capacity and the storage capacity of each new RAID group in the at least one new RAID group; according to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion , said each RAID group includes: each original RAID group and each new RAID group; determine the storage data stored in said at least one original RAID group, and renew the storage data for each RAID group according to the capacity ratio among said each RAID group The storage data is allocated to each of the RAID groups. This solution achieves balanced storage.
Description
技术领域technical field
本发明涉及存储技术领域,特别涉及一种平衡存储的方法、装置和系统。The present invention relates to the technical field of storage, in particular to a method, device and system for balancing storage.
背景技术Background technique
随着存储数据量的增长,常常通过增加磁盘阵列组(RedundantArraysofIndependentDisks,RAID组)来扩大存储架构的存储空间。As the amount of stored data increases, the storage space of the storage architecture is often expanded by adding a Redundant Array of Independent Disks (RAID group).
在增加磁盘阵列之后,现有的存储方式是:将数据随机分配到不同的RAID组中,常常使得一些磁盘阵列组已经存满数据,而另外的磁盘阵列组还有剩余存储空间,例如:RAIDGroup0为原有存储空间,其大小为50G,已经占用存储空间大小为40G,剩余空间大小为10G。当对原有空间进行扩容加入两个磁盘阵列组分别为30G的RAIDGroup1和20G的RAIDGroup2,当需要对大小为30G的数据文件a进行存储时,将数据文件a分为三段数据分别为10G的VOL0、5G的VOL1和15G的VOL2,并将VOL0、VOL1和VOL2分别存储到RAIDGroup0、RAIDGroup1和RAIDGroup2中,使得RAIDGroup0完全被存满,RAIDGroup1剩余35G存储空间,RAIDGroup2剩余5G空间,因此,现有的这种存储方式,造成存储不均衡。After adding disk arrays, the existing storage method is: randomly assigning data to different RAID groups, often making some disk array groups full of data, while other disk array groups still have remaining storage space, for example: RAIDGroup0 It is the original storage space, its size is 50G, the occupied storage space is 40G, and the remaining space is 10G. When expanding the original space and adding two disk array groups of 30G RAIDGroup1 and 20G RAIDGroup2 respectively, when it is necessary to store data file a with a size of 30G, the data file a is divided into three sections with data of 10G respectively VOL0, VOL1 of 5G, and VOL2 of 15G, and store VOL0, VOL1, and VOL2 in RAIDGroup0, RAIDGroup1, and RAIDGroup2 respectively, so that RAIDGroup0 is completely full, RAIDGroup1 has 35G of storage space left, and RAIDGroup2 has 5G of remaining space. Therefore, the existing This storage method causes storage imbalance.
发明内容Contents of the invention
本发明实施例提供了一种平衡存储的方法、装置和系统,实现了均衡存储。Embodiments of the present invention provide a method, device and system for balanced storage, which realize balanced storage.
一种平衡存储的方法,为至少一个原有RAID组扩展至少一个新RAID组,还包括:A method for balancing storage, expanding at least one new RAID group for at least one original RAID group, further comprising:
确定所述至少一个原有RAID组中每个原有RAID组的存储容量及所述至少一个新RAID组中每个新RAID组的存储容量;determining the storage capacity of each original RAID group in the at least one original RAID group and the storage capacity of each new RAID group in the at least one new RAID group;
根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,所述各个RAID组包括:每个原有RAID组和每个新RAID组;According to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion, and each RAID group includes: each original RAID group and each new RAID group ;
确定所述至少一个原有RAID组存储的存储数据,并根据所述各个RAID组间的容量比例,重新为所述各个RAID组分配所述存储数据。Determining the storage data stored in the at least one original RAID group, and re-allocating the storage data to the various RAID groups according to the capacity ratio among the various RAID groups.
优选地,上述方法进一步包括:设置至少一个卷;Preferably, the above method further comprises: setting at least one volume;
在所述计算扩展后各个RAID组间的容量比例之后,在所述重新为所述每个原有RAID组和所述每个新RAID组分配所述存储数据之前,进一步包括:根据所述各个RAID组间的容量比例,在所述各个RAID组中,为所述至少一个卷配置对应容量比例的存储空间;After the calculation of the capacity ratio among the expanded RAID groups, before the redistribution of the storage data for each of the original RAID groups and each of the new RAID groups, further comprising: according to the each The capacity ratio between RAID groups, in each RAID group, configure storage space corresponding to the capacity ratio for the at least one volume;
所述重新为所述各个RAID组分配所述存储数据,包括:在所述至少一个卷中,确定第一目标卷和所述第一目标卷对应的所述各个RAID组中的第一目标存储空间,根据所述各个RAID组间的容量比例,将所述存储数据存储到所述各个RAID组中的第一目标存储空间。The re-allocating the storage data for each RAID group includes: determining the first target volume and the first target storage in each RAID group corresponding to the first target volume in the at least one volume space, storing the storage data in the first target storage space in each RAID group according to the capacity ratio among the RAID groups.
优选地,上述方法进一步包括:Preferably, the above method further comprises:
当接收到存储当前数据的请求时,为所述当前数据确定所述至少一个卷中的第二目标卷和所述第二目标卷对应的所述各个RAID组中的第二目标存储空间;When a request for storing current data is received, determining a second target volume in the at least one volume and a second target storage space in each RAID group corresponding to the second target volume for the current data;
根据所述各个RAID组间的容量比例,将所述当前数据分配给所述各个RAID组中的第二目标存储空间存储。Allocating the current data to the second target storage space in each RAID group for storage according to the capacity ratio among the various RAID groups.
优选地,上述方法,进一步包括:Preferably, the above method further comprises:
当接收到外设的数据请求端读取目标数据的请求时,确定所述目标数据在所述各个RAID组中的存储情况;When receiving a request from the data requesting end of the peripheral device to read the target data, determine the storage situation of the target data in each RAID group;
根据所述存储情况,将所述各个RAID组中的目标数据同步发送给所述外设的数据请求端。According to the storage situation, synchronously send the target data in each RAID group to the data requesting end of the peripheral device.
一种平衡存储的装置,包括:A device for balancing storage, comprising:
确定单元,用于确定外设的至少一个原有RAID组中每个原有RAID组的存储容量及外设的至少一个新RAID组中每个新RAID组的存储容量;A determination unit, configured to determine the storage capacity of each original RAID group in at least one original RAID group of the peripheral and the storage capacity of each new RAID group in at least one new RAID group of the peripheral;
计算单元,用于根据所述确定单元确定的外设的每个原有RAID组的存储容量和所述外设的每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,所述各个RAID组包括:每个原有RAID组和每个新RAID组;A calculation unit, configured to calculate the capacity ratio between each RAID group after expansion according to the storage capacity of each original RAID group of the peripheral device determined by the determination unit and the storage capacity of each new RAID group of the peripheral device, The various RAID groups include: each original RAID group and each new RAID group;
分配单元,用于确定所述至少一个原有RAID组存储的存储数据,并根据所述计算单元计算出的各个RAID组间的容量比例,重新为所述各个RAID组分配所述存储数据。The allocating unit is configured to determine the storage data stored in the at least one original RAID group, and re-allocate the storage data to the various RAID groups according to the capacity ratio between the various RAID groups calculated by the calculation unit.
优选地,上述装置,进一步包括:设置单元,其中,Preferably, the above-mentioned device further includes: a setting unit, wherein,
所述设置单元,用于设置至少一个卷,并根据所述计算单元计算出的各个RAID组间的容量比例,在所述各个RAID组中,为所述至少一个卷配置对应容量比例的存储空间;The setting unit is configured to set at least one volume, and according to the capacity ratio between each RAID group calculated by the calculation unit, in each RAID group, configure storage space corresponding to the capacity ratio for the at least one volume ;
所述分配单元,用于在所述设置单元设置的至少一个卷中,确定第一目标卷和所述第一目标卷对应的所述各个RAID组中的第一目标存储空间,根据所述各个RAID组间的容量比例,将所述存储数据存储到所述第一目标存储空间。The allocating unit is configured to, in at least one volume set by the setting unit, determine the first target volume and the first target storage space in each RAID group corresponding to the first target volume, according to each The capacity ratio among RAID groups, storing the storage data in the first target storage space.
优选地,所述分配单元,进一步用于当接收到存储当前数据的请求时,为所述当前数据确定所述至少一个卷中的第二目标卷和所述第二目标卷对应的所述各个RAID组中的第二目标存储空间;根据所述各个RAID组间的容量比例,将所述当前数据分配给所述各个RAID组中的第二目标存储空间存储。Preferably, the allocating unit is further configured to, when receiving a request for storing current data, determine a second target volume in the at least one volume and the respective volumes corresponding to the second target volume for the current data. The second target storage space in the RAID group; according to the capacity ratio among the various RAID groups, allocating the current data to the second target storage space in the various RAID groups for storage.
优选地,上述装置,进一步包括:发送单元,用于当接收到外设的数据请求端读取目标数据的请求时,确定所述目标数据在所述分配单元分配的各个RAID组中的存储情况;根据所述存储情况,将所述各个RAID组中的目标数据同步发送给所述外设的数据请求端。Preferably, the above device further includes: a sending unit, configured to determine the storage situation of the target data in each RAID group allocated by the allocation unit when receiving a request from the data requesting end of the peripheral device to read the target data ; According to the storage situation, synchronously send the target data in each RAID group to the data requesting end of the peripheral device.
一种平衡存储的系统,包括:上述任一所述的平衡存储的装置、至少一个原有RAID组和至少一个新RAID组,其中,A system for balanced storage, comprising: any of the above-mentioned balanced storage devices, at least one original RAID group and at least one new RAID group, wherein,
所述至少一个原有RAID组中,每个原有RAID组,用于根据所述平衡存储的装置计算出的各个RAID组间的容量比例,将存储的存储数据分配给所述至少一个新RAID组。In the at least one original RAID group, each original RAID group is used to allocate the stored storage data to the at least one new RAID according to the capacity ratio between each RAID group calculated by the device for balancing storage Group.
所述至少一个新RAID组中,每个新RAID组,用于接收所述每个原有RAID组发送的存储数据。In the at least one new RAID group, each new RAID group is used to receive the stored data sent by each original RAID group.
优选地,上述系统,进一步包括:至少一个数据请求端,其中,Preferably, the above system further includes: at least one data requester, wherein,
每个数据请求端,用于向所述平衡存储的装置发送读取目标数据的请求,并同步接收所述每个原来RAID组和每个新RAID组发送的目标数据。Each data requesting end is configured to send a request for reading target data to the balance storage device, and synchronously receive the target data sent by each original RAID group and each new RAID group.
本发明实施例提供了一种平衡存储的方法、装置和系统,该方法通过为至少一个原有RAID组扩展至少一个新RAID组,确定至少一个原有RAID组中每个原有RAID组的存储容量及至少一个新RAID组中每个新RAID组的存储容量;根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,各个RAID组包括:每个原有RAID组和每个新RAID组;确定至少一个原有RAID组存储的存储数据,并根据各个RAID组间的容量比例,重新为各个RAID组分配存储数据,该方法通过计算各个RAID组间的容量比例,并按照该容量比例分配数据,使每个RAID组存储数据的量占其自身总存储容量的比例一致,实现了均衡存储。Embodiments of the present invention provide a method, device and system for balancing storage. The method determines the storage capacity of each original RAID group in at least one original RAID group by expanding at least one new RAID group for at least one original RAID group. Capacity and the storage capacity of each new RAID group in at least one new RAID group; according to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion, and each RAID group The groups include: each original RAID group and each new RAID group; determine the storage data stored in at least one original RAID group, and re-allocate the storage data for each RAID group according to the capacity ratio between each RAID group. The method passes Calculate the capacity ratio between each RAID group, and allocate data according to the capacity ratio, so that the ratio of the amount of data stored in each RAID group to its own total storage capacity is consistent, and balanced storage is realized.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明一个实施例提供的一种平衡存储的方法的流程图;FIG. 1 is a flowchart of a method for balancing storage provided by an embodiment of the present invention;
图2是本发明另一个实施例提供的一种平衡存储的方法的流程图;Fig. 2 is a flow chart of a method for balancing storage provided by another embodiment of the present invention;
图3是本发明一个实施例提供的扩展后RAID组的结构示意图;FIG. 3 is a schematic structural diagram of an expanded RAID group provided by an embodiment of the present invention;
图4是本发明一个实施例提供的一种平衡存储的装置的结构示意图;Fig. 4 is a schematic structural diagram of a balance storage device provided by an embodiment of the present invention;
图5是本发明一个实施例提供的一种平衡存储的系统的结构示意图。Fig. 5 is a schematic structural diagram of a balanced storage system provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection of the present invention. scope.
如图1所示,本发明实施例提供了一种平衡存储的方法,该方法可以包括以下步骤:As shown in Figure 1, an embodiment of the present invention provides a method for balancing storage, which may include the following steps:
步骤101:为至少一个原有RAID组扩展至少一个新RAID组;Step 101: expanding at least one new RAID group for at least one original RAID group;
步骤102:确定至少一个原有RAID组中每个原有RAID组的存储容量及至少一个新RAID组中每个新RAID组的存储容量;Step 102: determining the storage capacity of each original RAID group in at least one original RAID group and the storage capacity of each new RAID group in at least one new RAID group;
步骤103:根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,各个RAID组包括:每个原有RAID组和每个新RAID组;Step 103: According to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion, each RAID group includes: each original RAID group and each new RAID group Group;
步骤104:确定至少一个原有RAID组存储的存储数据,并根据各个RAID组间的容量比例,重新为各个RAID组分配存储数据。Step 104: Determine the storage data stored in at least one original RAID group, and re-allocate the storage data for each RAID group according to the capacity ratio among each RAID group.
在图1所示的实施例中,通过为至少一个原有RAID组扩展至少一个新RAID组,确定至少一个原有RAID组中每个原有RAID组的存储容量及至少一个新RAID组中每个新RAID组的存储容量;根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,各个RAID组包括:每个原有RAID组和每个新RAID组;确定至少一个原有RAID组存储的存储数据,并根据各个RAID组间的容量比例,重新为各个RAID组分配存储数据,该方法通过计算各个RAID组间的容量比例,并按照该容量比例分配数据,使每个RAID组存储数据的量占其自身总存储容量的比例一致,实现了均衡存储。In the embodiment shown in Figure 1, by extending at least one new RAID group for at least one original RAID group, the storage capacity of each original RAID group in at least one original RAID group and the storage capacity of each original RAID group in at least one new RAID group are determined. The storage capacity of each new RAID group; according to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion. Each RAID group includes: each original RAID group and each new RAID group; determine the storage data of at least one original RAID group storage, and redistribute storage data for each RAID group according to the capacity ratio between each RAID group, the method is by calculating the capacity ratio between each RAID group, And allocate data according to the capacity ratio, so that the amount of data stored in each RAID group accounts for the same proportion of its own total storage capacity, and balanced storage is realized.
在本发明一个实施例中,上述方法进一步包括:设置至少一个卷;在步骤103之后,步骤104之前,进一步包括:根据各个RAID组间的容量比例,在各个RAID组中,为至少一个卷配置对应容量比例的存储空间;步骤104的具体实施方式,包括:在至少一个卷中,确定第一目标卷和第一目标卷对应的各个RAID组中的第一目标存储空间,根据各个RAID组间的容量比例,将存储数据存储到第一目标存储空间,通过划分卷实现了对RAID组的管理。In an embodiment of the present invention, the above method further includes: setting at least one volume; after step 103 and before step 104, further includes: configuring at least one volume in each RAID group according to the capacity ratio between each RAID group The storage space corresponding to the capacity ratio; the specific implementation of step 104, including: in at least one volume, determine the first target volume and the first target storage space in each RAID group corresponding to the first target volume, according to each RAID group The storage data is stored in the first target storage space, and the management of the RAID group is realized by dividing the volume.
在本发明一个实施例中,上述方法进一步包括:当接收到存储当前数据的请求时,为当前数据确定至少一个卷中的第二目标卷和第二目标卷对应的各个RAID组中的第二目标存储空间;根据各个RAID组间的容量比例,将当前数据分配给各个RAID组中的第二目标存储空间存储,即存储新的数据的过程中仍然按照容量比例分配存储空间,进一步提高了存储的均衡性。In an embodiment of the present invention, the above method further includes: when a request for storing current data is received, determining a second target volume in at least one volume and a second target volume in each RAID group corresponding to the second target volume for the current data. Target storage space: according to the capacity ratio between each RAID group, the current data is allocated to the second target storage space in each RAID group for storage, that is, the storage space is still allocated according to the capacity ratio during the process of storing new data, which further improves the storage capacity. of balance.
在本发明一个实施例中,上述方法进一步包括:当接收到外设的数据请求端读取目标数据的请求时,确定目标数据在所述各个RAID组中的存储情况;根据存储情况,将各个RAID组中的目标数据同步发送给外设的数据请求端,由于数据在各个RAID组中均有存储,那么各个RAID组同时提供数据的速率远远大于一个RAID组提供数据的速率,有效的提高了读取数据的效率。In an embodiment of the present invention, the above method further includes: when receiving a request from the data requesting end of the peripheral device to read the target data, determining the storage conditions of the target data in each RAID group; The target data in the RAID group is synchronously sent to the data requesting end of the peripheral device. Since the data is stored in each RAID group, the rate at which each RAID group provides data at the same time is far greater than the rate at which one RAID group provides data, effectively improving improve the efficiency of reading data.
为使本发明的目的、技术方案和优点更加清楚,以为一个原有RAID组扩展新RAID组为例,展开说明平衡存储的方法,如图2所示,该方法可以包括以下步骤:In order to make the purpose of the present invention, technical solutions and advantages clearer, take an original RAID group as an example to expand a new RAID group, expand and illustrate the method for balanced storage, as shown in Figure 2, the method may include the following steps:
步骤200:设置至少一个卷;Step 200: setting at least one volume;
对于前端的主机来说,可以将存储空间分为至少一个卷,该卷是对用户显示的如D卷、F卷等等。For the front-end host, the storage space can be divided into at least one volume, which is displayed to the user, such as volume D, volume F, and so on.
步骤201:为原有RAID组扩展至少一个新RAID组;Step 201: expanding at least one new RAID group for the original RAID group;
如图3所示,原有RAID组为RAIDGroup0,为了扩大存储容量,为该RAIDGroup0扩展出两个新RAID组,分别为RAIDGroup1和RAIDGroup2,以扩大总存储容量。As shown in FIG. 3, the original RAID group is RAIDGroup0. In order to expand the storage capacity, two new RAID groups are extended for the RAIDGroup0, namely RAIDGroup1 and RAIDGroup2, to expand the total storage capacity.
步骤202:确定原有RAID组中每个原有RAID组的存储容量及至少一个新RAID组中每个新RAID组的存储容量;Step 202: Determine the storage capacity of each original RAID group in the original RAID group and the storage capacity of each new RAID group in at least one new RAID group;
如图3所示,组成各个RAID组的磁盘大小为20G,那么,RAIDGroup0作为原有RAID组由5个磁盘组成,其大小为100G;新RAID组中,RAIDGroup1由3个磁盘组成,其大小为60G;RAIDGroup2由5个磁盘组成,其大小为100G;即扩展后总的存储容量为260G。As shown in Figure 3, the disk size of each RAID group is 20G. Then, RAIDGroup0 is composed of 5 disks as the original RAID group, and its size is 100G; in the new RAID group, RAIDGroup1 is composed of 3 disks, and its size is 60G; RAIDGroup2 consists of 5 disks with a size of 100G; that is, the total storage capacity after expansion is 260G.
步骤203:根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例;Step 203: According to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion;
该步骤中提及的各个RAID组包括:每个原有RAID组和每个新RAID组;如图3所示,RAIDGroup0容量:RAIDGroup1容量:RAIDGroup2容量=100:60:100=5:3:5,即图3所示的各个RAID组的容量比为5:3:5。Each RAID group mentioned in this step includes: each original RAID group and each new RAID group; as shown in Figure 3, RAIDGroup0 capacity: RAIDGroup1 capacity: RAIDGroup2 capacity=100:60:100=5:3:5 , that is, the capacity ratio of each RAID group shown in FIG. 3 is 5:3:5.
步骤204:根据各个RAID组间的容量比例,在各个RAID组中,为至少一个卷配置对应容量比例的存储空间;Step 204: According to the capacity ratio between each RAID group, in each RAID group, configure storage space corresponding to the capacity ratio for at least one volume;
例如:为前端主机设置的D卷分配78G的存储空间,则按照RAIDGroup0容量:RAIDGroup1容量:RAIDGroup2容量=5:3:5,分别在RAIDGroup0中配置30G给D卷,在RAIDGroup1中配置18G给D卷,在RAIDGroup2中配置30G给D卷。For example: to allocate 78G storage space for the D volume set by the front-end host, according to RAIDGroup0 capacity: RAIDGroup1 capacity: RAIDGroup2 capacity = 5:3:5, configure 30G for D volume in RAIDGroup0 and 18G for D volume in RAIDGroup1 , Configure 30G for volume D in RAIDGroup2.
步骤205:确定原有RAID组存储的存储数据;Step 205: Determine the storage data stored in the original RAID group;
步骤206:在至少一个卷中,确定第一目标卷和第一目标卷对应的各个RAID组中的第一目标存储空间;Step 206: In at least one volume, determine the first target volume and the first target storage space in each RAID group corresponding to the first target volume;
步骤205和步骤206的过程:在扩展RAID组之前,对于D卷来说,在RAIDGroup0中存在26G的数据,D卷作为目标卷,在RAIDGroup0中存储空间为30G,在RAIDGroup1中存储空间为18G,在RAIDGroup2中存储空间为30G。The process of step 205 and step 206: before expanding the RAID group, for volume D, there is 26G of data in RAIDGroup0, volume D is used as the target volume, the storage space in RAIDGroup0 is 30G, and the storage space in RAIDGroup1 is 18G, The storage space in RAIDGroup2 is 30G.
步骤207:根据各个RAID组间的容量比例,将存储数据存储到各个RAID组中的第一目标存储空间;Step 207: According to the capacity ratio between each RAID group, store the storage data in the first target storage space in each RAID group;
根据RAIDGroup0容量:RAIDGroup1容量:RAIDGroup2容量=5:3:5,将扩展前RAIDGroup0中存在的26G数据,重新分配为VOL010G、VOL16G及VOL210G;并分别将VOL010G存储到RAIDGroup0中,将VOL16G存储到RAIDGroup1中,将VOL210G存储到RAIDGroup2中。According to RAIDGroup0 capacity: RAIDGroup1 capacity: RAIDGroup2 capacity = 5:3:5, redistribute the 26G data existing in RAIDGroup0 before expansion into VOL010G, VOL16G and VOL210G; and store VOL010G in RAIDGroup0 and VOL16G in RAIDGroup1 respectively , store VOL210G in RAIDGroup2.
步骤208:当接收到存储当前数据的请求时,为当前数据确定至少一个卷中的第二目标卷和第二目标卷对应的各个RAID组中的第二目标存储空间;Step 208: When a request for storing current data is received, determine a second target volume in at least one volume and a second target storage space in each RAID group corresponding to the second target volume for the current data;
步骤209:根据各个RAID组间的容量比例,将当前数据分配给各个RAID组中的第二目标存储空间存储;Step 209: According to the capacity ratio between each RAID group, allocate the current data to the second target storage space in each RAID group for storage;
例如:要将13G的当前数据存储到D卷中,则根据RAIDGroup0容量:RAIDGroup1容量:RAIDGroup2容量=5:3:5,将13G当前数据划分为VOL0#5G、VOL1#3G及VOL2#5G,并分别将VOL0#5G存储到RAIDGroup0中,VOL1#3G存储到RAIDGroup1中,VOL2#5G存储到RAIDGroup2中,实现了均衡存储。For example: to store 13G of current data in volume D, according to RAIDGroup0 capacity: RAIDGroup1 capacity: RAIDGroup2 capacity = 5:3:5, divide 13G current data into VOL0#5G, VOL1#3G and VOL2#5G, and Store VOL0#5G in RAIDGroup0, VOL1#3G in RAIDGroup1, and VOL2#5G in RAIDGroup2, achieving balanced storage.
步骤210:当接收到外设的数据请求端读取目标数据的请求时,确定目标数据在各个RAID组中的存储情况;Step 210: When receiving a request from the data requesting end of the peripheral device to read the target data, determine the storage conditions of the target data in each RAID group;
步骤211:根据存储情况,将各个RAID组中的目标数据同步发送给外设的数据请求端。Step 211: Synchronously send the target data in each RAID group to the data requesting end of the peripheral device according to the storage situation.
对于步骤210和步骤211数据读取的过程来说,值得说明的是,在上述的存储过程中,会生成一个对应表,用来存储数据的存放位置以及各个RAID组中的存储情况等,那么,当接收到I/O读取数据时,则首先在对应表中确定数据的位置,例如:要读取步骤209存储的13G数据,则RAIDGroup0提供其存储的5G数据,RAIDGroup1提供其存储的3G数据,RAIDGroup2提供其存储的5G数据,这3个RAID组能够同步提供数据,从而有效地提高了数据的读取效率。For the process of reading data in step 210 and step 211, it is worth noting that in the above storage process, a corresponding table will be generated to store the storage location of the data and the storage conditions in each RAID group, etc., then , when receiving the I/O read data, first determine the location of the data in the corresponding table, for example: to read the 13G data stored in step 209, then RAIDGroup0 provides its stored 5G data, and RAIDGroup1 provides its stored 3G data Data, RAIDGroup2 provides the 5G data it stores, and these three RAID groups can provide data synchronously, thus effectively improving the efficiency of data reading.
如图4所示,本发明实施例提供一种平衡存储的装置,包括:As shown in Figure 4, an embodiment of the present invention provides a device for balancing storage, including:
确定单元401,用于确定外设的至少一个原有RAID组中每个原有RAID组的存储容量及外设的至少一个新RAID组中每个新RAID组的存储容量;A determining unit 401, configured to determine the storage capacity of each original RAID group in at least one original RAID group of the peripheral device and the storage capacity of each new RAID group in at least one new RAID group of the peripheral device;
计算单元402,用于根据确定单元401确定的外设的每个原有RAID组的存储容量和外设的每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,各个RAID组包括:每个原有RAID组和每个新RAID组;The calculation unit 402 is used to calculate the capacity ratio between each RAID group after expansion according to the storage capacity of each original RAID group of the peripheral device determined by the determination unit 401 and the storage capacity of each new RAID group of the peripheral device. Groups include: each original RAID group and each new RAID group;
分配单元403,用于确定至少一个原有RAID组存储的存储数据,并根据计算单元402计算出的各个RAID组间的容量比例,重新为各个RAID组分配存储数据。The allocation unit 403 is configured to determine storage data stored in at least one original RAID group, and re-allocate storage data for each RAID group according to the capacity ratio between each RAID group calculated by the calculation unit 402 .
在本发明另一实施例中,上述装置,进一步包括:设置单元(图中未示出),其中,In another embodiment of the present invention, the above-mentioned device further includes: a setting unit (not shown in the figure), wherein,
设置单元,用于设置至少一个卷,并根据计算单元402计算出的各个RAID组间的容量比例,在各个RAID组中,为至少一个卷配置对应容量比例的存储空间;A setting unit, configured to set at least one volume, and according to the capacity ratio between each RAID group calculated by the calculation unit 402, in each RAID group, configure storage space corresponding to the capacity ratio for at least one volume;
分配单元403,用于在设置单元设置的至少一个卷中,确定第一目标卷和第一目标卷对应的各个RAID组中的第一目标存储空间,根据各个RAID组间的容量比例,将存储数据存储到第一目标存储空间。The allocating unit 403 is configured to determine the first target volume and the first target storage space in each RAID group corresponding to the first target volume in at least one volume set by the setting unit, and store the storage space according to the capacity ratio between each RAID group. The data is stored in the first target storage space.
在本发明又一实施例中,分配单元403,进一步用于当接收到存储当前数据的请求时,为当前数据确定至少一个卷中的第二目标卷和第二目标卷对应的各个RAID组中的第二目标存储空间;根据各个RAID组间的容量比例,将当前数据分配给各个RAID组中的第二目标存储空间存储。In yet another embodiment of the present invention, the allocating unit 403 is further configured to, when receiving a request for storing current data, determine a second target volume in at least one volume for the current data and each RAID group corresponding to the second target volume The second target storage space; according to the capacity ratio between each RAID group, the current data is allocated to the second target storage space in each RAID group for storage.
在本发明另一实施例中,上述装置进一步包括:发送单元(图中未示出),用于当接收到外设的数据请求端读取目标数据的请求时,确定目标数据在分配单元分配的各个RAID组中的存储情况;根据存储情况,将各个RAID组中的目标数据同步发送给外设的数据请求端。In another embodiment of the present invention, the above-mentioned device further includes: a sending unit (not shown in the figure), configured to determine that the target data is allocated in the allocation unit when receiving a request from the data requesting end of the peripheral device to read the target data. The storage situation in each RAID group; according to the storage situation, the target data in each RAID group is synchronously sent to the data request end of the peripheral device.
上述装置内的各单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。The information exchange and execution process among the units in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific content can refer to the description in the method embodiment of the present invention, and will not be repeated here.
如图5所示,本发明实施例提供一种平衡存储的系统,该系统包括:上述任意一种平衡存储的装置501、至少一个原有RAID组502和至少一个新RAID组503,其中,As shown in FIG. 5 , an embodiment of the present invention provides a balanced storage system, which includes: any of the above-mentioned balanced storage devices 501, at least one original RAID group 502, and at least one new RAID group 503, wherein,
至少一个原有RAID组中,每个原有RAID组502,用于根据平衡存储的装置501计算出的各个RAID组间的容量比例,将存储的存储数据分配给至少一个新RAID组503。In at least one original RAID group, each original RAID group 502 is configured to allocate the stored storage data to at least one new RAID group 503 according to the capacity ratio between each RAID group calculated by the device 501 for balancing storage.
至少一个新RAID组中,每个新RAID组503,用于接收每个原有RAID502组发送的存储数据。In at least one new RAID group, each new RAID group 503 is used to receive storage data sent by each original RAID group 502 .
在本发明另一实施例中,上述系统,进一步包括:至少一个数据请求端(图中未示出),其中,每个数据请求端,用于向平衡存储的装置发送读取目标数据的请求,并同步接收每个原来RAID组502和每个新RAID组503发送的目标数据。In another embodiment of the present invention, the above-mentioned system further includes: at least one data requesting end (not shown in the figure), wherein each data requesting end is used to send a request for reading target data to a device for balancing storage , and synchronously receive the target data sent by each original RAID group 502 and each new RAID group 503 .
根据上述方案,本发明的各实施例所提供的平衡存储的方法、装置和系统,至少具有如下有益效果:According to the above solutions, the method, device and system for balanced storage provided by the embodiments of the present invention have at least the following beneficial effects:
1.通过为至少一个原有RAID组扩展至少一个新RAID组,确定至少一个原有RAID组中每个原有RAID组的存储容量及至少一个新RAID组中每个新RAID组的存储容量;根据每个原有RAID组的存储容量和每个新RAID组的存储容量,计算扩展后各个RAID组间的容量比例,各个RAID组包括:每个原有RAID组和每个新RAID组;确定至少一个原有RAID组存储的存储数据,并根据各个RAID组间的容量比例,重新为各个RAID组分配存储数据,该方法通过计算各个RAID组间的容量比例,并按照该容量比例分配数据,使每个RAID组存储数据的量占其自身总存储容量的比例一致,实现了均衡存储。1. by expanding at least one new RAID group for at least one original RAID group, determining the storage capacity of each original RAID group in the at least one original RAID group and the storage capacity of each new RAID group in the at least one new RAID group; According to the storage capacity of each original RAID group and the storage capacity of each new RAID group, calculate the capacity ratio between each RAID group after expansion. Each RAID group includes: each original RAID group and each new RAID group; determine Store data stored in at least one original RAID group, and re-allocate storage data for each RAID group according to the capacity ratio between each RAID group. This method calculates the capacity ratio between each RAID group and allocates data according to the capacity ratio. The ratio of the amount of data stored in each RAID group to its total storage capacity is consistent, and balanced storage is realized.
2.在本发明实施例中,在数据存储的过程,根据各个RAID组间的容量比例,为每个RAID组分配其存储数据的大小,即保证数据能够存储在每个RAID组中存储一部分,那么当后续读取数据的过程中,每个RAID组提供其存储的一部分数据,即在对数据进行读取或写入时,可以保证每个RAID组处于工作状态,从而提高了读写性能。2. In the embodiment of the present invention, in the process of data storage, according to the capacity ratio among each RAID group, distribute the size of its storage data for each RAID group, promptly guarantee that data can be stored in each RAID group and store a part, Then, during the subsequent process of reading data, each RAID group provides a part of its stored data, that is, when reading or writing data, it can ensure that each RAID group is in a working state, thereby improving read and write performance.
3.由于为前端主机的卷分配的存储空间是按照各个RAID组间的容量比例,在每个RAID组中划分出一定的存储空间,同时,在数据存储过程中,仍然按照各个RAID组间的容量比例,为每个RAID组分配对应比例的存储数据,保证了每个RAID组中存储数据的量与每个RAID组的总存储容量之间的比例是一致的,避免一个RAID组已经存满,其他RAID组剩余小存储空间不能继续存储,即避免了RAID组容量的浪费。3. Since the storage space allocated for the volume of the front-end host is based on the capacity ratio between each RAID group, a certain storage space is divided in each RAID group. Capacity ratio, assigning a corresponding proportion of storage data to each RAID group, ensuring that the ratio between the amount of data stored in each RAID group and the total storage capacity of each RAID group is consistent, and avoiding that a RAID group is full , the remaining small storage space of other RAID groups cannot continue to store, that is, the waste of RAID group capacity is avoided.
需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个······”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同因素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional same elements in the process, method, article or apparatus comprising said element.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储在计算机可读取的存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质中。Those of ordinary skill in the art can understand that all or part of the steps to realize the above method embodiments can be completed by program instructions related hardware, and the aforementioned programs can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后需要说明的是:以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solution of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610202611.3A CN105808171A (en) | 2016-04-01 | 2016-04-01 | Storage balancing method, device and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610202611.3A CN105808171A (en) | 2016-04-01 | 2016-04-01 | Storage balancing method, device and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN105808171A true CN105808171A (en) | 2016-07-27 |
Family
ID=56459454
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610202611.3A Pending CN105808171A (en) | 2016-04-01 | 2016-04-01 | Storage balancing method, device and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105808171A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109753236A (en) * | 2017-11-08 | 2019-05-14 | 爱思开海力士有限公司 | Storage system and method of operation |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102096557A (en) * | 2010-12-31 | 2011-06-15 | 成都市华为赛门铁克科技有限公司 | Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID) |
| CN102549542A (en) * | 2009-10-09 | 2012-07-04 | 株式会社日立制作所 | Storage system and control method thereof, implementing data reallocation in case of load bias |
| CN104094254A (en) * | 2011-12-02 | 2014-10-08 | 康佩伦特科技公司 | System and method for unbalanced raid management |
| US20150100695A1 (en) * | 2013-10-08 | 2015-04-09 | Wistron Corporation | Method of integrating network storage spaces and control system thereof |
-
2016
- 2016-04-01 CN CN201610202611.3A patent/CN105808171A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102549542A (en) * | 2009-10-09 | 2012-07-04 | 株式会社日立制作所 | Storage system and control method thereof, implementing data reallocation in case of load bias |
| CN102096557A (en) * | 2010-12-31 | 2011-06-15 | 成都市华为赛门铁克科技有限公司 | Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID) |
| CN104094254A (en) * | 2011-12-02 | 2014-10-08 | 康佩伦特科技公司 | System and method for unbalanced raid management |
| US20150100695A1 (en) * | 2013-10-08 | 2015-04-09 | Wistron Corporation | Method of integrating network storage spaces and control system thereof |
| CN104519111A (en) * | 2013-10-08 | 2015-04-15 | 纬创资通股份有限公司 | Control system and method for integrating multiple network storage spaces |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109753236A (en) * | 2017-11-08 | 2019-05-14 | 爱思开海力士有限公司 | Storage system and method of operation |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110413201B (en) | Method, apparatus and computer program product for managing a storage system | |
| US20180011812A1 (en) | Information processing apparatus | |
| US20160085467A1 (en) | Intelligent data placement | |
| KR20140061444A (en) | Volatile memory representation of nonvolatile storage device set | |
| KR20100077156A (en) | Thin provisioning migration and scrubbing | |
| CN110688256B (en) | Method, device, electronic device, and storage medium for restoring metadata after power-on | |
| US9547450B2 (en) | Method and apparatus to change tiers | |
| CN106656631A (en) | Method and system of logical volume dynamic allocation on shared storage | |
| CN110389710A (en) | The method and apparatus for distributing storage resource | |
| WO2019072250A1 (en) | Document management method, document management system, electronic device and storage medium | |
| CN112650441B (en) | Stripe cache allocation method, device, electronic device and storage medium | |
| CN107924350B (en) | Electronic equipment and data compression method thereof | |
| CN114047886A (en) | NVME command processing method, system, electronic equipment and storage medium | |
| KR101573112B1 (en) | Method for distributing data and apparatus therefor | |
| US11740816B1 (en) | Initial cache segmentation recommendation engine using customer-specific historical workload analysis | |
| CN105808171A (en) | Storage balancing method, device and system | |
| CN107168800A (en) | A kind of memory allocation method and device | |
| CN111007988B (en) | RAID internal wear balancing method, system, terminal and storage medium | |
| CN117234811B (en) | Data backup methods, devices, equipment and storage media | |
| CN108196791A (en) | Data access method and device based on multiple storage devices | |
| CN105224261B (en) | A method and device for realizing block virtualization array | |
| CN105988871B (en) | Remote memory allocation method, device and system | |
| CN107632788A (en) | A kind of method of more controlled storage system I O schedulings and more controlled storage systems | |
| US12112075B1 (en) | Dynamically increasing performance of a virtual storage appliance that uses multi-attach cloud storage volumes | |
| WO2018235149A1 (en) | Storage device and storage area management method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160727 |
|
| WD01 | Invention patent application deemed withdrawn after publication |