WO2015042778A1 - 数据迁移方法、数据迁移装置和存储设备 - Google Patents

数据迁移方法、数据迁移装置和存储设备 Download PDF

Info

Publication number
WO2015042778A1
WO2015042778A1 PCT/CN2013/084093 CN2013084093W WO2015042778A1 WO 2015042778 A1 WO2015042778 A1 WO 2015042778A1 CN 2013084093 W CN2013084093 W CN 2013084093W WO 2015042778 A1 WO2015042778 A1 WO 2015042778A1
Authority
WO
WIPO (PCT)
Prior art keywords
ssd
space usage
data
destination
source
Prior art date
Application number
PCT/CN2013/084093
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 华为技术有限公司
Priority to PCT/CN2013/084093 priority Critical patent/WO2015042778A1/zh
Priority to EP13892079.8A priority patent/EP2942715B1/en
Priority to JP2015551104A priority patent/JP6318173B2/ja
Priority to CN201380001625.3A priority patent/CN104662518B/zh
Priority to HUE13892079A priority patent/HUE035390T2/en
Priority to US14/662,928 priority patent/US9733844B2/en
Publication of WO2015042778A1 publication Critical patent/WO2015042778A1/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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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/0688Non-volatile semiconductor memory arrays
    • 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
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7204Capacity control, e.g. partitioning, end-of-life degradation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7208Multiple device management, e.g. distributing data over multiple flash devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling

