Data migration method, system and device and non-volatile readable storage medium

By receiving deaggregation tasks and processing file metadata, file migration from low-speed storage media to high-speed storage media is realized, which solves the problem of low data migration flexibility in the existing technology and ensures data recovery speed and storage efficiency.

WO2024187818A1PCT designated stage expired Publication Date: 2024-09-19LANGCHAO ELECTRONIC INFORMATION IND CO LTD

Patent Information

Application Number
PCT/CN2023/134126
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-10
Filing Date
2023-11-24
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

In the scenario of massive small files, the existing technology has low flexibility of data migration, and it is difficult to improve the flexibility of data migration while ensuring the speed of data recovery.

Method used

By receiving de-aggregation tasks, file metadata is obtained, and files are migrated from low-speed storage media to high-speed storage media in the form of de-migration aggregation. At the same time, metadata is updated and files in low-speed storage media are deleted to achieve de-aggregation of files. Support data migration between multi-level storage media.

Benefits of technology

It improves the flexibility of data migration and ensures the speed of data recovery. It realizes high-speed data access through high-speed storage media and enables the storage of large amounts of data under cost control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023134126_19092024_PF_FP_ABST
    Figure CN2023134126_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a data migration method, system and device and a non-volatile readable storage medium, applicable to the technical field of storage, and for use in solving the technical problem of improving data migration flexibility while maintaining data recovery speed. The method comprises: receiving a reverse aggregation task; for any one file pointed to by the reverse aggregation task, acquiring metadata of the file, reading the file from a second storage medium by means of the metadata, and writing the read file into a first storage medium in a reverse migration aggregation mode; and after said any one file is written into the first storage medium, updating the metadata of the file, and deleting the file stored in the second storage medium, wherein the second storage medium stores file data in the form of an aggregated file, the first storage medium stores file data in the form of a non-aggregated file, and the data access speed of the first storage medium is higher than that of the second storage medium. By applying the solution of the present application, data migration flexibility is improved while data recovery speed is maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Data migration method, system, device and non-volatile readable storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 10, 2023, with application number 202310225922.1, and application name “A Data Migration Method, System, Device and Computer-Readable Storage Medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present invention relates to the field of storage technology, and in particular to a data migration method, system, device and non-volatile readable storage medium. Background Art

[0004] In scenarios with massive small files, by configuring the storage system with a small amount of high-speed storage media, such as ordinary SSDs (Solid State Disks) or NVMe (Non-Volatile Memory Express) SSDs, file tiering can achieve high system performance at a lower hardware cost.

[0005] File tiering is based on data lifecycle management theory. This feature enables data to be transferred between various storage media without user awareness, also known as data migration. Data migration supports multiple user strategies and seamlessly relocates data that meets migration requirements without disrupting normal system operations.

[0006] At present, the commonly used storage solution is data hot and cold tiering, that is, high-speed storage media is used to store hot data, and low-speed storage media is used to store cold data. The storage format of data in high-speed storage media and low-speed storage media is the same.

[0007] At present, there are still a few solutions that have designed migration aggregation solutions, that is, multiple small file data are actually stored in a new large file, and the aggregated large file is directly operated when reading and writing data, which is conducive to improving data recovery speed. The small files after aggregation can be called individual aggregated small files in the large file. When performing migration aggregation based on file classification, small files are migrated from high-speed storage media to aggregated large files on low-speed storage media during migration, and small file aggregation is achieved through the migration process. However, the current migration aggregation solution only realizes the migration of small files from high-speed storage media to low-speed storage media, and has a narrow application scenario and low flexibility.

[0008] In summary, how to improve the flexibility of data migration while ensuring the data recovery speed is a technical problem that those skilled in the art urgently need to solve.

[0009] Summary of the Invention

[0010] The object of the present invention is to provide a data migration method, system, device and non-volatile readable storage medium to improve the flexibility of data migration while ensuring the data recovery speed.

[0011] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0012] A data migration method, comprising:

[0013] Receive anti-aggregation tasks;

[0014] For any file pointed to by the de-aggregation task, obtain the metadata of the file, read the file in the second storage medium based on the metadata, and write the read file to the first storage medium in the form of de-migration aggregation;

[0015] After any file is written to the first storage medium, metadata of the file is updated, and the file stored in the second storage medium is deleted;

[0016] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0017] Optionally, any one file pointed to by the de-aggregation task is a file that meets the preset first classification rule;

[0018] The first classification rules include:

[0019] When the number of times a file is accessed within a first time period is greater than or equal to a preset first threshold, the first classification rule is established.

[0020] Optionally, the first classification rule further includes:

[0021] When the file name of the file matches the first database, the first classification rule is established.

[0022] Optionally, the first classification rule further includes:

[0023] When the file size of the file is smaller than a preset first value, the first classification rule is established.

[0024] Optionally, the first classification rule further includes:

[0025] When the file is the file specified by the first user instruction, the first classification rule is established.

[0026] Optionally, after any file is written to the first storage medium, updating the metadata of the file includes:

[0027] After any file is written into the first storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is cleared.

[0028] Optionally, also include:

[0029] Before deleting the files stored in the second storage medium, when an error occurs during the data migration process, the files stored in the second storage medium are retained, and the corresponding migration data is deleted.

[0030] Optionally, also include:

[0031] Receive the first reaggregation task;

[0032] For any one file pointed to by the first re-aggregation task, obtain metadata of the file, read the file in the second storage medium based on the metadata, and write the file into the aggregation cache of the second storage medium;

[0033] Whenever the aggregate cache is full, each file in the aggregate cache is written to the third storage medium in the form of re-aggregation of the aggregated files;

[0034] For any file written from the aggregate cache to the third storage medium, update the metadata of the file and delete the file stored in the second storage medium;

[0035] The third storage medium stores file data in the form of aggregated files, and the data access speed of the second storage medium is higher than the data access speed of the third storage medium.

[0036] Optionally, any one file pointed to by the first re-aggregation task is a file that meets a preset third classification rule;

[0037] The third classification rules include:

[0038] When the number of times a file is accessed within the first time period is greater than or equal to the third threshold and less than the second threshold, the third classification rule is established:

[0039] The second threshold is greater than the third threshold.

[0040] Optionally, for any file written from the aggregate cache to the third storage medium, updating the file metadata includes:

[0041] For any file written from the aggregate cache to the third storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is updated.

[0042] Optionally, also include:

[0043] The hierarchical migration service in the first storage medium receives a migration aggregation task;

[0044] For any file pointed to by the migration aggregation task, the hierarchical migration service in the first storage medium obtains the metadata of the file, reads the file in the first storage medium based on the metadata, and writes the read file to the second storage medium in the form of a migration aggregation;

[0045] After any file is written into the second storage medium, the hierarchical migration service in the first storage medium updates the metadata of the file and deletes the file stored in the first storage medium.

[0046] Optionally, any file pointed to by the migration aggregation task is a file that meets the preset second classification rule;

[0047] The second classification rules include:

[0048] When the number of times a file is accessed within the first time period is greater than or equal to the second threshold and less than the first threshold, the second classification rule is established:

[0049] The second threshold is smaller than the first threshold.

[0050] Optionally, also include:

[0051] The hierarchical migration service in the third storage medium receives the second re-aggregation task;

[0052] For any one file pointed to by the second re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0053] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the fourth storage medium in the form of re-migration of aggregate files;

[0054] For any file written from the aggregate cache to the fourth storage medium, update the metadata of the file and delete the file stored in the third storage medium;

