Data migration device, method and storage medium from file storage to object storage

By performing data migration from file storage to object storage locally, and using the file system abstract module, file storage agent module and object storage gateway module to directly read and write data, the problem of low migration efficiency in the existing technology is solved. Enables a faster and more efficient migration process.

CN114416690BActive Publication Date: 2024-10-01NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111585376.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2024-10-01
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The migration efficiency of file storage to object storage in the existing technology is low, requiring third-party software for migration, occupying host resources and network bandwidth, and does not support incremental migration. The migration speed is slow and cannot meet business needs.

Method used

By providing a data migration device and method from file storage to object storage, the file system abstract module, file storage agent module and object storage gateway module are used to directly read and write data locally, reduce IO paths, and support full and Incremental migration mode records migration task information and reduces network transmission.

Benefits of technology

It improves the speed and efficiency of migrating file storage to object storage, reduces network bandwidth usage, supports incremental migration, and meets business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416690B_ABST
    Figure CN114416690B_ABST
Patent Text Reader

Abstract

The present invention provides a data migration device, method and storage medium from file storage to object storage, which are used to solve the technical problem of low efficiency in migration from file storage to object storage. The present invention mounts a remote NFS server to a local storage side NFS agent. Under the control of a migration task, an object storage gateway directly reads the migration file content from the NFS agent and converts it into an object storage format and stores it in a destination object storage. The present invention directly transmits migration data through an internal module, avoids forwarding through a network by a third-party migration tool, reduces the IO path of data flow, and improves migration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data migration device, method and storage medium from file storage to object storage. Background Art

[0002] Simple Storage Service (S3) is an object storage service for the Internet. At present, cloud infrastructure is becoming more and more popular. Enterprises need to convert a large amount of existing data from traditional file storage to cloud storage represented by S3 object storage to ensure the sharing and unification of data sources in data centers.

[0003] Currently, the migration from file storage to object storage requires the use of third-party software. During the migration, a client software needs to be installed externally, using conventional read and write methods. The input / output (IO) path is very long and incremental migration is not supported, such as Rclone and Rsync.

[0004] When migrating data, this type of third-party software needs to read the source file storage data to the host where the software is located, and then the host writes it to the target S3 object storage side. The reading and writing process requires host resources and network bandwidth. This type of third-party software usually uses a common protocol to read and write data, and does not record the data of the migration task. The migration speed is slow and cannot meet business needs. Summary of the invention

[0005] In view of this, the present invention provides a data migration device, method and storage medium from file storage to object storage, which are used to solve the technical problem of low efficiency of data migration from file storage to object storage.

[0006] Figure 1 A schematic diagram of a data migration device from file storage to object storage provided by the present invention is provided. The device 100 includes:

[0007] The migration task module 110 is used to customize and execute the migration task, wherein the migration task calls the local file storage proxy module 130 through the interface provided by the file system abstract module 120 to read the source file storage data, and calls the object storage gateway module 140 through the interface provided by the file system abstract module 120 to write the read source file storage data into the local object storage;

[0008] The file system abstraction module 120 is used to provide a file system abstraction layer access interface for the upper layer;

[0009] The file storage proxy module 130 is used to provide an access interface for the source file storage data for the file system abstraction module 120, mount the network file system NFS directory of the source file storage under the control of the migration task, and read and cache the source file storage data;

[0010] The object storage gateway module 140 is used to provide an object storage access interface for the file system abstraction module 120, read the file storage data cached in the file storage proxy module 130 under the control of the migration task, and convert the read file storage data into object storage and write it into the object storage.

[0011] Furthermore, the migration task module 110 is also used to create a migration thread pool, and the migration task is executed by the migration threads in the migration thread pool; the migration task module 110 executes the migration task based on the pre-configured IP address of the source file storage and the bucket name of the destination object storage.

[0012] Furthermore, the execution modes of the migration task include a full migration mode and an incremental migration mode. When using the full migration mode, first obtain a list of all files in the mounted NFS directory, and then add all the files in the list to the migration task. When the migration task is executed, the file storage proxy module reads the contents of all files in the NFS directory mounted in the source file storage in full.