Definitions

  • Data migration method data migration device, and storage device
  • the present invention relates to storage technologies, and in particular, to a data migration method, a data migration device, and a storage device. Background technique
  • Nand Flash Flash Memory
  • SSDs solid state devices
  • SSDs solid state drives
  • SSDs Since SSDs have a limited number of erasures, each read and write operation to the SSD (also known as an erase operation) is a degree of wear on the SSD. Therefore, the life of an SSD is related to the degree of wear. The higher the wear, the shorter the life.
  • Embodiments of the present invention provide a data migration method, apparatus, and storage device to improve the service life of an SSD storage array.
  • An embodiment of the present invention provides a data migration method, where the method is applied to a storage system, where the storage system includes a disk group, and the disk group includes a plurality of solid state disk SSDs. Determining a source SSD in the disk group, where a space usage rate of the source SSD is higher than an average space usage rate of the disk group;
  • the data of the source SSD is migrated to the destination SSD according to the amount of data migrated by the source SSD.
  • the destination SSD is another SSD of the hard disk group except the source SSD.
  • the destination SSD is an SSD in which the space usage rate in the hard disk group is lower than the average space usage rate.
  • the destination SSD is a preset SSD corresponding to the source SSD.
  • the determining, by the determining, the at least one destination SSD in the hard disk group includes: determining, according to load balancing, at least one destination SSD in the hard disk group.
  • the migrating the data of the source SSD to the destination SSD according to the data volume that is migrated by the source SSD includes:
  • the data of the source SSD is migrated to each of the destination SSDs according to the amount of migrated data and the amount of migrated data of each of the destination SSDs.
  • the space usage rate and the average space usage rate according to the destination SSD are Calculating the amount of data to move into each destination SSD includes:
  • the calculating, according to the space usage rate of the source SSD and the average space usage rate, the amount of data migrated by the source SSD includes:
  • the resulting product is the amount of data that the source SSD migrates out.
  • a second aspect of the embodiments of the present invention provides a data migration apparatus, where the apparatus includes: a determining module, configured to determine a source SSD in a hard disk group, where a space usage rate of the source SSD is higher than an average of the hard disk group Space usage rate; and determining at least one destination SSD in the hard disk group;
  • a calculation module configured to calculate, according to the space usage rate of the source SSD and the average space usage, the amount of data migrated by the source SSD;
  • a migration module configured to migrate data of the source SSD to the destination SSD according to the amount of data migrated by the source SSD.
  • the destination SSD is another SSD of the hard disk group except the source SSD.
  • the destination SSD is an SSD in which the space usage rate in the hard disk group is lower than the average space usage rate.
  • the destination SSD is a preset SSD corresponding to the source SSD
  • the migration module is specifically configured to use a space usage rate according to the destination SSD. And calculating the amount of the migrated data of each destination SSD according to the average space usage rate; and migrating the data of the source SSD to the location according to the amount of the migrated data and the amount of the migrated data of each destination SSD Described in each destination SSD.
  • the migration module is specifically configured to obtain a space usage rate of each target SSD. Deriving the difference between the average space usage rates; multiplying the difference between the space usage rate of the each destination SSD and the average space usage rate by the available physical capacity of each destination SSD, and the resulting product is The amount of data moved by each destination SSD.
  • the calculating module is specifically configured to obtain a difference between a spatial usage rate of the source SSD and the average space usage rate; The difference between the space usage rate of the SSD and the average space usage rate is multiplied by the available physical capacity of the source SSD, and the resulting product is the amount of data that the source SSD migrates out.
  • a third aspect of the embodiments of the present invention provides a storage device, including:
  • processor a processor, a memory, a system bus, and a communication interface, wherein the processor, the memory, and the communication interface are connected by the system bus and complete communication with each other;
  • the communication interface is configured to communicate with a storage device
  • the memory is configured to store a computer execution instruction
  • the processor is configured to execute the computer to execute an instruction, and execute the data migration method according to the first aspect.
  • a fourth aspect of the embodiments of the present invention provides a computer program product, comprising: a computer readable storage medium storing a program code, the program code comprising instructions for performing the data migration method according to the first aspect.
  • the data in the SSD whose space usage rate is higher than the average space usage rate of the hard disk group is migrated to the determined destination SSD, so that the space usage rate of each SSD in the hard disk group tends to the average The space utilization rate, thereby achieving wear leveling, prolongs the service life of the hard disk unit.
  • FIG. 1 is a schematic diagram of an application network architecture of a data migration method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a data migration method according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a storage device according to an embodiment of the present invention. detailed description
  • the system architecture of the embodiment of the present invention is a system architecture diagram of a method for managing a storage array according to an embodiment of the present invention.
  • the storage system includes a controller 11 and a storage device 22.
  • the storage device 22 is illustrated by using a solid state disk (SSD) as an example.
  • SSD solid state disk
  • Solid state drives, also known as solid state drives (SSDs), are referred to as hard drives.
  • FIG. 1 is only an exemplary description, and is not limited to a specific networking manner, such as: a cascading tree network or a ring network. As long as the controller 11 and the storage device 22 can communicate with each other.
  • Controller 11 may comprise any computing device known in the art, such as a server, desktop computer, or the like. Inside the controller, an operating system and other applications are installed. The controller 11 can manage the storage device 22, such as controlling data migration in the storage device.
  • Storage device 22 may include storage devices known in the art, such as SSDs, or direct access storage. Direct Access Storage Device (DASD), etc.
  • the storage device 22 is taken as an example of an SSD.
  • N physical SSDs form a storage array, which can also be called a disk group.
  • the basic idea of a storage array is to combine multiple relatively inexpensive hard drives to achieve performance that exceeds even an expensive hard drive.
  • the number of physical SSDs in a storage array must not be less than a certain lower limit, for example, 10.
  • the number of physical SSDs in a storage array must not exceed an upper limit, for example, 30.
  • the N physical SSDs included in the storage array may be SSDs of different capacities and different capacities, or SSDs of different capacities of different models, or SSDs of different capacities of the same model, or SSDs of the same capacity of the same model.
  • the SSDs in the embodiments of the present invention refer to physical SSDs.
  • Each physical SSD can be divided into fine-grained data blocks of the same size (Chunk, CK)
  • Chunk can also be called a logical SSD.
  • RAID Redundant Array of Independent Disks
  • CKG Chunk Group
  • RAID Redundant array of independent hard disks
  • Step S201 Determine a source SSD in the hard disk group, where a space usage rate of the source SSD is higher than an average space usage rate of the hard disk group.
  • an SSD with a space usage rate higher than an average space usage rate of the disk group is used as a source SSD, and an average space usage rate of the disk group refers to a user write data amount of the disk group and a disk group.
  • the ratio between the available physical capacities, the space usage of the SSD is the ratio of the amount of user write data for the SSD to the available physical capacity of the SSD.
  • the amount of data written by the user of the hard disk group refers to the sum of the amount of data written by the user of each SSD of the disk group.
  • the available physical capacity of the disk group refers to the total available physical capacity of each SSD of the disk group.
  • a disk group can be regarded as an SSD storage array.
  • an SSD is composed of multiple blocks. During long-term use, some blocks may fail to be read or written due to programming errors or erasure errors, and are therefore referred to as bad blocks.
  • the increase in space usage is often caused by an increase in the number of bad blocks in the SSD. Therefore, determining the source SSD in the disk group can be implemented by monitoring the capacity of the bad blocks of each SSD in the disk group. When the capacity of the bad block of an SSD exceeds a preset threshold, the space usage rate is also Will be higher than the average space usage of the hard disk group.
  • some hardware failures may also cause increased space usage of the SSD, such as pin damage to the Flash particles.
  • the controller can monitor the capacity of the bad block of each SSD in the disk group in real time. When the capacity of the bad block of an SSD exceeds a preset threshold, the space usage rate can be considered to be increased.
  • the controller can monitor the space usage rate of each SSD in the disk group in real time. When the space usage rate of an SSD is higher than the average space usage rate, determine the source SSD in the disk group. Or, when the space usage of an SSD is higher than the average space usage, it is automatically reported to the controller.
  • the controller can monitor the user visible capacity of each SSD in the hard disk group in real time, and when the visible capacity of the user of the SSD is reduced, determine the source SSD in the hard disk group; or, when When the SSD user sees a decrease in capacity, it is automatically reported to the controller.
  • its internal storage space can be divided into two parts: data storage space and redundant space. The size of the SSD's data storage space is the user's visible capacity.
  • the redundant space of the SSD refers to the NAND Flash storage space provided by the SSD beyond the user's visible capacity. Taking a 400GB SSD as an example, the disk actually contains 512GB of NAND Flash particles, but the user has a visible capacity of only 400GB and an extra 112GB as redundant space. Due to NAND Flash during long-term use, bad blocks may occur due to programming errors or erasure errors. Since bad blocks cannot be read or written, data stored in bad blocks needs to be migrated to the redundant space of the SSD. Bad blocks are marked inside the SSD, and these marked bad blocks are no longer used. The redundant space is mainly used to replace bad blocks, ensuring that the SSD always has 400 GB of data storage space during use.
  • Step S202 Determine at least one destination SSD in the hard disk group.
  • the source SSD In order to reduce the space usage of the source SSD, its stored data can be migrated to other SSDs of the disk group. To this end, at least one destination SSD needs to be determined from the disk group.
  • SSDs other than the source SSD in the hard disk group may be used as a purpose.
  • an SSD in which the space usage rate of the hard disk group is lower than the average space usage rate may be used as the destination SSD.
  • mapping between the source SSD and the destination SSD may be set in advance, and the source SSD is used to query the corresponding relationship to obtain the destination SSD.
  • the load status of each SSD in the disk group is obtained separately, and the destination SSD is determined according to the load balancing principle.
  • Step S203 Calculate the amount of data migrated by the source SSD according to the space usage rate of the source SSD and the average space usage rate.
  • the amount of data that the source SSD migrates refers to the amount of data that is migrated in order to make the space usage rate of the source SSD reach the average space usage rate.
  • a difference between a spatial usage rate of the source SSD and the average space usage rate may be obtained; multiplied by a difference between a spatial usage rate of the source SSD and the average space usage rate.
  • the available physical capacity of the source SSD, and the resulting product is the amount of data that the source SSD migrates out.
  • the amount of data written by the user of the source SSD and the available physical capacity of the source SSD may be obtained; the amount of data written by the user of the source SSD minus the available physical capacity of the source SSD and The product between the average space usage rates, and the resulting difference is the amount of data that the source SSD migrates out.
  • step S202 there is no order between step S202 and step S203.
  • Step S204 The data of the source SSD is migrated to the destination SSD according to the amount of data migrated by the source SSD.
  • the data in the source SSD is moved in chunks, and the size of each chunk is fixed. Therefore, the amount of data migrated by the source SSD can be divided by the size of the chunk to obtain the size.
  • the number of chunks that are migrated out of the source SSD. In the case that the divisible is not divisible, the number of chunks from which the source SSD is moved out may be calculated by rounding off the remainder.
  • the data in the SSD whose space usage rate is higher than the average space usage rate of the hard disk group is migrated to the determined destination SSD, so that the space usage rate of each SSD in the hard disk group tends to the average Space utilization, thereby achieving wear leveling, extending the The life of the hard disk group.
  • step S204 may specifically include:
  • Step S2041 Calculate the amount of data to be moved for each destination SSD according to the space usage rate of the destination SSD and the average space usage rate.
  • the amount of data to be migrated for each destination SSD refers to the amount of data moved in order to make the space usage rate of each destination SSD reach the average space usage rate.
  • a difference between a space usage rate of each destination SSD and the average space usage rate may be obtained; a difference between a space usage rate of the each destination SSD and the average space usage rate Multiplying the available physical capacity of each destination SSD, the resulting product is the amount of data moved by each of the destination SSDs.
  • the amount of data written by the user of each destination SSD and the available physical capacity of each destination SSD may be obtained; the product of the available physical capacity of each destination SSD and the average space usage is subtracted from each of said each The amount of data written by the user of the destination SSD, and the difference obtained is the amount of data moved by each of the destination SSDs.
  • the amount of the migrated data may be divided by the number of destination SSDs to obtain the amount of data that each destination SSD migrates.
  • Step S2042 The data of the source SSD is migrated to each destination SSD according to the amount of migrated data and the amount of migrated data of each destination SSD.
  • the data in each destination SSD is moved in chunks, and the size of each chunk is fixed. Therefore, the amount of data moved by each destination SSD can be divided by the size of the chunk. Obtain the number of chunks that each destination SSD migrates into. In the case where the divisible is not divisible, the number of chunks into which each destination SSD is moved can be calculated by rounding off the remainder.
  • N chunks can be randomly selected from the source SSD, and each chunk of the N chunks is sequentially according to the preset disc selection algorithm and the number of chunks moved by each destination SSD. An idle chunk is determined in the destination SSD, and then the data stored in the N chunks of the source SSD is separately migrated to the destination SSD.
  • the SSD that generates the bad block can be determined as the source SSD, and the space usage rate is greater than the average space usage rate of 0.4720.
  • the source needs to be The data of the SSD is migrated to other SSDs. Here, take the remaining 8 SSDs as the destination SSD as an example.
  • the source SSD data can be migrated to each destination SSD in chunks according to the amount of migrated data of the source SSD and the amount of migrated data of each destination SSD.
  • the data migration is completed.
  • the space utilization of each SSD in a disk group is equal to the average space usage. This shows that the wear level of each SSD is balanced, which extends the service life of the entire SSD storage array.
  • FIG. 3 it is a structural diagram of a data migration device according to an embodiment of the present invention.
  • the device includes:
  • the determining module 301 is configured to determine a source SSD in the hard disk group, wherein a space usage rate of the source SSD is higher than an average space usage rate of the hard disk group; and determining at least one destination SSD in the hard disk group.
  • the calculating module 302 is configured to calculate, according to the space usage rate of the source SSD and the average space usage rate, the amount of data migrated by the source SSD.
  • a migration module 303 configured to: according to the amount of data migrated by the source SSD, the source SSD The data is migrated to the destination SSD.
  • the destination SSD is another SSD in the hard disk group except the source SSD.
  • the destination SSD is an SSD in which the space usage rate in the hard disk group is lower than the average space usage rate.
  • the destination SSD is a preset SSD corresponding to the source SSD.
  • the migration module 303 is specifically configured to calculate, according to the space usage rate of the destination SSD and the average space usage rate, an amount of data to be migrated for each destination SSD; according to the amount of data to be migrated and each destination The amount of data moved into the SSD, and the data of the source SSD is migrated to each of the destination SSDs. Specifically, a difference between a space usage rate of each destination SSD and the average space usage rate may be obtained; multiplied by a difference between a space usage rate of the each destination SSD and the average space usage rate With the available physical capacity of each destination SSD, the resulting product is the amount of data moved by each of the destination SSDs.
  • the calculating module 302 is specifically configured to obtain a difference between a space usage rate of the source SSD and the average space usage rate, and a space usage rate between the source SSD and the average space usage rate. The difference is multiplied by the available physical capacity of the source SSD, and the resulting product is the amount of data that the source SSD migrates out.
  • the device provided by the embodiment of the present invention may be configured in the controller described in the foregoing embodiment, and is used to perform the data migration method described in the foregoing embodiment.
  • the device provided by the embodiment of the present invention may be configured in the controller described in the foregoing embodiment, and is used to perform the data migration method described in the foregoing embodiment.
  • the space usage rate is higher than the average space usage rate of the hard disk group.
  • the data in the SSD is migrated to the determined destination SSD, so that the space usage rate of each SSD in the disk group tends to the average space usage rate, thereby achieving wear leveling and prolonging the service life of the disk group.
  • a storage device 1200 includes:
  • a processor 101 a memory 102, a system bus (abbreviated as bus) 105, and a communication interface 103.
  • the processor 101, the memory 102 and the communication interface 103 are connected and completed by the system bus 105. Into each other's communication.
  • Processor 101 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 102 can be a high speed RAM memory or a non-volatile memory, for example at least one hard disk memory.
  • Communication interface 103 is used to communicate with the storage device.
  • Memory 102 is used to store computer execution instructions 1021. Specifically, the program code may be included in the computer execution instruction 1021.
  • the processor 101 executes the computer execution instructions 1021, and the method flow described in FIG. 2 can be performed.
  • the embodiment of the invention further provides a computer program product for data processing, comprising a computer readable storage medium storing program code, the program code comprising instructions for executing the method flow described in FIG.
  • the data in the SSD whose space usage rate is higher than the average space usage rate of the hard disk group is migrated to the determined destination SSD, so that the space usage rate of each SSD in the hard disk group tends to the average
  • the space utilization rate thereby achieving wear leveling, prolongs the service life of the hard disk unit.
  • aspects of the invention, or possible implementations of various aspects may be embodied as a system, method, or computer program product.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored on a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium Quality.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM).
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can be executed entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or server.
  • the functions noted in the various steps in the flowcharts or in the blocks in the block diagrams may not occur in the order noted.
  • two steps, or two blocks, shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order.

