WO2015078193A1 - 存储空间的管理方法和存储管理装置 - Google Patents

存储空间的管理方法和存储管理装置 Download PDF

Info

Publication number
WO2015078193A1
WO2015078193A1 PCT/CN2014/082988 CN2014082988W WO2015078193A1 WO 2015078193 A1 WO2015078193 A1 WO 2015078193A1 CN 2014082988 W CN2014082988 W CN 2014082988W WO 2015078193 A1 WO2015078193 A1 WO 2015078193A1
Authority
WO
WIPO (PCT)
Prior art keywords
source
storage space
target
balanced
storage
Prior art date
Application number
PCT/CN2014/082988
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 WO2015078193A1 publication Critical patent/WO2015078193A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • 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/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms

Definitions

  • Embodiments of the present invention relate to the field of data storage, and more particularly, to a management method and storage management apparatus for a storage space.
  • the current balancing strategy is to migrate the data blocks between hard disks, that is, to re-arrange the data.
  • the overall trend of data migration is to migrate data from disks with higher disk space utilization to lower disks. In the process, some hard disk data is not accessed by users. It is futile to migrate such data.
  • the efficiency of the equilibrium is low, as long as the data blocks in the assigned logic block CK will participate in the equilibrium, affecting the overall equilibrium progress.
  • the embodiments of the present invention provide a storage space management method and a storage management device, which can save the overhead of data migration to a certain extent and speed up the efficiency of balancing.
  • the first aspect provides a storage space management method, where the method includes: determining a first balanced storage space in a plurality of storage spaces, where the first balanced storage space is a storage space that needs to be equalized; An access state of at least one logical block CK in the equalized storage space, wherein the at least one CK is a CK to be migrated in the first balanced storage space; according to the access status of the at least one CK in the first balanced storage space At least one CK in the equalized storage space performs migration processing.
  • the migrating processing of the at least one CK in the first balanced storage space according to the access state of the at least one CK in the first balanced storage space is implemented as follows:
  • the access status of the at least one CK determines the data of the at least one CK a migration policy; performing migration processing on the at least one CK according to the data migration policy of the at least one CK.
  • the data migration policy that is specifically implemented by the at least one CK includes: if the access state of the source CK is an accessed state, The data of the source CK is migrated to the target CK, and the source CK is mapped to the target CK at the current CKG position; or if the access state of the source CK is not the accessed initialized state, the target CK is written to all zeros, and Mapping the source CK to the target CK at the current CKG location; or mapping the source CK to the target CK at the current CKG location if the access state of the source CK is uninitialized; wherein, the source CK For the CK in the at least one CK, the target CK is the CK corresponding to the source CK in the target storage space of the source CK, and the current CKG is the CKG where the source CK is located.
  • the migrating processing of the at least one CK in the first balanced storage space according to the access state of the at least one CK in the first balanced storage space is specifically implemented as follows: If the access status of the source CK is the accessed state, the data of the source CK is migrated to the target CK, and the source CK is mapped to the target CK at the current CKG location; or if the access status of the source CK is not accessed.
  • the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG position; or if the access state of the source CK is uninitialized, the source CK is at the current CKG The location is mapped to the target CK; wherein, the source CK is the CK in the at least one CK, the target CK is the CK corresponding to the source CK in the target storage space of the source CK, and the current CKG is the source CK CKG.
  • the specific implementation is The at least one CK is the CK of the first balanced storage space among the 10 CKGs that are lightly loaded.
  • the method further includes: the first equalization storage space in the access state according to the CK in the first balanced storage space After the at least one CK is migrated to the target storage space corresponding to the respective CKs in the at least one CK, if the equalization rate of the plurality of storage spaces still satisfies the equalization processing condition, determining the second equalized storage in the plurality of storage spaces Obtaining an access state of at least one logical block CK in the second balanced storage space, wherein the at least one CK is a CK to be migrated in the first balanced storage space; and according to the at least one CK in the second balanced storage space The access state performs a migration process on the at least one CK in the second equalized storage space.
  • the equalizing processing condition is: the mean square error of the equalization ratio of the multiple storage spaces is greater than or equal to the first predetermined width Or a ratio of a mean square error of the equalization ratios of the plurality of storage spaces to an average equalization ratio of the plurality of storage spaces is greater than or equal to a second predetermined threshold; or an equalization ratio of any one of the plurality of storage spaces The absolute value of the difference between the average equalization rates of the plurality of storage spaces is greater than or equal to the third predetermined threshold.
  • the method further The method includes: determining that an access state of a CK accessed by 10 in the plurality of storage spaces is an accessed state; or determining an access state of a CK that is not accessed by the 10 but initialized by the array in the plurality of storage spaces is an unaccessed initialized state Or determining that the access status of the CK that is not 10 or not initialized by the array in the plurality of storage spaces is an uninitialized state.
  • a second aspect provides a storage management device, where the device includes: a determining unit, configured to determine a first balanced storage space in a plurality of storage spaces, where the first balanced storage space is a storage space that needs to be equalized; a unit, configured to acquire an access state of the logical block CK in the first balanced storage space, and a data migration unit, configured to: at least one CK in the first balanced storage space according to an access state of the CK in the first balanced storage space Performing a migration process, the at least one CK being the first The CK in the equalization storage space is determined to be migrated.
  • the data migration unit includes: a determining subunit, configured to determine a data migration policy of the at least one CK according to an access state of the at least one CK; a data migration subunit, And migrating the at least one CK according to the data migration policy of the at least one CK.
  • the data migration policy that is specifically implemented by the at least one CK includes: if the access state of the source CK is an accessed state, The data of the source CK is migrated to the target CK, and the source CK is mapped to the target CK at the current CKG position; or if the access state of the source CK is not the accessed initialized state, the target CK is written to all zeros, and Mapping the source CK to the target CK at the current CKG location; or mapping the source CK to the target CK at the current CKG location if the access state of the source CK is uninitialized; wherein, the source CK For the CK in the at least one CK, the target CK is the CK corresponding to the source CK in the target storage space of the source CK, and the current CKG is the CKG where the source CK is located.
  • the data migration unit is specifically configured to: if the access state of the source CK is an accessed state, migrate the data of the source CK to the target CK, and the source is CK maps the location of the current CKG to the target CK; or if the access state of the source CK is an unaccessed initialized state, writes the target CK to all zeros, and maps the source CK to the target at the current CKG location On the CK; or if the access state of the source CK is an uninitialized state, the source CK is mapped to the target CK at the location of the current CKG; wherein the source CK is the CK in the at least one CK, and the target CK is The CK corresponding to the source CK in the target storage space of the source CK, and the current CKG is the CKG where the source CK is located.
  • the at least one CK is a lightly loaded CKG belonging to the first balanced storage space. CK.
  • the determining unit And after the migrating at least one CK in the first equalization storage space to the target storage space corresponding to each CK in the at least one CK, respectively, if the CK access status in the first equalization storage space is respectively The equalization rate of the storage space still satisfies the equalization processing condition, and then the second equalized storage space in the plurality of storage spaces is re-determined; the obtaining unit is further configured to acquire the access status of the CK in the second balanced storage space; The unit is further configured to perform migration processing on the at least one CK in the second balanced storage space according to the access status of the CK in the second balanced storage space, where the at least one CK is determined to be migrated in the second balanced storage space. CK.
  • the equalizing processing condition includes: the mean square error of the equalization ratio of the multiple storage spaces is greater than or equal to the first predetermined width Or a ratio of a mean square error of the equalization ratios of the plurality of storage spaces to an average equalization ratio of the plurality of storage spaces is greater than or equal to a second predetermined threshold; or an equalization ratio of any one of the plurality of storage spaces The absolute value of the difference between the average equalization rates of the plurality of storage spaces is greater than or equal to the third predetermined threshold.
  • the determining unit The method is further configured to: determine that an access status of a CK that is accessed by 10 in the multiple storage spaces is an accessed state; or determine that an access status of a CK that is not accessed by the 10 but is initialized by the array in the multiple storage spaces is not accessed. Initializing state; or determining that an access state of the CK that is not 10 accesses or initialized by the array among the plurality of storage spaces is an uninitialized state.
  • the management method and the storage management device for the storage space in the embodiment of the present invention can perform data migration on the first balanced storage space according to the access state of the CK in the first balanced storage space, thereby being able to Save the cost of data migration and speed up the efficiency of the balance.
  • FIG. 1 is a flow chart of a method for managing a storage space according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a method for setting a logical block access state according to an embodiment of the present invention.
  • FIG. 3 is a flow chart of storage space balancing management according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a storage management apparatus according to an embodiment of the present invention.
  • FIG. 5 is another schematic structural diagram of a storage management apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of still another structure of a storage management apparatus according to an embodiment of the present invention.
  • Logic block Hard disk segmentation granularity, the basic unit of hard disk space division.
  • the physical address of the hard disk in the CK is continuous.
  • the CK may include a metadata area and a data area, and the data of the metadata area is used to maintain data in the data area in the CK, and to describe and organize the relationship of the data area in the CK.
  • Balance The data on the hard disks in the storage pool is migrated to achieve a relatively uniform space utilization on each hard disk.
  • Redundant Arrays of Independent Disks (RAID): Original The rational use of arrays for disk groups, with the design of data decentralized arrangement, to improve data security.
  • RAID is composed of a number of cheaper disks, which are combined into a huge disk group. The effect of providing data by individual disks increases the performance of the entire disk system. Using this technology, the data is cut into a number of segments, which are stored on separate hard disks. RAID can also take advantage of the concept of Parity Check. When any hard disk in the array fails, the data can still be read. When the data is reconstructed, the data is calculated and re-inserted into the new hard disk.
  • Chunk Group (CKG), a logical space composed of multiple CKs according to the specified RAID type.
  • Storage pool A pool of storage resources consisting of multiple disks.
  • a disk can be thought of as a storage space for a storage pool.
  • 1 is a flow chart of a method for managing a storage space according to an embodiment of the present invention, and the method of FIG. 1 is executed by a storage management device.
  • the first balanced storage space is a storage space that needs to be equalized.
  • the plurality of storage spaces are storage spaces in a storage pool managed by the storage management device.
  • the storage management device Before the storage management device performs the equalization process, it is necessary to determine the storage space in the storage pool to be equalized.
  • the process of the storage management device to determine the equalization of the storage space is well known to those skilled in the art, and details are not described herein again.
  • the at least one CK is a CK to be migrated in the first balanced storage space.
  • the access status of the CK may include an accessed state, an unaccessed initialized state, and an uninitialized state.
  • the at least one CK is migrated.
  • the data migration overhead can be saved to some extent, and the efficiency of the equalization is accelerated.
  • performing the migration processing on the at least one CK according to the access status of the at least one CK in the first balanced storage space may be implemented as: determining the at least one CK according to the access status of the at least one CK. Data migration strategy; performing migration processing on the at least one CK according to the data migration policy of the at least one CK.
  • the data migration policy of the at least one CK may include: if the access state of the source CK is an accessed state, the data of the source CK is migrated to the target CK, and the location of the source CK at the current CKG is mapped to the On the target CK; or if the access state of the source CK is not accessing the initialized state, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG location; or if the source CK is accessed If the state is an uninitialized state, the source CK is mapped to the target CK at the current CKG location; wherein, the source CK is the CK in the at least one CK, and the target CK is in the target storage space of the source CK.
  • the source CK corresponds to the CK, and the current CKG is the CKG where the source CK is located.
  • performing the migration processing on the at least one CK according to the access status of the at least one CK in the first balanced storage space may be implemented as follows: if the access status of the source CK is an accessed status, The data of the source CK is migrated to the target CK, and the source CK is mapped to the target CK at the current CKG position; or if the access state of the source CK is the unaccessed initialized state, the target CK is written to all zeros.
  • the source CK is the CK in the at least one CK
  • the target CK is the CK corresponding to the source CK in the target storage space of the source CK
  • the current CKG is the CKG where the source CK is located.
  • at least one CK is a lightly loaded CKG genus CK in the first equalized storage space.
  • the storage management device selects the CK in the current 10 load-carrying CKG in the storage pool managed by the current storage management device to migrate, and the impact of the 10 read and write operations on the system performance in the equalization process is minimized.
  • the method further includes: determining, if the equalization rate of the multiple storage spaces still meets the equalization processing condition, determining a second equalized storage space of the plurality of storage spaces; acquiring the second balanced storage An access state of at least one logical block CK in the space, wherein the at least one CK is a CK to be migrated in the first balanced storage space; and the second balanced storage is stored according to an access state of the at least one CK in the second balanced storage space At least one CK in the space is subjected to migration processing. .
  • the equalization processing of the second equalized storage space reference may be made to the processing of the first equalized storage space in steps 102 and 103, which is not repeatedly described herein.
  • the equalization processing condition includes: a mean square error of the equalization ratios of the plurality of storage spaces is greater than or equal to a first predetermined threshold; or a mean square error of the equalization ratios of the plurality of storage spaces and an average equalization of the plurality of storage spaces The ratio of the ratio is greater than or equal to the second predetermined threshold; or the absolute value of the difference between the equalization ratio of any one of the plurality of storage spaces and the average equalization ratio of the plurality of storage spaces is greater than or equal to a third predetermined threshold.
  • the method may further include: determining that an access status of the CK accessed by the 10 in the plurality of storage spaces is an accessed state; or determining that the plurality of storage spaces are not accessed by the 10 but are arrayed
  • the access state of the initialized CK is an unaccessed initialized state; or it is determined that the access state of the CK that is not 10 accesses or initialized by the array among the plurality of storage spaces is an uninitialized state.
  • the first equalization storage space is a storage space in which the equalization ratio exceeds a predetermined threshold of the average equalization ratio of the plurality of storage spaces. Further, the first equalization storage space is a storage space with the largest equalization ratio among the plurality of storage spaces.
  • FIG. 2 is a schematic diagram of a method for setting a logical block access state according to an embodiment of the present invention.
  • the method of Figure 2 is stored by Management device execution.
  • CK allocation is performed on multiple storage spaces in the storage pool.
  • the process of allocating CK by the storage management device is well known to those skilled in the art, and the embodiments of the present invention will not be described herein.
  • the storage management device can initialize the access status of the CK.
  • the storage management device can set the access status of the CK to an uninitialized state.
  • the storage management device monitors the operation of the host 10, and the operation runs throughout the entire period in which the storage management device operates.
  • the storage management device determines whether there is a host performing 10 access to the storage space under the storage management device, and if so, executing step 205; otherwise, executing step 206.
  • the storage management device marks the CK accessed by 10, and can mark its access status as the accessed state.
  • 10 Device access to the CK of the storage space may include read and write operations to the CK.
  • the storage management device may continue to perform step 203 to monitor the operation of the host 10.
  • the storage management device determines whether or not array initialization has been performed on the storage space of the storage management device. If yes, go to step 207; otherwise, go to step 202.
  • the storage management device can mark the access status of the CK initialized by the array as not accessing the initialized state. After the marking is completed, the storage management device may continue to perform step 203 to monitor the operation of the host 10.
  • the storage management device can identify 10 the storage space of the storage management device by using 10 monitoring software.
  • the storage space of the storage management device may be a storage space in the storage system, such as a hard disk or the like.
  • FIG. 3 is a flow chart of storage space balancing management according to an embodiment of the present invention. The method of Figure 3 is performed by a storage management device.
  • the automatic equalization trigger condition is whether the automatic equalization is performed may be determined according to the mean square error of the equalization rates of the plurality of storage spaces of the storage pool managed by the storage management device.
  • the automatic equalization trigger condition is whether the mean square error of the equalization ratios of the plurality of storage spaces of the storage pool is not less than the first predetermined threshold.
  • the first predetermined threshold is used to compare the degree of difference in the equalization rates of the plurality of storage spaces of the storage pool.
  • Another judgment manner of the embodiment of the present invention may be determined according to a ratio between a mean square error of a plurality of storage spaces of the storage pool managed by the storage management device and an average equalization ratio of the plurality of storage spaces managed by the storage management device. That is, the ratio is equal to the mean square error of the equalization ratio of the plurality of storage spaces of the storage pool/the average equalization ratio of the plurality of storage spaces of the storage pool.
  • the automatic equalization trigger condition is whether the ratio is not less than a second predetermined threshold. If the ratio is greater than or equal to the second predetermined threshold, automatic equalization is also required.
  • the second predetermined threshold is also used to compare the difference in the equalization rates of the plurality of storage spaces of the storage pool. Degree.
  • a determination manner of the embodiment of the present invention may be determined according to an absolute value of a difference between an equalization ratio of any one of a plurality of storage spaces of the storage pool managed by the storage management device and an average equalization ratio of the plurality of storage spaces.
  • the automatic equalization triggering condition is whether the absolute value of the difference between the equalization rate of any one of the plurality of storage spaces of the storage pool and the average equalization ratio of the plurality of storage spaces is not less than a third predetermined threshold. If at least one storage space exists in the storage pool, and the absolute value of the difference between the equalization rate and the average equalization ratio of the plurality of storage spaces is greater than or equal to the third predetermined threshold, automatic equalization is also required.
  • the third predetermined threshold is also used to compare the degree of difference in the equalization rates of the plurality of storage spaces of the storage pool.
  • there may be other automatic equalization triggering conditions which are not limited herein.
  • the storage management device needs to query multiple storage spaces of the storage pool, and select an equalized storage space that needs to be balanced.
  • the storage management device can pick out one or more equalized storage spaces and equalize the equalized storage space.
  • the embodiment of the present invention is a method for selecting a balanced storage space.
  • the storage management device selects, as the balanced storage, a storage space in which the equalization ratio of the plurality of storage spaces of the storage pool exceeds the average equalization ratio of the plurality of storage spaces. space.
  • the storage management device may select, as the equalized storage space, a storage space having the largest equalization ratio among the plurality of storage spaces of the storage pool.
  • the storage management device can determine the size of the space that needs to be migrated according to the current equalization rate of the equalized storage space.
  • the storage management device may randomly select CK for migration, or select CK for migration according to a certain policy, and only need to satisfy the merged CK sum equal to data migration. The amount of space moved.
  • CK is selected for migration, the CK in the CKG that belongs to the current 10 load is selected for migration, and the impact of 10 reads and writes on the system performance in the equalization process can be minimized.
  • CK in a CKG may belong to different storage spaces. Therefore, preferably, the storage management device performs data migration of the CK belonging to the balanced storage space among the CKGs that are relatively lightly loaded in the storage pool.
  • the storage management device can determine the data migration policy according to the access status of the CK to be migrated.
  • the CK in the equalized storage space of the CK to be migrated may be referred to as the source CK.
  • the CK corresponding to the source CK in the target storage space of the source CK is referred to as the target CK, and the CKG in which the source CK is located is referred to as the current CKG.
  • the data migration policy may include: if the access state of the source CK is an accessed state, the data of the source CK is migrated to the target CK, and the location of the source CK at the current CKG is mapped to the target CK; if the source CK is If the access status is not accessing the initialized state, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG position; if the access status of the source CK is uninitialized, the source is CK maps to the target CK at the current CKG location.
  • the storage management device can select different target storage spaces for different CKs to be migrated.
  • the storage management device performs data migration on the CK to be migrated in the balanced storage space according to the data migration policy selected in step 304.
  • the storage management device determines whether the equalization rate of the plurality of storage spaces of the current storage pool meets the equalization processing condition.
  • the equalization processing condition may be a condition for determining whether or not the equalization processing is necessary in the storage management apparatus.
  • a determining manner of the embodiment of the present invention may be determined according to a mean square error of a plurality of storage spaces of the storage pool managed by the storage management device.
  • the equalization processing condition is whether the mean square error of the equalization ratios of the plurality of storage spaces of the storage pool is not less than a fourth predetermined threshold. If the mean square error of the equalization rates of the plurality of storage spaces of the storage pool is greater than or equal to the fourth predetermined threshold, the equalization process is also required.
  • the fourth predetermined threshold is used to compare the degree of difference in the equalization rates of the plurality of storage spaces of the storage pool. Another judgment manner of the embodiment of the present invention may be determined according to a ratio between a mean square error of a plurality of storage spaces of the storage pool managed by the storage management device and an average equalization ratio of the plurality of storage spaces of the storage pool, that is, The ratio is equal to the mean square error of the equalization rate of the plurality of storage spaces of the storage pool/the average equalization ratio of the plurality of storage spaces of the storage pool.
  • the equalization processing condition is whether the ratio is not less than a fifth predetermined threshold. If the ratio is greater than or equal to the fifth predetermined threshold, an equalization process is also required.
  • the fifth predetermined threshold is also used to compare the degree of difference in the equalization rates of the plurality of storage spaces of the storage pool.
  • a determination manner of the embodiment of the present invention may be determined according to an absolute value of a difference between an equalization ratio of any one of a plurality of storage spaces of the storage pool managed by the storage management device and an average equalization ratio of the plurality of storage spaces.
  • the equalization processing condition is whether the absolute value of the difference between the equalization rate of any one of the plurality of storage spaces of the storage pool and the average equalization ratio of the plurality of storage spaces is not less than a sixth predetermined threshold.
  • the equalization processing condition may be the same as or different from the automatic equalization trigger condition. When the two are different, the judgment manners of the two may be different, or the judgment manners of the two may be the same but the predetermined threshold values are different.
  • the storage management device performs data migration on the balanced storage space according to the access state of the CK in the balanced storage space, thereby saving the data migration overhead to a certain extent and speeding up the balancing efficiency.
  • FIG. 4 is a schematic structural diagram of a storage management apparatus 400 according to an embodiment of the present invention.
  • the storage management apparatus 400 may include: a determining unit 401, an obtaining unit 402, and a data migration unit 403.
  • the determining unit 401 is configured to determine a first equalized storage space of the plurality of storage spaces.
  • the first balanced storage space is a storage space that needs to be equalized.
  • the plurality of storage spaces are storage spaces in a storage pool managed by the storage management device. Before the storage management device performs the equalization process, it is necessary to determine the storage space in the storage pool to be equalized.
  • the process of the storage management device for determining the equalization storage space is well known to those skilled in the art, and details are not described herein again.
  • the obtaining unit 402 is configured to obtain an access status of the CK in the first balanced storage space.
  • the access status of the CK may include an accessed state, an unaccessed initialized state, and an uninitialized state.
  • the data migration unit 403 is configured to perform migration processing on the at least one CK in the first equalization storage space according to the access status of the CK in the first balanced storage space.
  • the at least one CK is determined as the CK to be migrated in the first balanced storage space.
  • the storage management device 400 performs data migration on the first balanced storage space according to the access status of the CK in the first balanced storage space, thereby saving the data migration overhead to a certain extent and speeding up the balancing efficiency.
  • the data migration unit 403 may include: a determining subunit 4031 and a data migration subunit 4032.
  • the determining subunit 4031 is configured to determine a data migration policy of the at least one CK according to the access status of the at least one CK.
  • the data migration policy of the at least one CK includes: if the access state of the source CK is an accessed state, the data of the source CK is migrated to the target CK, and the location of the source CK at the current CKG is mapped to the target. CK; or if the access state of the source CK is not accessing the initialized state, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG location; or if the source CK is accessed.
  • the source CK is mapped to the target CK at the location of the current CKG.
  • the source CK is the CK in the at least one CK
  • the target CK is the CK corresponding to the source CK in the target storage space of the source CK
  • the current CKG is the CKG where the source CK is located.
  • the data migration unit 403 is specifically configured to: if the access state of the source CK is an accessed state, migrate the data of the source CK to the target CK, and the source CK is in the current CKG. The location is mapped to the target CK; or, if the access state of the source CK is an unaccessed initialized state, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG location; or If the access state of the source CK is an uninitialized state, the source CK is mapped to the target CK at the location of the current CKG.
  • the source CK is the CK of the at least one CK
  • the target CK is the CK corresponding to the source CK in the target storage space of the source CK
  • the current CKG is the CKG where the source CK is located.
  • the data migration unit 403 may appear as a single module in actual applications, or may be divided into two modules: the determining subunit 4031 and the data migration subunit 4032.
  • the module implements the functions of the data migration unit 403 when acting as a separate module.
  • the determining sub-unit 4031 may be located in a storage space management module of the storage management device, and the data migration sub-unit 4032 may be specifically located in the storage data management module of the storage management device.
  • At least one CK is a CK belonging to the first equalized storage space among the 10 CKGs with light load.
  • the storage management device 400 selects the CK in the current 10 load-carrying CKG in the storage pool managed by the current storage management device to migrate. Move, the impact of 10 read and write on the system performance in the equalization process can be minimized.
  • the determining unit 401 is further configured to re-determine the second equalized storage space in the plurality of storage spaces
  • the obtaining unit 402 is further configured to acquire the CK in the second balanced storage space.
  • the data migration unit 403 is further configured to perform migration processing on the at least one CK in the second equalization storage space according to the access status of the CK in the second balanced storage space, where the at least one CK is the second balanced storage The space is determined to be the CK to be migrated.
  • the equalization processing condition includes: a mean square error of the equalization ratios of the plurality of storage spaces is greater than or equal to a first predetermined threshold; or a mean square error of the equalization ratios of the plurality of storage spaces and an average equalization of the plurality of storage spaces The ratio of the ratio is greater than or equal to the second predetermined threshold; or the absolute value of the difference between the equalization ratio of any one of the plurality of storage spaces and the average equalization ratio of the plurality of storage spaces is greater than or equal to a third predetermined threshold.
  • the determining unit 401 is further configured to: determine an access state of the CK that is accessed by 10 in the plurality of storage spaces to be an accessed state; or determine a CK that is not accessed by the array but is initialized by the array among the multiple storage spaces.
  • the access state is the unaccessed initialized state; or the access state of the CK that is not 10 accesses or initialized by the array among the plurality of storage spaces is determined to be an uninitialized state.
  • the storage management device 400 can also perform the method of FIG. 1 and has the functions of the storage management device 400 in the embodiment shown in FIG. 1 to FIG. 3. The specific implementation can refer to the embodiment shown in FIG. 1 to FIG. I will not repeat them here.
  • FIG. 6 is a schematic structural diagram of a storage management apparatus 600 according to an embodiment of the present invention.
  • the storage management device 600 can include: 10 channels 601, a processor 602, and a plurality of memories 603.
  • the 10 channel 601, the processor 602, and the memory 603 are connected to each other through a bus 605.
  • the bus 605 can be an ISA bus, a PCI bus, or an EISA bus.
  • the bus can be divided into an address bus, a number According to the bus, control bus, etc. For ease of representation, only one double-headed arrow is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
  • the memory 603 is configured to store a program.
  • the program can include program code, the program code including computer operating instructions.
  • Memory 603 can include read only memory and random access memory and provides instructions and data to processor 602.
  • the memory 603 may include a high speed RAM memory, and may also include a non-volatile memory such as at least one disk memory.
  • the memory 603 may be a storage pool including a plurality of storage spaces. Each storage space may specifically be a disk storage or other non-volatile memory.
  • the processor 602 is configured to execute a program stored in the memory 603, and configured to determine a first balanced storage space in the plurality of storage spaces in the memory 603 that needs to be equalized, and obtain an access status of the logical block CK in the first balanced storage space, and According to the access status of the CK in the first equalization storage space, at least one CK in the first equalization storage space is migrated through the 10 channels 601. The at least one CK is determined as the CK to be migrated in the first balanced storage space.
  • Processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 602 or an instruction in a form of software.
  • the processor 602 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or a transistor logic step and a logic block diagram.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software modules can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 603.
  • the processor 602 reads the information in the memory 603, and completes the steps of the foregoing method in combination with the hardware.
  • the storage management device 600 performs data migration on the first balanced storage space according to the access state of the CK in the first balanced storage space, thereby saving the data migration overhead to a certain extent and speeding up the balancing efficiency.
  • the processor 602 is specifically applicable to The data migration policy of the at least one CK is determined according to the access status of the at least one CK, and the at least one CK is migrated through the 10 channel 601 according to the data migration policy of the at least one CK.
  • the data migration policy of the at least one CK includes: if the access state of the source CK is an accessed state, the data of the source CK is migrated to the target CK, and the location of the source CK at the current CKG is mapped to the target. CK; or if the access state of the source CK is not accessing the initialized state, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG location; or if the source CK is accessed. In the uninitialized state, the source CK is mapped to the target CK at the location of the current CKG.
  • the source CK is the CK in the at least one CK
  • the target CK is the CK corresponding to the source CK in the target storage space of the source CK
  • the current CKG is the CKG where the source CK is located.
  • the processor 602 is specifically available in the process of performing migration processing on the at least one CK in the first equalized storage space according to the access status of the CK in the first balanced storage space.
  • the access state of the source CK is the accessed state, the data of the source CK is migrated to the target CK, and the source CK is mapped to the target CK at the current CKG location; or, if the access state of the source CK is If the initialized state is not accessed, the target CK is written to all zeros, and the source CK is mapped to the target CK at the current CKG position; or, if the access state of the source CK is uninitialized, the source is CK maps to the target CK at the current CKG location.
  • the source CK is CK in the at least one CK
  • the target CK is a target of the source CK CK corresponding to the source CK in the storage space
  • the current CKG is the CKG where the source CK is located.
  • at least one CK is a CK belonging to the first equalized storage space among the 10 CKGs with light load.
  • the processor 602 is further configured to determine a second equalized storage space of the plurality of storage spaces of the memory 603, and obtain an access status of the CK in the second balanced storage space, and According to the access status of the CK in the second equalization storage space, at least one CK in the second equalization storage space is migrated through the 10 channels 601. The at least one CK is determined as the CK to be migrated in the second balanced storage space.
  • the equalization processing condition includes: a mean square error of the equalization ratios of the plurality of storage spaces is greater than or equal to a first predetermined threshold; or a mean square error of the equalization ratios of the plurality of storage spaces and an average equalization of the plurality of storage spaces The ratio of the ratio is greater than or equal to the second predetermined threshold; or the absolute value of the difference between the equalization ratio of any one of the plurality of storage spaces and the average equalization ratio of the plurality of storage spaces is greater than or equal to a third predetermined threshold.
  • the processor 602 is further configured to determine that an access status of the CK accessed by the 10 in the plurality of storage spaces is an accessed state; or determine a CK of the plurality of storage spaces that is not accessed by the 10 but initialized by the array.
  • the access state is an un-initialized state; or the access state of the CK that is not 10 or not initialized by the array among the plurality of storage spaces is determined to be an uninitialized state.
  • the storage management device 600 can also perform the method of FIG. 1 and has the functions of the storage management device 600 in the embodiment shown in FIG. 1 to FIG. 3.
  • the specific implementation can refer to the embodiment shown in FIG. 1 to FIG. 3, which is an embodiment of the present invention. I will not repeat them here.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the components displayed by the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

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)
  • Computer Networks & Wireless Communication (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

实施例提供了一种存储空间的管理方法和存储管理装置,该方法包括:确定多个存储空间中的第一均衡存储空间,其中所述第一均衡存储空间为需要进行均衡处理的存储空间;获取所述第一均衡存储空间中至少一个逻辑块CK的访问状态,其中所述至少一个CK为所述第一均衡存储空间中待迀移的CK;根据所述第一均衡存储空间内的至少一个CK的访问状态对所述第一均衡存储空间内的至少一个CK进行迀移处理。实施例的用于存储空间的管理方法和存储管理装置,通过根据第一均衡存储空间中的CK的访问状态对第一均衡存储空间进行数据迀移,从而能够一定程度上节省数据迀移的开销,加快均衡的效率。

Description

存储空间的管理方法和存储管理装置 本申请要求于 2013年 11月 27日提交中国专利局、申请号 201310616035.3、 发明名称为 "存储空间的管理方法和存储管理装置"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域 本发明实施例涉及数据存储领域, 并且更具体地, 涉及一种存储空间的管 理方法和存储管理装置。
背景技术
现行均衡策略是将数据块在硬盘之间的迁移, 即重新进行数据布局。 这种 数据迁移总体趋势是将数据从硬盘空间利用率较高的盘迁移到较低的盘, 在这 个过程中有些硬盘数据是没有被用户访问过, 对这样的数据进行迁移是徒劳 的, 会造成均衡的效率低下, 只要是被分配的逻辑块 CK中的数据块都会参与 均衡, 影响总体的均衡进度。
发明内容 本发明实施例提供一种存储空间的管理方法和存储管理装置, 能够一定程 度上节省数据迁移的开销, 加快均衡的效率。 第一方面, 提供了一种存储空间的管理方法, 该方法包括: 确定多个存储 空间中的第一均衡存储空间, 其中该第一均衡存储空间为需要进行均衡处理的 存储空间; 获取该第一均衡存储空间中至少一个逻辑块 CK的访问状态, 其中 该至少一个 CK为该第一均衡存储空间中待迁移的 CK; 根据该第一均衡存储 空间内的至少一个 CK的访问状态对该第一均衡存储空间内的至少一个 CK进 行迁移处理。 结合第一方面, 在第一种可能的实现方式中, 根据该第一均衡存储空间内 的至少一个 CK的访问状态对该第一均衡存储空间内的至少一个 CK进行迁移 处理具体实现为: 根据该至少一个 CK的访问状态确定该至少一个 CK的数据 迁移策略; 根据该至少一个 CK的数据迁移策略对该至少一个 CK进行迁移处 理。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 具 体实现为该至少一个 CK的数据迁移策略包括: 如果源 CK的访问状态为已访 问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG的位 置映射到该目标 CK上; 或者如果源 CK的访问状态为未访问已初始化状态, 则将该目标 CK写全零,并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未初始化状态, 则将该源 CK在当前 CKG的位 置映射到该目标 CK上; 其中, 该源 CK为该至少一个 CK中的 CK, 该目标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK , 该当前 CKG为该源 CK所在的 CKG。 结合第一方面, 在第三种可能的实现方式中, 根据该第一均衡存储空间内 的至少一个 CK的访问状态对该第一均衡存储空间内的至少一个 CK进行迁移 处理具体实现为: 如果源 CK的访问状态为已访问状态, 则将该源 CK的数据 迁移到目标 CK, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者 如果源 CK的访问状态为未访问已初始化状态, 则将该目标 CK写全零, 并将 该源 CK在当前 CKG的位置映射到该目标 CK上;或者如果源 CK的访问状态 为未初始化状态, 则将该源 CK在当前 CKG的位置映射到该目标 CK上; 其 中, 该源 CK为该至少一个 CK中的 CK, 该目标 CK为该源 CK的目标存储空 间中与该源 CK对应的 CK, 该当前 CKG为该源 CK所在的 CKG。 结合第一方面或第一方面的第一种可能的实现方式至第一方面的第三种 可能的实现方式中任一种可能的实现方式, 在第四种可能的实现方式中, 具体 实现为: 该至少一个 CK为 10负载较轻的 CKG中属于该第一均衡存储空间的 CK。 结合第一方面或第一方面的第一种可能的实现方式至第一方面的第四种 可能的实现方式中任一种可能的实现方式, 在第五种可能的实现方式中, 该方 法还包括: 在该根据该第一均衡存储空间内的 CK的访问状态将该第一均衡存 储空间内的至少一个 CK分别迁移到该至少一个 CK中各自 CK对应的目标存 储空间之后, 如果该多个存储空间的均衡率仍然满足均衡处理条件, 则确定该 多个存储空间中的第二均衡存储空间; 获取该第二均衡存储空间中至少一个逻 辑块 CK的访问状态, 其中该至少一个 CK为该第一均衡存储空间中待迁移的 CK;根据该第二均衡存储空间内的至少一个 CK的访问状态对该第二均衡存储 空间内的至少一个 CK进行迁移处理。 结合第一方面的第五种可能的实现方式, 在第六种可能的实现方式中, 具 体实现为该均衡处理条件包括: 该多个存储空间的均衡率的均方差大于或者等 于第一预定阔值; 或者该多个存储空间的均衡率的均方差与该多个存储空间的 平均均衡率的比值大于或者等于第二预定阔值; 或者该多个存储空间中任一个 存储空间的均衡率与该多个存储空间的平均均衡率之差的绝对值大于或者等 于第三预定阔值。 结合第一方面或第一方面的第一种可能的实现方式至第一方面的第六种 可能的实现方式中任一种可能的实现方式, 在第七种可能的实现方式中, 该方 法还包括: 确定该多个存储空间中被 10访问的 CK的访问状态为已访问状态; 或者确定该多个存储空间中未被 10访问但被阵列初始化过的 CK的访问状态 为未访问已初始化状态; 或者确定该多个存储空间中未被 10访问也未被阵列 初始化过的 CK的访问状态为未初始化状态。 第二方面, 提供了一种存储管理装置, 该装置包括: 确定单元, 用于确定 多个存储空间中的第一均衡存储空间, 该第一均衡存储空间为需要进行均衡处 理的存储空间; 获取单元, 用于获取该第一均衡存储空间中逻辑块 CK的访问 状态; 数据迁移单元, 用于根据该第一均衡存储空间内的 CK的访问状态对该 第一均衡存储空间内的至少一个 CK进行迁移处理, 该至少一个 CK为该第一 均衡存储空间中被确定为待迁移的 CK。
结合第二方面, 在第一种可能的实现方式中, 该数据迁移单元包括: 确定 子单元, 用于根据该至少一个 CK的访问状态确定该至少一个 CK的数据迁移 策略; 数据迁移子单元, 用于根据该至少一个 CK的数据迁移策略对该至少一 个 CK进行迁移处理。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 具 体实现为该至少一个 CK的数据迁移策略包括: 如果源 CK的访问状态为已访 问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG的位 置映射到该目标 CK上; 或者如果源 CK的访问状态为未访问已初始化状态, 则将该目标 CK写全零,并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未初始化状态, 则将该源 CK在当前 CKG的位 置映射到该目标 CK上; 其中, 该源 CK为该至少一个 CK中的 CK, 该目标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK , 该当前 CKG为该源 CK所在的 CKG。
结合第二方面, 在第三种可能的实现方式中, 该数据迁移单元具体用于: 如果源 CK的访问状态为已访问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG的位置映射到该目标 CK上;或者如果源 CK的访问 状态为未访问已初始化状态,则将该目标 CK写全零,并将该源 CK在当前 CKG 的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未初始化状态, 则 将该源 CK在当前 CKG的位置映射到该目标 CK上; 其中,该源 CK为该至少 一个 CK中的 CK,该目标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK, 该当前 CKG为该源 CK所在的 CKG。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第三种 可能的实现方式中任一种可能的实现方式, 在第四种可能的实现方式中, 具体 实现为: 该至少一个 CK为 10负载较轻的 CKG中属于该第一均衡存储空间的 CK。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第四种 可能的实现方式中任一种可能的实现方式, 在第五种可能的实现方式中, 该确 定单元还用于在该根据该第一均衡存储空间内的 CK的访问状态将该第一均衡 存储空间内的至少一个 CK分别迁移到该至少一个 CK中各自 CK对应的目标 存储空间之后, 如果该多个存储空间的均衡率仍然满足均衡处理条件, 则重新 确定该多个存储空间中的第二均衡存储空间; 该获取单元还用于获取该第二均 衡存储空间中 CK的访问状态; 该数据迁移单元还用于根据该第二均衡存储空 间内的 CK的访问状态对该第二均衡存储空间内的至少一个 CK进行迁移处理, 该至少一个 CK为该第二均衡存储空间中被确定为待迁移的 CK。
结合第二方面的第五种可能的实现方式, 在第六种可能的实现方式中, 具 体实现为该均衡处理条件包括: 该多个存储空间的均衡率的均方差大于或者等 于第一预定阔值; 或者该多个存储空间的均衡率的均方差与该多个存储空间的 平均均衡率的比值大于或者等于第二预定阔值; 或者该多个存储空间中任一个 存储空间的均衡率与该多个存储空间的平均均衡率之差的绝对值大于或者等 于第三预定阔值。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第六种 可能的实现方式中任一种可能的实现方式, 在第七种可能的实现方式中, 该确 定单元还用于: 确定该多个存储空间中被 10访问的 CK的访问状态为已访问 状态; 或者确定该多个存储空间中未被 10访问但被阵列初始化过的 CK的访 问状态为未访问已初始化状态; 或者确定该多个存储空间中未被 10访问也未 被阵列初始化过的 CK的访问状态为未初始化状态。 基于以上技术方案, 本发明实施例的用于存储空间的管理方法和存储管理 装置, 通过根据第一均衡存储空间中的 CK的访问状态对第一均衡存储空间进 行数据迁移, 从而能够一定程度上节省数据迁移的开销, 加快均衡的效率。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技术 描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。 图 1是本发明实施例存储空间的管理方法流程图。
图 2是本发明实施例逻辑块访问状态设置方法示意图。
图 3是本发明实施例存储空间均衡管理流程图。
图 4是本发明实施例存储管理装置的一种结构示意图。
图 5是本发明实施例存储管理装置的另一种结构示意图。
图 6是本发明实施例存储管理装置的再一种结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
为了方便理解本发明实施例, 首先在此介绍本发明实施例描述中会引入的 几个要素。
逻辑块(Chunk, CK ) : 硬盘切分粒度, 硬盘空间划分的基本单位。 CK 内的硬盘物理地址连续。 CK 内可包括元数据区和数据区, 元数据区的数据用 于维护 CK内数据区的数据, 并描述和组织 CK内数据区的关系。 均衡: 通过对存储池中硬盘上的数据进行迁移, 以达到各个硬盘上的空间 利用率相对均匀。
独立磁盘冗余阵歹 'J ( Redundant Arrays of Independent Disks, RAID ) : 原 理是利用数组方式来作磁盘组,配合数据分散排列的设计,提升数据的安全性。
RAID是由很多价格较便宜的磁盘, 组合成一个容量巨大的磁盘组, 利用个别 磁盘提供数据所产生加成效果提升整个磁盘系统效能。 利用这项技术, 将数据 切割成许多区段, 分别存放在各个硬盘上。 RAID还能利用同位检查 (Parity Check )的观念, 在数组中任一颗硬盘故障时, 仍可读出数据, 在数据重构时, 将数据经计算后重新置入新硬盘中。
逻辑块组( Chunk Group, CKG ) , 由多个 CK按照指定 RAID类型组成 的逻辑空间。
存储池: 由多个磁盘组成的存储资源池。 一个磁盘可视为存储池的一个存 储空间。 图 1是本发明实施例存储空间的管理方法流程图, 图 1的方法由存储管理 装置执行。
101 , 确定多个存储空间中的第一均衡存储空间。
其中, 该第一均衡存储空间为需要进行均衡处理的存储空间。 另外, 本发明实施例中, 该多个存储空间为存储管理装置管理的存储池中 的存储空间。
存储管理装置在进行均衡处理之前, 需要确定存储池中将被均衡处理的存 储空间。 存储管理装置确定均衡存储空间的过程为本领域技术人员所熟知, 本 发明实施例在此不再赘述。
102, 获取该第一均衡存储空间中至少一个逻辑块 CK的访问状态。
其中, 该至少一个 CK为该第一均衡存储空间中待迁移的 CK。 可选地, CK的访问状态可包括已访问状态、 未访问已初始化状态和未初 始化状态。
103 , 根据该第一均衡存储空间内的至少一个 CK的访问状态对该至少一 个 CK进行迁移处理。 本发明实施例中, 通过根据第一均衡存储空间中的 CK的访问状态对第一 均衡存储空间进行数据迁移, 从而能够一定程度上节省数据迁移的开销, 加快 均衡的效率。 可选地, 作为一个实施例, 根据该第一均衡存储空间内的至少一个 CK的 访问状态对该至少一个 CK进行迁移处理具体可实现为: 根据该至少一个 CK 的访问状态确定该至少一个 CK的数据迁移策略; 根据该至少一个 CK的数据 迁移策略对该至少一个 CK进行迁移处理。 具体地, 该至少一个 CK的数据迁 移策略可包括: 如果源 CK的访问状态为已访问状态, 则将该源 CK的数据迁 移到目标 CK, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者如 果源 CK的访问状态为未访问已初始化状态, 则将该目标 CK写全零, 并将该 源 CK在当前 CKG的位置映射到该目标 CK上;或者如果源 CK的访问状态为 未初始化状态, 则将该源 CK在当前 CKG的位置映射到该目标 CK上; 其中, 该源 CK为该至少一个 CK中的 CK,该目标 CK为该源 CK的目标存储空间中 与该源 CK对应的 CK, 该当前 CKG为该源 CK所在的 CKG。 可选地, 作为另一个实施例, 根据该第一均衡存储空间内的至少一个 CK 的访问状态对该至少一个 CK进行迁移处理具体可实现为: 如果源 CK的访问 状态为已访问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当 前 CKG的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未访问已 初始化状态, 则将该目标 CK写全零, 并将该源 CK在当前 CKG的位置映射 到该目标 CK上; 或者如果源 CK的访问状态为未初始化状态, 则将该源 CK 在当前 CKG的位置映射到该目标 CK上; 其中,该源 CK为该至少一个 CK中 的 CK , 该目标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK , 该当 前 CKG为该源 CK所在的 CKG。 优选地, 在上述两种实施例中, 至少一个 CK为 10负载较轻的 CKG中属 于该第一均衡存储空间的 CK。 在选择 CK进行迁移时, 存储管理装置选择当 前存储管理装置管理的存储池中当前 10负载较轻的 CKG内的 CK进行迁移, 可将均衡过程中的 10读写对系统性能的影响尽量降低。 可选地, 在步骤 103之后, 该方法还包括: 如果该多个存储空间的均衡率 仍然满足均衡处理条件, 则确定该多个存储空间中的第二均衡存储空间; 获取 该第二均衡存储空间中至少一个逻辑块 CK的访问状态, 其中该至少一个 CK 为该第一均衡存储空间中待迁移的 CK; 根据该第二均衡存储空间内的至少一 个 CK的访问状态对该第二均衡存储空间内的至少一个 CK进行迁移处理。 。 对该第二均衡存储空间进行均衡处理的具体步骤可参考步骤 102、 103 中对第 一均衡存储空间的处理, 本发明实施例在此不再赘述。 具体地, 该均衡处理条件包括: 该多个存储空间的均衡率的均方差大于或 者等于第一预定阔值; 或者该多个存储空间的均衡率的均方差与该多个存储空 间的平均均衡率的比值大于或者等于第二预定阔值; 或者该多个存储空间中任 一个存储空间的均衡率与该多个存储空间的平均均衡率之差的绝对值大于或 者等于第三预定阔值。 可选地, 在步骤 101之前, 该方法还可包括: 确定该多个存储空间中被 10 访问的 CK的访问状态为已访问状态; 或者确定该多个存储空间中未被 10访 问但被阵列初始化过的 CK的访问状态为未访问已初始化状态; 或者确定该多 个存储空间中未被 10访问也未被阵列初始化过的 CK的访问状态为未初始化 状态。 可选地, 该第一均衡存储空间为该多个存储空间中均衡率超出该多个存储 空间的平均均衡率预定阔值的存储空间。 进一步地, 该第一均衡存储空间为该 多个存储空间中均衡率最大的存储空间。 下面, 结合具体的实施例, 对本发明实施例的方法作进一步的描述。 图 2是本发明实施例逻辑块访问状态设置方法示意图。 图 2的方法由存储 管理装置执行。
201 , 分配 CK。 本发明实施例中, 首先需要对存储池内的多个存储空间进行 CK分配。 存 储管理装置分配 CK的过程为本领域技术人员所熟知, 本发明实施例在此不再 赘述。
202 , 初始化已分配 CK为未初始化状态。 当 CK被分配时, 存储管理装置可初始化 CK的访问状态。 存储管理装置 可将 CK的访问状态设置为未初始化状态。
203 , 监控主机 10操作。 存储管理装置监控主机的 10操作, 本操作运行于存储管理装置工作的整 个周期。
204, 是否有主机 10访问。 存储管理装置判断是否有主机进行 10访问存储管理装置下的存储空间, 如果是, 则执行步骤 205; 否则, 执行步骤 206。
205 , 标记被 10访问的 CK为已访问状态。 当 10设备对存储空间内的 CK进行访问时,存储管理装置对被 10访问的 CK进行标记, 可将其访问状态标记为已访问状态。 10设备对存储空间的 CK 的访问, 可包括对 CK的读操作和写操作。
标记完毕后, 存储管理装置可继续执行步骤 203 , 监控主机 10操作。
206, 是否执行阵列初始化。 存储管理装置判断是否对存储管理装置的存储空间执行过阵列初始化。 如果是, 执行步骤 207; 否则, 执行步骤 202。
207 , 存储管理装置可将记被阵列初始化的 CK的访问状态标记为未访问已初始 化状态。 标记完毕后, 存储管理装置可继续执行步骤 203 , 监控主机 10操作。 本发明实施例中, 存储管理装置可通过用 10监控软件对存储管理装置的 存储空间进行 10识别。 具体的, 存储管理装置的存储空间可以是存储系统中 的存储空间, 例如硬盘等。 图 3是本发明实施例存储空间均衡管理流程图。 图 3的方法由存储管理装 置执行。
301 , 添加新盘或自动均衡。 当添加新盘时, 该存储空间的均衡率为 0。 此时, 需要进行均衡处理。 当存储池的磁盘空间利用率的不均衡程度达到自动均衡触发条件时,会触 发存储管理装置的自动均衡。 本发明实施例的一种判断方式, 可根据存储管理装置管理的存储池的多个 存储空间的均衡率的均方差判断是否进行自动均衡。 此时该自动均衡触发条件 为存储池的多个存储空间的均衡率的均方差是否不小于第一预定阔值。如果存 储池的多个存储空间的均衡率的均方差大于或者等于第一预定阔值, 则还需要 进行自动均衡。 该第一预定阔值用于比较存储池的多个存储空间的均衡率的差 异程度。 本发明实施例的另一种判断方式, 可根据存储管理装置管理的存储池的多 个存储空间的均衡率的均方差与存储管理装置管理的多个存储空间的平均均 衡率之间的比值判断, 即该比值等于存储池的多个存储空间的均衡率的均方差 /存储池的多个存储空间的平均均衡率。此时该自动均衡触发条件为该比值是否 不小于第二预定阔值。 如果该比值大于或者等于第二预定阔值, 则还需要进行 自动均衡。该第二预定阔值也用于比较存储池的多个存储空间的均衡率的差异 程度。 本发明实施例的一种判断方式, 可根据存储管理装置管理的存储池的多个 存储空间中任一个存储空间的均衡率与该多个存储空间的平均均衡率之差的 绝对值判断。 此时该自动均衡触发条件为存储池的多个存储空间中任一个存储 空间的均衡率与该多个存储空间的平均均衡率之差的绝对值是否不小于第三 预定阔值。 如果存储池中存在至少一个存储空间, 其均衡率与该多个存储空间 的平均均衡率之差的绝对值大于或者等于第三预定阔值, 则还需要进行自动均 衡。 该第三预定阔值也用于比较存储池的多个存储空间的均衡率的差异程度。 当然, 还可能存在其它自动均衡触发条件, 本发明实施例在此不作限制。
302, 启动均衡。
303 , 查询存储池的多个存储空间中需要进行均衡操作的均衡存储空间。 在启动均衡处理后, 存储管理装置需要查询存储池的多个存储空间, 从中 选择出需要进行均衡操作的均衡存储空间。
存储管理装置可从中挑出一个或多个均衡存储空间, 并对均衡存储空间进 行均衡处理。 本发明实施例一种选择均衡存储空间的方式, 可选地, 存储管理装置选择 存储池的多个存储空间中均衡率超出该多个存储空间的平均均衡率预定阔值 的存储空间作为均衡存储空间。 进一步地, 存储管理装置可选择存储池的多个 存储空间中均衡率最大的存储空间作为均衡存储空间。
304, 确定均衡存储空间内待迁移的 CK。 在进行均衡处理时,存储管理装置可根据均衡存储空间当前的均衡率确定 需要进行数据迁移的空间大小。
在选择待迁移的 CK时, 存储管理装置可随机选择 CK进行迁移, 也可按 照一定的策略选择 CK进行迁移, 只需要满足迁移的 CK之和等于进行数据迁 移的空间大小。 在选择 CK进行迁移时, 选择属于当前 10负载较轻的 CKG内 的 CK进行迁移, 可将均衡过程中的 10读写对系统性能的影响尽量降低。 另 外, 一个 CKG内的 CK, 可能属于不同的存储空间。 因此, 优选地, 存储管理 装置将存储池中 10负载较轻的 CKG中属于均衡存储空间的 CK进行数据迁移。
304, 根据待迁移 CK的访问状态确定数据迁移策略。 在进行数据迁移时, 存储管理装置可根据待迁移 CK的访问状态确定数据 迁移策略。
不妨将待迁移 CK在均衡存储空间内的 CK称为该源 CK,在该源 CK的目 标存储空间内该源 CK对应的 CK称为目标 CK, 源 CK所在的 CKG称为当前 CKG, 则该数据迁移策略可包括: 如果源 CK的访问状态为已访问状态,则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 如果源 CK的访问状态为未访问已初始化状态, 则将该目标 CK写全零, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 如果源 CK的访问状态为未初始化状态, 则将该源 CK在当前 CKG的位 置映射到该目标 CK上。
305 , 选择目标存储空间执行数据迁移。 存储管理装置可为不同的待迁移 CK选择不同的目标存储空间。 存储管理装置根据步骤 304中选择的数据迁移策略,对均衡存储空间内待 迁移 CK进行数据迁移。
306, 多个存储空间的均衡率是否符合均衡条件。 当对均衡存储空间的均衡处理结束后,存储管理装置还要判断当前存储池 的多个存储空间的均衡率是否符合均衡处理条件。
如果符合均衡处理条件, 则执行步骤 303; 否则, 执行步骤 307。 该均衡处理条件可以是存储管理装置中用于判断是否需要进行均衡处理 的条件。 本发明实施例的一种判断方式, 可根据存储管理装置管理的存储池的多个 存储空间的均衡率的均方差判断。此时该均衡处理条件为存储池的多个存储空 间的均衡率的均方差是否不小于第四预定阔值。如果存储池的多个存储空间的 均衡率的均方差大于或者等于第四预定阔值, 则还需要进行均衡处理。 该第四 预定阔值用于比较存储池的多个存储空间的均衡率的差异程度。 本发明实施例的另一种判断方式, 可根据存储管理装置管理的存储池的多 个存储空间的均衡率的均方差与存储池的多个存储空间的平均均衡率之间的 比值判断,即该比值等于存储池的多个存储空间的均衡率的均方差 /存储池的多 个存储空间的平均均衡率。此时该均衡处理条件为该比值是否不小于第五预定 阔值。 如果该比值大于或者等于第五预定阔值, 则还需要进行均衡处理。 该第 五预定阔值也用于比较存储池的多个存储空间的均衡率的差异程度。 本发明实施例的一种判断方式, 可根据存储管理装置管理的存储池的多个 存储空间中任一个存储空间的均衡率与该多个存储空间的平均均衡率之差的 绝对值判断。 此时该均衡处理条件为存储池的多个存储空间中任一个存储空间 的均衡率与该多个存储空间的平均均衡率之差的绝对值是否不小于第六预定 阔值。 如果存储池中存在至少一个存储空间, 其均衡率与该多个存储空间的平 均均衡率之差的绝对值大于或者等于第六预定阔值, 则还需要进行均衡处理。 该第六预定阔值也用于比较存储池的多个存储空间的均衡率的差异程度。 当然, 还可能存在其它均衡处理条件, 本发明实施例在此不作限制。 另外, 本发明实施例中, 均衡处理条件可以和自动均衡触发条件相同, 也 可以不同。 当二者不同时, 可以是二者的判断方式不同, 也可以是二者的判断 方式相同但预定阔值取值不同。
307 , 数据迁移完毕, 均衡完成。 本发明实施例中, 存储管理装置通过根据均衡存储空间中的 CK的访问状 态对均衡存储空间进行数据迁移, 从而能够一定程度上节省数据迁移的开销, 加快均衡的效率。
图 4是本发明实施例存储管理装置 400的结构示意图。 存储管理装置 400 可包括: 确定单元 401、 获取单元 402和数据迁移单元 403。 确定单元 401 , 用于确定多个存储空间中的第一均衡存储空间。
其中, 该第一均衡存储空间为需要进行均衡处理的存储空间。 本发明实施例中, 该多个存储空间为存储管理装置管理的存储池中的存储 空间。 存储管理装置在进行均衡处理之前, 需要确定存储池中将被均衡处理的 存储空间。 存储管理装置确定均衡存储空间的过程为本领域技术人员所熟知, 本发明实施例在此不再赘述。
获取单元 402 , 用于获取该第一均衡存储空间中 CK的访问状态。 可选地, CK的访问状态可包括已访问状态、 未访问已初始化状态和未初 始化状态。 数据迁移单元 403 , 用于根据该第一均衡存储空间内的 CK的访问状态对 该第一均衡存储空间内的至少一个 CK进行迁移处理。
其中, 该至少一个 CK为该第一均衡存储空间中被确定为待迁移的 CK。 本发明实施例中, 存储管理装置 400通过根据第一均衡存储空间中的 CK 的访问状态对第一均衡存储空间进行数据迁移,从而能够一定程度上节省数据 迁移的开销, 加快均衡的效率。 可选地, 作为一个实施例, 如图 5所示, 数据迁移单元 403可包括: 确定 子单元 4031和数据迁移子单元 4032。 确定子单元 4031 , 用于根据该至少一个 CK的访问状态确定该至少一个 CK的数据迁移策略。 数据迁移子单元, 用于 根据该至少一个 CK的数据迁移策略对该至少一个 CK进行迁移处理。 具体地, 该至少一个 CK的数据迁移策略包括: 如果源 CK的访问状态为 已访问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG 的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未访问已初始化状 态, 则将该目标 CK写全零, 并将该源 CK在当前 CKG的位置映射到该目标 CK上;或者如果源 CK的访问状态为未初始化状态,则将该源 CK在当前 CKG 的位置映射到该目标 CK上。 其中, 该源 CK为该至少一个 CK中的 CK, 该目 标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK , 该当前 CKG为该 源 CK所在的 CKG。
可选地, 作为另一个实施例, 数据迁移单元 403具体用于: 如果源 CK的 访问状态为已访问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK 在当前 CKG的位置映射到该目标 CK上; 或者, 如果源 CK的访问状态为未 访问已初始化状态, 则将该目标 CK写全零, 并将该源 CK在当前 CKG的位 置映射到该目标 CK上; 或者, 如果源 CK的访问状态为未初始化状态, 则将 该源 CK在当前 CKG的位置映射到该目标 CK上。其中,该源 CK为该至少一 个 CK中的 CK, 该目标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK, 该当前 CKG为该源 CK所在的 CKG。
数据迁移单元 403如上述两个实施例所示, 在实际应用中, 可以作为一个 单独的模块出现,也可以分成确定子单元 4031和数据迁移子单元 4032两个模 块出现。 当作为一个单独的模块时, 该模块可实现数据迁移单元 403的功能。 当作为两个模块出现时, 确定子单元 4031 具体可以位于存储管理装置的存储 空间管理模块, 数据迁移子单元 4032具体可位于存储管理装置的存储数据管 理模块。 当然, 可能还存在其它的划分方式, 本发明实施例在此不再赘述。
优选地, 在上述两种实施例中, 至少一个 CK为 10负载较轻的 CKG中属 于该第一均衡存储空间的 CK。 在选择 CK进行迁移时, 存储管理装置 400选 择当前存储管理装置管理的存储池中当前 10负载较轻的 CKG内的 CK进行迁 移, 可将均衡过程中的 10读写对系统性能的影响尽量降低。 可选地, 在该根据该第一均衡存储空间内的 CK的访问状态将该第一均衡 存储空间内的至少一个 CK分别迁移到该至少一个 CK中各自 CK对应的目标 存储空间之后, 如果该多个存储空间的均衡率仍然满足均衡处理条件, 则确定 单元 401 还用于重新确定该多个存储空间中的第二均衡存储空间, 获取单元 402还用于获取该第二均衡存储空间中 CK的访问状态; 数据迁移单元 403还 用于根据该第二均衡存储空间内的 CK的访问状态对该第二均衡存储空间内的 至少一个 CK进行迁移处理, 该至少一个 CK为该第二均衡存储空间中被确定 为待迁移的 CK。 具体地, 该均衡处理条件包括: 该多个存储空间的均衡率的均方差大于或 者等于第一预定阔值; 或者该多个存储空间的均衡率的均方差与该多个存储空 间的平均均衡率的比值大于或者等于第二预定阔值; 或者该多个存储空间中任 一个存储空间的均衡率与该多个存储空间的平均均衡率之差的绝对值大于或 者等于第三预定阔值。 可选地, 确定单元 401还用于: 确定该多个存储空间中被 10访问的 CK 的访问状态为已访问状态; 或者确定该多个存储空间中未被 10访问但被阵列 初始化过的 CK的访问状态为未访问已初始化状态; 或者确定该多个存储空间 中未被 10访问也未被阵列初始化过的 CK的访问状态为未初始化状态。 存储管理装置 400还可执行图 1的方法, 并具备存储管理装置 400在图 1 至图 3所示实施例中的功能, 具体实现可参考图 1至图 3所示实施例, 本发明 实施例在此不再赘述。 图 6是本发明实施例提供的一种存储管理装置 600的结构示意图。存储管 理装置 600可包括: 10通道 601、 处理器 602和多个存储器 603。
10通道 601、 处理器 602和存储器 603通过总线 605相互连接。 总线 605 可以是 ISA总线、 PCI总线或 EISA总线等。 所述总线可以分为地址总线、 数 据总线、 控制总线等。 为便于表示, 图 6中仅用一个双向箭头表示, 但并不表 示仅有一根总线或一种类型的总线。 存储器 603 , 用于存放程序。 具体地, 程序可以包括程序代码, 所述程序 代码包括计算机操作指令。存储器 603可以包括只读存储器和随机存取存储器, 并向处理器 602提供指令和数据。 存储器 603可能包含高速 RAM存储器, 也 可能还包括非易失性存储器 (non-volatile memory ) , 例如至少一个磁盘存储 器。 本发明实施中, 存储器 603可以是存储池, 包括多个存储空间。 每个存储 空间具体可以是一个磁盘存储器或其它非易失性存储器。 处理器 602, 执行存储器 603所存放的程序, 用于确定存储器 603中多个 存储空间中需要进行均衡处理的第一均衡存储空间, 获取该第一均衡存储空间 中逻辑块 CK的访问状态, 并根据该第一均衡存储空间内的 CK的访问状态, 通过 10通道 601对该第一均衡存储空间内的至少一个 CK进行迁移处理。 其 中, 该至少一个 CK为该第一均衡存储空间中被确定为待迁移的 CK。 上述如本发明图 1至图 3中任一实施例揭示的存储管理装置执行的方法可 以应用于处理器 602中, 或者由处理器 602实现。 处理器 602可能是一种集成 电路芯片, 具有信号的处理能力。 在实现过程中, 上述方法的各步骤可以通过 处理器 602中的硬件的集成逻辑电路或者软件形式的指令完成。 上述的处理器 602可以是通用处理器、 数字信号处理器 (DSP ) 、 专用集成电路(ASIC ) 、 现成可编程门阵列 (FPGA )或者其他可编程逻辑器件、 分立门或者晶体管逻 步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规 的处理器等。 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码 处理器执行完成, 或者用译码处理器中的硬件及软件模块组合执行完成。 软件 模块可以位于随机存储器, 闪存、 只读存储器, 可编程只读存储器或者电可擦 写可编程存储器、 寄存器等本领域成熟的存储介质中。 该存储介质位于存储器 603 , 处理器 602读取存储器 603中的信息, 结合其硬件完成上述方法的步骤。 本发明实施例中, 存储管理装置 600通过根据第一均衡存储空间中的 CK 的访问状态对第一均衡存储空间进行数据迁移,从而能够一定程度上节省数据 迁移的开销, 加快均衡的效率。 可选地, 作为一个实施例, 在用于根据该第一均衡存储空间内的 CK的访 问状态对该第一均衡存储空间内的至少一个 CK进行迁移处理的过程中, 处理 器 602具体可用于根据该至少一个 CK的访问状态确定该至少一个 CK的数据 迁移策略, 并根据该至少一个 CK的数据迁移策略, 通过 10通道 601对该至 少一个 CK进行迁移处理。 具体地, 该至少一个 CK的数据迁移策略包括: 如果源 CK的访问状态为 已访问状态, 则将该源 CK的数据迁移到目标 CK, 并将该源 CK在当前 CKG 的位置映射到该目标 CK上; 或者如果源 CK的访问状态为未访问已初始化状 态, 则将该目标 CK写全零, 并将该源 CK在当前 CKG的位置映射到该目标 CK上;或者如果源 CK的访问状态为未初始化状态,则将该源 CK在当前 CKG 的位置映射到该目标 CK上。 其中, 该源 CK为该至少一个 CK中的 CK, 该目 标 CK为该源 CK的目标存储空间中与该源 CK对应的 CK , 该当前 CKG为该 源 CK所在的 CKG。 可选地, 作为另一个实施例, 在用于根据该第一均衡存储空间内的 CK的 访问状态对该第一均衡存储空间内的至少一个 CK进行迁移处理的过程中, 处 理器 602具体可用于: 如果源 CK的访问状态为已访问状态, 则将该源 CK的 数据迁移到目标 CK, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者,如果源 CK的访问状态为未访问已初始化状态,则将该目标 CK写全零, 并将该源 CK在当前 CKG的位置映射到该目标 CK上; 或者,如果源 CK的访 问状态为未初始化状态, 则将该源 CK在当前 CKG的位置映射到该目标 CK 上。 其中, 该源 CK为该至少一个 CK中的 CK, 该目标 CK为该源 CK的目标 存储空间中与该源 CK对应的 CK, 该当前 CKG为该源 CK所在的 CKG。 优选地, 在上述两种实施例中, 至少一个 CK为 10负载较轻的 CKG中属 于该第一均衡存储空间的 CK。 在选择 CK进行迁移时, 处理器 602选择当前 存储管理装置管理的存储池中当前 10负载较轻的 CKG内的 CK进行迁移,可 将均衡过程中的 10读写对系统性能的影响尽量降低。 可选地, 在该根据该第一均衡存储空间内的 CK的访问状态将该第一均衡 存储空间内的至少一个 CK分别迁移到该至少一个 CK中各自 CK对应的目标 存储空间之后, 如果该多个存储空间的均衡率仍然满足均衡处理条件, 则处理 器 602还用于确定存储器 603的多个存储空间中的第二均衡存储空间, 获取该 第二均衡存储空间中 CK的访问状态, 并根据该第二均衡存储空间内的 CK的 访问状态, 通过 10通道 601对该第二均衡存储空间内的至少一个 CK进行迁 移处理。其中,该至少一个 CK为该第二均衡存储空间中被确定为待迁移的 CK。 具体地, 该均衡处理条件包括: 该多个存储空间的均衡率的均方差大于或 者等于第一预定阔值; 或者该多个存储空间的均衡率的均方差与该多个存储空 间的平均均衡率的比值大于或者等于第二预定阔值; 或者该多个存储空间中任 一个存储空间的均衡率与该多个存储空间的平均均衡率之差的绝对值大于或 者等于第三预定阔值。 可选地, 处理器 602还用于确定该多个存储空间中被 10访问的 CK的访 问状态为已访问状态; 或者确定该多个存储空间中未被 10访问但被阵列初始 化过的 CK的访问状态为未访问已初始化状态; 或者确定该多个存储空间中未 被 10访问也未被阵列初始化过的 CK的访问状态为未初始化状态。 存储管理装置 600还可执行图 1的方法, 并具备存储管理装置 600在图 1 至图 3所示实施例中的功能, 具体实现可参考图 1至图 3所示实施例, 本发明 实施例在此不再赘述。 本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各示 例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来 实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用 和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现 所描述的功能, 但是这种实现不应认为超出本发明的范围。 所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描述 的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程, 在此不再赘述。 在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和方 法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性 的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另 外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直 接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其它的形式。
单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者 也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元 中。 所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用 时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技 术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以 以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介质中, 包括 若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设 备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前述的存储介质 包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory ) 、 随机存 取存储器 (RAM, Random Access Memory ) 、 磁碟或者光盘等各种可以存储 程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应 所述以权利要求的保护范围为准。