[0055] The fourth storage medium stores file data in the form of aggregated files, and the data access speed of the third storage medium is higher than that of the fourth storage medium.

[0056] Optionally, any one file pointed to by the second re-aggregation task is a file that meets a preset fourth classification rule;

[0057] The fourth classification rules include:

[0058] When the number of times the file is accessed within the first time period is less than a preset third threshold, the fourth classification rule is established.

[0059] Optionally, also include:

[0060] The hierarchical migration service in the fourth storage medium receives the third re-aggregation task;

[0061] For any one file pointed to by the third re-aggregation task, the hierarchical migration service in the fourth storage medium obtains metadata of the file, reads the file in the fourth storage medium based on the metadata, and writes the file into the aggregation cache of the fourth storage medium;

[0062] Whenever the aggregate cache is full, the hierarchical migration service in the fourth storage medium writes each file in the aggregate cache to the third storage medium in the form of re-migration of aggregate files;

[0063] For any file written from the aggregate cache to the third storage medium, metadata of the file is updated, and the file stored in the fourth storage medium is deleted.

[0064] Optionally, also include:

[0065] The hierarchical migration service in the third storage medium receives a fourth re-aggregation task;

[0066] For any one file pointed to by the fourth re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0067] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the second storage medium in the form of re-migration of aggregate files;

[0068] For any file written from the aggregate cache to the second storage medium, metadata of the file is updated, and the file stored in the third storage medium is deleted.

[0069] Optionally, the first storage medium is a storage medium composed of an SSD, the second storage medium is a storage medium composed of an SSD and an HDD, the third storage medium is a storage medium composed of an HDD, and the fourth storage medium is a storage medium composed of a tape library and / or an optical disc.

[0070] A data migration method, comprising:

[0071] Generate a de-aggregation task and send it to the hierarchical migration service;

[0072] For any file pointed to by the de-aggregation task, the metadata of the file is sent to the hierarchical migration service, so that the hierarchical migration service reads the file in the second storage medium through the metadata and writes the read file to the first storage medium in the form of de-migration aggregation;

[0073] After the hierarchical migration service writes any file to the first storage medium, the metadata of the file is updated, and after the update is completed, the hierarchical migration service deletes the file stored in the second storage medium;

[0074] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0075] A data migration system, comprising:

[0076] A task receiving module is configured to receive anti-aggregation tasks;

[0077] The de-migration aggregation module is configured to obtain metadata of any file pointed to by the de-aggregation task, read the file in the second storage medium through the metadata, and write the read file to the first storage medium in the form of de-migration aggregation;

[0078] an update and delete module configured to update metadata of any file and delete the file stored in the second storage medium after any file is written to the first storage medium;

[0079] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0080] A data migration device, comprising:

[0081] a memory arranged to store a computer program;

[0082] The processor is configured to execute a computer program to implement the steps of the above-mentioned data migration method.

[0083] A non-volatile readable storage medium stores a computer program, which implements the steps of the above-mentioned data migration method when executed by a processor.

[0084] Applying the technical solutions provided by the embodiments of the present invention, the data access speed of the first storage medium is higher than that of the second storage medium. That is, the first storage medium is a high-speed storage medium, facilitating high-speed data access. Compared to the first storage medium, the second storage medium is a low-speed storage medium, facilitating the storage of large amounts of data while ensuring cost-effectiveness. The second storage medium stores file data in the form of aggregated files, which also facilitates data recovery speed. Furthermore, the solution of this application supports data migration from the second storage medium to the first storage medium. Optionally, the hierarchical migration service of the second storage medium can receive a de-aggregation task and, for any file targeted by the de-aggregation task, indicate that it needs to be pulled up to the first storage medium. The service can then obtain metadata for the file and use the metadata to read the file from the second storage medium. Since the first storage medium does not aggregate files, while the second storage medium does, the read file is written to the first storage medium in the form of a de-migration aggregate. After writing any file to the first storage medium, the file metadata needs to be updated, and the file stored in the second storage medium needs to be deleted. It can be seen that the present application realizes the de-aggregation of files, that is, data is read from the second storage medium where file aggregation is performed and stored in the first storage medium where file aggregation is not performed. Therefore, the solution of the present application improves the flexibility of data migration while ensuring the data recovery speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0086] FIG1 is a flowchart of an implementation method of a data migration method in the present invention;

[0087] FIG2 is a schematic diagram of a reverse migration polymerization process in an optional embodiment;

[0088] FIG3 is a schematic diagram of a migration and repolymerization process in an optional embodiment;

[0089] FIG4 is a schematic diagram of a storage medium hierarchical structure in an optional embodiment;

[0090] FIG5 is a schematic structural diagram of a data migration system in the present invention;

[0091] FIG6 is a schematic structural diagram of a data migration device in the present invention;

[0092] FIG7 is a schematic structural diagram of a non-volatile readable storage medium in the present invention. DETAILED DESCRIPTION

[0093] The core of the present invention is to provide a data migration method, which improves the flexibility of data migration while ensuring the data recovery speed.

[0094] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and optional embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0095] Please refer to FIG1 , which is a flowchart of an implementation method of a data migration method in the present invention. The data migration method may include the following steps:

[0096] Step S101: receiving a de-aggregation task.

[0097] Optionally, the storage system of the present application solution can usually be a distributed file system. A distributed file system is a cluster composed of multiple file storage node servers. It supports storing a piece of data in multiple nodes separately. When accessing data, it supports reading data from multiple nodes at the same time to obtain complete data. At the same time, it improves file performance through concurrent access and supports linear expansion. In addition, when a node goes down, the complete data can be restored according to the configured strategy. It has the characteristics of high availability, high performance, and high scalability.

[0098] The operations from step S101 to step S103 may be performed by the hierarchical migration service of the second storage medium.

[0099] Optionally, in actual applications, the MDS (Meta Data Server) of the second storage medium can usually send a de-aggregation task to the hierarchical migration service of the second storage medium. The de-aggregation task can carry one or more files, indicating that these files need to be stored in the faster first storage medium.

[0100] For example, FIG2 is a schematic diagram of a de-migration aggregation process in an optional implementation. In FIG2 , the MDS sends a de-aggregation task containing batch files to a hierarchical migration service of a second storage medium.

[0101] It is understandable that when a file is added to a de-aggregation task, the optional triggering method can be set and adjusted according to actual needs, that is, the rules of the file classification strategy can be set and adjusted according to actual needs. For example, in an optional embodiment of the present invention, any file pointed to by the de-aggregation task is a file that meets the preset first classification rule; and the first classification rule may, for example, include: when the number of accesses to the file within the first time period is greater than or equal to the preset first threshold, the first classification rule is established.

[0102] It can be understood that the higher the number of times a file is accessed within the first time period, the more the file should be able to achieve high-speed reading and writing, so as to ensure high-performance execution of the business, improve product competitiveness, and enhance user satisfaction. Therefore, when the number of times a file is accessed within the first time period is greater than or equal to the preset first threshold, this implementation method determines that the first classification rule is established, and the file needs to be added to the de-aggregation task so that the file can be subsequently migrated from the low-speed second storage medium to the high-speed first storage medium.

[0103] Step S102: for any file pointed to by the de-aggregation task, obtain the metadata of the file, read the file in the second storage medium through the metadata, and write the read file to the first storage medium in the form of de-migration aggregation.

[0104] Since the de-aggregation task can include batch files, that is, the de-aggregation task can point to multiple files, the files can be processed one by one.

[0105] For any file targeted by the de-aggregation task, the secondary storage medium's hierarchical migration service needs to obtain the file's metadata. Since file metadata is typically managed by the MDS, in practice, the secondary storage medium's hierarchical migration service can retrieve the file's metadata from the MDS after traversing the files in the de-aggregation task.

