CN111078158A - Data migration method and related device - Google Patents

Data migration method and related device Download PDF

Info

Publication number
CN111078158A
CN111078158A CN201911386494.0A CN201911386494A CN111078158A CN 111078158 A CN111078158 A CN 111078158A CN 201911386494 A CN201911386494 A CN 201911386494A CN 111078158 A CN111078158 A CN 111078158A
Authority
CN
China
Prior art keywords
block
data
real block
real
migration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911386494.0A
Other languages
Chinese (zh)
Inventor
刘晓瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911386494.0A priority Critical patent/CN111078158A/en
Publication of CN111078158A publication Critical patent/CN111078158A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • 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
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data migration method, which comprises the following steps: determining a first real block and a second real block to be worn and balanced according to a wear balancing algorithm; migrating the data prototypes of the first real block to a second real block, and migrating the data prototypes of the second real block to the first real block; and when the original sample migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block. By only modifying the corresponding relation between the real block and the virtual block, the method avoids modifying a large amount of LP mapping relation and reduces performance consumption. The application also discloses a data migration device, a server and a computer readable storage medium, which have the beneficial effects.

Description

Data migration method and related device
Technical Field
The present application relates to the field of storage technologies, and in particular, to a data migration method, a data migration apparatus, a server, and a computer-readable storage medium.
Background
A full flash memory array is a self-contained storage array or device that is composed entirely of solid-state storage media (typically NAND flash memory), and the system is used to enhance performance in environments that may contain disk arrays, or to replace all conventional hard disk storage arrays. In general, in a full flash memory array, in order to maintain the service life of an SSD disk, wear leveling needs to be performed according to the wear level of different blocks. That is, in the area with large wear where data is written frequently, data is changed into data in the area with small wear which is not changed frequently or even not changed for a long time, so that the subsequent wear of the area with large wear is reduced, and the area with small wear is fully utilized.
In the prior art, a large number of mapping relationships need to be modified during data relocation and exchange. Namely, the mapping relationship between the LBA (logical Block Address) to the PBA (physical Block Address) in each data unit is modified. The LBA is a logical block address of the service data, and the PBA is a physical block address. For example, block0 is a region with larger wear and block1 is a region with smaller wear, each block has unequal data and corresponding LP (LBA to PBA) mapping relationship, and data is migrated between block0 and block 1. Since the block of the data store changes, i.e. the physical block address changes, the LP map needs to be modified. When the data volume of the migration data is increased continuously, a large amount of mapping relations among different blocks need to be modified, and great performance consumption is caused to the system.
Therefore, how to reduce the performance consumption of the storage system in wear leveling is a key issue of attention for those skilled in the art.
Disclosure of Invention
The application aims to provide a data migration method, a data migration device, a server and a computer readable storage medium, data of a real block is migrated in an original mode when an array is subjected to wear leveling, and a corresponding relation between the real block and a virtual block is modified, so that a large amount of modification of an LP mapping relation is avoided, and performance consumption is reduced.
In order to solve the above technical problem, the present application provides a data migration method, including:
determining a first real block and a second real block to be worn and balanced according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
migrating the data prototype of the first real block to the second real block, and migrating the data prototype of the second real block to the first real block;
and when the original image migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block.
Optionally, determining a first real block and a second real block to be subjected to wear leveling according to a wear leveling algorithm includes:
calculating the abrasion value of each real block according to an abrasion balance algorithm;
taking the block with the abrasion value larger than the first abrasion value as the first real block;
taking the block with the abrasion value smaller than a second abrasion value as a second real block;
wherein the first wear value is not less than the second wear value.
Optionally, determining a first real block and a second real block to be subjected to wear leveling according to a wear leveling algorithm includes:
calculating the abrasion value of each real block according to an abrasion balance algorithm;
taking the block with the maximum abrasion value as the first real block;
and taking the block with the minimum abrasion value as the second real block.
Optionally, migrating the data primitive of the first real block to the second real block, and migrating the data primitive of the second real block to the first real block, including:
migrating the data of the first real block to the second real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
The present application further provides a data migration apparatus, comprising:
the data block determining module is used for determining a first real block and a second real block to be subjected to wear balancing according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
a data original migration module, configured to migrate a data original of the first real block to the second real block, and migrate a data original of the second real block to the first real block;
and the mapping relation modification module is used for modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block when the original sample migration is finished.
Optionally, the data block determining module includes:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a large wear determination unit configured to take a block whose wear value is larger than a first wear value as the first real block;
a smaller wear determination unit configured to take a block whose wear value is smaller than a second wear value as the second real block.
Optionally, the data block determining module includes:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a maximum wear determining unit configured to take the block with the largest wear value as the first real block;
and the minimum abrasion determining unit is used for taking the block with the minimum abrasion value as the second real block.
Optionally, the data original migration module includes:
the first migration unit is used for migrating the data of the first real block to the second real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and the second migration unit is used for migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
The present application further provides a server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data migration method as described above when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data migration method as described above.
The application provides a data migration method, which comprises the following steps: determining a first real block and a second real block to be worn and balanced according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block; migrating the data prototype of the first real block to the second real block, and migrating the data prototype of the second real block to the first real block; and when the original image migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block.
The method comprises the steps of determining two blocks needing wear leveling, namely a first real block and a second real block, and then carrying out original data migration on data in the two real blocks, namely data migration with the relative positions unchanged, directly modifying the corresponding relation between the real blocks and the virtual blocks instead of modifying the LP mapping relation of the data after migration, so that a large amount of LP mapping modification operations are avoided, the performance consumption during wear leveling is reduced, and the performance utilization rate is improved.
The application also provides a data migration device, a server and a computer readable storage medium, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data migration method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present disclosure.
Detailed Description
The core of the application is to provide a data migration method, a data migration device, a server and a computer readable storage medium, data of a real block is migrated in an original mode when wear leveling is carried out, and the corresponding relation between the real block and a virtual block is modified, so that a large amount of modification of an LP mapping relation is avoided, and performance consumption is reduced.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, a large number of mapping relationships need to be modified during data relocation and exchange. I.e. the mapping relationship between LBA to PBA on each data unit is modified. The LBA is a logical block address of the service data, and the PBA is a physical block address. For example, block0 is a region with larger wear and block1 is a region with smaller wear, each block has unequal data and corresponding LP (LBA to PBA) mapping relationship, and data is migrated between block0 and block 1. Since the block of the data store changes, i.e. the physical block address changes, the LP map needs to be modified. When the data volume of the migration data is increased continuously, a large amount of mapping relations among different blocks need to be modified, and great performance consumption is caused to the system.
Therefore, the data migration method determines two blocks needing wear leveling, namely a first real block and a second real block, through a wear leveling algorithm, then performs original data migration on the data in the two real blocks, namely data migration is performed while keeping the relative positions unchanged, and after migration, the corresponding relation between the real blocks and the virtual blocks is directly modified instead of modifying the LP mapping relation of the data, so that a large amount of LP mapping modification operations are avoided, the performance consumption during wear leveling is reduced, and the performance utilization rate is improved.
A data migration method provided in the present application is described below by an embodiment.
Referring to fig. 1, fig. 1 is a flowchart of a data migration method according to an embodiment of the present disclosure.
In this embodiment, the method may include:
s101, determining a first real block and a second real block to be subjected to wear balancing according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
this step is intended to determine the two blocks that need to be wear balanced. The wear leveling mainly refers to exchanging data between a data block with a high wear degree and a data block with a low wear degree. The main purpose of this step is therefore to determine the blocks with higher wear and the blocks with lower wear. The wear level of the data block is mainly determined through a wear leveling algorithm.
It should be noted that in this embodiment, a virtual block needs to be created for each real block, and a mapping relationship is established between the virtual block and the real block, that is, the virtual block corresponds to the real block. And the PBA in the LP mapping relation of the data in the real block corresponds to the virtual block. That is, if the read data is that the corresponding PBA is found according to the LBA, the PBA corresponds to a virtual block, and then the corresponding real block is determined according to the relationship between the real block and the virtual block, and the data is obtained.
Specifically, the wear leveling algorithm used in this embodiment may be any one of wear leveling algorithms provided in the prior art, which is not limited herein. After the adopted wear leveling algorithm is determined, calculation can be carried out according to the wear leveling algorithm to obtain the wear value of each real block, and then the first real block and the second real block for wear leveling are determined according to different wear values.
Optionally, this step may include:
step 1, calculating a wear value of each real block according to a wear balancing algorithm;
step 2, taking the block with the abrasion value larger than the first abrasion value as a first real block;
step 3, taking the block with the abrasion value smaller than the second abrasion value as a second real block; wherein the first wear value is not less than the second wear value.
It can be seen that in this alternative scheme, a block larger than the first wear value is mainly used as the first true block, and a block smaller than the second wear value is mainly used as the second true block. Wherein the first wear value may be equal to the second wear value, and the first wear value may be greater than the second wear value.
Optionally, the step may also include:
step 1, calculating a wear value of each real block according to a wear balancing algorithm;
step 2, taking the block with the maximum abrasion value as a first real block;
and 3, taking the block with the minimum abrasion value as a second real block.
Therefore, in the alternative scheme, the block with the largest abrasion value is mainly used as the first real block, and the block with the smallest abrasion value is used as the second real block.
S102, migrating the data prototype of the first real block to a second real block, and migrating the data prototype of the second real block to the first real block;
on the basis of S101, this step is intended to perform data migration between two real blocks as they are, that is, data migration while keeping the relative positions unchanged.
Optionally, this step may include:
step 1, migrating data of a first real block to a second real block according to a relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and 2, migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
And S103, when the original sample migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block.
On the basis of the S102, the step aims to switch the mapping relationship between the first real block and the virtual block corresponding to the second real block. Because the relative position of the data in each block does not change, the direct mapping relation between the real block and the virtual block can be switched directly.
As can be seen, in this embodiment, a corresponding virtual block is created for each real block. In general, the LP mapping relationship of data in a real block is obtained by mapping the data and a physical address of the real block, in this embodiment, in order to avoid a large number of LP mapping relationships in a data migration process, the LP mapping relationship of the data in the real block is directly modified into the virtual block, and the mapping relationship between the real block and the virtual block is modified during migration, instead of the mapping relationship between the data and the virtual block. When data access is carried out, the LP mapping relation between the data and the virtual block is still adopted, and then the data in the real block is accessed through the corresponding relation between the virtual block and the real block. Since the original data migration is adopted during the data migration, the relative position of the data in each block does not change, and the actual address of the data can be obtained and accessed through the mark position and the relative position as long as the mark position in each virtual block and the mark position in each real block are determined.
To sum up, in this embodiment, two blocks, namely the first real block and the second real block, which need to be subjected to wear leveling are determined first by a wear leveling algorithm, then data in the two real blocks are migrated as they are, that is, data migration is performed while keeping the relative position unchanged, and after migration, the corresponding relationship between the real blocks and the virtual blocks is directly modified instead of modifying the LP mapping relationship of the data, so that a large amount of LP mapping modification operations are avoided, performance consumption during wear leveling is reduced, and performance utilization is improved.
A data migration method provided in the present application is further described below by way of another specific embodiment.
In this embodiment, the method may include:
step 1, establishing a mapping relation between a virtual block and a real block for all real blocks in a storage pool in an array;
step 2, the array stores data to a real block, and an LP mapping relation is established, wherein PBA corresponds to a virtual block corresponding to the real block;
step 3, selecting a target real block0 and a target real block1 which are large in abrasion and small in abrasion in an abrasion balance mode, wherein the virtual blocks corresponding to the target real block0 and the target real block1 are block0 'and block 1' respectively;
step 4, keeping the relative position of the data in the block0 in the block unchanged, migrating and writing the data to a target block1 in the original way, keeping the relative position of the original data in the block1 in the block unchanged, and migrating and writing the data to the target block0 in the original way;
step 5, modifying the mapping relation between virtual block0 ', block 1' and real block0 and block1, namely that block0 'corresponds to block1, and block 1' corresponds to block 0;
and 6, repeating the steps of 3-5 until the wear balance of all blocks is realized.
It can be seen that, in this embodiment, two blocks, namely, a first real block and a second real block, which need to be subjected to wear leveling are determined first by a wear leveling algorithm, then data in the two real blocks are migrated as they are, that is, data migration is performed while keeping the relative position unchanged, and after migration, the corresponding relationship between the real blocks and the virtual blocks is directly modified instead of modifying the LP mapping relationship of the data, so that a large amount of LP mapping modification operations are avoided, performance consumption during wear leveling is reduced, and performance utilization is improved.
More specifically, the data migration method in the application technical solution may also be specifically applied to a full flash memory array. The data migration method is further described below by an embodiment.
In this embodiment, the method may include:
step 1, determining a first real block and a second real block to be worn and balanced by a full flash memory array according to a wear and balance algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
step 2, migrating the data prototype of the first real block to the second real block, and migrating the data prototype of the second real block to the first real block;
and 3, when the original sample migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block.
Therefore, the embodiment can realize wear leveling processing on the full flash memory array so as to balance the wear degrees among different blocks and improve the data reading performance in the medium with lower wear degree. Meanwhile, the corresponding relation between the virtual block and the real block is directly modified during wear leveling, so that the LP mapping relation is prevented from being modified in a large quantity, and the performance consumption of wear leveling is reduced.
In the following, a data migration apparatus provided in an embodiment of the present application is introduced, and a data migration apparatus described below and a data migration method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present disclosure.
In this embodiment, the apparatus may include:
the data block determining module 100 is configured to determine a first real block and a second real block to be wear balanced according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
the data original sample migration module 200 is configured to migrate a data original sample of the first real block to a second real block, and migrate a data original sample of the second real block to the first real block;
and the mapping relation modifying module 300 is configured to modify the first real block corresponding relation into a second virtual block corresponding to the second real block and modify the second real block corresponding relation into a first virtual block corresponding to the first real block when the original sample migration is finished.
Optionally, the data block determining module 100 may include:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a large wear determination unit configured to take a block whose wear value is larger than the first wear value as a first real block;
a smaller wear determination unit configured to take a block whose wear value is smaller than the second wear value as a second real block.
Optionally, the data block determining module 100 may include:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a maximum wear determining unit for taking the block with the maximum wear value as a first real block;
and a minimum wear determination unit for taking the block with the minimum wear value as the second real block.
Optionally, the data original migration module 200 may include:
the first migration unit is used for migrating the data of the first real block to the second real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and the second migration unit is used for migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
An embodiment of the present application further provides a server, including:
a memory for storing a computer program;
a processor for implementing the steps of the data migration method as described in the above embodiments when executing the computer program.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data migration method according to the above embodiments.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
A data migration method, a data migration apparatus, a server and a computer-readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method of data migration, comprising:
determining a first real block and a second real block to be worn and balanced according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
migrating the data prototype of the first real block to the second real block, and migrating the data prototype of the second real block to the first real block;
and when the original image migration is finished, modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block, and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block.
2. The data migration method according to claim 1, wherein determining the first real block and the second real block to be wear balanced according to a wear leveling algorithm comprises:
calculating the abrasion value of each real block according to an abrasion balance algorithm;
taking the block with the abrasion value larger than the first abrasion value as the first real block;
taking the block with the abrasion value smaller than a second abrasion value as a second real block;
wherein the first wear value is not less than the second wear value.
3. The data migration method according to claim 1, wherein determining the first real block and the second real block to be wear balanced according to a wear leveling algorithm comprises:
calculating the abrasion value of each real block according to an abrasion balance algorithm;
taking the block with the maximum abrasion value as the first real block;
and taking the block with the minimum abrasion value as the second real block.
4. The data migration method according to claim 1, wherein migrating the data primitive of the first real block to the second real block and migrating the data primitive of the second real block to the first real block includes:
migrating the data of the first real block to the second real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
5. A data migration apparatus, comprising:
the data block determining module is used for determining a first real block and a second real block to be subjected to wear balancing according to a wear balancing algorithm; each real block corresponds to a virtual block, and PBA of data in the real block points to the corresponding virtual block;
a data original migration module, configured to migrate a data original of the first real block to the second real block, and migrate a data original of the second real block to the first real block;
and the mapping relation modification module is used for modifying the corresponding relation of the first real block into a second virtual block corresponding to the second real block and modifying the corresponding relation of the second real block into a first virtual block corresponding to the first real block when the original sample migration is finished.
6. The data migration apparatus according to claim 5, wherein the data block determination module comprises:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a large wear determination unit configured to take a block whose wear value is larger than a first wear value as the first real block;
a smaller wear determination unit configured to take a block whose wear value is smaller than a second wear value as the second real block.
7. The data migration apparatus according to claim 5, wherein the data block determination module comprises:
the abrasion value calculation unit is used for calculating the abrasion value of each real block according to an abrasion balance algorithm;
a maximum wear determining unit configured to take the block with the largest wear value as the first real block;
and the minimum abrasion determining unit is used for taking the block with the minimum abrasion value as the second real block.
8. The data migration apparatus according to claim 5, wherein the intact data migration module comprises:
the first migration unit is used for migrating the data of the first real block to the second real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration;
and the second migration unit is used for migrating the data of the second real block to the first real block according to the relative position in the block so as to keep the same relative position between the data before migration and the data after migration.
9. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data migration method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data migration method according to any one of claims 1 to 4.
CN201911386494.0A 2019-12-29 2019-12-29 Data migration method and related device Pending CN111078158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911386494.0A CN111078158A (en) 2019-12-29 2019-12-29 Data migration method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911386494.0A CN111078158A (en) 2019-12-29 2019-12-29 Data migration method and related device

