WO2016086818A1 - 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列 - Google Patents

一种在存储阵列中划分硬盘域的方法及控制器、存储阵列 Download PDF

Info

Publication number
WO2016086818A1
WO2016086818A1 PCT/CN2015/095996 CN2015095996W WO2016086818A1 WO 2016086818 A1 WO2016086818 A1 WO 2016086818A1 CN 2015095996 W CN2015095996 W CN 2015095996W WO 2016086818 A1 WO2016086818 A1 WO 2016086818A1
Authority
WO
WIPO (PCT)
Prior art keywords
hard disk
domain
disk domain
hard
space
Prior art date
Application number
PCT/CN2015/095996
Other languages
English (en)
French (fr)
Inventor
罗小东
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016086818A1 publication Critical patent/WO2016086818A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems

Definitions

  • the present invention relates to the field of computer storage technologies, and in particular, to a method, a controller, and a storage array for dividing a hard disk domain in a storage array.
  • a storage array consists of a large number of hard disks.
  • the user divides the storage array into multiple disk domains based on service requirements and reliability.
  • Each disk domain includes dozens or hundreds of disks.
  • the number of service data stored by users changes, and the space utilization between disk domains is not balanced. This leads to unbalanced hard disk pressure, reduced hard disk life, and fluctuations in business performance. .
  • the embodiment of the invention discloses a method, a controller and a storage array for dividing a disk domain in a storage array, which can improve the utilization of the space resource of the hard disk under the condition that the space utilization of the disk domain is unbalanced.
  • a first aspect of an embodiment of the present invention discloses a method for dividing a hard disk domain in a storage array.
  • the storage array includes at least a controller and two hard disk domains, each hard disk domain includes a plurality of hard disks, and the method is performed by the controller, and the method includes:
  • the space utilization of the first disk domain is greater than the space utilization of the second disk domain, and the space utilization of the first disk domain and the second hard disk
  • the difference in space utilization of the domain is greater than a preset threshold, and the space utilization is equal to a ratio of a space capacity used by the disk domain to a total space capacity of the disk domain;
  • the data stored in the K hard disks of the second hard disk domain is migrated to other hard disks of the second hard disk domain to obtain K idle hard disks;
  • the space utilization ratio of the second hard disk domain after the K hard disks are reduced is equal to the space utilization rate after the K hard disks are added to the first hard disk domain.
  • the calculating the hard disk that needs to be reduced in the second hard disk domain includes:
  • Cap2 is the space capacity used by the second hard disk domain
  • Totalcap2 is the total space capacity of the second hard disk domain
  • Unitcap2 is the space capacity of each hard disk in the second hard disk domain
  • Usedcap1 is the said The space capacity used by a disk domain
  • Totalcap1 is the total space capacity of the first disk domain
  • K 0 is the number of hard disks to be reduced in the second disk domain
  • the K 0 is a positive number greater than 1.
  • K is an integer obtained by rounding down the value of K 0 calculated according to the formula (1).
  • the calculating the second hard disk domain needs to be reduced.
  • the method further includes:
  • the calculating the number K of hard disks to be reduced in the second hard disk domain includes:
  • the K hard disks are determined according to the space capacity required by the second hard disk domain, and the absolute value of the difference between the total space capacity of the K hard disks and the space capacity required to be reduced by the second hard disk domain is a minimum value.
  • the calculating in a fourth possible implementation manner of the first aspect of the embodiments, the calculating, :
  • the used capacity is the capacity of the second hard disk domain, and the total capacity of the second hard disk domain is used.
  • the usedcap1 is the used space capacity of the first hard disk domain
  • Totalcap1 is the first hard disk.
  • the total space capacity of the domain, Minuscap2 is the space capacity that needs to be reduced for the second hard disk domain.
  • a second aspect of the embodiment of the present invention discloses a controller, where the controller includes a communication interface, where the communication interface is used to communicate with at least two hard disk domains, each hard disk domain includes a plurality of hard disks, and the controller uses Do the following:
  • the space utilization of the first disk domain is greater than the space utilization of the second disk domain, and the space utilization of the first disk domain and the second hard disk
  • the difference in space utilization of the domain is greater than a preset threshold, and the space utilization is equal to a ratio of a space capacity used by the disk domain to a total space capacity of the disk domain;
  • the data stored in the K hard disks of the second hard disk domain is migrated to other hard disks of the second hard disk domain to obtain K idle hard disks;
  • the space utilization ratio of the second hard disk domain after the K hard disks are reduced is equal to the space utilization rate after the K hard disks are added to the first hard disk domain.
  • the controller calculates that the second hard disk domain needs to be reduced.
  • the specific method of the number K of hard disks is:
  • Cap2 is the space capacity used by the second hard disk domain
  • Totalcap2 is the total space capacity of the second hard disk domain
  • Unitcap2 is the space capacity of each hard disk in the second hard disk domain
  • Usedcap1 is the said The space capacity used by a disk domain
  • Totalcap1 is the total space capacity of the first disk domain
  • K 0 is the number of hard disks to be reduced in the second disk domain
  • the K 0 is a positive number greater than 1.
  • K is an integer obtained by rounding down the value of K 0 calculated according to the formula (1).
  • the controller is further configured to:
  • the K hard disks are determined according to the space capacity required by the second hard disk domain, and the absolute value of the difference between the total space capacity of the K hard disks and the space capacity required to be reduced by the second hard disk domain is a minimum value.
  • the controller calculates a space required for the second hard disk domain to be reduced.
  • the specific method of capacity is:
  • the used capacity is the capacity of the second hard disk domain, and the total capacity of the second hard disk domain is used.
  • the usedcap1 is the used space capacity of the first hard disk domain
  • Totalcap1 is the first hard disk.
  • the total space capacity of the domain, Minuscap2 is the space capacity that needs to be reduced for the second hard disk domain.
  • a third aspect of the embodiments of the present invention discloses a storage array, where the storage array includes the foregoing controller and at least two hard disk domains, and each hard disk domain includes a plurality of hard disks.
  • the controller first determines the first disk domain and the second disk domain, wherein the space utilization of the first disk domain is greater than the space utilization of the second disk domain, and the space utilization of the first disk domain is The difference in the space utilization ratio of the second disk domain is greater than a preset threshold, and the space utilization is equal to the ratio of the space capacity used by the disk domain to the total space capacity of the disk domain, and then calculating the hard disk to be reduced in the second disk domain.
  • the number K and the data stored in the K hard disks of the second hard disk domain are migrated to other hard disks of the second hard disk domain to obtain K idle hard disks, where K is an integer greater than or equal to 1, and finally K idle
  • the hard disk is configured to the first hard disk domain.
  • the embodiments of the present invention can improve the utilization of the space resources of the hard disk under the condition that the space utilization of the hard disk domain is unbalanced.
  • FIG. 1 is a schematic structural diagram of a memory array according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for dividing a hard disk domain in a storage array according to an embodiment of the present invention.
  • the embodiment of the invention discloses a method, a controller and a storage array for dividing a disk domain in a storage array, which can improve the utilization of the space resource of the hard disk under the condition that the space utilization of the disk domain is unbalanced.
  • an embodiment of the present invention discloses a storage array, as shown in FIG. 1 , which is a disclosure of an embodiment of the present invention.
  • the storage array 100 includes at least a controller 101 and two disk domains (such as the disk domain 1 to the disk domain N in FIG. 1 , where N is greater than or equal to 2), and each disk domain includes multiple
  • the controller 101 may include a communication interface 1011, a memory 1012, and a processor 1013.
  • the controller 101 may communicate with at least two hard disk domains through the communication interface 1011.
  • the memory 1012 stores a set of program codes, and the controller 101 may The program code in the memory 1012 is called by the processor 1013 for performing the following operations:
  • Determining the first disk domain and the second disk domain wherein the space utilization of the first disk domain is greater than the space utilization of the second disk domain, and the space utilization of the first disk domain is different from the space utilization of the second disk domain.
  • the value is greater than the preset threshold and the space utilization is equal to the ratio of the space capacity used by the disk domain to the total space capacity of the disk domain;
  • the data stored in the K hard disks of the second hard disk domain is migrated to other hard disks of the second hard disk domain to obtain K idle hard disks;
  • the space utilization ratio of the second hard disk domain after the K hard disks are reduced is equal to the space utilization rate after the K hard disks are added to the first hard disk domain.
  • the specific manner in which the controller 101 calculates the number K of hard disks that need to be reduced in the second hard disk domain may be:
  • Usedcap2 is the space capacity used by the second disk domain
  • Totalcap2 is the total space capacity of the second disk domain
  • Unitcap2 is the space capacity of each hard disk in the second disk domain
  • Usedcap1 is the space capacity used by the first disk domain.
  • Totalcap1 is the total space capacity of the first hard disk domain
  • K 0 is the number of hard disks to be reduced in the second hard disk domain
  • K 0 is a positive number greater than 1
  • K is K 0 calculated according to formula (1). The value of the value is rounded down to the resulting integer.
  • controller 101 calls the program code in the memory 1012 through the processor 1013, and is also used to perform the following operations:
  • controller 101 calculates the number K of hard disks to be reduced in the second hard disk domain.
  • the K hard disks are determined according to the required space capacity of the second hard disk domain, wherein the absolute value of the difference between the total space capacity of the K hard disks and the space capacity required to be reduced by the second hard disk domain is a minimum value.
  • the specific manner in which the controller 101 calculates the space capacity that the second disk domain needs to reduce may be:
  • Usedcap2 is the space capacity used by the second disk domain
  • Totalcap2 is the total space capacity of the second disk domain
  • Usedcap1 is the space capacity used by the first disk domain
  • Totalcap1 is the total space capacity of the first disk domain
  • Mincuscap2 is The second hard disk domain requires a reduced amount of space.
  • the controller 101 may be a server including a memory, a processor, and a communication interface, which is not limited in the embodiment of the present invention.
  • FIG. 2 is a schematic diagram of dividing a hard disk domain in a storage array according to an embodiment of the present invention. Schematic diagram of the process.
  • the method shown in FIG. 2 can be applied to the memory array 100 shown in FIG. 1 and the method can be performed by the controller 101 in the memory array 100. As shown in FIG. 2, the method may include the following steps:
  • the space utilization ratio of the first disk domain is greater than the space utilization of the second disk domain, and the difference between the space utilization ratio of the first disk domain and the space utilization of the second disk domain is greater than a preset threshold, where
  • the space utilization ratio may be equal to the ratio of the space capacity used by the disk domain to the total space capacity of the disk domain, or may be equal to the ratio of the used space capacity of any hard disk in the disk domain to the total space capacity of the disk.
  • the embodiment of the invention is not limited.
  • the controller when the storage array includes two disk domains, the disk domain with large space utilization is the first disk domain, and the disk domain with small space utilization is the second disk domain, and when the first disk domain is When the difference between the space utilization rate and the space utilization ratio of the second hard disk domain is greater than a preset threshold, the controller performs step S202.
  • the controller may first utilize N spaces of the N disk domains.
  • the rate is sorted according to the size, and then the absolute value of the difference between the Mth space utilization rate and the (N-M+1) space utilization ratio in the sorted N space utilization ratios is greater than a preset threshold, and if so,
  • the disk domain with the space utilization ratio corresponding to the (N-M+1) space utilization corresponding to the (M-M+1) space utilization is determined to be the first disk domain, and the Mth space utilization rate is determined.
  • the disk domain with a smaller space utilization ratio in the disk domain corresponding to the (N-M+1) space utilization is the second disk domain, and then the controller performs step S202, where M is greater than or equal to 1 and an integer less than or equal to (N-M+1). For example, when N is equal to 50, the controller compares the first space utilization rate of the 50 space utilizations after sorting with the 50th space utilization rate, and the second space utilization rate and the 49th space utilization rate. Space utilization is compared, and so on.
  • the preset threshold may be 15%, 20%, or 25%, etc., which is not limited in the embodiment of the present invention.
  • K is an integer greater than or equal to 1.
  • the controller can uniformly migrate the data stored in the K hard disks to other hard disks in the second disk domain, which is not limited in the embodiment of the present invention.
  • the service data stored in the first disk domain can be uniformly stored in all the disks in the first disk domain, which can alleviate the first The pressure of other hard disks in a hard disk domain.
  • the space utilization ratio after the K hard disks are reduced in the second hard disk domain is equal to the space utilization rate after the K hard disks are added in the first hard disk domain.
  • the controller calculates the number K of hard disks to be reduced in the second hard disk domain, which may include:
  • Usedcap2 is the space capacity used by the second disk domain
  • Totalcap2 is the total space capacity of the second disk domain
  • Unitcap2 is the space capacity of each hard disk in the second disk domain
  • Usedcap1 is the space capacity used by the first disk domain.
  • Totalcap1 is the total space capacity of the first hard disk domain
  • K 0 is the number of hard disks to be reduced in the second hard disk domain
  • K 0 is a positive number greater than 1
  • K is K 0 calculated according to formula (1). The value of the value is rounded down to the resulting integer.
  • the controller may randomly select K hard disks from all the hard disks in the second hard disk domain, or may According to the importance level of the service data stored in each hard disk in the second hard disk domain, the K hard disks whose storage service data has a relatively low level of importance are selected from the second disk domain, which is not limited in the embodiment of the present invention.
  • the method may further include:
  • the controller calculates the number K of hard disks to be reduced in the second hard disk domain, which may include:
  • the K hard disks are determined according to the required space capacity of the second hard disk domain, wherein the absolute value of the difference between the total space capacity of the K hard disks and the space capacity required to be reduced by the second hard disk domain is a minimum value.
  • controller calculating the space capacity that the second hard disk domain needs to reduce may include:
  • Usedcap2 is the space capacity used by the second disk domain
  • Totalcap2 is the total space capacity of the second disk domain
  • Usedcap1 is the space capacity used by the first disk domain
  • Totalcap1 is the total space capacity of the first disk domain
  • Mincuscap2 is The second hard disk domain requires a reduced amount of space.
  • the controller first determines the first disk domain and the second disk domain, wherein the space utilization of the first disk domain is greater than the space utilization of the second disk domain, and the space utilization of the first disk domain is The difference in the space utilization ratio of the second disk domain is greater than a preset threshold, and the space utilization is equal to the ratio of the space capacity used by the disk domain to the total space capacity of the disk domain, and then calculating the hard disk to be reduced in the second disk domain.
  • the number K and the data stored in the K hard disks of the second hard disk domain are migrated to other hard disks of the second hard disk domain to obtain K idle hard disks, where K is an integer greater than or equal to 1, and finally K idle
  • the hard disk is configured to the first hard disk domain.
  • the embodiments of the present invention can improve the utilization of the space resources of the hard disk under the condition that the space utilization of the hard disk domain is unbalanced.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: Flash disk, Read-Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.