[0013] Furthermore, when the migration task uses the incremental migration mode, it first obtains a list of all files in the mounted NFS directory, filters the files according to the modification time of each file in the list and the time when the last migration task was executed, and adds the files modified after the last migration to the migration task. When the migration task is executed, the file storage proxy module incrementally reads the contents of the files that have changed since the last migration in the NFS directory mounted in the source file storage.

[0014] Based on an embodiment of the present invention, the present invention also provides a method for migrating data from file storage to object storage, the method comprising:

[0015] Step S1. Customize and execute migration tasks;

[0016] Step S2. Under the control of the migration task, the migration task calls the local file storage proxy module through the interface provided by the file system abstraction module, and the file storage proxy module mounts the network file system NFS directory of the source file storage, reads and caches the source file storage data;

[0017] Step S3. Under the control of the migration task, the migration task calls the object storage gateway module through the interface provided by the file system abstraction module, and the object storage gateway module reads the file storage data cached in the file storage proxy module and converts the read file storage data into object storage and writes it into the object storage.

[0018] Furthermore, the method also includes creating a migration thread pool for the migration task, and the migration task is executed by the migration thread in the migration thread pool; and executing the migration task based on the pre-configured IP address of the source file storage and the bucket name of the destination object storage.

[0019] The present invention provides a device and method for data migration from file storage to object storage, which is used to solve the technical problem of low efficiency in migration from file storage to object storage. The present invention mounts a remote NFS server to a local storage side NFS agent. Under the control of a migration task, an object storage gateway directly reads the migration file content from the NFS agent and converts it into an object storage format and stores it in a destination object storage. The present invention directly transmits migration data through an internal module, avoids forwarding through a network by a third-party migration tool, reduces the IO path of data flow, and improves migration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments of the present invention or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present invention.

[0021] Figure 1 A schematic diagram of the structure of a data migration device from file storage to object storage provided by the present invention;

[0022] Figure 2 A schematic diagram of a framework structure for data migration from file storage to object storage provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of an electronic device for implementing a method for migrating data from file storage to object storage provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, rather than limiting the embodiments of the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. The term "and / or" used in the present invention refers to any or all possible combinations of one or more associated listed items.

[0025] It should be understood that although the terms first, second, third, etc. may be used to describe various information in embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at the time of" or "when" or "in response to determining".

[0026] The purpose of the present invention is to provide a data migration method, device, equipment and storage medium from file storage to object storage, so as to reduce the network bandwidth occupied by data migration and improve the migration efficiency. The basic idea of ​​the present invention is to mount the remote NFS server to a separate software module / component on the local storage side, read and write data between internal modules / components, reduce the IO path of data flow, and finally achieve the purpose of migrating NFS file data to S3 object storage.

[0027] The technical solution provided by the embodiment of the present invention is implemented by the internal software module / component of the local storage side. Compared with the third-party client software, data flows between two software modules / components in the local storage, shortening the IO path and thus improving the migration speed. In addition, in the embodiment of the present invention, each migration task information can also be recorded to support incremental migration. The present invention can improve the migration speed and efficiency from file storage to object storage.

[0028] Figure 2 A schematic diagram of the framework structure of data migration from file storage to object storage provided by an embodiment of the present invention. In this example, a data migration device 100 from file storage to object storage is implemented by improving NFS Ganesha, Migrationd corresponds to a migration task module 110, a file system abstraction layer (FSAL) corresponds to a file system abstraction module 120, an NFS Proxy (referred to as Proxy) corresponds to a file storage proxy module 130, and FSAL_RGW corresponds to an object storage gateway module 140.

[0029] Among them, NFS-Ganesha is a file service software module / component based on the Network File System (NFS), which can run in the user mode (UserMode) of most operating systems with Unix / Linux as the core. NFS-Ganesha abstracts the backend storage into a unified API application program interface through the file system abstraction layer FSAL, and provides the storage access interface API to the Ganesha server. RGW is the object storage access interface gateway in Ceph, and FSAL_RGW is an object storage access interface gateway that supports FSAL, which enables FSAL to access the Ceph cluster using the standard object storage API. RGW supports S3 and Swift API, etc. NFS Proxy is an NFS protocol proxy that is used to cache data transmitted through the NFS protocol so that other modules can read it quickly.