Claims

权利要求
1、 一种存储空间的管理方法, 其特征在于, 包括: 确定多个存储空间中的第一均衡存储空间, 其中所述第一均衡存储空 间为需要进行均衡处理的存储空间;
获取所述第一均衡存储空间中至少一个逻辑块 CK的访问状态,其中所 述至少一个 CK为所述第一均衡存储空间中待迁移的 CK; 根据所述第一均衡存储空间内的至少一个 CK 的访问状态对所述第一 均衡存储空间内的至少一个 CK进行迁移处理。
2、 如权利要求 1所述的方法, 其特征在于, 所述根据所述第一均衡存 储空间内的至少一个 CK 的访问状态对所述第一均衡存储空间内的至少一 个 CK进行迁移处理包括:
根据所述至少一个 CK的访问状态确定所述至少一个 CK的数据迁移策 略;
根据所述至少一个 CK的数据迁移策略对所述至少一个 CK进行迁移处 理。
3、 如权利要求 2所述的方法, 其特征在于, 所述至少一个 CK的数据 迁移策略包括:
如果源 CK的访问状态为已访问状态,则将所述源 CK的数据迁移到目 标 CK, 并将所述源 CK在当前逻辑块组 CKG的位置映射到所述目标 CK 上; 或者
如果源 CK的访问状态为未访问已初始化状态,则将所述目标 CK写全 零, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上; 或者
如果源 CK的访问状态为未初始化状态, 则将所述源 CK在当前 CKG 的位置映射到所述目标 CK上; 其中, 所述源 CK为所述至少一个 CK中的 CK, 所述目标 CK为所述 源 CK的目标存储空间中与所述源 CK对应的 CK, 所述当前 CKG为所述 源 CK所在的 CKG。
4、 如权利要求 1所述的方法, 其特征在于, 所述根据所述第一均衡存 储空间内的至少一个 CK 的访问状态对所述第一均衡存储空间内的至少一 个 CK进行迁移处理包括:
如果源 CK的访问状态为已访问状态,则将所述源 CK的数据迁移到目 标 CK, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上; 或者 如果源 CK的访问状态为未访问已初始化状态,则将所述目标 CK写全 零, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上; 或者
如果源 CK的访问状态为未初始化状态, 则将所述源 CK在当前 CKG 的位置映射到所述目标 CK上;
其中, 所述源 CK为所述至少一个 CK中的 CK, 所述目标 CK为所述 源 CK的目标存储空间中与所述源 CK对应的 CK, 所述当前 CKG为所述 源 CK所在的 CKG。
5、 如权利要求 3或 4所述的方法的, 其特征在于, 所述至少一个 CK 为 10负载较轻的 CKG中属于所述第一均衡存储空间的 CK。
6、 如权利要求 1至 5任一项所述的方法, 其特征在于, 在所述根据所 述第一均衡存储空间内的 CK 的访问状态将所述第一均衡存储空间内的至 少一个 CK分别迁移到所述至少一个 CK中各自 CK对应的目标存储空间之 后, 还包括: 如果所述多个存储空间的均衡率仍然满足均衡处理条件, 则 确定所述多个存储空间中的第二均衡存储空间;
获取所述第二均衡存储空间中至少一个逻辑块 CK的访问状态,其中所 述至少一个 CK为所述第一均衡存储空间中待迁移的 CK; 根据所述第二均衡存储空间内的至少一个 CK 的访问状态对所述第二 均衡存储空间内的至少一个 CK进行迁移处理。
7、 如权利要求 6所述的方法, 其特征在于, 所述均衡处理条件包括: 所述多个存储空间的均衡率的均方差大于或者等于第一预定阔值; 或 者 所述多个存储空间的均衡率的均方差与所述多个存储空间的平均均衡 率的比值大于或者等于第二预定阔值; 或者 所述多个存储空间中任一个存储空间的均衡率与所述多个存储空间的 平均均衡率之差的绝对值大于或者等于第三预定阔值。
8、 如权利要求 1至 7任一项所述的方法, 其特征在于, 所述方法还包 括: 确定所述多个存储空间中被 10访问的 CK的访问状态为已访问状态; 或者 确定所述多个存储空间中未被 10访问但被阵列初始化过的 CK的访问 状态为未访问已初始化状态; 或者 确定所述多个存储空间中未被 10访问也未被阵列初始化过的 CK的访 问状态为未初始化状态。
9、 一种存储管理装置, 其特征在于, 包括: 确定单元, 用于确定多个存储空间中的第一均衡存储空间, 所述第一 均衡存储空间为需要进行均衡处理的存储空间; 获取单元, 用于获取所述第一均衡存储空间中逻辑块 CK的访问状态; 数据迁移单元,用于根据所述第一均衡存储空间内的 CK的访问状态对 所述第一均衡存储空间内的至少一个 CK进行迁移处理, 所述至少一个 CK 为所述第一均衡存储空间中被确定为待迁移的 CK。
10、 如权利要求 9所述的装置, 其特征在于, 所述数据迁移单元包括: 确定子单元,用于才艮据所述至少一个 CK的访问状态确定所述至少一个 CK的数据迁移策略; 数据迁移子单元,用于根据所述至少一个 CK的数据迁移策略对所述至 少一个 CK进行迁移处理。
11、 如权利要求 10所述的装置, 其特征在于, 所述至少一个 CK的数 据迁移策略包括: 如果源 CK的访问状态为已访问状态,则将所述源 CK的数据迁移到目 标 CK, 并将所述源 CK在当前逻辑块组 CKG的位置映射到所述目标 CK 上; 或者
如果源 CK的访问状态为未访问已初始化状态,则将所述目标 CK写全 零, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上; 或者 如果源 CK的访问状态为未初始化状态, 则将所述源 CK在当前 CKG 的位置映射到所述目标 CK上,
其中, 所述源 CK为所述至少一个 CK中的 CK, 所述目标 CK为所述 源 CK的目标存储空间中与所述源 CK对应的 CK, 所述当前 CKG为所述 源 CK所在的 CKG。
12、 如权利要求 9 所述的装置, 其特征在于, 所述数据迁移单元具体 用于:
如果源 CK的访问状态为已访问状态,则将所述源 CK的数据迁移到目 标 CK, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上, 或者 如果源 CK的访问状态为未访问已初始化状态,则将所述目标 CK写全 零, 并将所述源 CK在当前 CKG的位置映射到所述目标 CK上, 或者 如果源 CK的访问状态为未初始化状态, 则将所述源 CK在当前 CKG 的位置映射到所述目标 CK上, 其中, 所述源 CK为所述至少一个 CK中的 CK, 所述目标 CK为所述 源 CK的目标存储空间中与所述源 CK对应的 CK, 所述当前 CKG为所述 源 CK所在的 CKG。
13、 如权利要求 11或 12所述的装置, 其特征在于, 所述至少一个 CK 为 10负载较轻的 CKG中属于所述第一均衡存储空间的 CK。
14、 如权利要求 9至 13任一项所述的装置, 其特征在于, 所述确定单元还用于在所述根据所述第一均衡存储空间内的 CK 的访 问状态将所述第一均衡存储空间内的至少一个 CK分别迁移到所述至少一 个 CK中各自 CK对应的目标存储空间之后,如果所述多个存储空间的均衡 率仍然满足均衡处理条件, 则重新确定所述多个存储空间中的第二均衡存 储空间; 所述获取单元还用于获取所述第二均衡存储空间中 CK的访问状态; 所述数据迁移单元还用于根据所述第二均衡存储空间内的 CK 的访问 状态对所述第二均衡存储空间内的至少一个 CK进行迁移处理,所述至少一 个 CK为所述第二均衡存储空间中被确定为待迁移的 CK。
15、如权利要求 14所述的装置, 其特征在于, 所述均衡处理条件包括: 所述多个存储空间的均衡率的均方差大于或者等于第一预定阔值; 或 者 所述多个存储空间的均衡率的均方差与所述多个存储空间的平均均衡 率的比值大于或者等于第二预定阔值; 或者 所述多个存储空间中任一个存储空间的均衡率与所述多个存储空间的 平均均衡率之差的绝对值大于或者等于第三预定阔值。
16、 如权利要求 9至 15任一项所述的装置, 其特征在于, 所述确定单 元还用于:
确定所述多个存储空间中被 10访问的 CK的访问状态为已访问状态; 或者
确定所述多个存储空间中未被 10访问但被阵列初始化过的 CK的访问 状态为未访问已初始化状态; 或者
确定所述多个存储空间中未被 10访问也未被阵列初始化过的 CK的访 问状态为未初始化状态。
PCT/CN2014/082988 2013-11-27 2014-07-25 存储空间的管理方法和存储管理装置 WO2015078193A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310616035.3A CN103645860B (zh) 2013-11-27 2013-11-27 存储空间的管理方法和存储管理装置
CN201310616035.3 2013-11-27