[0106] In addition, it should be pointed out that the second storage medium stores file data in the form of aggregated files, that is, multiple small file data are actually stored in a large file. For example, a large amount of small file data is aggregated and stored in a 512M large file, where 512M is the size of a single large file in this example. When reading and writing data, the aggregated large file is directly operated on. This is because if a large number of small files are not aggregated, it will seriously affect the data recovery time in the event of a failure. After aggregation, data recovery is performed in large blocks of data, which is faster. The small files after aggregation can be called individual aggregated small files in the large file. Therefore, the "obtaining small file metadata" described in Figure 2 is also the process of obtaining file metadata in step S102. In other words, the small files in Figure 2 are the same concept as the files described in steps S101 to S103, and the small files in the second storage medium can also be called aggregated small files in the large file. Similarly, the small files in Figure 3 in the implementation method below are the same concept as the files described in steps S101 to S103.

[0107] After obtaining the metadata of the file, the file in the second storage medium can be read through the metadata, for example, the data of the aggregated small file can be read from the aggregated large file through the information of the aggregated large file in the metadata, the offset of the file in the aggregated large file, and other information.

[0108] After reading the file in the second storage medium through metadata, since the file data is stored in the first storage medium in the form of a non-aggregated file, the read file is written to the first storage medium in the form of a de-migrated aggregate, that is, the read file is written to the first storage medium, and the file is stored in the first storage medium in the form of a non-aggregated file.

[0109] In actual applications, when reading a file from the second storage medium, as described in Figure 2, the hierarchical migration service of the second storage medium can send a read data request and receive a response indicating that the read is complete. Similarly, when writing a file to the first storage medium, a write data request can be sent and a response indicating that the write is complete can be received.

[0110] Step S103: After any file is written to the first storage medium, metadata of the file is updated, and the file stored in the second storage medium is deleted.

[0111] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0112] After any file is written into the first storage medium, the metadata of the file needs to be updated, and usually the location information can be updated.

[0113] For example, in an optional embodiment of the present invention, after any file is written into the first storage medium, updating the metadata of the file described in step S103 may include:

[0114] After any file is written into the first storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is cleared.

[0115] In this implementation, after any file is written to the first storage medium, the file's storage location has changed, so the location information in the file's metadata can be updated. Furthermore, this implementation takes into account that the second storage medium stores file data as aggregated files, while the first storage medium stores file data as non-aggregated files. Therefore, the aggregation attribute needs to be cleared to avoid errors.

[0116] In actual applications, when updating file metadata, as described in Figure 2, the hierarchical migration service of the second storage medium can send a request to update the file metadata and receive a response indicating that the metadata update is complete. Similarly, when deleting a file stored in the second storage medium, a deletion request can be sent and a response indicating that the deletion is complete can be received.

[0117] Furthermore, in actual applications, when all files pointed to by the de-aggregation task are migrated to the first storage medium, as shown in FIG2 , the hierarchical migration service of the second storage medium may respond to the MDS that the de-aggregation task is completed.

[0118] In the solution of the present application, the data access speed of the first storage medium is higher than the data access speed of the second storage medium, that is, the performance of the first storage medium is higher than that of the second storage medium, and of course, the cost will be higher. For example, in actual applications, the first storage medium of the present application can usually be an SSD or an NVMe SSD, which can achieve high-speed access for random reading and writing of small files. The second storage medium can usually be a storage medium composed of an SSD and an HDD, that is, the second storage medium is a hybrid flash memory, which has a lower cost than the first storage medium. Therefore, the storage space configured by the second storage medium can be larger than the storage space configured by the first storage medium to achieve large-scale storage of data.

[0119] It should also be noted that when the storage medium includes hard disks of different performance, for example, in the above example, the second storage medium is usually composed of SSD and HDD, then the average access speed of these hard disks can be used as the data access speed of the second storage medium.

[0120] In addition, since the performance of the first storage medium is higher than that of the second storage medium, the data read speed of the first storage medium is usually higher than the data read speed of the second storage medium, and the data write speed of the first storage medium is also higher than the data write speed of the second storage medium. The data access speed of the second storage medium described below is higher than the data access speed of the third storage medium, and the data access speed of the third storage medium is higher than the data access speed of the fourth storage medium. Of course, in some cases, taking the first storage medium as an example, the average of the data read speed and the data write speed of the hard disk can be used as the data access speed of the hard disk, and then the data access speed of each hard disk in the first storage medium can be used as the data access speed of the first storage medium. The same applies to the second storage medium, the third storage medium, and the fourth storage medium.

[0121] As described above, the file is added to the de-aggregation task, and the first classification rule can be set based on the number of times the file is accessed within the first time period. In this implementation, in addition to the access frequency of the file, it can also be decided based on the file name whether the file needs to be stored in the first storage medium.

[0122] That is, in an optional embodiment of the present invention, the first classification rule may further include:

[0123] When the file name of the file matches the first database, the first classification rule is established.

[0124] In this implementation, a first database needs to be established in advance. If the file name matches the first database, it means that the file needs to be stored in the first storage medium. Therefore, the first classification rule is established, so that the file will be added to the de-aggregation task to migrate from the second storage medium to the first storage medium.

[0125] In an optional embodiment of the present invention, the first classification rule may further include:

[0126] When the file size of the file is smaller than a preset first value, the first classification rule is established.

[0127] This implementation takes into account that the advantage of high-speed storage media such as SSD is mainly reflected in the high-speed access of small files. Therefore, in this implementation, when the file size of a file is smaller than a preset first value, it can be determined that the first classification rule is established, so that the file will be added to the de-aggregation task to migrate from the second storage medium to the high-performance first storage medium.

[0128] In an optional embodiment of the present invention, the first classification rule may further include:

[0129] When the file is the file specified by the first user instruction, the first classification rule is established.

[0130] This implementation method takes into account that the storage location of the file can also support user specification, further improving the flexibility of the solution. That is, when the file is specified by the first user instruction, it means that the user needs to store the file in a high-performance first storage medium, so it can be determined that the first classification rule is established.

[0131] In the aforementioned embodiments, multiple design methods of the first classification rule are introduced. It can be understood that in actual applications, the multiple design methods of the first classification rule in the aforementioned embodiments can also be combined according to actual needs, which does not affect the implementation of the present invention. In addition, more forms of the first classification rule can be designed as needed to further ensure the flexibility of the solution, which does not affect the implementation of the present invention.

[0132] In an optional embodiment of the present invention, the method may further include:

[0133] Before deleting the files stored in the second storage medium, when an error occurs during the data migration process, the files stored in the second storage medium are retained, and the corresponding migration data is deleted.

[0134] This embodiment takes into account the possibility of errors during the entire process of executing steps S101 to S103. Therefore, before deleting the files stored in the second storage medium, if an error occurs during the data migration process, the files stored in the second storage medium can be retained and the corresponding migrated data can be deleted to ensure data security. Of course, if the data migration process occurs before the pulled data is written to the new location, there is no need to delete the migrated data because the migrated data does not exist at this time.

[0135] Similarly, in the implementation methods described below, whether it is the migration and aggregation process of executing files or the migration and re-aggregation process of executing files, if an error occurs, the original file can also be retained and the corresponding migration data can be deleted, which will not be repeated in the implementation methods described below.

[0136] In an optional embodiment of the present invention, the method may further include:

[0137] Receive the first reaggregation task;