[0030] In this embodiment, a migration background program module Migrationd is added to NFS-Ganesha, and this process is responsible for handling all migration tasks. When data needs to be migrated, the migration thread pool (DP Thread pools) is started to execute the migration task and perform data reading and writing operations. DP Thread pools calls Proxy through the interface provided by FSAL to read the data stored in the source file, and then writes the data to the local S3 object storage through FSAL_RGW.

[0031] Before starting the migration task, you need to pre-configure: 1) the IP address of the source file storage and ensure that the NFS shared directory of the source file storage can be accessed by the local storage; 2) the bucket name of the destination object storage.

[0032] After the migration task is started, the NFS shared directory to be migrated in the source file storage is mounted to the local storage server based on the configured source file storage IP address. The migration task obtains the list information of all files in the NFS shared directory mounted on the remote NFS device. The file list includes the attribute information of each file, such as file name, file modification time, file size, etc.

[0033] This embodiment provides two execution modes of migration tasks, namely full migration mode and incremental migration mode. Full migration mode refers to migrating all files in the mounted NFS shared directory to the destination object storage, regardless of whether some or all of the files have been migrated in the last migration task. In full migration mode, after Migrationd starts the migration task, the migration task calls the FSAL instruction Proxy to mount the remote storage, that is, the source NFS directory, reads the file list generated by all file information in the mounted shared NFS directory, and then adds all files in the file list to the migration task, and the migration task is executed by the migration thread in the migration thread pool. When the migration task is executed, the FSAL instruction Proxy reads the content of the file to be migrated and caches it, and then the migration task reads the file data cached by the Proxy through the Socket connection through the FSAL instruction FSAL_RGW, and writes the data of the migration file into the local object storage in the format of the object storage.

[0034] Incremental migration mode refers to migrating the files in the mounted NFS shared directory that have changed since the last migration to the destination object storage. It is necessary to filter the files in the directory based on the file modification time and the execution time of the last migration task. In incremental migration mode, first obtain a list of all files in the mounted NFS directory, filter them according to the modification time of each file in the list and the execution time of the last migration task, add the files that have been modified after the last migration to the migration task, and when the migration task is executed, incrementally read the contents of the files that have changed since the last migration in the NFS directory mounted in the source file storage through the Proxy, and then the migration task reads the file data cached by the Proxy through the Socket connection through the FSAL instruction FSAL_RGW, and writes the data of the migrated files to the local object storage in the format of the object storage.

[0035] like Figure 2 As shown, the Proxy version used in this example can be v3 or v4. The NFS directory of the source file storage is mounted, the source file is read, and then written to the corresponding bucket in the destination object storage in the form of an object. If the file size exceeds 4M, the file content is read in 4M increments. If it does not exceed 4M, the file content is read in 4M increments.

[0036] This solution takes advantage of the capabilities of NFS-Ganesha. By adding Porxy v3 / v4 components, it can automatically mount NFS data locally and use the FASL_RGW interface to write object data into the object bucket. The entire process shortens the IO path and implements data flow between the two storage types.

[0037] based on Figure 2 A structural example of a file storage to object storage data migration method is also provided. The method is applied in a local storage device located on the object storage side. The method is completed by multiple software modules located in NFS-Ganesha working together. The method includes:

[0038] B1. Users can customize migration tasks through the management platform or management terminal, and send the migration tasks to the local storage NFS-Ganesha. Migrationd in NFS-Ganesha is responsible for executing the migration tasks.

[0039] B2. After the migration task is started, the migration task controls the execution of each migration step. The migration task calls the local file storage proxy module (Proxy) through the interface provided by the file system abstraction module (FSAL). The Proxy mounts the network file system NFS directory of the source file storage, reads and caches the source file storage data;

[0040] B3. Under the control of the migration task, the migration task calls the object storage gateway module FSAL_RGW through the interface provided by FSAL, and FSAL_RGW reads the file storage data cached in the Proxy through protocols such as Socket and converts the read file storage data into object storage and writes it into the object storage.

[0041] Figure 3 This is a schematic diagram of the structure of an electronic device for implementing a data migration method from file storage to object storage provided by an embodiment of the present invention. The device 300 includes: a processor 310 such as a central processing unit (CPU), a communication bus 320, a communication interface 340, and a storage medium 330. The processor 310 and the storage medium 330 can communicate with each other through the communication bus 320. The storage medium 330 stores a computer program, and when the computer program is executed by the processor 310, the functions of each step of the method provided by the present invention can be implemented.