Abstract

本发明实施例提供了一种数据迁移方法、装置和存储设备,所述方法包括:确定所述硬盘组中的源 SSD,其中所述源 SSD的空间使用率高于所述硬盘组的平均空间使用率;确定所述硬盘组中的至少一个目的 SSD;根据所述源 SSD的空间使用率和所述平均空间使用率,计算所述源 SSD迁出的数据量;根据所述源 SSD迁出的数据量,将所述源 SSD的数据迁移至所述目的 SSD中。可以延长 SSD存储阵列的使用寿命。

Description

数据迁移方法、 数据迁移装置和存储设备 技术领域
本发明涉及存储技术, 尤其涉及一种数据迁移方法、 数据迁移装置和存 储设备。 背景技术
Nand Flash (闪存存储器)是一种非易失性存储器, 具有断电后数据不消 失的特点, 因此, 被广泛的作为外部和内部存储器使用。 比如近年来越来越 多地用于计算机系统的固态硬盘(Solid State Device, SSD ) , 就^^于闪 存存储器实现的。 固态硬盘, 也可以称为固态驱动器(Solid State Drive, SSD ) 。 由于 SSD具有擦除次数有限的特点, 每次对 SSD的读写操作 (也 可以称为擦除操作) , 是对 SSD—定程度上的磨损。 因此 SSD的寿命和磨 损度有关, 磨损度越高, 寿命越短。 由于 NAND Flash在长期使用过程中, 会因为编程错误或擦除错误出现坏块, 而坏块增多会导致对整个 SSD内的 NAND Flash的读写次数增加,磨损度会增高,从而缩短该 SSD的使用寿命。
如今,为了满足大数据存储的需求,通常需要把多个 SSD组成 SSD存储 阵列。如果 SSD存储阵列中的一个 SSD由于坏块增多而导致该 SSD的寿命 缩短, 那么 SSD存储阵列的寿命也会缩短。 也就是说, SSD存储阵列的寿 命取决于其包含的寿命最短的 SSD。
发明内容
本发明实施例提供了一种数据迁移方法、 装置和存储设备, 以提高 SSD存储阵列的使用寿命。
本发明实施例一方面提供了一种数据迁移方法, 所述方法应用于存储 系统中, 所述存储系统包括硬盘组, 所述硬盘组包括多个固态硬盘 SSD; 所述方法包括: 确定所述硬盘组中的源 SSD , 其中所述源 SSD 的空间使用率高于所 述硬盘组的平均空间使用率;
确定所述硬盘组中的至少一个目的 SSD;
根据所述源 SSD 的空间使用率和所述平均空间使用率, 计算所述源 SSD迁出的数据量;
根据所述源 SSD迁出的数据量, 将所述源 SSD的数据迁移至所述目 的 SSD中。
在本发明实施例第一方面的第一种实施方式中,所述目的 SSD是所述 硬盘组中除源 SSD的其他 SSD。
在本发明实施例第一方面的第二种实施方式中, 所述目的 SSD 是所 述硬盘组中的空间使用率低于所述平均空间使用率的 SSD。
在本发明实施例第一方面的第三种实施方式中,所述目的 SSD是预先 设定的所述源 SSD对应的 SSD。
在本发明实施例第一方面的第四种实施方式中, 所述确定所述硬盘组 中的至少一个目的 SSD包括:根据负载均衡确定所述硬盘组中的至少一个 目的 SSD。
在本发明实施例第一方面的第五种实施方式中, 所述根据所述源 SSD 迁出的数据量, 将所述源 SSD的数据迁移至所述目的 SSD中包括:
根据所述目的 SSD的空间使用率和所述平均空间使用率,计算每个目 的 SSD的迁入数据量;
根据所述迁出的数据量以及所述每个目的 SSD的迁入数据量,将所述 源 SSD的数据迁移至所述每个目的 SSD中。
结合本发明实施例第一方面的第五种实施方式, 在本发明实施例第一 方面的第六种实施方式中,所述根据所述目的 SSD的空间使用率和所述平 均空间使用率, 计算每个目的 SSD的迁入数据量包括:
获得每个目的 SSD的空间使用率与所述平均空间使用率之间的差值; 用所述每个目的 SSD的空间使用率与所述平均空间使用率之间的差 值乘以每个目的 SSD的可用物理容量, 所得的乘积为所述每个目的 SSD 迁入的数据量。
在本发明实施例第一方面的第七种实施方式中, 所述根据所述源 SSD 的空间使用率和所述平均空间使用率, 计算所述源 SSD 迁出的数据量包 括:
获得所述源 SSD的空间使用率与所述平均空间使用率之间的差值; 用所述源 SSD的空间使用率与所述平均空间使用率之间的差值乘以 所述源 SSD的可用物理容量, 所得的乘积为所述源 SSD迁出的数据量。
本发明实施例第二方面提供了一种数据迁移装置, 所述装置包括: 确定模块, 用于确定硬盘组中的源 SSD, 其中所述源 SSD 的空间使 用率高于所述硬盘组的平均空间使用率; 以及确定所述硬盘组中的至少一 个目的 SSD;
计算模块, 用于根据所述源 SSD 的空间使用率和所述平均空间使用 率, 计算所述源 SSD迁出的数据量;
迁移模块, 用于根据所述源 SSD迁出的数据量, 将所述源 SSD的数 据迁移至所述目的 SSD中。
在本发明实施例第二方面的第一种实施方式中,所述目的 SSD是所述 硬盘组中除源 SSD的其他 SSD。
在本发明实施例第二方面的第二种实施方式中, 所述目的 SSD 是所 述硬盘组中的空间使用率低于所述平均空间使用率的 SSD。
在本发明实施例第二方面的第三种实施方式中,所述目的 SSD是预先 设定的所述源 SSD对应的 SSD; 所述迁移模块, 具体用于根据所述目的 SSD的空间使用率和所述平均空间使用率, 计算每个目的 SSD的迁入数 据量; 根据所述迁出的数据量以及所述每个目的 SSD的迁入数据量,将所 述源 SSD的数据迁移至所述每个目的 SSD中。 结合本发明实施例第二方面的第四种实施方式, 在本发明实施例第二 方面的第五种实施方式中, 所述迁移模块, 具体用于获得每个目的 SSD的 空间使用率与所述平均空间使用率之间的差值;用所述每个目的 SSD的空 间使用率与所述平均空间使用率之间的差值乘以每个目的 SSD的可用物 理容量, 所得的乘积为所述每个目的 SSD迁入的数据量。
在本发明实施例第二方面的第六种实施方式中, 所述计算模块, 具体 用于获得所述源 SSD的空间使用率与所述平均空间使用率之间的差值;用 所述源 SSD的空间使用率与所述平均空间使用率之间的差值乘以所述源 SSD的可用物理容量, 所得的乘积为所述源 SSD迁出的数据量。
本发明实施例第三方面提供了一种存储设备, 包括:
处理器、 存储器、 系统总线和通信接口, 所述处理器、 所述存储器 和所述通信接口之间通过所述系统总线连接并完成相互间的通信;
所述通信接口, 用于与存储设备通信;
所述存储器, 用于存储计算机执行指令;
所述处理器, 用于运行所述计算机执行指令, 执行如第一方面所述 的数据迁移方法。
本发明实施例第四方面提供了一种计算机程序产品, 包括存储了程 序代码的计算机可读存储介质, 所述程序代码包括的指令用于执行如第 一方面所述的数据迁移方法。 在本发明实施例中, 将空间使用率高于硬盘组的平均空间使用率的 SSD中的数据迁移至确定出的目的 SSD中, 使得硬盘组中的各个 SSD的 空间使用率趋于所述平均空间使用率, 从而实现了磨损均衡, 延长了所述 硬盘组的使用寿命。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不 付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的一种数据迁移方法的应用网络架构示意图; 图 2为本发明实施例提供的一种数据迁移方法的流程图;
图 3为本发明实施例提供的一种数据迁移装置的结构示意图;
图 4为本发明实施例提供的一种存储设备的结构示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例的系统架构 为本发明实施例提供的存储阵列的管理方法的系统架构示意图,如图 1所示, 该存储系统包括控制器 11和存储设备 22。 本实施例中, 存储设备 22以固态 硬盘(Solid State Device, SSD )为例说明。 固态硬盘, 也可以称为固态驱动 器 ( Solid State Drive, SSD ) , 简称为硬盘。
图 1仅是示例性说明, 并不限定具体的组网方式, 如: 级联树形组网、 环状组网都可以。 只要控制器 11和存储设备 22之间能够相互通信。
控制器 11可以包括当前技术已知的任何计算设备, 如服务器、 台式计算 机等等。 在控制器内部, 安装有操作系统以及其他应用程序。 控制器 11可以 对存储设备 22进行管理, 比如控制存储设备中的数据迁移。
存储设备 22可以包括当前技术已知的存储设备,如 SSD、或直接存取存 储器 ( Direct Access Storage Device, DASD )等。 图 1中, 以存储设备 22为 SSD为例说明。 N个物理 SSD组成存储阵列 ( storage array ) , 也可以称为 disk group。 存储阵列的基本思想就是把多个相对便宜的硬盘组合起来, 使性 能达到甚至超过一个价格昂贵、容量巨大的硬盘。一个存储阵列中的物理 SSD 数量 N不得少于某个下限, 例如 10个; 一个存储阵列中的物理 SSD数量 N 不得多于某个上限, 例如 30个。 具体地, 该存储阵列包含的 N个物理 SSD, 可以是不同型号不同容量的 SSD, 或者是不同型号相同容量的 SSD, 或者相 同型号不同容量的 SSD、 或者相同型号相同容量的 SSD。
除非特别指明, 本发明实施例所称 SSD, 均指物理 SSD。
每个物理 SSD可以被划分为细粒度的尺寸相同的数据块(Chunk, CK )
221。 Chunk也可以称为逻辑 SSD。
而且,多个 CK可以按照指定类型的独立硬盘冗余数组( Redundant Array of Independent Disks , RAID )组成逻辑空间, 该逻辑空间就是一个数据块组 ( Chunk Group, CKG ) 。 一个 CKG所包含的各个 CK必须属于不同 SSD。 独立硬盘冗余数组, 又称廉价硬盘冗余数组(Redundant Array of Inexpensive Disks, RAID ) 。
当某个 SSD中出现大量坏块时, 空间使用率就会增高, SSD的寿命就 会缩短。 而 SSD存储阵列的寿命又取决于其包含的寿命最短的 SSD。 因此, 为了使 SSD存储阵列的寿命延长,可以将空间使用率超过 SSD存储阵列的平 均空间使用率的 SSD中的部分数据迁移到 SSD存储阵列的其他 SSD中, 使 得各个 SSD的磨损度均衡。 数据迁移方法
下面介绍本发明实施例提供的数据迁移方法, 如图 2所示, 为本发明实 施例提供的数据迁移方法的流程图, 执行下述步骤的可以是控制器中的处理 器, 参见图 2 , 所述方法包括: 步骤 S201 : 确定所述硬盘组中的源 SSD, 其中所述源 SSD的空间使 用率高于所述硬盘组的平均空间使用率。
在本发明实施例中, 将空间使用率高于所述硬盘组的平均空间使用率 的 SSD作为源 SSD , 所述硬盘组的平均空间使用率是指硬盘组的用户写 入数据量与硬盘组的可用物理容量之间的比值, SSD的空间使用率是指该 SSD的用户写入数据量与该 SSD的可用物理容量之间的比值。 其中, 硬 盘组的用户写入数据量是指所述硬盘组的各个 SSD的用户写入数据量的 总和,硬盘组的可用物理容量是指所述硬盘组的各个 SSD的可用物理容量 的总和。
需要说明的是,在本发明实施例中, 一个硬盘组可以视作一个 SSD存 储阵列。
在物理上, SSD是由多个 block组成的,在长期使用过程中,某些 block 会因为编程错误或擦除错误发生故障, 不能进行读写操作, 因此被称作坏块。 对于一个 SSD而言, 其空间使用率增高往往是由该 SSD的坏块数目增多造 成的。 因此, 确定所述硬盘组中的源 SSD可以通过监控所述硬盘组中各个 SSD的坏块的容量来实现, 当某个 SSD的坏块的容量超过预设阔值时, 其 空间使用率也会高于所述硬盘组的平均空间使用率。 此外, 一些硬件方面 的故障也可能引起 SSD的空间使用率增高,例如 Flash颗粒的引脚损坏等。
可选的, 可以由控制器实时监控硬盘组中每个 SSD的坏块的容量, 当 某个 SSD的坏块的容量超过预设阔值时, 则可以认为其空间使用率增高, 将其确定为源 SSD; 或者, 当某个 SSD的坏块的容量超过预设阔值时, 自 动上报给控制器。
可选的, 可以由控制器实时监控硬盘组中每个 SSD的空间使用率, 当 某个 SSD的空间使用率高于平均空间使用率时,将其确定为所述硬盘组中 的源 SSD; 或者, 当某个 SSD的空间使用率高于平均空间使用率时, 自动 上报给控制器。 可选的, 可以由控制器实时监控硬盘组中每个 SSD的用户可见容量, 当某个 SSD的用户可见容量降低时, 将其确定为所述硬盘组中的源 SSD; 或者, 当某个 SSD的用户可见容量降低时, 自动上报给控制器。 对于一个 SSD来说, 其内部的存储空间可以分为两部分: 数据存储空间和冗余空间。 SSD的数据存储空间的大小就是用户可见容量。 SSD的冗余空间, 是指 SSD 提供的超出用户可见容量的 NAND Flash存储空间。 以 400GB的 SSD为例, 该盘实际包含了 512GB的 NAND Flash颗粒, 但用户可见容量只有 400GB , 多出的 112GB作为冗余空间。 由于 NAND Flash在长期使用过程中, 会因为 编程错误或擦除错误出现坏块。 由于坏块是不能进行读写操作的, 因此需要 将坏块中存储的数据迁移到 SSD的冗余空间中, SSD内部会对坏块进行标记, 后续将不再使用这些已标记的坏块。 而冗余空间主要用于替换坏块, 确保该 SSD在使用过程中始终具有 400GB的数据存储空间。
步骤 S202 : 确定所述硬盘组中的至少一个目的 SSD。
为了降低源 SSD的空间使用率, 可以将其存储的数据迁移至所述硬盘 组的其他 SSD中。 为此, 需要从所述硬盘组中确定至少一个目的 SSD。
可选的, 可以将所述硬盘组中除源 SSD以外的其他 SSD都作为目的
SSD。
可选的, 可以将所述硬盘组中空间使用率低于所述平均空间使用率的 SSD作为目的 SSD。
可选的,可以预先设置源 SSD与目的 SSD之间的对应关系,通过源 SSD 在所述对应关系中查询获得目的 SSD。
可选的, 可以分别获得所述硬盘组中每个 SSD的负载情况, 根据负载 均衡原则确定目的 SSD。
需要说明的是, 由上面的描述可知目的 SSD可以是所述硬盘组中除源 SSD以外的所有 SSD , 也可以是所述硬盘组中除源 SSD以外的部分 SSD , 在 此不作限定。 步骤 S203 : 根据所述源 SSD的空间使用率和所述平均空间使用率, 计算所述源 SSD迁出的数据量。
在本发明实施例中,所述源 SSD迁出的数据量是指为了使所述源 SSD 的空间使用率达到所述平均空间使用率, 而迁出的数据量。
可选的,可以获得所述源 SSD的空间使用率与所述平均空间使用率之 间的差值;用所述源 SSD的空间使用率与所述平均空间使用率之间的差值 乘以所述源 SSD的可用物理容量, 所得的乘积为所述源 SSD迁出的数据 量。
可选的, 可以获得所述源 SSD的用户写入的数据量和所述源 SSD的 可用物理容量; 用所述源 SSD的用户写入的数据量减去所述源 SSD的可 用物理容量与所述平均空间使用率之间的乘积, 所得的差值为所述源 SSD 迁出的数据量。
需要说明的是, 步骤 S202和步骤 S203之间没有先后顺序之分。
步骤 S204: 根据所述源 SSD迁出的数据量, 将所述源 SSD的数据迁 移至所述目的 SSD中。
在本发明实施例中, 源 SSD中的数据的迁出是以 chunk为单位的,每 个 chunk的大小固定,因此,可以根据所述源 SSD迁出的数据量除以 chunk 的大小, 获得所述源 SSD中迁出的 chunk的个数。 在不能整除的情况下, 可以釆用对余数四舍五入的方式,计算获得所述源 SSD迁出的 chunk的个 数。
需要说明的是, 由于数据迁移是以 chunk为单位进行迁移的, 所以经 过数据迁移,硬盘组中每个 SSD的空间使用率近似等于所述平均空间使用 率, 可以不保证绝对相等。
在本发明实施例中, 将空间使用率高于硬盘组的平均空间使用率的 SSD中的数据迁移至确定出的目的 SSD中, 使得硬盘组中的各个 SSD的 空间使用率趋于所述平均空间使用率, 从而实现了磨损均衡, 延长了所述 硬盘组的使用寿命。
可选的, 在上述实施例中, 步骤 S204可以具体包括:
步骤 S2041:根据所述目的 SSD的空间使用率和所述平均空间使用率, 计算每个目的 SSD的迁入数据量。
在本发明实施例中 ,所述每个目的 SSD的迁入数据量是指为了使每个 目的 SSD的空间使用率达到所述平均空间使用率, 而迁入的数据量。
由于确定出的目的 SSD可以不止一个, 因此需要分别计算每个目的 SSD的迁入数据量。
可选的,可以获得每个目的 SSD的空间使用率与所述平均空间使用率 之间的差值;用所述每个目的 SSD的空间使用率与所述平均空间使用率之 间的差值乘以每个目的 SSD的可用物理容量,所得的乘积为所述每个目的 SSD迁入的数据量。
可选的,可以获得每个目的 SSD的用户写入的数据量和每个目的 SSD 的可用物理容量;用每个目的 SSD的可用物理容量与所述平均空间使用率 的乘积减去所述每个目的 SSD的用户写入的数据量,所得的差值为所述每 个目的 SSD迁入的数据量。
可选的, 可以用所述迁出的数据量除以目的 SSD的个数,从而获得每 个目的 SSD迁入的数据量。
步骤 S2042:根据所述迁出的数据量以及所述每个目的 SSD的迁入数 据量, 将所述源 SSD的数据迁移至所述每个目的 SSD中。
在本发明实施例中,每个目的 SSD中的数据的迁入是以 chunk为单位 的, 每个 chunk的大小固定, 因此, 可以根据每个目的 SSD迁入的数据量 除以 chunk的大小, 获得每个目的 SSD迁入的 chunk的个数。 在不能整除 的情况下, 可以釆用对余数四舍五入的方式,计算获得每个目的 SSD迁入 的 chunk的个数。
可选的, 在计算出源 SSD待迁出的 chunk的个数(假设为 N, N为大 于 1的自然数)之后, 可以从所述源 SSD中随机选取 N个 chunk, 根据预 设的选盘算法以及每个目的 SSD迁入的 chunk的个数,依次为 N个 chunk 中的每个 chunk在目的 SSD中确定一个空闲的 chunk, 然后将所述源 SSD 的 N个 chunk中存储的数据分别迁移至目的 SSD中。
例如, 首先确定所述源 SSD的第 i个 chunk, 其中, i为自然数, 且 0
< i < N+l ;
根据每个目的 SSD待迁入的 chunk的个数, 以及预设的选盘算法, 在 所述硬盘组除源 SSD外的其他 SSD中确定一个空闲的 chunk,所述空闲的 chunk所在的 SSD, 与所述第 i个 chunk所属的 CKG中包含的其他 chunk 所在的 SSD不相同;
将所述源 SSD的第 i个 chunk中存储的数据迁移至所述空闲的 chunk 中;
当 i < N时, i=i+l , 继续确定所述源 SSD的第 i个 chunk。 下面以一个具体的示例来描述数据的迁移过程,假设硬盘组( disk group ) 中总共有 9个 SSD, 每个 SSD的物理容量是 128GB, 每个 SSD所承担的业 务压力相同, 其用户写入的数据量均为 60GB。
如果某个 SSD 的坏块的容量达到 8GB, 那么该 SSD的可用物理容量为
128 - 8=120 ( GB ) ; 该 SSD的空间使用率为 60/120=0.5;
而整个 disk group的用户写入的数据量为 60*9=540 ( GB ) , 并且整个 disk grou 的可用物理容量是 128 * 8 + ( 128 - 8 )=1144 ( GB ) , 因此 disk group 的平均空间使用率为 540/1144=0.4720。
因此, 可以将产生坏块的 SSD确定为源 SSD, 其空间使用率 0.5大于平 均空间使用率 0.4720, 为了使整个 disk group中的每个 SSD的空间使用率均 达到平均空间使用率, 需要将源 SSD的数据迁移至其他 SSD。 这里以其余 8 个 SSD作为目的 SSD为例。 所述源 SSD迁出的数据量为:用户写入的数据量-源 SSD的空间使用率 *源 SSD的可用物理容量, 因此源 SSD迁出的数据量 =60 - (540 / 1144) * 120 = 3.3566 (GB)。
或者, 所述源 SSD迁出的数据量为: (源 SSD的空间使用率-平均空间 使用率) *源 SSD的可用物理容量= ( 0.5-540 / 1144 ) * 120= 3.3566 (GB)。
每个目的 SSD迁出的数据量为:平均空间使用率 *目的 SSD的可用物理 容量-用户写入的数据量 =(540 I 1144) * 128-60=0.4196(GB)。
或者, 每个目的 SSD迁出的数据量为: (平均空间使用率 -目的 SSD的 空间使用率) *目的 SSD的可用物理容量= ( 540 / 1144-60/128 )
* 128=0.4196(GB)。
然后,可以根据源 SSD的迁出数据量和每个目的 SSD的迁入数据量, 以 chunk为单位将源 SSD的数据迁移至各个目的 SSD中。
完成数据迁移之后, 源 SSD的空间利用率为: ( 60-3.3566 ) / 120 = 0.4720 , 其他每个 SSD的空间利用率为: ( 60+0.4196 ) / 128 = 0.4720ο 由此可见, 完成数据迁移后, 一个 disk group中的各个 SSD的空间利 用率均等于平均空间使用率。 由此说明实现了各个 SSD的磨损度均衡,从 而延长了整个 SSD存储阵列的使用寿命。
本发明实施例的装置
下面介绍本发明实施例提供的数据迁移装置, 如图 3所示, 为本发明实 施例提供的数据迁移装置的结构图, 所述装置包括:
确定模块 301 , 用于确定硬盘组中的源 SSD , 其中所述源 SSD的空间 使用率高于所述硬盘组的平均空间使用率; 以及确定所述硬盘组中的至少 一个目的 SSD。
计算模块 302 , 用于根据所述源 SSD的空间使用率和所述平均空间使 用率, 计算所述源 SSD迁出的数据量。
迁移模块 303 , 用于根据所述源 SSD迁出的数据量, 将所述源 SSD 的数据迁移至所述目的 SSD中。
可选的, 所述目的 SSD是所述硬盘组中除源 SSD的其他 SSD。
可选的,所述目的 SSD是所述硬盘组中的空间使用率低于所述平均空 间使用率的 SSD。
可选的, 所述目的 SSD是预先设定的所述源 SSD对应的 SSD。
其中,迁移模块 303具体用于根据所述目的 SSD的空间使用率和所述 平均空间使用率,计算每个目的 SSD的迁入数据量; 根据所述迁出的数据 量以及所述每个目的 SSD的迁入数据量, 将所述源 SSD的数据迁移至所 述每个目的 SSD中。 具体的, 可以获得每个目的 SSD的空间使用率与所 述平均空间使用率之间的差值;用所述每个目的 SSD的空间使用率与所述 平均空间使用率之间的差值乘以每个目的 SSD的可用物理容量,所得的乘 积为所述每个目的 SSD迁入的数据量。
其中, 计算模块 302 , 具体用于获得所述源 SSD的空间使用率与所述 平均空间使用率之间的差值;用所述源 SSD的空间使用率与所述平均空间 使用率之间的差值乘以所述源 SSD的可用物理容量,所得的乘积为所述源 SSD迁出的数据量。
本发明实施例所提供的装置, 可以设置于前面实施例所描述的控制 器中, 用于执行前面实施例所描述的数据迁移方法, 各个模块功能的详 细描述可参见方法实施例中的描述, 在此不再赘述。
在本发明实施例中, 将空间使用率高于硬盘组的平均空间使用率的
SSD中的数据迁移至确定出的目的 SSD中,使得硬盘组中的各个 SSD的 空间使用率趋于所述平均空间使用率, 从而实现了磨损均衡, 延长了所 述硬盘组的使用寿命。
如图 4 , 为本发明实施例提供的存储设备 1200 , 包括:
处理器 101、存储器 102、 系统总线(简称总线) 105和通信接口 103。 处理器 101、 存储器 102和通信接口 103之间通过系统总线 105连接并完 成相互间的通信。
处理器 101可能为单核或多核中央处理单元, 或者为特定集成电路, 或者为被配置成实施本发明实施例的一个或多个集成电路。
存储器 102可以为高速 RAM存储器, 也可以为非易失性存储器 ( non-volatile memory ) , 例 口至少一个硬盘存 4诸器。
通信接口 103用于与存储设备通信。
存储器 102用于存储计算机执行指令 1021。具体的,计算机执行指令 1021中可以包括程序代码。
当计算机运行时,处理器 101运行计算机执行指令 1021 , 可以执行图 2所述的方法流程。
本发明实施例还提供一种数据处理的计算机程序产品, 包括存储了程 序代码的计算机可读存储介质, 所述程序代码包括的指令用于执行图 2所 述的方法流程。
在本发明实施例中, 将空间使用率高于硬盘组的平均空间使用率的 SSD中的数据迁移至确定出的目的 SSD中, 使得硬盘组中的各个 SSD的 空间使用率趋于所述平均空间使用率, 从而实现了磨损均衡, 延长了所述 硬盘组的使用寿命。
本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可 能实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本 发明的各方面、 或各个方面的可能实现方式可以釆用完全硬件实施例、 完 全软件实施例 (包括固件、驻留软件等等), 或者组合软件和硬件方面的实 施例的形式, 在这里都统称为 "电路" 、 "模块" 或者 "系统" 。 此外, 本发明的各方面、 或各个方面的可能实现方式可以釆用计算机程序产品的 形式, 计算机程序产品是指存储在计算机可读介质中的计算机可读程序代 码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介 质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或 半导体系统、 设备或者装置, 或者前述的任意适当组合, 如随机存取存 储器 (RAM)、 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM或 者快闪存储器)、 光纤、 便携式只读存储器 (CD-ROM)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序 代码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定 的功能动作; 生成实施在框图的每一块、 或各块的组合中规定的功能动作 的装置。
计算机可读程序代码可以完全在用户的计算机上执行、 部分在用户的 计算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远 程计算机上, 或者完全在远程计算机或者服务器上执行。 也应该注意, 在 某些替代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可 能不按图中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两 个步骤、 或两个块实际上可能被大致同时执行, 或者这些块有时候可能被 以相反顺序执行。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件 的结合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方 案的特定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使 用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明的范 围。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明 的保护范围应所述以权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种数据迁移方法, 所述方法应用于存储系统中, 所述存储系统包 括硬盘组, 所述硬盘组包括多个固态硬盘 SSD; 其特征在于, 所述方法包 括:
确定所述硬盘组中的源 SSD , 其中所述源 SSD 的空间使用率高于所 述硬盘组的平均空间使用率;
确定所述硬盘组中的至少一个目的 SSD;
根据所述源 SSD 的空间使用率和所述平均空间使用率, 计算所述源 SSD迁出的数据量;
根据所述源 SSD迁出的数据量, 将所述源 SSD的数据迁移至所述目 的 SSD中。
2、 根据权利要求 1所述的方法, 其特征在于, 所述目的 SSD是所述 硬盘组中除源 SSD的其他 SSD。
3、 根据权利要求 1所述的方法, 其特征在于, 所述目的 SSD 是所述 硬盘组中的空间使用率低于所述平均空间使用率的 SSD。
4、 根据权利要求 1所述的方法, 其特征在于, 所述目的 SSD是预先 设定的所述源 SSD对应的 SSD。
5、 根据权利要求 1 所述的方法, 其特征在于, 所述确定所述硬盘组 中的至少一个目的 SSD包括:根据负载均衡确定所述硬盘组中的至少一个 目的 SSD。
6、 根据权利要求 1 所述的方法, 其特征在于, 所述根据所述源 SSD 迁出的数据量, 将所述源 SSD的数据迁移至所述目的 SSD中包括:
根据所述目的 SSD的空间使用率和所述平均空间使用率,计算每个目 的 SSD的迁入数据量;
根据所述迁出的数据量以及所述每个目的 SSD的迁入数据量,将所述 源 SSD的数据迁移至所述每个目的 SSD中。
7、根据权利要求 6所述的方法,其特征在于, 所述根据所述目的 SSD 的空间使用率和所述平均空间使用率,计算每个目的 SSD的迁入数据量包 括:
获得每个目的 SSD的空间使用率与所述平均空间使用率之间的差值; 用所述每个目的 SSD 的空间使用率与所述平均空间使用率之间的差 值乘以每个目的 SSD 的可用物理容量, 所得的乘积为所述每个目的 SSD 迁入的数据量。
8、 根据权利要求 1 所述的方法, 其特征在于, 所述根据所述源 SSD 的空间使用率和所述平均空间使用率, 计算所述源 SSD 迁出的数据量包 括:
获得所述源 SSD的空间使用率与所述平均空间使用率之间的差值; 用所述源 SSD 的空间使用率与所述平均空间使用率之间的差值乘以 所述源 SSD的可用物理容量, 所得的乘积为所述源 SSD迁出的数据量。
9、 一种数据迁移装置, 其特征在于, 所述装置包括:
确定模块, 用于确定硬盘组中的源 SSD, 其中所述源 SSD 的空间使 用率高于所述硬盘组的平均空间使用率; 以及确定所述硬盘组中的至少一 个目的 SSD;
计算模块, 用于根据所述源 SSD 的空间使用率和所述平均空间使用 率, 计算所述源 SSD迁出的数据量;
迁移模块, 用于根据所述源 SSD迁出的数据量, 将所述源 SSD的数 据迁移至所述目的 SSD中。
10、 根据权利要求 9所述的装置, 其特征在于, 所述目的 SSD是所述 硬盘组中除源 SSD的其他 SSD。
11、 根据权利要求 9所述的装置, 其特征在于, 所述目的 SSD 是所 述硬盘组中的空间使用率低于所述平均空间使用率的 SSD。
12、 根据权利要求 9所述的装置, 其特征在于, 所述目的 SSD是预先 设定的所述源 SSD对应的 SSD。
13、 根据权利要求 9所述的装置, 其特征在于,
所述迁移模块,具体用于根据所述目的 SSD的空间使用率和所述平均 空间使用率,计算每个目的 SSD的迁入数据量; 根据所述迁出的数据量以 及所述每个目的 SSD的迁入数据量, 将所述源 SSD的数据迁移至所述每 个目的 SSD中。
14、 根据权利要求 13所述的装置, 其特征在于,
所述迁移模块,具体用于获得每个目的 SSD的空间使用率与所述平均 空间使用率之间的差值;用所述每个目的 SSD的空间使用率与所述平均空 间使用率之间的差值乘以每个目的 SSD的可用物理容量,所得的乘积为所 述每个目的 SSD迁入的数据量。
15、 根据权利要求 9所述的装置, 其特征在于,
所述计算模块,具体用于获得所述源 SSD的空间使用率与所述平均空 间使用率之间的差值;用所述源 SSD的空间使用率与所述平均空间使用率 之间的差值乘以所述源 SSD 的可用物理容量, 所得的乘积为所述源 SSD 迁出的数据量。
16、 一种存储设备, 其特征在于, 包括:
处理器、 存储器、 系统总线和通信接口, 所述处理器、 所述存储器 和所述通信接口之间通过所述系统总线连接并完成相互间的通信;
所述通信接口, 用于与存储设备通信;
所述存储器, 用于存储计算机执行指令;
所述处理器, 用于运行所述计算机执行指令, 执行如权利要求 1-8所 述的方法。
17、 一种计算机程序产品, 包括存储了程序代码的计算机可读存储 介质, 所述程序代码包括的指令用于执行如权利要求 1-8任一所述的方 法。
PCT/CN2013/084093 2013-09-24 2013-09-24 数据迁移方法、数据迁移装置和存储设备 WO2015042778A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
PCT/CN2013/084093 WO2015042778A1 (zh) 2013-09-24 2013-09-24 数据迁移方法、数据迁移装置和存储设备
EP13892079.8A EP2942715B1 (en) 2013-09-24 2013-09-24 Data migration method, data migration apparatus and storage device
JP2015551104A JP6318173B2 (ja) 2013-09-24 2013-09-24 データマイグレーション方法、データマイグレーション装置及びストレージデバイス
CN201380001625.3A CN104662518B (zh) 2013-09-24 2013-09-24 数据迁移方法、数据迁移装置和存储设备
HUE13892079A HUE035390T2 (en) 2013-09-24 2013-09-24 Data migration process, data migration device and storage device
US14/662,928 US9733844B2 (en) 2013-09-24 2015-03-19 Data migration method, data migration apparatus, and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/084093 WO2015042778A1 (zh) 2013-09-24 2013-09-24 数据迁移方法、数据迁移装置和存储设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/662,928 Continuation US9733844B2 (en) 2013-09-24 2015-03-19 Data migration method, data migration apparatus, and storage device