[0138] For any one file pointed to by the first re-aggregation task, obtain metadata of the file, read the file in the second storage medium based on the metadata, and write the file into the aggregation cache of the second storage medium;

[0139] Whenever the aggregate cache is full, each file in the aggregate cache is written to the third storage medium in the form of re-aggregation of the aggregated files;

[0140] For any file written from the aggregate cache to the third storage medium, update the metadata of the file and delete the file stored in the second storage medium;

[0141] The third storage medium stores file data in the form of aggregated files, and the data access speed of the second storage medium is higher than the data access speed of the third storage medium.

[0142] In the aforementioned embodiment, a high-performance first storage medium and a low-performance second storage medium are set up, and this embodiment further takes into account that a third storage medium with lower performance than the second storage medium can also be set, that is, the data access speed of the second storage medium is higher than the data access speed of the third storage medium, the cost of the third storage medium is lower, and a larger storage space can be designed to realize the storage of large amounts of data.

[0143] For example, in an optional embodiment of the present invention, the first storage medium is a storage medium composed of an SSD, that is, the first storage medium can be composed of multiple SSDs. The second storage medium is a storage medium composed of an SSD and an HDD (Hard Disk Drive), that is, the first storage medium can be composed of a certain number of SSDs and a certain number of HDDs. The third storage medium is a storage medium composed of an HDD, that is, the third storage medium can be composed of multiple HDDs.

[0144] Furthermore, in this embodiment, to ensure data recovery speed, the third storage medium also stores file data in the form of aggregated files. Furthermore, it should be noted that since the high-performance first storage medium does not store file data in the form of aggregated files, and this does not significantly affect data recovery speed, the first storage medium of this application stores file data in the form of non-aggregated files.

[0145] In this embodiment, the hierarchical migration service of the second storage medium may receive the first re-aggregation task. Since the first re-aggregation task may include batch files, that is, the first re-aggregation task may point to multiple files, each file may be processed one by one.

[0146] For any file pointed to by the first re-aggregation task, the hierarchical migration service of the second storage medium needs to obtain the metadata of the file. Similar to the above, since the metadata of the file is usually managed by the MDS, in actual applications, the hierarchical migration service of the second storage medium can traverse the files of the first re-aggregation task, and then obtain the metadata of any file from the MDS.

[0147] After obtaining the metadata of the file, the file in the second storage medium can be read through the metadata, for example, the data of the aggregated small file can be read from the aggregated large file through the information of the aggregated large file in the metadata, the offset of the file in the aggregated large file, and other information.

[0148] After reading the file from the second storage medium, it needs to be written to the aggregation cache of the second storage medium to facilitate subsequent re-aggregation. The re-aggregation described in this application refers to storing file data in the form of aggregated files in the storage medium before and after migration. In this case, the file data is stored in the form of aggregated files in both the second storage medium and the third storage medium.

[0149] In actual applications, when reading a file from the second storage medium, as described in Figure 3, the hierarchical migration service of the second storage medium can send a read data request and receive a response indicating that the read is complete. Similarly, when writing a file to the third storage medium, a write data request can be sent and a response indicating that the write is complete can be received.

[0150] The size of the aggregate cache can be set as needed. For example, in one scenario, the aggregated large file is 512M, and the aggregate cache is set to 4M.

[0151] Whenever the aggregate cache is full, each file in the aggregate cache needs to be written to the third storage medium in the form of aggregate files re-migrated and aggregated, that is, all files in the aggregate cache are written to the third storage medium, and these files are stored in the third storage medium as non-aggregated files.

[0152] After all files in the aggregate cache are written to the third storage medium, for any file written from the aggregate cache to the third storage medium, the metadata of the file needs to be updated, usually by updating the location information, and deleting the file stored in the second storage medium.

[0153] In an optional embodiment of the present invention, for any file written from the aggregate cache to the third storage medium, updating the metadata of the file may include:

[0154] For any file written from the aggregate cache to the third storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is updated.

[0155] In this implementation, for any file written from the aggregate cache to the third storage medium, the location information in the file's metadata can be updated because the file's storage location has changed. Furthermore, this implementation takes into account that the second storage medium stores file data in the form of aggregated files, and the third storage medium also stores file data in the form of aggregated files, so the aggregation attributes also need to be updated to avoid errors.

[0156] In actual applications, when updating file metadata, as described in Figure 3, the secondary storage medium's hierarchical migration service can send a request to update the file metadata and receive a response from the MDS indicating the metadata update is complete. Similarly, when deleting a file stored in the secondary storage medium, a deletion request can be sent and a response indicating the deletion is complete can be received.

[0157] Furthermore, in actual applications, when all files pointed to by the first re-aggregation task are migrated to the third storage medium, as shown in FIG3 , the hierarchical migration service of the second storage medium can respond to the MDS that the first re-aggregation task is completed.

[0158] The file is added to the first re-aggregation task, and the optional triggering method can be set and adjusted according to actual needs, that is, the rules of the file classification strategy can be set and adjusted according to actual needs. For example, in an optional embodiment of the present invention, any file pointed to by the first re-aggregation task is a file that meets the preset third classification rule.

[0159] The third classification rule includes: when the number of times a file is accessed within the first time period is greater than or equal to a preset third threshold and less than a preset second threshold, the third classification rule is established; wherein the second threshold is greater than the third threshold.

[0160] It is understandable that when the number of times a file is accessed within the first time period is lower, it means that the file can be transferred to a storage medium with lower performance to avoid occupying storage space of a high-performance storage medium and improve product competitiveness.

[0161] The first threshold described in the above embodiment is denoted as a, and the number of times the file is accessed within the first time period is denoted as X. In the above embodiment, when X≥a, it is determined that the first classification rule holds and the file is added to the de-aggregation task so as to migrate the file from the low-speed second storage medium to the high-speed first storage medium.

[0162] In this implementation, when b > X ≥ c, the third classification rule is determined to hold true, and the file is added to the first re-aggregation task to migrate the file from the slow second storage medium to the even slower third storage medium. b is the second threshold, and c is the third threshold. b should be greater than c, and it is understood that b is less than a, meaning that the second threshold is less than the first threshold described above.

[0163] Furthermore, it is understood that, referring to the description above, in addition to file access frequency, the validity of the first classification rule can also be determined based on factors such as file name, file size, and user instructions. Similarly, in actual applications, the validity of the third classification rule, as well as the second and fourth classification rules described in other embodiments, can also be determined based on one or more of these factors. Since the principles are the same as above, please refer to the description above and will not be further explained here.

[0164] In an optional embodiment of the present invention, the method may further include:

[0165] The hierarchical migration service in the first storage medium receives a migration aggregation task;

[0166] For any file pointed to by the migration aggregation task, the hierarchical migration service in the first storage medium obtains the metadata of the file, reads the file in the first storage medium based on the metadata, and writes the read file to the second storage medium in the form of a migration aggregation;

[0167] After any file is written into the second storage medium, the hierarchical migration service in the first storage medium updates the metadata of the file and deletes the file stored in the first storage medium.

[0168] This embodiment describes the process of file migration and aggregation performed by the hierarchical migration service in the first storage medium. Optionally, the hierarchical migration service in the first storage medium may receive a migration and aggregation task sent by the MDS in the first storage medium.

[0169] For any file pointed to by the migration aggregation task, the hierarchical migration service in the first storage medium can obtain metadata of the file, and then read the file in the first storage medium through the metadata.

[0170] Since the file data is stored in the second storage medium in the form of aggregated files and the file data is stored in the first storage medium in the form of non-aggregated files, the read file is written to the second storage medium in the form of migration aggregation, that is, the file read in the first storage medium is written to the second storage medium, and after writing, the file is stored in the second storage medium in the form of an aggregated file.