[0042] Among them, the storage medium may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. In addition, the storage medium may also be at least one storage device located away from the aforementioned processor. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0043] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner. Each program may be implemented in a high-level process or object-oriented programming language to communicate with a computer system. However, if necessary, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose. In addition, the operation of the process described in the present invention may be performed in any suitable order, unless the present invention otherwise indicates or otherwise clearly contradicts the context. The process described in the present invention (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as a code (e.g., executable instructions, one or more computer programs, or one or more applications) executed on one or more processors in common, by hardware or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.

[0044] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described in the present invention includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention also includes the computer itself.

[0045] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data migration device from file storage to object storage, characterized in that: The device includes: A migration task module, used to customize and execute a migration task, wherein the migration task calls a local file storage proxy module through an interface provided by the file system abstract module to read source file storage data, and calls an object storage gateway module through an interface provided by the file system abstract module to write the read source file storage data into a local object storage; The file system abstraction module is used to provide the file system abstraction layer access interface for the upper layer; The file storage proxy module is used to provide an access interface for the file system abstraction module to the source file storage data, mount the network file system NFS directory of the source file storage under the control of the migration task, and read and cache the source file storage data; The object storage gateway module is used to provide an object storage access interface for the file system abstraction module, read the file storage data cached in the file storage proxy module under the control of the migration task, and convert the read file storage data into object storage and write it into the object storage.

2. The device according to claim 1, characterized in that The migration task module is also used to create a migration thread pool, and the migration threads in the migration thread pool execute the migration task; The migration task module executes the migration task based on the pre-configured IP address of the source file storage and the bucket name of the destination object storage.

3. The device according to claim 2, characterized in that The execution modes of the migration task include full migration mode and incremental migration mode. When using the full migration mode, first obtain a list of all files in the mounted NFS directory, and then add all files in the list to the migration task. When the migration task is executed, the file storage proxy module reads the contents of all files in the NFS directory mounted in the source file storage in full.

4. The device according to claim 3, characterized in that When the migration task uses the incremental migration mode, it first obtains a list of all files in the mounted NFS directory, filters the files according to the modification time of each file in the list and the time when the last migration task was executed, and adds the files modified after the last migration to the migration task. When the migration task is executed, the file storage proxy module incrementally reads the contents of the files that have changed since the last migration in the NFS directory mounted in the source file storage.

5. A data migration method from file storage to object storage, characterized in that: The method includes: Customize and execute migration tasks; Under the control of the migration task, the migration task calls the local file storage proxy module through the interface provided by the file system abstraction module, and the file storage proxy module mounts the network file system NFS directory of the source file storage, reads and caches the source file storage data; Under the control of the migration task, the migration task calls the object storage gateway module through the interface provided by the file system abstraction module, and the object storage gateway module reads the file storage data cached in the file storage proxy module and converts the read file storage data into object storage and writes it into the object storage.

6. The method according to claim 5, characterized in that The method also includes creating a migration thread pool for the migration task, and executing the migration task by the migration threads in the migration thread pool; and executing the migration task based on a pre-configured IP address of the source file storage and a bucket name of the destination object storage.

7. The method according to claim 6, characterized in that The execution modes of the migration task include full migration mode and incremental migration mode. When using the full migration mode, first obtain a list of all files in the mounted NFS directory, and then add all files in the list to the migration task. When the migration task is executed, the file storage proxy module reads the contents of all files in the NFS directory mounted in the source file storage in full.

8. The method according to claim 7, characterized in that When the migration task uses the incremental migration mode, it first obtains a list of all files in the mounted NFS directory, filters the files according to the modification time of each file in the list and the time when the last migration task was executed, and adds the files modified after the last migration to the migration task. When the migration task is executed, the file storage proxy module incrementally reads the contents of the files that have changed since the last migration in the NFS directory mounted in the source file storage.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a storage medium and a communication bus, wherein the processor, the communication interface and the storage medium communicate with each other via the communication bus; Storage medium for storing computer programs; A processor, for implementing the method steps described in any one of claims 5 to 8 when executing a computer program stored on a storage medium.

10. A storage medium having a computer program stored thereon, characterized in that: The computer program implements the method steps of any one of claims 5 to 8 when executed by a processor.