Method for fast migration of data RAID level

By directly modifying the mapping relationship of the FTL table entries inside the SSD through the RAID card, the problem of slow data migration in the existing technology is solved, fast and reliable RAID level migration is achieved, and system performance is improved.

CN120335730BActive Publication Date: 2025-10-14CHENGDU HUARUI SHUXIN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510821063.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-14
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

In the existing technology, during data migration, CPU and interface resources are occupied when moving data through the host, resulting in slow transmission speed and affecting user services.

Method used

Directly access the FTL inside the SSD through the RAID card, modify the mapping relationship of the FTL table entries, and achieve rapid migration of data RAID levels, including IO write operations and custom configuration of NVMe SSDs.

Benefits of technology

It reduces the amount of data moved, shortens the RAID mode switching time, improves system reliability and data transfer speed, and reduces the occupation of CPU and interface resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335730B_ABST
    Figure CN120335730B_ABST
Patent Text Reader

Abstract

The present application relates to the field of SSD data migration, and is a data RAID level fast migration method, which solves the problem of slow transmission speed in the existing data migration process.The present application relates to a RAID card and a solid state disk (SSD), wherein the SSD includes an FTL, and the method comprises the following steps: a host performs mode switching through the RAID card; the RAID card directly accesses the FTL in the SSD through an interface according to the received mode switching instruction, and completes FTL table item modification; after confirming that the FTL modification is completed, the RAID card reports the completion status to the host, and completes the RAID level migration.The present application realizes the modification of the LBA-PBA mapping relationship by customizing the FTL write interface; the RAID mode switching is realized by modifying the FTL table item, thereby reducing the resource occupation of the RAID mode switching, greatly reducing the data moving amount, shortening the switching time, and obviously improving the system reliability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of SSD data migration, and particularly relates to a method for quickly migrating data RAID level. BACKGROUND

[0002] RAID (Redundant Array of Independent Disks), also known as "disk array", is a large disk system formed by multiple independent disks, so as to achieve better storage performance and higher reliability than a single disk. Among them, RAID0 and RAID1 are more commonly used in system disks. The function of RAID0 is striping, which combines multiple disks together to form a large-capacity storage. When we write data, the data will be divided into N parts, and the N parts of data will be written to the disk in an independent manner, so the execution performance is very high; the function of RAID1 is backup, which writes the same data to two disks without difference when writing data to the disk, and the data is written to the working disk and the mirror disk respectively. Any disk failure can be recovered based on another disk, and the data reliability is very strong, but the performance will be lost.

[0003] In use, users will select the RAID type to be used according to the reliability, performance and other requirements. At the same time, if the requirements change, there is also the possibility of dynamically modifying the RAID type, such as adjusting the high-reliability RAID1 configuration to the high-performance RAID0 configuration, or other adjustments.

[0004] When the user adjusts the RAID mode, the RAID card or soft RAID currently performs the following operations: RAID1-->RAID0 (2 disks), the storage space is split according to the striping, and then the even striping data is written to the first member disk and the odd striping data is written to the second member disk.

[0005] Solid State Disk or Solid State Drive (SSD) is a hard disk made of solid-state electronic storage chip array, and currently mainly uses NAND Flash.

[0006] An SSD contains an SSD controller, DRAM, and NAND. Commands issued by the host are first sent to the SSD controller. Based on the address the host needs to access, the SSD controller queries the Flash Translation Table (FTL) in DRAM. The FTL converts the logical address (LBA) accessed by the host into the physical address (PBA) of the backend NAND. The controller then accesses the specific NAND chip based on the PBA, enabling data reading and writing.

[0007] The function of FTL is to map the internal addresses of the SSD, which is dynamically refreshed according to the internal algorithm and is generally inaccessible to the host.

[0008] In existing technologies, data migration typically involves moving data through the host. For example, a 960GB SSD requires reading and writing 960GB of data, a process that can take hours, consuming CPU and interface resources. During this time, upper-layer services are suspended, significantly impacting user services.

[0009] There is an urgent need for a new migration method that can solve the above problems. Summary of the Invention

[0010] The invention proposes a method for rapid data RAID level migration, which solves the problem in the existing data migration process that CPU and interface resources are occupied when the data is moved through the host, resulting in slow transmission speed.

[0011] The technical solution of the present invention is implemented as follows: a method for rapid migration of data RAID levels, involving a RAID card and a solid-state drive (SSD) for storing data, the SSD including a controller, DRAM, and NAND; the DRAM includes an FTL (Flash Translation Table), and the controller stores data in the NAND by modifying the mapping relationship of FTL table entries, comprising the following steps: S1: a host performs mode switching through a RAID card; S2: the RAID card sends an FTL read / write command to the SSD based on the received mode switching instruction after the switching preparation is completed; S3: the RAID card directly accesses the FTL inside the SSD through an interface, completes the FTL table entry modification, and modifies the address mapping relationship; S4: after confirming that the FTL modification is completed, the RAID card reports the completion status to the host, completing the RAID level migration.