[0171] After any file is written into the second storage medium, the hierarchical migration service in the first storage medium needs to update the metadata of the file through the MDS and delete the original file in the first storage medium.

[0172] The file is added to the migration aggregation task, and the optional triggering method can be set and adjusted according to actual needs, that is, the rules of the file classification policy can be set and adjusted according to actual needs. For example, in an optional embodiment of the present invention, any file pointed to by the migration aggregation task is a file that meets the preset second classification rule; the second classification rule includes: when the number of accesses to the file within the first time period is greater than or equal to the preset second threshold and less than the preset first threshold, the second classification rule is established.

[0173] Similarly to the above, when the number of file accesses in the first time period is lower, it needs to be moved to a storage medium with lower performance. When the number of file accesses in the first time period is higher, it needs to be moved up to a storage medium with higher performance to improve product competitiveness.

[0174] In this implementation, when a > X ≥ b, the second classification rule is determined to hold true, and the file is added to the migration aggregation task to migrate the file from the high-speed first storage medium to the low-speed second storage medium. b is the second threshold, and c is the first threshold. a must be greater than b, meaning the second threshold is less than the first threshold.

[0175] Furthermore, it is understood that in the aforementioned implementation, in addition to file access frequency, the validity of the first classification rule may also be determined based on factors such as file name, file size, and user instructions. Similarly, in actual applications, the validity of the third classification rule may also be determined based on one or more of these factors. Since the principles are the same as above, please refer to the above description and will not be further explained here.

[0176] In an optional embodiment of the present invention, the method may further include:

[0177] The hierarchical migration service in the third storage medium receives the second re-aggregation task;

[0178] For any one file pointed to by the second re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0179] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the fourth storage medium in the form of re-migration of aggregate files;

[0180] For any file written from the aggregate cache to the fourth storage medium, update the metadata of the file and delete the file stored in the third storage medium;

[0181] The fourth storage medium stores file data in the form of aggregated files, and the data access speed of the third storage medium is higher than that of the fourth storage medium.

[0182] In this embodiment, a fourth storage medium with a lower speed is also provided, that is, the data access speed of the third storage medium is higher than that of the fourth storage medium. The fourth storage medium also stores file data in the form of aggregated files to ensure the speed of data recovery.

[0183] This embodiment describes the process of migrating files from a third storage medium to a fourth storage medium. Since both the third and fourth storage media store file data in the form of aggregated files, this process is also a migration and then aggregation process. In other words, the principles of this embodiment are the same as those described in the above embodiment for migrating files from the second storage medium to the third storage medium, so the process of this embodiment will not be repeated.

[0184] The fourth storage medium is lower cost and can be designed with larger storage space, enabling storage of large amounts of data. For example, in the optional embodiment of Figure 4 , the first storage medium is a storage medium composed of an SSD, the second storage medium is a storage medium composed of an SSD and an HDD, the third storage medium is a storage medium composed of an HDD, and the fourth storage medium is a storage medium composed of a tape library and / or an optical disk. In Figure 4 , hot data, warm data, cold data, and frozen data are used to represent different data access frequencies.

[0185] In actual applications, only the backed-up and inaccessible data is usually stored in the fourth storage medium, i.e., the data is rarely accessed or even not accessed at all. For example, in an optional embodiment of the present invention, any file pointed to by the second re-aggregation task is a file that meets the preset fourth classification rule;

[0186] The fourth classification rule includes: when the number of times a file is accessed within the first time period is less than a preset third threshold, the fourth classification rule is established.

[0187] In this embodiment, when c>X, the fourth classification rule is determined to be valid, and the file is added to the second re-aggregation task to migrate the file from the third storage medium to the fourth storage medium with the lowest speed. c is the third threshold.

[0188] In an optional embodiment of the present invention, the method may further include:

[0189] The hierarchical migration service in the fourth storage medium receives the third re-aggregation task;

[0190] For any one file pointed to by the third re-aggregation task, the hierarchical migration service in the fourth storage medium obtains metadata of the file, reads the file in the fourth storage medium based on the metadata, and writes the file into the aggregation cache of the fourth storage medium;

[0191] Whenever the aggregate cache is full, the hierarchical migration service in the fourth storage medium writes each file in the aggregate cache to the third storage medium in the form of re-migration of aggregate files;

[0192] For any file written from the aggregate cache to the third storage medium, metadata of the file is updated, and the file stored in the fourth storage medium is deleted.

[0193] In this embodiment, the process of migrating files from the fourth storage medium to the third storage medium is described. Since both the third storage medium and the fourth storage medium store file data in the form of aggregated files, this process is also a process of migration and re-aggregation. In other words, the principle of this embodiment is the same as the description of the migration of files from the second storage medium to the third storage medium and the description of the migration of files from the third storage medium to the fourth storage medium in the above embodiment, except that the migration direction is different. Therefore, the migration process of this embodiment will not be repeated. The different migration directions described here refer to the fact that the first two embodiments are downward migration, that is, migrating files to a lower-speed storage medium, while this embodiment is upward migration, that is, migrating files to a higher-speed storage medium.

[0194] Since this implementation can realize the migration and re-aggregation process during upward migration, the comprehensiveness of the life cycle management of aggregated small files is further improved.

[0195] In an optional embodiment of the present invention, the method may further include:

[0196] The hierarchical migration service in the third storage medium receives a fourth re-aggregation task;

[0197] For any one file pointed to by the fourth re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0198] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the second storage medium in the form of re-migration of aggregate files;

[0199] For any file written from the aggregate cache to the second storage medium, metadata of the file is updated, and the file stored in the third storage medium is deleted.

[0200] This implementation describes the process of migrating files from the third storage medium to the second storage medium. Since both the third and second storage media store file data in the form of aggregated files, this process is also a migration-and-reaggregation process. In other words, the principle of this implementation is the same as the above implementation of migrating files from the fourth storage medium to the third storage medium, and the migration direction is also upward, that is, migrating files to higher-speed storage media.

[0201] Combining this implementation with the previous implementation, we can achieve full lifecycle management of aggregated small files based on the four levels of storage media. This full lifecycle management of aggregated small files covers the migration and aggregation process (i.e., the process of converting non-aggregated files into aggregated small files), the de-aggregation process (i.e., the process of converting aggregated small files into non-aggregated files), and the migration and re-aggregation process (i.e., the process of converting aggregated small files into non-aggregated files).

[0202] Applying the technical solutions provided by the embodiments of the present invention, the data access speed of the first storage medium is higher than that of the second storage medium. That is, the first storage medium is a high-speed storage medium, facilitating high-speed data access. Compared to the first storage medium, the second storage medium is a low-speed storage medium, facilitating the storage of large amounts of data while ensuring cost-effectiveness. The second storage medium stores file data in the form of aggregated files, which also facilitates data recovery speed. Furthermore, the solution of this application supports data migration from the second storage medium to the first storage medium. Optionally, the hierarchical migration service of the second storage medium can receive a de-aggregation task and, for any file targeted by the de-aggregation task, indicate that it needs to be pulled up to the first storage medium. The service can then obtain metadata for the file and use the metadata to read the file from the second storage medium. Since the first storage medium does not aggregate files, while the second storage medium does, the read file is written to the first storage medium in the form of a de-migration aggregate. After writing any file to the first storage medium, the file metadata needs to be updated, and the file stored in the second storage medium needs to be deleted. It can be seen that the present application realizes the de-aggregation of files, that is, data is read from the second storage medium where file aggregation is performed and stored in the first storage medium where file aggregation is not performed. Therefore, the solution of the present application improves the flexibility of data migration while ensuring the data recovery speed.