Publications (1)

Publication Number Publication Date
WO2015078193A1 true WO2015078193A1 (zh) 2015-06-04

Family

ID=50251087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082988 WO2015078193A1 (zh) 2013-11-27 2014-07-25 存储空间的管理方法和存储管理装置

Country Status (2)

Country Link
CN (1) CN103645860B (zh)
WO (1) WO2015078193A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645860B (zh) * 2013-11-27 2017-01-25 华为技术有限公司 存储空间的管理方法和存储管理装置
CN105242967B (zh) * 2015-09-29 2019-06-25 上海新储集成电路有限公司 一种基于dvfs技术的多核系统内混合内存上数据迁移的方法
CN107562380A (zh) * 2017-08-28 2018-01-09 郑州云海信息技术有限公司 一种raid2.0的数据块分配方法及装置
CN111181820A (zh) * 2019-12-31 2020-05-19 智车优行科技(北京)有限公司 用于传输数据的方法和装置、电子设备和存储介质
CN111880747B (zh) * 2020-08-01 2022-11-08 广西大学 一种基于分级映射的Ceph存储系统自动均衡存储方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610287A (zh) * 2009-06-16 2009-12-23 浙江大学 一种应用于分布式海量存储系统的负载均衡方法
CN102156738A (zh) * 2011-04-13 2011-08-17 成都市华为赛门铁克科技有限公司 数据块处理方法、数据块存储设备及系统
US20110246701A1 (en) * 2009-03-24 2011-10-06 Hitachi, Ltd. Storage apparatus and its data control method
CN102841931A (zh) * 2012-08-03 2012-12-26 中兴通讯股份有限公司 分布式文件系统的存储方法及装置
CN103645860A (zh) * 2013-11-27 2014-03-19 华为技术有限公司 存储空间的管理方法和存储管理装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8224782B2 (en) * 2008-09-29 2012-07-17 Hitachi, Ltd. System and method for chunk based tiered storage volume migration
CN102096561B (zh) * 2011-02-09 2012-07-25 成都市华为赛门铁克科技有限公司 分层数据存储处理方法、装置以及存储设备
CN103186350B (zh) * 2011-12-31 2016-03-30 北京快网科技有限公司 混合存储系统及热点数据块的迁移方法
CN102968281A (zh) * 2012-11-26 2013-03-13 华为技术有限公司 一种数据迁移的方法及装置
CN103020255B (zh) * 2012-12-21 2016-03-02 华为技术有限公司 分级存储方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110246701A1 (en) * 2009-03-24 2011-10-06 Hitachi, Ltd. Storage apparatus and its data control method
CN101610287A (zh) * 2009-06-16 2009-12-23 浙江大学 一种应用于分布式海量存储系统的负载均衡方法
CN102156738A (zh) * 2011-04-13 2011-08-17 成都市华为赛门铁克科技有限公司 数据块处理方法、数据块存储设备及系统
CN102841931A (zh) * 2012-08-03 2012-12-26 中兴通讯股份有限公司 分布式文件系统的存储方法及装置
CN103645860A (zh) * 2013-11-27 2014-03-19 华为技术有限公司 存储空间的管理方法和存储管理装置