Publications (1)

Publication Number Publication Date
WO2015042778A1 true WO2015042778A1 (zh) 2015-04-02

Family

ID=52741734

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084093 WO2015042778A1 (zh) 2013-09-24 2013-09-24 数据迁移方法、数据迁移装置和存储设备

Country Status (6)

Country Link
US (1) US9733844B2 (zh)
EP (1) EP2942715B1 (zh)
JP (1) JP6318173B2 (zh)
CN (1) CN104662518B (zh)
HU (1) HUE035390T2 (zh)
WO (1) WO2015042778A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367466A (zh) * 2018-12-26 2020-07-03 深圳市茁壮网络股份有限公司 一种磁盘预退休方法和装置

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10534417B1 (en) * 2015-03-10 2020-01-14 Amazon Technologies, Inc. Mass storage device electrical power consumption monitoring
US10599352B2 (en) 2015-08-14 2020-03-24 Samsung Electronics Co., Ltd. Online flash resource allocation manager based on a TCO model
CN105183670B (zh) * 2015-10-27 2018-11-27 北京百度网讯科技有限公司 用于分布式缓存系统的数据处理方法和装置
US9933952B1 (en) * 2016-03-31 2018-04-03 EMC IP Holding Company LLC Balancing allocated cache pages among storage devices in a flash cache
CN106293509A (zh) * 2016-07-12 2017-01-04 乐视控股(北京)有限公司 数据存储方法及系统
WO2018022136A1 (en) * 2016-07-26 2018-02-01 Pure Storage, Inc. Geometry based, space aware shelf/writegroup evacuation
CN113655952A (zh) 2016-11-26 2021-11-16 华为技术有限公司 数据迁移的方法、主机、及固态存储设备
WO2018116392A1 (ja) * 2016-12-21 2018-06-28 株式会社日立製作所 情報処理システム、及び、情報処理方法
CN107122264B (zh) * 2017-05-15 2020-06-09 成都优孚达信息技术有限公司 海量数据容灾备份方法
CN107357523B (zh) * 2017-06-27 2021-06-15 联想(北京)有限公司 一种数据处理方法及电子设备
US10866741B2 (en) * 2017-08-02 2020-12-15 Toshiba Memory Corporation Extending SSD longevity
CN107562380A (zh) * 2017-08-28 2018-01-09 郑州云海信息技术有限公司 一种raid2.0的数据块分配方法及装置
CN111966540B (zh) * 2017-09-22 2024-03-01 成都华为技术有限公司 存储介质的管理方法、装置及可读存储介质
CN108595108A (zh) * 2017-12-29 2018-09-28 北京奇虎科技有限公司 一种数据的迁移方法和装置
US10831371B2 (en) * 2018-01-02 2020-11-10 International Business Machines Corporation Quota controlled movement of data in a tiered storage system
CN110196752A (zh) * 2018-06-07 2019-09-03 腾讯科技(深圳)有限公司 数据处理方法、装置及存储介质
US10698630B2 (en) * 2018-06-13 2020-06-30 EMC IP Holding Company LLC Intra-cluster migration for elastic cloud storage devices
US11023129B2 (en) 2018-12-03 2021-06-01 EMC IP Holding Company LLC Hybrid intra-cluster migration of data between storage devices using chunk usage efficiency
US11068207B2 (en) * 2019-06-10 2021-07-20 EMC IP Holding Company LLC Method, device, and computer program product for managing storage system
KR102650689B1 (ko) 2019-08-02 2024-03-25 삼성전자주식회사 스토리지 장치
KR20210016208A (ko) 2019-08-02 2021-02-15 삼성전자주식회사 스토리지 장치, 및 스토리지 장치 및 스토리지 장치를 제어하는 호스트 장치를 포함하는 스토리지 시스템의 동작 방법
US11163476B2 (en) * 2019-10-04 2021-11-02 International Business Machines Corporation Dynamic rebalancing of free space between storage pools
CN112764665A (zh) * 2019-10-21 2021-05-07 伊姆西Ip控股有限责任公司 存储管理的方法、设备和计算机程序产品
CN112748852A (zh) * 2019-10-30 2021-05-04 伊姆西Ip控股有限责任公司 用于管理盘的方法、电子设备和计算机程序产品
TWI739325B (zh) * 2020-02-27 2021-09-11 瑞昱半導體股份有限公司 儲存空間管理方法
US11726684B1 (en) * 2021-02-26 2023-08-15 Pure Storage, Inc. Cluster rebalance using user defined rules
CN113268203B (zh) * 2021-05-18 2022-11-04 天津中科曙光存储科技有限公司 存储系统的容量均衡方法、装置、计算机设备和存储介质
CN114489504B (zh) * 2022-01-21 2023-08-08 苏州浪潮智能科技有限公司 一种ssd数据管理方法及相关组件

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102713828A (zh) * 2011-12-21 2012-10-03 华为技术有限公司 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统
US20120324191A1 (en) * 2011-06-14 2012-12-20 Western Digital Technologies, Inc. System and method for performing data retention that incorporates environmental conditions
CN102880570A (zh) * 2012-09-05 2013-01-16 记忆科技(深圳)有限公司 固态硬盘的加权磨损均衡方法及系统

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5724539A (en) * 1992-03-19 1998-03-03 Digital Equipment Corporation System for selectively storing stripes of data in tracks of disks so that sum of transfer rates of stripes match communication bandwidth to host
US6895467B2 (en) * 2001-10-22 2005-05-17 Hewlett-Packard Development Company, L.P. System and method for atomizing storage
MXPA01012371A (es) * 2001-11-30 2003-06-05 Fernando Mejias Butron Manuel Metodo para optimizar el desempe°o de una computadora y medio principal de almacenamiento no volatil optimizado con secciones de proposito especifico.
JP3950720B2 (ja) * 2002-03-18 2007-08-01 株式会社日立製作所 ディスクアレイサブシステム
JP4418286B2 (ja) * 2003-07-14 2010-02-17 富士通株式会社 分散型ストレージシステム
JP3940409B2 (ja) * 2003-12-26 2007-07-04 Tdk株式会社 メモリコントローラ、フラッシュメモリシステム及び制御方法
US7509474B2 (en) * 2005-06-08 2009-03-24 Micron Technology, Inc. Robust index storage for non-volatile memory
JP2007079762A (ja) * 2005-09-13 2007-03-29 Phison Electronics Corp フラッシュメモリの管理方法
JP2008015769A (ja) * 2006-07-05 2008-01-24 Hitachi Ltd ストレージシステム及び書き込み分散方法
US8321597B2 (en) * 2007-02-22 2012-11-27 Super Talent Electronics, Inc. Flash-memory device with RAID-type controller
TWI373772B (en) * 2007-10-04 2012-10-01 Phison Electronics Corp Wear leveling method and controller using the same
JP4461170B2 (ja) 2007-12-28 2010-05-12 株式会社東芝 メモリシステム
JP2011515727A (ja) * 2008-02-12 2011-05-19 ネットアップ,インコーポレイテッド ハイブリッド媒体ストレージシステムアーキテクチャ
JP5242264B2 (ja) * 2008-07-07 2013-07-24 株式会社東芝 データ制御装置、ストレージシステムおよびプログラム
US8161237B2 (en) * 2009-03-27 2012-04-17 Lenovo (Singapore) Pte. Ltd. Asymmetric load balancing for RAID storage systems
EP2413245B1 (en) * 2009-07-22 2017-08-23 Hitachi, Ltd. Storage system provided with a plurality of flash packages
US8364858B1 (en) * 2009-12-07 2013-01-29 Emc Corporation Normalizing capacity utilization within virtual storage pools
US8850114B2 (en) * 2010-09-07 2014-09-30 Daniel L Rosenband Storage array controller for flash-based storage devices
CN103036994B (zh) * 2012-12-18 2015-08-19 曙光信息产业(北京)有限公司 实现负载均衡的云存储系统
US9405621B2 (en) * 2012-12-28 2016-08-02 Super Talent Technology, Corp. Green eMMC device (GeD) controller with DRAM data persistence, data-type splitting, meta-page grouping, and diversion of temp files for enhanced flash endurance
US9454434B2 (en) * 2014-01-17 2016-09-27 Netapp, Inc. File system driven raid rebuild technique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120324191A1 (en) * 2011-06-14 2012-12-20 Western Digital Technologies, Inc. System and method for performing data retention that incorporates environmental conditions
CN102713828A (zh) * 2011-12-21 2012-10-03 华为技术有限公司 提供多设备镜像和条带功能的磁盘缓存方法、设备和系统
CN102880570A (zh) * 2012-09-05 2013-01-16 记忆科技(深圳)有限公司 固态硬盘的加权磨损均衡方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367466A (zh) * 2018-12-26 2020-07-03 深圳市茁壮网络股份有限公司 一种磁盘预退休方法和装置
CN111367466B (zh) * 2018-12-26 2023-08-15 深圳市茁壮网络股份有限公司 一种磁盘预退休方法和装置