[0203] In the above implementation, the operations of steps S101 to S103 can be performed by a hierarchical migration service of the second storage medium. Corresponding to the above method embodiment, an embodiment of the present invention also provides a data migration method, which can be referenced in conjunction with the above. This data migration method can be applied to a metadata service, and includes the following steps performed by the metadata service of the second storage medium:

[0204] Step 1: Generate a de-aggregation task and send it to the hierarchical migration service;

[0205] Step 2: For any file pointed to by the de-aggregation task, send the file's metadata to the hierarchical migration service, so that the hierarchical migration service reads the file from the second storage medium through the metadata and writes the read file to the first storage medium in the form of de-migration aggregation;

[0206] Step 3: After the hierarchical migration service writes any file to the first storage medium, the metadata of the file is updated, and after the update is completed, the hierarchical migration service deletes the file stored in the second storage medium;

[0207] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0208] Since the principle is the same as above, it will not be repeated here.

[0209] In an optional embodiment of the present invention, any one file pointed to by the de-aggregation task is a file that meets the preset first classification rule;

[0210] The first classification rules include:

[0211] When the number of times the file is accessed within the first time period is greater than or equal to a preset first threshold, the first classification rule is established.

[0212] In an optional embodiment of the present invention, the first classification rule further includes:

[0213] When the file name of the file matches the first database, the first classification rule is established.

[0214] In an optional embodiment of the present invention, the first classification rule further includes:

[0215] When the file size of the file is smaller than a preset first value, the first classification rule is established.

[0216] In an optional embodiment of the present invention, the first classification rule further includes:

[0217] When the file is the file specified by the first user instruction, the first classification rule is established.

[0218] In an optional embodiment of the present invention, after the hierarchical migration service writes any file into the first storage medium, updating the metadata of the file includes:

[0219] After the hierarchical migration service writes any file to the first storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is cleared.

[0220] In an optional embodiment of the present invention, it also includes:

[0221] Before deleting the files stored in the second storage medium, the hierarchical migration service retains the files stored in the second storage medium and deletes the corresponding migration data when an error occurs during the data migration process.

[0222] In an optional embodiment of the present invention, it also includes:

[0223] Sending the first reaggregation task to the hierarchical migration service;

[0224] For any one file pointed to by the first re-aggregation task, metadata of the file is sent to the hierarchical migration service, so that the hierarchical migration service reads the file in the second storage medium through the metadata and writes the file into the aggregation cache of the second storage medium;

[0225] Whenever the aggregate cache is full, the hierarchical migration service writes each file in the aggregate cache to the third storage medium in the form of re-aggregation of the aggregated files;

[0226] For any file written from the aggregate cache to the third storage medium, the metadata of the file is updated, and the hierarchical migration service deletes the file stored in the second storage medium;

[0227] The third storage medium stores file data in the form of aggregated files, and the data access speed of the second storage medium is higher than the data access speed of the third storage medium.

[0228] In an optional embodiment of the present invention, any one file pointed to by the first re-aggregation task is a file that meets a preset third classification rule;

[0229] The third classification rules include:

[0230] When the number of times a file is accessed within the first time period is greater than or equal to the third threshold and less than the second threshold, the third classification rule is established:

[0231] The second threshold is greater than the third threshold.

[0232] In an optional embodiment of the present invention, for any file written from the aggregate cache to the third storage medium, updating the metadata of the file includes:

[0233] For any file written from the aggregate cache to the third storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is updated.

[0234] In an optional embodiment of the present invention, the method may further include:

[0235] The metadata service in the first storage medium sends a migration aggregation task to the hierarchical migration service in the first storage medium to receive the migration aggregation task;

[0236] For any file pointed to by the migration aggregation task, the metadata of the file is sent to the hierarchical migration service in the first storage medium, so that the hierarchical migration service in the first storage medium reads the file in the first storage medium through the metadata and writes the read file to the second storage medium in the form of a migration aggregation;

[0237] After the hierarchical migration service in the first storage medium writes any file into the second storage medium, the metadata of the file is updated, and the hierarchical migration service in the first storage medium deletes the file stored in the first storage medium.

[0238] In an optional embodiment of the present invention, any one file pointed to by the migration aggregation task is a file that meets the preset second classification rule;

[0239] The second classification rules include:

[0240] When the number of times a file is accessed within the first time period is greater than or equal to the second threshold and less than the first threshold, the second classification rule is established:

[0241] The second threshold is smaller than the first threshold.

[0242] In an optional embodiment of the present invention, it also includes:

[0243] The metadata service in the third storage medium sends the second re-aggregation task to the hierarchical migration service in the third storage medium;

[0244] For any one file pointed to by the second re-aggregation task, the metadata of the file is sent to the hierarchical migration service in the third storage medium, so that the hierarchical migration service in the third storage medium reads the file in the third storage medium through the metadata and writes it into the aggregation cache of the third storage medium;

[0245] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the fourth storage medium in the form of re-migration of aggregate files;

[0246] For any file written from the aggregate cache to the fourth storage medium, the metadata of the file is updated, and the hierarchical migration service in the third storage medium deletes the file stored in the third storage medium;

[0247] The fourth storage medium stores file data in the form of aggregated files, and the data access speed of the third storage medium is higher than that of the fourth storage medium.

[0248] In an optional embodiment of the present invention, any one file pointed to by the second re-aggregation task is a file that meets a preset fourth classification rule;

[0249] The fourth classification rules include:

[0250] When the number of times the file is accessed within the first time period is less than a preset third threshold, the fourth classification rule is established.

[0251] In an optional embodiment of the present invention, it also includes:

[0252] The metadata service in the fourth storage medium sends the third re-aggregation task to the hierarchical migration service in the fourth storage medium;

[0253] For any one file pointed to by the third re-aggregation task, the metadata of the file is sent to the hierarchical migration service in the fourth storage medium, so that the hierarchical migration service in the fourth storage medium reads the file in the fourth storage medium through the metadata and writes the file into the aggregation cache of the fourth storage medium;

[0254] Whenever the aggregate cache is full, the hierarchical migration service in the fourth storage medium writes each file in the aggregate cache to the third storage medium in the form of re-migration of aggregate files;

[0255] For any file written from the aggregate cache to the third storage medium, the metadata of the file is updated, and the hierarchical migration service in the fourth storage medium deletes the file stored in the fourth storage medium.

[0256] In an optional embodiment of the present invention, it also includes:

[0257] The metadata service in the third storage medium sends the fourth re-aggregation task to the hierarchical migration service in the third storage medium;

[0258] For any one file pointed to by the fourth re-aggregation task, the metadata of the file is sent to the hierarchical migration service in the third storage medium, so that the hierarchical migration service in the third storage medium reads the file in the third storage medium through the metadata and writes the file into the aggregation cache of the third storage medium;

[0259] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the second storage medium in the form of re-migration of aggregate files;

[0260] For any file written from the aggregate cache to the second storage medium, metadata of the file is updated, and the hierarchical migration service in the third storage medium deletes the file stored in the third storage medium.

[0261] Corresponding to the above method embodiment, an embodiment of the present invention further provides a data migration system, which can be referred to in correspondence with the above.

[0262] Referring to FIG5 , the data migration system may include:

[0263] The task receiving module 501 is configured to receive a de-aggregation task;