[0012] Among them, the command interface in S3 includes the following two specific implementation methods: 1. Implementation through IO write operation: Use the command written in the invalid address as the entry of FTL; when the RAID card sends a write command to the invalid address, the SSD is directly mapped to the FTL area for actual access; 2. NVMe SSD is implemented through custom configuration: Configure the SSD through custom NVMe commands, and the operation is mapped to the FTL area, so that the FTL can be refreshed through configuration.

[0013] Preferably, the step S2 further includes a backup operation, and backing up the original FTL before writing the new FTL instruction.

[0014] Furthermore, the specific method of accessing the FTL in step S2 includes: A: the RAID card sends a write FTL command to Disk0 and Disk1 respectively according to the mode switch instruction, refreshing the FTL table entries one by one; B: the RAID card sends a command to switch from RAID1 to RAID0, where the first parameter RAID10 represents switching from RAID1 to RAID0, and the second parameter represents whether the current disk is Disk0 or Disk1; after receiving the command, the SSD determines how to refresh the FTL based on whether it is Disk0 or Disk1; C: setting a pointer *FTLe pointing to the RAID card memory, where *FTLe stores the entire FTL content that needs to be written to the SSD; through this pointer, all files in the RAID card memory are refreshed to the SSD's FTL.

[0015] Preferably, the FTL writing process in step S2 is provided with CRC check or ECC check to check the command and data, and the command is written only after the check is passed.

[0016] Preferably, S4 also includes post-writing verification. After the write operation is completed, a read operation is performed to compare the written data with the data in the command. When the data are consistent, the RAID card returns the execution completion status and reports it to the host.

[0017] The present invention discloses a method for rapid migration of data RAID levels, which realizes the modification of LBA-PBA mapping relationship by customizing FTL write interface; realizes RAID mode switching by modifying FTL table entries, thereby reducing the resource occupation of RAID mode switching, greatly reducing the amount of data moved, shortening the switching time, and significantly improving system reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only need to be some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort.

[0019] Figure 1 RAID card switching rule diagram. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the protection scope of the present application. DETAILED DESCRIPTION

[0022] In the embodiment, the solid state disk (SSD) has a capacity of 960 GB, which is split in units of 512 bytes, and each unit is assigned an LBA. A 480 GB SSD has an LBA address of 0~937703087, and a larger LBA address is an invalid address that is generally not accessed by a user. A host switches modes through a RAID card. The RAID card is connected to the SSD and uses an invalid address, such as LBA 937703100, as an FTL entry through an IO write operation. When the RAID card issues a write command for LBA 937703100, the SSD internally maps to the FTL area for actual access and read / write FTL. The FTL specifically represents the mapping relationship between the LBA logical address and the PBA physical address. The RAID card directly accesses the FTL in the SSD according to the received mode switching instruction and through an interface, and completes FTL table item modification and address mapping relationship modification. A 480 GB SSD can complete FTL refresh after 937500 LBAs are written from the address.

[0023] As shown in the RAID card switching rule diagram, the RAID card sends write FTL commands to Disk0 and Disk1 respectively according to the switching rule, and refreshes the FTL table items one by one. Figure 1

[0024] Disk0: WriteFTL(1, 2); where 1 represents LBA1 and 2 represents PBA2. WriteFTL(2, 4); WriteFTL(3, 6); WriteFTL(4, 8); ……;

[0025] ​Disk1:WriteFTL(0,1);WriteFTL(1,3);WriteFTL(2,5);WriteFTL(3,7);WriteFTL(4,9);...; the above write operation continues to the maximum address of the maximum capacity of the RAID group.

[0026] The RAID card can also directly send a command of switching from RAID1 to RAID0: where the first parameter RAID10 represents switching from RAID1 to RAID0; the second parameter represents whether the disk is Disk0 or Disk1; after receiving the command, the SSD judges how to flush the FTL in the SSD according to whether it is Disk0 or Disk1;

[0027] Disk0:WriteFTL(1,2); where 1 represents LBA1 and 2 represents PBA2. WriteFTL(2,4); WriteFTL(3,6); WriteFTL(4,8);...;

[0028] If the disk is Disk1, the following operations are performed (same as the above scheme):

[0029] WriteFTL(0,1);WriteFTL(1,3);WriteFTL(2,5);WriteFTL(3,7);WriteFTL(4,9);...;