Abstract

一种在存储阵列中划分硬盘域的方法及控制器、存储阵列,该方法包括首先确定第一硬盘域以及第二硬盘域,其中,第一硬盘域的空间利用率大于第二硬盘域的空间利用率,第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值,且空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值,然后计算第二硬盘域中需要减少的硬盘的个数K并将第二硬盘域的K个硬盘中存储的数据迁移至第二硬盘域的其它硬盘中,以获取K个空闲硬盘,其中,K为大于等于1的整数,最后将K个空闲硬盘配置到第一硬盘域中。该方法能够在缓解硬盘域间空间利用率不均衡情况下提高硬盘空间资源利用率。

Description

一种在存储阵列中划分硬盘域的方法及控制器、存储阵列
本申请要求于2014年12月5日提交中国专利局、申请号为201410736459.8、发明名称为“一种在存储阵列中划分硬盘域的方法及控制器、存储阵列”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机存储技术领域,具体涉及一种在存储阵列中划分硬盘域的方法及控制器、存储阵列。
背景技术
存储阵列由大量硬盘组成,在使用存储阵列存储业务数据时,从业务需求及可靠性的角度考虑,用户会将存储阵列划分成为多个硬盘域,且每个硬盘域包括几十或上百块硬盘,用户可以根据业务需求在不同的硬盘域中配置不同的业务,即在不同的硬盘域中存储不同的业务数据。随着时间的推移,用户存储的业务数据的数量发生变化,硬盘域间的空间利用率不均衡的情况也越来越严重,这导致了硬盘压力不均衡、硬盘寿命降低以及业务性能波动的问题。
为了解决上述问题,当前存在以下方案:向空间利用率高的硬盘域中增加新的硬盘以均衡硬盘域间的空间利用率,但是这种方案给用户带来了一定的成本开销且造成了空间利用率低的硬盘域的硬盘空间资源浪费的问题。
发明内容
本发明实施例公开了一种在存储阵列中划分硬盘域的方法及控制器、存储阵列,能够在缓解硬盘域间空间利用率不均衡情况下提高硬盘空间资源利用率。
本发明实施例第一方面公开了一种在存储阵列中划分硬盘域的方法,所 述存储阵列至少包括控制器以及两个硬盘域,每个硬盘域包括多个硬盘,所述方法由所述控制器执行,所述方法包括:
确定第一硬盘域以及第二硬盘域,所述第一硬盘域的空间利用率大于所述第二硬盘域的空间利用率,且所述第一硬盘域的空间利用率与所述第二硬盘域的空间利用率的差值大于预设阈值,所述空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值;
计算所述第二硬盘域中需要减少的硬盘的个数K,所述K为大于等于1的整数;
将所述第二硬盘域的K个硬盘中存储的数据迁移至所述第二硬盘域的其它硬盘中,以获取K个空闲硬盘;
将所述K个空闲硬盘配置到所述第一硬盘域中。
在本发明实施例第一方面的第一种可能的实现方式中,所述第二硬盘域减少K个硬盘后的空间利用率与所述第一硬盘域增加K个硬盘后的空间利用率相等。
结合本发明实施例第一方面的第一种可能的实现方式,在本发明实施例第一方面的第二种可能的实现方式中,所述计算所述第二硬盘域中需要减少的硬盘的个数K包括:
依据公式(1)计算所述第二硬盘域中需要减少的硬盘的个数K,其中,所述公式(1)为:
Figure PCTCN2015095996-appb-000001
其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Unitcap2为所述第二硬盘域中每个硬盘的空间容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,K0为所述第二硬盘域中需要减少的硬盘的个数且所述K0为大于1的正数,则K为根据所述公式(1)计算出的K0的值向下取整得到的整数。
结合本发明实施例第一方面的第一种可能的实现方式,在本发明实施例第一方面的第三种可能的实现方式中,所述计算所述第二硬盘域中需要减少 的硬盘的个数K之前,所述方法还包括:
计算所述第二硬盘域需要减少的空间容量;
所述计算所述第二硬盘域中需要减少的硬盘的个数K包括:
根据所述第二硬盘域需要减少的空间容量确定出K个硬盘,所述K个硬盘的空间总容量与所述第二硬盘域需要减少的空间容量的差值的绝对值为最小值。
结合本发明实施例第一方面的第三种可能的实现方式,在本发明实施例第一方面的第四种可能的实现方式中,所述计算所述第二硬盘域需要减少的空间容量包括:
依据公式(2)计算所述第二硬盘域需要减少的空间容量,其中,所述公式(2)为:
Figure PCTCN2015095996-appb-000002
其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,Minuscap2为所述第二硬盘域需要减少的空间容量。
本发明实施例第二方面公开了一种控制器,所述控制器包括通信接口,所述通信接口用于与至少两个硬盘域进行通信,每个硬盘域包括多个硬盘,所述控制器用于执行以下操作:
确定第一硬盘域以及第二硬盘域,所述第一硬盘域的空间利用率大于所述第二硬盘域的空间利用率,且所述第一硬盘域的空间利用率与所述第二硬盘域的空间利用率的差值大于预设阈值,所述空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值;
计算所述第二硬盘域中需要减少的硬盘的个数K,所述K为大于等于1的整数;
将所述第二硬盘域的K个硬盘中存储的数据迁移至所述第二硬盘域的其它硬盘中,以获取K个空闲硬盘;
将所述K个空闲硬盘配置到所述第一硬盘域中。
在本发明实施例第二方面的第一种可能的实现方式中,所述第二硬盘域减少K个硬盘后的空间利用率与所述第一硬盘域增加K个硬盘后的空间利用率相等。
结合本发明实施例第二方面的第一种可能的实现方式,在本发明实施例第二方面的第二种可能的实现方式中,所述控制器计算所述第二硬盘域中需要减少的硬盘的个数K的具体方式为:
依据公式(1)计算所述第二硬盘域中需要减少的硬盘的个数K,其中,所述公式(1)为:
Figure PCTCN2015095996-appb-000003
其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Unitcap2为所述第二硬盘域中每个硬盘的空间容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,K0为所述第二硬盘域中需要减少的硬盘的个数且所述K0为大于1的正数,则K为根据所述公式(1)计算出的K0的值向下取整得到的整数。
结合本发明实施例第二方面的第一种可能的实现方式,在本发明实施例第二方面的第三种可能的实现方式中,所述控制器还用于执行以下操作:
计算所述第二硬盘域需要减少的空间容量;
所述控制器计算所述第二硬盘域中需要减少的硬盘的个数K的具体方式为:
根据所述第二硬盘域需要减少的空间容量确定出K个硬盘,所述K个硬盘的空间总容量与所述第二硬盘域需要减少的空间容量的差值的绝对值为最小值。
结合本发明实施例第二方面的第三种可能的实现方式,在本发明实施例第二方面的第四种可能的实现方式中,所述控制器计算所述第二硬盘域需要减少的空间容量的具体方式为:
依据公式(2)计算所述第二硬盘域需要减少的空间容量,其中,所述公式(2)为:
Figure PCTCN2015095996-appb-000004
其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,Minuscap2为所述第二硬盘域需要减少的空间容量。
本发明实施例第三方面公开了一种存储阵列,所述存储阵列包括上述的控制器以及至少两个硬盘域,每个硬盘域包括多个硬盘。
本发明实施例中,控制器首先确定第一硬盘域以及第二硬盘域,其中,第一硬盘域的空间利用率大于第二硬盘域的空间利用率,第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值,且空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值,然后计算第二硬盘域中需要减少的硬盘的个数K并将第二硬盘域的K个硬盘中存储的数据迁移至第二硬盘域的其它硬盘中,以获取K个空闲硬盘,其中,K为大于等于1的整数,最后将K个空闲硬盘配置到第一硬盘域中。实施本发明实施例能够在缓解硬盘域间空间利用率不均衡情况下提高硬盘空间资源利用率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例公开的一种存储阵列的结构示意图;
图2是本发明实施例公开的一种在存储阵列中划分硬盘域的方法的流程示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例公开了一种在存储阵列中划分硬盘域的方法及控制器、存储阵列,能够在缓解硬盘域间空间利用率不均衡情况下提高硬盘空间资源利用率。
为了更好的理解本发明实施例公开的一种在存储阵列中划分硬盘域的方法,本发明实施例公开了一种存储阵列,如图1所示,图1是本发明实施例公开的一种存储阵列的结构示意图。如图1所示,该存储阵列100至少包括控制器101以及两个硬盘域(如图1中的硬盘域1至硬盘域N,其中,N大于等于2),且每个硬盘域包括多个硬盘,控制器101可以包括通信接口1011、存储器1012以及处理器1013,控制器101可以通过通信接口1011与至少两个硬盘域进行通信,其中,存储器1012中存储一组程序代码,控制器101可以通过处理器1013调用存储器1012中的程序代码,用于执行以下操作:
确定第一硬盘域以及第二硬盘域,其中,第一硬盘域的空间利用率大于第二硬盘域的空间利用率,第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值且空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值;
计算第二硬盘域中需要减少的硬盘的个数K,其中,K为大于等于1的整数;
将第二硬盘域的K个硬盘中存储的数据迁移至第二硬盘域的其它硬盘中,以获取K个空闲硬盘;
将K个空闲硬盘配置到第一硬盘域中。
可选的,第二硬盘域减少K个硬盘后的空间利用率与第一硬盘域增加K个硬盘后的空间利用率相等。
可选的,控制器101计算第二硬盘域中需要减少的硬盘的个数K的具体方式可以为:
依据公式(1)计算第二硬盘域中需要减少的硬盘的个数K,其中,公式 (1)为:
Figure PCTCN2015095996-appb-000005
其中,Usedcap2为第二硬盘域已使用的空间容量,Totalcap2为第二硬盘域的空间总容量,Unitcap2为第二硬盘域中每个硬盘的空间容量,Usedcap1为第一硬盘域已使用的空间容量,Totalcap1为第一硬盘域的空间总容量,K0为第二硬盘域中需要减少的硬盘的个数且K0为大于1的正数,则K为根据公式(1)计算出的K0的值向下取整得到的整数。
可选的,控制器101通过处理器1013调用存储器1012中的程序代码,还用于执行以下操作:
计算第二硬盘域需要减少的空间容量。
控制器101计算第二硬盘域中需要减少的硬盘的个数K的具体方式可以为:
根据第二硬盘域需要减少的空间容量确定出K个硬盘,其中,K个硬盘的空间总容量与第二硬盘域需要减少的空间容量的差值的绝对值为最小值。
可选的,控制器101计算第二硬盘域需要减少的空间容量的具体方式可以为:
依据公式(2)计算第二硬盘域需要减少的空间容量,其中,公式(2)为:
Figure PCTCN2015095996-appb-000006
其中,Usedcap2为第二硬盘域已使用的空间容量,Totalcap2为第二硬盘域的空间总容量,Usedcap1为第一硬盘域已使用的空间容量,Totalcap1为第一硬盘域的空间总容量,Minuscap2为第二硬盘域需要减少的空间容量。
本发明实施例中,控制器101可以为包括存储器、处理器以及通信接口的服务器,本发明实施例不做限定。
请参阅图2,图2是本发明实施例公开的一种在存储阵列中划分硬盘域的 方法的流程示意图。其中,图2所示的方法可以应用于图1所示的存储阵列100中且该方法可以由存储阵列100中的控制器101来执行。如图2所示,该方法可以包括以下步骤:
S201、确定第一硬盘域以及第二硬盘域。
本发明实施例中,第一硬盘域的空间利用率大于第二硬盘域的空间利用率且第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值,其中,空间利用率可以等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值,也可以等于硬盘域中任一硬盘的已使用的空间容量与该任一硬盘的空间总容量的比值,本发明实施例不做限定。
本发明实施例中,当存储阵列中包括两个硬盘域时,空间利用率大的硬盘域为第一硬盘域,空间利用率小的硬盘域为第二硬盘域,且当第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值时,控制器才执行步骤S202。
本发明实施例中,当存储阵列中包括两个以上的硬盘域时,假设硬盘域的个数为N(N为大于2的整数),控制器可以先将N个硬盘域的N个空间利用率按照大小进行排序,然后比较排序后的N个空间利用率中第M个空间利用率与第(N-M+1)个空间利用率的差值的绝对值是否大于预设阈值,若是,则确定第M个空间利用率对应的硬盘域与第(N-M+1)个空间利用率对应的硬盘域中空间利用率较大的硬盘域为第一硬盘域,第M个空间利用率对应的硬盘域与第(N-M+1)个空间利用率对应的硬盘域中空间利用率较小的硬盘域为第二硬盘域,之后,控制器执行步骤S202,其中,M为大于等于1且小于等于(N-M+1)的整数。举例来说,当N等于50时,控制器将排序后的50个空间利用率中的第1个空间利用率与第50个空间利用率进行比较,将第2个空间利用率与第49个空间利用率进行比较,以此类推。
本发明实施例中,预设阈值可以为15%、20%或25%等,本发明实施例不做限定。
S202、计算第二硬盘域中需要减少的硬盘的个数K。
本发明实施例中,K为大于等于1的整数。
S203、将第二硬盘域的K个硬盘中存储的数据迁移至第二硬盘域的其它硬盘中,以获取K个空闲硬盘
本发明实施例中,控制器可以将K个硬盘中存储的数据均匀的迁移至第二硬盘域的其它硬盘中,本发明实施例不做限定。
S204、将K个空闲硬盘配置到第一硬盘域中。
本发明实施例中,控制器将K个空闲硬盘配置到第一硬盘域中后,还可以将第一硬盘域中存储的业务数据均匀存储在第一硬盘域的所有硬盘中,这样可以缓解第一硬盘域中其它硬盘的压力。
本发明实施例中,第二硬盘域减少K个硬盘后的空间利用率与第一硬盘域增加K个硬盘后的空间利用率相等。
作为一种可选的实施方式,当第二硬盘域中每个硬盘的空间容量相等时,控制器计算第二硬盘域中需要减少的硬盘的个数K可以包括:
依据公式(1)计算第二硬盘域中需要减少的硬盘的个数K,其中,公式(1)为:
Figure PCTCN2015095996-appb-000007
其中,Usedcap2为第二硬盘域已使用的空间容量,Totalcap2为第二硬盘域的空间总容量,Unitcap2为第二硬盘域中每个硬盘的空间容量,Usedcap1为第一硬盘域已使用的空间容量,Totalcap1为第一硬盘域的空间总容量,K0为第二硬盘域中需要减少的硬盘的个数且K0为大于1的正数,则K为根据公式(1)计算出的K0的值向下取整得到的整数。
本发明实施例中,在依据公式(1)确定出第二硬盘域中需要减少的硬盘的个数K之后,控制器可以从第二硬盘域的所有硬盘中随机的选取K个硬盘,也可以根据第二硬盘域中每个硬盘存储的业务数据的重要级别从第二硬盘域中选取存储的业务数据的重要级别比较低的K个硬盘,本发明实施例不做限定。
作为一种可选的实施方式,在步骤S202之前,该方法还可以包括:
计算第二硬盘域需要减少的空间容量。
控制器计算第二硬盘域中需要减少的硬盘的个数K可以包括:
根据第二硬盘域需要减少的空间容量确定出K个硬盘,其中,K个硬盘的空间总容量与第二硬盘域需要减少的空间容量的差值的绝对值为最小值。
作为一种可选的实施方式,控制器计算第二硬盘域需要减少的空间容量可以包括:
依据公式(2)计算第二硬盘域需要减少的空间容量,其中,公式(2)为:
Figure PCTCN2015095996-appb-000008
其中,Usedcap2为第二硬盘域已使用的空间容量,Totalcap2为第二硬盘域的空间总容量,Usedcap1为第一硬盘域已使用的空间容量,Totalcap1为第一硬盘域的空间总容量,Minuscap2为第二硬盘域需要减少的空间容量。
本发明实施例中,控制器首先确定第一硬盘域以及第二硬盘域,其中,第一硬盘域的空间利用率大于第二硬盘域的空间利用率,第一硬盘域的空间利用率与第二硬盘域的空间利用率的差值大于预设阈值,且空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值,然后计算第二硬盘域中需要减少的硬盘的个数K并将第二硬盘域的K个硬盘中存储的数据迁移至第二硬盘域的其它硬盘中,以获取K个空闲硬盘,其中,K为大于等于1的整数,最后将K个空闲硬盘配置到第一硬盘域中。实施本发明实施例能够在缓解硬盘域间空间利用率不均衡情况下提高硬盘空间资源利用率。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
以上对本发明实施例所提供的一种在存储阵列中划分硬盘域的方法及控制器、存储阵列进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具 体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (11)

  1. 一种在存储阵列中划分硬盘域的方法,其特征在于,所述存储阵列至少包括控制器以及两个硬盘域,每个硬盘域包括多个硬盘,所述方法由所述控制器执行,所述方法包括:
    确定第一硬盘域以及第二硬盘域,所述第一硬盘域的空间利用率大于所述第二硬盘域的空间利用率,且所述第一硬盘域的空间利用率与所述第二硬盘域的空间利用率的差值大于预设阈值,所述空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值;
    计算所述第二硬盘域中需要减少的硬盘的个数K,所述K为大于等于1的整数;
    将所述第二硬盘域的K个硬盘中存储的数据迁移至所述第二硬盘域的其它硬盘中,以获取K个空闲硬盘;
    将所述K个空闲硬盘配置到所述第一硬盘域中。
  2. 根据权利要求1所述的方法,其特征在于,所述第二硬盘域减少K个硬盘后的空间利用率与所述第一硬盘域增加K个硬盘后的空间利用率相等。
  3. 根据权利要求2所述的方法,其特征在于,所述计算所述第二硬盘域中需要减少的硬盘的个数K包括:
    依据公式(1)计算所述第二硬盘域中需要减少的硬盘的个数K,其中,所述公式(1)为:
    Figure PCTCN2015095996-appb-100001
    其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Unitcap2为所述第二硬盘域中每个硬盘的空间容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,K0为所述第二硬盘域中需要减少的硬盘的个数且所述K0为大于1 的正数,则K为根据所述公式(1)计算出的K0的值向下取整得到的整数。
  4. 根据权利要求2所述的方法,其特征在于,所述计算所述第二硬盘域中需要减少的硬盘的个数K之前,所述方法还包括:
    计算所述第二硬盘域需要减少的空间容量;
    所述计算所述第二硬盘域中需要减少的硬盘的个数K包括:
    根据所述第二硬盘域需要减少的空间容量确定出K个硬盘,所述K个硬盘的空间总容量与所述第二硬盘域需要减少的空间容量的差值的绝对值为最小值。
  5. 根据权利要求4所述的方法,其特征在于,所述计算所述第二硬盘域需要减少的空间容量包括:
    依据公式(2)计算所述第二硬盘域需要减少的空间容量,其中,所述公式(2)为:
    Figure PCTCN2015095996-appb-100002
    其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,Minuscap2为所述第二硬盘域需要减少的空间容量。
  6. 一种控制器,其特征在于,所述控制器包括通信接口,所述通信接口用于与至少两个硬盘域进行通信,每个硬盘域包括多个硬盘,所述控制器用于执行以下操作:
    确定第一硬盘域以及第二硬盘域,所述第一硬盘域的空间利用率大于所述第二硬盘域的空间利用率,且所述第一硬盘域的空间利用率与所述第二硬盘域的空间利用率的差值大于预设阈值,所述空间利用率等于硬盘域已使用的空间容量与该硬盘域的空间总容量的比值;
    计算所述第二硬盘域中需要减少的硬盘的个数K,所述K为大于等于1的整数;
    将所述第二硬盘域的K个硬盘中存储的数据迁移至所述第二硬盘域的其它硬盘中,以获取K个空闲硬盘;
    将所述K个空闲硬盘配置到所述第一硬盘域中。
  7. 根据权利要求6所述的控制器,其特征在于,所述第二硬盘域减少K个硬盘后的空间利用率与所述第一硬盘域增加K个硬盘后的空间利用率相等。
  8. 根据权利要求7所述的控制器,其特征在于,所述控制器计算所述第二硬盘域中需要减少的硬盘的个数K的具体方式为:
    依据公式(1)计算所述第二硬盘域中需要减少的硬盘的个数K,其中,所述公式(1)为:
    Figure PCTCN2015095996-appb-100003
    其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Unitcap2为所述第二硬盘域中每个硬盘的空间容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,K0为所述第二硬盘域中需要减少的硬盘的个数且所述K0为大于1的正数,则K为根据所述公式(1)计算出的K0的值向下取整得到的整数。
  9. 根据权利要求7所述的控制器,其特征在于,所述控制器还用于执行以下操作:
    计算所述第二硬盘域需要减少的空间容量;
    所述控制器计算所述第二硬盘域中需要减少的硬盘的个数K的具体方式为:
    根据所述第二硬盘域需要减少的空间容量确定出K个硬盘,所述K个硬盘的空间总容量与所述第二硬盘域需要减少的空间容量的差值的绝对值为最小 值。
  10. 根据权利要求9所述的控制器,其特征在于,所述控制器计算所述第二硬盘域需要减少的空间容量的具体方式为:
    依据公式(2)计算所述第二硬盘域需要减少的空间容量,其中,所述公式(2)为:
    Figure PCTCN2015095996-appb-100004
    其中,Usedcap2为所述第二硬盘域已使用的空间容量,Totalcap2为所述第二硬盘域的空间总容量,Usedcap1为所述第一硬盘域已使用的空间容量,Totalcap1为所述第一硬盘域的空间总容量,Minuscap2为所述第二硬盘域需要减少的空间容量。
  11. 一种存储阵列,其特征在于,所述存储阵列包括如权利要求6~10任一项所述的控制器以及至少两个硬盘域,每个硬盘域包括多个硬盘。