[0264] The de-migration aggregation module 502 is configured to obtain metadata of any file pointed to by the de-aggregation task, read the file in the second storage medium based on the metadata, and write the read file to the first storage medium in the form of de-migration aggregation;

[0265] An update and delete module 503 is configured to update metadata of any file after writing the file to the first storage medium and delete the file stored in the second storage medium;

[0266] The second storage medium stores file data in the form of aggregated files, and the first storage medium stores file data in the form of non-aggregated files. The data access speed of the first storage medium is higher than that of the second storage medium.

[0267] In an optional embodiment of the present invention, any one file pointed to by the de-aggregation task is a file that meets the preset first classification rule;

[0268] The first classification rules include:

[0269] When the number of times the file is accessed within the first time period is greater than or equal to a preset first threshold, the first classification rule is established.

[0270] In an optional embodiment of the present invention, the first classification rule further includes:

[0271] When the file name of the file matches the first database, the first classification rule is established.

[0272] In an optional embodiment of the present invention, the first classification rule further includes:

[0273] When the file size of the file is smaller than a preset first value, the first classification rule is established.

[0274] In an optional embodiment of the present invention, the first classification rule further includes:

[0275] When the file is the file specified by the first user instruction, the first classification rule is established.

[0276] In an optional embodiment of the present invention, after writing any file into the first storage medium, the update and delete module 503 updates the metadata of the file, including:

[0277] After any file is written into the first storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is cleared.

[0278] In an optional embodiment of the present invention, an error reset module is further included, which is configured to:

[0279] Before deleting the files stored in the second storage medium, when an error occurs during the data migration process, the files stored in the second storage medium are retained, and the corresponding migration data is deleted.

[0280] In an optional embodiment of the present invention, a repolymerization module is further included:

[0281] Receive the first reaggregation task;

[0282] For any one file pointed to by the first re-aggregation task, obtain metadata of the file, read the file in the second storage medium based on the metadata, and write the file into the aggregation cache of the second storage medium;

[0283] Whenever the aggregate cache is full, each file in the aggregate cache is written to the third storage medium in the form of re-aggregation of the aggregated files;

[0284] For any file written from the aggregate cache to the third storage medium, update the metadata of the file and delete the file stored in the second storage medium;

[0285] The third storage medium stores file data in the form of aggregated files, and the data access speed of the second storage medium is higher than the data access speed of the third storage medium.

[0286] In an optional embodiment of the present invention, any one file pointed to by the first re-aggregation task is a file that meets a preset third classification rule;

[0287] The third classification rules include:

[0288] When the number of accesses to the file within the first time period is greater than or equal to a preset third threshold and less than a preset second threshold, the third classification rule is established;

[0289] The second threshold is greater than the third threshold.

[0290] In an optional embodiment of the present invention, for any file written from the aggregate cache to the third storage medium, updating the metadata of the file and deleting the file stored in the second storage medium includes:

[0291] For any file written from the aggregate cache to the third storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is updated.

[0292] In an optional embodiment of the present invention, the hierarchical migration service in the first storage medium is further used to:

[0293] The hierarchical migration service in the first storage medium receives a migration aggregation task;

[0294] For any file pointed to by the migration aggregation task, the hierarchical migration service in the first storage medium obtains the metadata of the file, reads the file in the first storage medium based on the metadata, and writes the read file to the second storage medium in the form of a migration aggregation;

[0295] After any file is written into the second storage medium, the hierarchical migration service in the first storage medium updates the metadata of the file and deletes the file stored in the first storage medium.

[0296] In an optional embodiment of the present invention, any one file pointed to by the migration aggregation task is a file that meets the preset second classification rule;

[0297] The second classification rules include:

[0298] When the number of accesses to the file within the first time period is greater than or equal to the preset second threshold and less than the preset first threshold, the second classification rule is established;

[0299] The second threshold is smaller than the first threshold.

[0300] In an optional embodiment of the present invention, the hierarchical migration service in the third storage medium is further used to:

[0301] The hierarchical migration service in the third storage medium receives the second re-aggregation task;

[0302] For any one file pointed to by the second re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0303] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the fourth storage medium in the form of re-migration of aggregate files;

[0304] For any file written from the aggregate cache to the fourth storage medium, update the metadata of the file and delete the file stored in the third storage medium;

[0305] The fourth storage medium stores file data in the form of aggregated files, and the data access speed of the third storage medium is higher than that of the fourth storage medium.

[0306] In an optional embodiment of the present invention, any one file pointed to by the second re-aggregation task is a file that meets a preset fourth classification rule;

[0307] The fourth classification rules include:

[0308] When the number of times the file is accessed within the first time period is less than a preset third threshold, the fourth classification rule is established.

[0309] In an optional embodiment of the present invention, the hierarchical migration service in the fourth storage medium is further used to:

[0310] The hierarchical migration service in the fourth storage medium receives the third re-aggregation task;

[0311] For any one file pointed to by the third re-aggregation task, the hierarchical migration service in the fourth storage medium obtains metadata of the file, reads the file in the fourth storage medium based on the metadata, and writes the file into the aggregation cache of the fourth storage medium;

[0312] Whenever the aggregate cache is full, the hierarchical migration service in the fourth storage medium writes each file in the aggregate cache to the third storage medium in the form of re-migration of aggregate files;

[0313] For any file written from the aggregate cache to the third storage medium, metadata of the file is updated, and the file stored in the fourth storage medium is deleted.

[0314] In an optional embodiment of the present invention, the hierarchical migration service in the third storage medium is further used to:

[0315] The hierarchical migration service in the third storage medium receives a fourth re-aggregation task;

[0316] For any one file pointed to by the fourth re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium based on the metadata, and writes the file into the aggregation cache of the third storage medium;

[0317] Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache to the second storage medium in the form of re-migration of aggregate files;

[0318] For any file written from the aggregate cache to the second storage medium, metadata of the file is updated, and the file stored in the third storage medium is deleted.

[0319] In an optional embodiment of the present invention, the first storage medium is a storage medium composed of an SSD, the second storage medium is a storage medium composed of an SSD and an HDD, the third storage medium is a storage medium composed of an HDD, and the fourth storage medium is a storage medium composed of a tape library and / or an optical disc.

[0320] Corresponding to the above method and system embodiments, embodiments of the present invention further provide a data migration device and a non-volatile readable storage medium, which can be referred to in correspondence with the above.

[0321] Referring to FIG6 , the data migration device may include:

[0322] Memory 601 is configured to store computer programs;

[0323] The processor 602 is configured to execute a computer program to implement the steps of any of the above data migration methods.

[0324] Referring to FIG. 7 , a non-volatile readable storage medium 70 stores a computer program 71. When executed by a processor, computer program 71 implements the steps of the data migration method described in any of the above embodiments. The non-volatile readable storage medium 70 herein includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD ROM, or any other form of storage medium known in the art.

[0325] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0326] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0327] This document uses individual examples to illustrate the principles and implementation methods of the present invention. The description of the above examples is only intended to help understand the technical solutions and core concepts of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A data migration method, It is characterized in that include: Receive anti-aggregation tasks; For any one file pointed to by the de-aggregation task, obtain metadata of the file, read the file in the second storage medium through the metadata, and write the read file into the first storage medium in the form of de-migration aggregation; After writing any of the files to the first storage medium, updating metadata of the file and deleting the file stored in the second storage medium; The second storage medium stores file data in the form of aggregated files, the first storage medium stores file data in the form of non-aggregated files, and the data access speed of the first storage medium is higher than the data access speed of the second storage medium.