[0030] The entire FTL content that needs to be written to the SSD can also be stored in the pointer *FTLe pointing to the memory of the RAID card; the files in the memory of the RAID card are flushed to the FTL of the SSD through the interface.

[0031] Through the three ways of accessing the FTL, the host directly modifies the address mapping relationship in the FTL through the RAID card, confirms the completion of the FTL modification, and then the RAID card modifies the SSD according to the feedback FTL command, and the SSD completes the modification, and then the RAID card reports the completion status to the host, completing the RAID level migration. The present embodiment no longer updates the FTL write through the controller of the SSD as in the prior art, greatly improving the data transfer speed.

[0032] Among them, the NVMe type SSD can be customized through the NVMe command, such as Set Feature, where Feature ID 00~85h has been defined, 86h~BFh is reserved Set Feature ID, and the SSD is configured through the configuration operation of Set Feature ID. Operation mapping to the FTL area, that is, the FTL can be refreshed through configuration, and then the data is quickly transferred. Specific implementation method two

[0034] The FTL determines the data mapping relationship within the SSD. If it is written incorrectly, data errors will occur. Therefore, the writing of the FTL must be ensured to be absolutely correct. Based on the specific embodiment 1, a backup operation is added. The original FTL is backed up before writing new FTL instructions. If the FTL is written incorrectly, it can be returned to the initial state through version rollback, avoiding errors caused by rapid writing of the FTL. Specific implementation method three

[0036] Based on the second embodiment, each FTL write process sets a CRC check or ECC check to verify the command and data. The command is written only after the check passes. After the write operation is completed, a read operation is performed to compare the written data with the data in the command. If the data is consistent, the RAID card returns the execution completion status to the host.

[0037] Under the premise of ensuring data transfer speed, the security and stability of migration are guaranteed.

[0038] Of course, without departing from the spirit and essence of the present invention, technicians familiar with the field should be able to make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for rapid data RAID level migration, involving a RAID card and a solid-state drive (SSD) for storing data. The SSD includes a controller, DRAM, and NAND. The DRAM includes an FTL. The controller stores data in the NAND by modifying the mapping relationship of FTL table entries. The method is characterized by: The following steps are involved: S1: The host switches the mode through the RAID card; S2: The RAID card sends an FTL read / write command to the SSD according to the received mode switching instruction after the switching preparation is completed; S3: The RAID card directly accesses the FTL inside the SSD through the interface, and completes the FTL table entry modification and modifies the address mapping relationship; S4: After confirming that the FTL modification is complete, the RAID card reports the completion status to the host, completing the RAID level migration.

2. The method for rapid data RAID level migration according to claim 1, wherein: The command interface in S3 includes the following two specific implementation methods:

1. Implemented through IO write operation: Use the command written to the invalid address as the entry of FTL: When the RAID card sends a write command to the invalid address, the SSD is directly mapped to the FTL area for actual access; 2. NVMe SSD is implemented through custom configuration: The SSD is configured through custom NVMe commands, and the operations are mapped to the FTL area, so that the FTL can be refreshed through configuration.

3. The method for rapid data RAID level migration according to claim 2, wherein: The step S2 also includes a backup operation, which is to back up the original FTL before writing the new FTL instruction.

4. The method for rapid data RAID level migration according to any one of claims 1 to 3, characterized in that: The specific method of accessing the FTL in step S2 includes: A: The RAID card sends write FTL commands to Disk0 and Disk1 respectively according to the mode switch instruction, refreshing the FTL table entries one by one; B: The RAID card sends a command to switch from RAID1 to RAID0. The first parameter, RAID10, indicates switching from RAID1 to RAID0, and the second parameter indicates whether the current disk is Disk0 or Disk1. After receiving the command, the SSD determines how to refresh the FTL based on whether it is Disk0 or Disk1. C: Set the pointer *FTLe pointing to the RAID card memory, where *FTLe stores the entire FTL content that needs to be written to the SSD; all files in the RAID card memory are refreshed to the SSD's FTL through this pointer.

5. The method for rapid data RAID level migration according to claim 4, characterized in that: The FTL writing process in step S2 is provided with CRC check or ECC check to check the command and data, and the command is written only after the check is passed.

6. The method for rapid data RAID level migration according to claim 5, characterized in that: The S4 also includes post-write verification. After the write operation is completed, a read operation is performed to compare the written data with the data in the command. If the data are consistent, the RAID card returns the execution completion status and reports it to the host.

Citation Information

Patent Citations

  • Method for mapping disk array of solid hard disk and solid hard disk

    CN102830942A

  • Method to switch between traditional SSD and open-channel SSD without data loss

    CN113168291A