PCT/CN2015/095996 2014-12-05 2015-11-30 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列 WO2016086818A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410736459.8A CN104571947B (zh) 2014-12-05 2014-12-05 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列
CN201410736459.8 2014-12-05

Publications (1)

Publication Number Publication Date
WO2016086818A1 true WO2016086818A1 (zh) 2016-06-09

Family

ID=53088132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095996 WO2016086818A1 (zh) 2014-12-05 2015-11-30 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列

Country Status (2)

Country Link
CN (1) CN104571947B (zh)
WO (1) WO2016086818A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104571947B (zh) * 2014-12-05 2017-10-10 华为技术有限公司 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列
CN107544747B (zh) * 2016-06-29 2022-06-03 北京忆恒创源科技股份有限公司 磨损逆均衡方法与装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150640A1 (en) * 2007-12-11 2009-06-11 Royer Steven E Balancing Computer Memory Among a Plurality of Logical Partitions On a Computing System
CN102968281A (zh) * 2012-11-26 2013-03-13 华为技术有限公司 一种数据迁移的方法及装置
CN103513938A (zh) * 2013-09-16 2014-01-15 华为技术有限公司 一种独立磁盘冗余阵列raid系统扩容方法及装置
CN104571947A (zh) * 2014-12-05 2015-04-29 华为技术有限公司 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150122B (zh) * 2011-12-07 2016-05-25 华为技术有限公司 一种磁盘缓存空间管理方法和装置
CN103500072A (zh) * 2013-09-27 2014-01-08 华为技术有限公司 数据迁移方法及数据迁移装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150640A1 (en) * 2007-12-11 2009-06-11 Royer Steven E Balancing Computer Memory Among a Plurality of Logical Partitions On a Computing System
CN102968281A (zh) * 2012-11-26 2013-03-13 华为技术有限公司 一种数据迁移的方法及装置
CN103513938A (zh) * 2013-09-16 2014-01-15 华为技术有限公司 一种独立磁盘冗余阵列raid系统扩容方法及装置
CN104571947A (zh) * 2014-12-05 2015-04-29 华为技术有限公司 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列