Also Published As

Publication number Publication date
CN103645860B (zh) 2017-01-25
CN103645860A (zh) 2014-03-19

Similar Documents

Publication Publication Date Title
US9798471B2 (en) Performance of de-clustered disk array by disk grouping based on I/O statistics
US11243706B2 (en) Fragment management method and fragment management apparatus
US10795599B2 (en) Data migration method, host and solid state disk
CN110858124B (zh) 数据迁移方法及装置
US9684467B2 (en) Management of pinned storage in flash based on flash-to-disk capacity ratio
US20210349640A1 (en) Performance Allocation among Users for Accessing Non-volatile Memory Devices
US20140068224A1 (en) Block-level Access to Parallel Storage
JP2014021972A (ja) 複数の仮想マシンとして動作する複数のシステムによって共有されるストレージ・キャッシングでの柔軟性を改善するための方法および構造
US9354826B2 (en) Capacity expansion method and device
JP7467593B2 (ja) リソース割振り方法、記憶デバイス、および記憶システム
JP2020533694A (ja) クラウド・ベースのランクを使用するデータの動的再配置
US11379127B2 (en) Method and system for enhancing a distributed storage system by decoupling computation and network tasks
WO2015078193A1 (zh) 存储空间的管理方法和存储管理装置
CN106201652B (zh) 一种数据处理方法及虚拟机
WO2019047026A1 (zh) 数据迁移的方法、系统及智能网卡
JP6232936B2 (ja) 情報処理装置、記憶装置制御回路及び記憶装置の制御方法
US10671293B2 (en) Topology aware load optimized multipath I/O scheduler
US20140082318A1 (en) Apparatus and Method for Sharing Resources between Storage Devices
WO2017113861A1 (zh) 一种数据访问方法和装置
US11740816B1 (en) Initial cache segmentation recommendation engine using customer-specific historical workload analysis
WO2017008571A1 (zh) 卷的空间分配方法和装置
EP2946300B1 (en) Sata initiator addressing and storage device slicing
US11722564B1 (en) Dynamic command feedback to limit impact of host-copy migration background copy load
US20230333871A1 (en) Host-controlled service levels
US10705905B2 (en) Software-assisted fine-grained data protection for non-volatile memory storage devices

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

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

Country of ref document: EP

Kind code of ref document: A1