Publications (1)

Publication Number Publication Date
CN111078158A true CN111078158A (en) 2020-04-28

Family

ID=70319208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911386494.0A Pending CN111078158A (en) 2019-12-29 2019-12-29 Data migration method and related device

Country Status (1)

Country Link
CN (1) CN111078158A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324758A (en) * 2018-08-24 2019-02-12 华为技术有限公司 Data migration method, device and storage equipment
CN110362268A (en) * 2018-04-10 2019-10-22 阿里巴巴集团控股有限公司 Abrasion equilibrium treating method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362268A (en) * 2018-04-10 2019-10-22 阿里巴巴集团控股有限公司 Abrasion equilibrium treating method and apparatus
CN109324758A (en) * 2018-08-24 2019-02-12 华为技术有限公司 Data migration method, device and storage equipment

Similar Documents

Publication Publication Date Title
CN109753443B (en) Data processing method and device and electronic equipment
US11016674B2 (en) Method, device, and computer program product for reading data
KR100965051B1 (en) Variable space page mapping method and apparatus for flash memory device
US11675709B2 (en) Reading sequential data from memory using a pivot table
US10162554B2 (en) System and method for controlling a programmable deduplication ratio for a memory system
WO2006052321A2 (en) System and method of reading non-volatile computer memory
CN109522154B (en) Data recovery method and related equipment and system
CN110377233B (en) SSD (solid State disk) reading performance optimization method and device, computer equipment and storage medium
CN110187832B (en) Data operation method, device and system
CN106775474A (en) A kind of Nand Flash abrasion equilibrium methods, device and memory
CN111930643B (en) Data processing method and related equipment
CN110688256A (en) Metadata power-on recovery method and device, electronic equipment and storage medium
JP7376488B2 (en) Deduplication as an infrastructure to avoid snapshot copy-on-write data movement
CN103714010B (en) Storage device write-in method and storage device
CN109558456A (en) A kind of file migration method, apparatus, equipment and readable storage medium storing program for executing
CN110347338B (en) Hybrid memory data exchange processing method, system and readable storage medium
US20180165869A1 (en) Method and apparatus for rendering object using mipmap including plurality of textures
KR101029704B1 (en) Method for managing a flash memory
CN107632786B (en) Data deduplication management method and device
CN116188244B (en) Method, device, equipment and storage medium for distributing image blocks
CN115237351B (en) NAND block dynamic remapping and read-write command processing method and storage device
CN111078158A (en) Data migration method and related device
CN110990301A (en) Sequential reading method of multi-plane storage medium and related device
CN116339643A (en) Formatting method, formatting device, formatting equipment and formatting medium for disk array
US11226738B2 (en) Electronic device and data compression method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428