2. The data migration method according to claim 1, It is characterized in that Any file pointed to by the de-aggregation task is a file that satisfies the preset first classification rule; The first classification rule includes: When the number of accesses to the file within the first time period is greater than or equal to a preset first threshold, the first classification rule is established.

3. The data migration method according to claim 2, It is characterized in that The first classification rule also includes: When the file name of the file matches the first database, the first classification rule is established.

4. The data migration method according to claim 2, It is characterized in that The first classification rule also includes: When the file size of the file is smaller than a preset first value, the first classification rule is established.

5. The data migration method according to claim 2, It is characterized in that The first classification rule also includes: When the file is a file specified by the first user instruction, the first classification rule is established.

6. The data migration method according to claim 1, It is characterized in that After writing any of the files into the first storage medium, updating the metadata of the file includes: After any of the files is written to the first storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is cleared.

7. The data migration method according to claim 1, It is characterized in that Also includes: Before deleting the file stored in the second storage medium, when an error occurs during the data migration process, the file stored in the second storage medium is retained, and the corresponding migration data is deleted.

8. The data migration method according to claim 1, It is characterized in that Also includes: receiving a first reaggregation task; For any one file pointed to by the first re-aggregation task, obtain metadata of the file, read the file in the second storage medium through the metadata, and write the file into the aggregation cache of the second storage medium; Whenever the aggregate cache is full, each file in the aggregate cache is written to a third storage medium in the form of re-migrating and aggregating the aggregate files; For any file written from the aggregate cache to the third storage medium, update the metadata of the file, and delete the file stored in the second storage medium; The third storage medium stores file data in the form of aggregated files, and the data access speed of the second storage medium is higher than the data access speed of the third storage medium.

9. The data migration method according to claim 8, It is characterized in that Any one of the files pointed to by the first re-aggregation task is a file that satisfies a preset third classification rule; The third classification rule includes: When the number of accesses to the file within the first time period is greater than or equal to a preset third threshold and less than a preset second threshold, the third classification rule is established; The second threshold is greater than the third threshold.

10. The data migration method according to claim 8, It is characterized in that For any file written from the aggregate cache to the third storage medium, updating metadata of the file includes: For any file written from the aggregate cache to the third storage medium, the location information in the metadata of the file is updated, and the aggregation attribute is updated.

11. The data migration method according to claim 1, It is characterized in that Also includes: The hierarchical migration service in the first storage medium receives a migration aggregation task; For any one file pointed to by the migration aggregation task, the hierarchical migration service in the first storage medium obtains metadata of the file, reads the file in the first storage medium through the metadata, and writes the read file into the second storage medium in the form of migration aggregation; After any of the files is written into the second storage medium, the hierarchical migration service in the first storage medium updates the metadata of the file and deletes the file stored in the first storage medium.

12. The data migration method according to claim 11, It is characterized in that Any file pointed to by the migration aggregation task is a file that satisfies the preset second classification rule; The second classification rule includes: When the number of accesses to the file within the first time period is greater than or equal to a preset second threshold and less than a preset first threshold, the second classification rule is established; The second threshold is smaller than the first threshold.

13. The data migration method according to any one of claims 1 to 12, It is characterized in that Also includes: The hierarchical migration service in the third storage medium receives the second re-aggregation task; For any one file pointed to by the second re-aggregation task, the hierarchical migration service in the third storage medium obtains metadata of the file, reads the file in the third storage medium through the metadata, and writes the file into the aggregation cache of the third storage medium; Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache into the fourth storage medium in the form of re-migration aggregation of aggregate files; For any file written from the aggregate cache to the fourth storage medium, update the metadata of the file, and delete the file stored in the third storage medium; The fourth storage medium stores file data in the form of aggregated files, and the data access speed of the third storage medium is higher than the data access speed of the fourth storage medium.

14. The data migration method according to claim 13, It is characterized in that Any one of the files pointed to by the second re-aggregation task is a file that satisfies a preset fourth classification rule; The fourth classification rule includes: When the number of accesses to the file within the first time period is less than a preset third threshold, the fourth classification rule is established.

15. The data migration method according to claim 13, It is characterized in that Also includes: The hierarchical migration service in the fourth storage medium receives a third re-aggregation task; For any one file pointed to by the third re-aggregation task, the hierarchical migration service in the fourth storage medium obtains metadata of the file, reads the file in the fourth storage medium through the metadata, and writes the file into the aggregation cache of the fourth storage medium; Whenever the aggregate cache is full, the hierarchical migration service in the fourth storage medium writes each file in the aggregate cache into the third storage medium in the form of re-migration aggregation of aggregate files; For any file written from the aggregate cache to the third storage medium, metadata of the file is updated, and the file stored in the fourth storage medium is deleted.

16. The data migration method according to claim 13, It is characterized in that Also includes: The hierarchical migration service in the third storage medium receives a fourth re-aggregation task; For any one file pointed to by the fourth re-aggregation task, the hierarchical migration service in the third storage medium obtains the file Metadata, through which the file in the third storage medium is read and written into an aggregate cache of the third storage medium; Whenever the aggregate cache is full, the hierarchical migration service in the third storage medium writes each file in the aggregate cache into the second storage medium in the form of re-migration aggregation of aggregate files; For any file written from the aggregate cache to the second storage medium, metadata of the file is updated, and the file stored in the third storage medium is deleted.

17. The data migration method according to claim 13, It is characterized in that The first storage medium is a storage medium composed of an SSD, the second storage medium is a storage medium composed of an SSD and an HDD, the third storage medium is a storage medium composed of an HDD, and the fourth storage medium is a storage medium composed of a tape library and / or an optical disk.

18. A data migration method, It is characterized in that include: Generate a de-aggregation task and send it to the hierarchical migration service; For any one file pointed to by the de-aggregation task, the metadata of the file is sent to the hierarchical migration service, so that the hierarchical migration service reads the file in the second storage medium through the metadata, and writes the read file into the first storage medium in the form of de-migration aggregation; After the hierarchical migration service writes any of the files into the first storage medium, the metadata of the file is updated, and after the update is completed, the hierarchical migration service deletes the file stored in the second storage medium; The second storage medium stores file data in the form of aggregated files, the first storage medium stores file data in the form of non-aggregated files, and the data access speed of the first storage medium is higher than the data access speed of the second storage medium.

19. A data migration system, It is characterized in that include: A task receiving module, configured to receive anti-aggregation tasks; The de-migration aggregation module is configured to obtain metadata of any one file pointed to by the de-aggregation task, read the file in the second storage medium through the metadata, and write the read file into the first storage medium in the form of de-migration aggregation; an update and delete module, configured to update the metadata of any file and delete the file stored in the second storage medium after writing any file to the first storage medium; The second storage medium stores file data in the form of aggregated files, the first storage medium stores file data in the form of non-aggregated files, and the data access speed of the first storage medium is higher than the data access speed of the second storage medium.

20. A data migration device, It is characterized in that include: a memory arranged to store a computer program; A processor is configured to execute the computer program to implement the steps of the data migration method according to any one of claims 1 to 17.

21. A non-volatile readable storage medium, It is characterized in that The non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data migration method according to any one of claims 1 to 17 are implemented.

Citation Information

Patent Citations

  • Method and equipment for acquiring data from network

    CN103336671A

  • Aggregate big file deletion method, apparatus and device, and computer storage medium

    CN107704203A

  • Data migration method, device and system

    CN109471836A

  • Data migration method and device, equipment and medium

    CN115061630A

  • Data migration method, system and device and computer readable storage medium

    CN115904263A

Cited By

  • Object storage method and device, storage medium and electronic equipment

    CN119668522A