Also Published As

Publication number Publication date
CN104571947A (zh) 2015-04-29
CN104571947B (zh) 2017-10-10

Similar Documents

Publication Publication Date Title
CN108475207B (zh) 云应用的联合自动缩放
US10642866B1 (en) Automated load-balancing of partitions in arbitrarily imbalanced distributed mapreduce computations
US9389798B2 (en) Dynamic reconfiguration of storage system
US9871745B2 (en) Automatic scaling of at least one user application to external clouds
US20170147399A1 (en) Policy-based virtual machine selection during an optimization cycle
US8751657B2 (en) Multi-client storage system and storage system management method
WO2021012956A1 (zh) 云平台的资源处理方法、相关设备及存储介质
US9405589B2 (en) System and method of optimization of in-memory data grid placement
US10506024B2 (en) System and method for equitable processing of asynchronous messages in a multi-tenant platform
KR102376713B1 (ko) 복합 파티션 함수 제공 기법
US10872070B2 (en) Distributed data processing
WO2016184037A1 (zh) 一种业务可用性管理方法、装置及其网络功能虚拟化架构
WO2017028696A1 (zh) 分布式存储系统的负载监控方法及设备
WO2015144008A1 (zh) 为虚拟机分配物理机的方法及装置
CN106133693A (zh) 虚拟机的迁移方法、装置及设备
CN105743677B (zh) 一种资源配置方法及装置
WO2017000645A1 (zh) 一种分配宿主机资源的方法和装置
EP3423940A1 (en) A method and device for scheduling resources
US10417192B2 (en) File classification in a distributed file system
US11194487B2 (en) Method, electronic device and computer program product of allocating storage disks
WO2016086818A1 (zh) 一种在存储阵列中划分硬盘域的方法及控制器、存储阵列
US10990519B2 (en) Multi-tenant cloud elastic garbage collector
US20160117107A1 (en) High Performance Hadoop with New Generation Instances
CN108259583B (zh) 一种数据动态迁移方法及装置
US10387578B1 (en) Utilization limiting for nested object queries

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: 15865829

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: 15865829

Country of ref document: EP

Kind code of ref document: A1