Also Published As

Publication number Publication date
JP6318173B2 (ja) 2018-04-25
HUE035390T2 (en) 2018-05-02
CN104662518B (zh) 2016-05-25
EP2942715A1 (en) 2015-11-11
JP2016503925A (ja) 2016-02-08
EP2942715B1 (en) 2017-11-08
CN104662518A (zh) 2015-05-27
US20150193154A1 (en) 2015-07-09
US9733844B2 (en) 2017-08-15
EP2942715A4 (en) 2016-05-11

Similar Documents

Publication Publication Date Title
WO2015042778A1 (zh) 数据迁移方法、数据迁移装置和存储设备
US10095429B2 (en) Method, apparatus, and controller for managing storage array
US9529535B2 (en) Storage system and method of control for storage system
US8719645B2 (en) Runtime dynamic performance skew elimination
US9626105B2 (en) Controlling a storage system
US20140380092A1 (en) Efficient raid technique for reliable ssd
US10209898B2 (en) Estimation of performance utilization of a storage device
US20230350595A1 (en) Data Migration Method, Host, and Solid State Disk
EP2378410A2 (en) Method and apparatus to manage tier information
JP2011221981A (ja) 外部ストレージシステムに結合されたストレージシステムのエラーコード管理方法及び装置
US20170212678A1 (en) Garbage Collection Pacing in a Storage System
US10761590B1 (en) Data storage performance scaling based on external energy
TW201533657A (zh) 資訊處理系統及記憶體系統
WO2015078193A1 (zh) 存储空间的管理方法和存储管理装置
US20140068214A1 (en) Information processing apparatus and copy control method
US11567883B2 (en) Connection virtualization for data storage device arrays
JP2012038212A (ja) ストレージ装置及びその制御方法
US11722564B1 (en) Dynamic command feedback to limit impact of host-copy migration background copy load
US11507321B1 (en) Managing queue limit overflow for data storage device arrays
CN117420943A (zh) 分布式集群中磁盘磨损均衡方法、装置、电子设备和介质

Legal Events

Date Code Title Description
REEP Request for entry into the european phase

Ref document number: 2013892079

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013892079

Country of ref document: EP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13892079

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015551104

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE