Data migration control method and device, storage medium and electronic device
Patent Information
- Application Number
- CN202110369315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-06
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-04-06
AI Technical Summary
[0004]本发明实施例提供了一种数据迁移的控制方法、装置和存储介质及电子设备,以至少解决在数据迁移过程中,存在因访问操作导致的迁移数据不同步的技术问题
[0009]在本发明实施例中,获取数据迁移请求,其中,上述数据迁移请求用于请求对目标数据进行数据迁移;响应上述数据迁移请求,获取上述目标数据的迁移状态,其中,上述迁移状态用于指示上述目标数据的迁移权限;将用于接收数据访问请求的目标链路进行迁移处理,其中,迁移后的目标链路用于监测上述数据访问请求,上述数据访问请求用于请求访问上述目标数据;在上述迁移状态为目标状态的情况下,对上述目标数据进行数据迁移,并通过上述迁移后的目标链路监测上述数据访问请求,其中,上述目标状态用于指示允许对上述目标数据进行数据迁移;在监测到上述数据访问请求的情况下,将上述迁移状态从上述目标状态调整为保护状态,以中止上述目标数据的数据迁移,其中,上述保护状态用于指示禁止对上述目标数据进行数据迁移,利用在迁移过程中,监测数据访问请求,并根据监测结果及时停止数据迁移的方式,避免了因访问操作触发的数据访问请求而导致的迁移数据不同步的问题,进而达到了及时制止数据不同步的问题发生的目的,从而实现了降低迁移数据不同步的概率的技术效果,进而解决了在数据迁移过程中,存在因访问操作导致的迁移数据不同步的技术问题。
Smart Images

Figure CN115168318B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and more specifically, to a data migration control method, apparatus, storage medium, and electronic device. Background Technology
[0002] In recent years, storage containers have been updated and replaced more frequently, necessitating frequent migration of data from obsolete containers to newer ones. However, since storage containers often have data access capabilities, users can perform access operations to access and even modify the data within them. Therefore, restricting user access to storage containers during data migration degrades the user experience, while granting access can lead to data asynchrony issues. Consequently, related technologies suffer from a technical problem related to data migration asynchrony caused by access operations.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a data migration control method, apparatus, storage medium, and electronic device to at least solve the technical problem of asynchronous migration data caused by access operations during the data migration process.
[0005] According to one aspect of the present invention, a data migration control method is provided, comprising: acquiring a data migration request, wherein the data migration request is used to request data migration of target data; responding to the data migration request and acquiring a migration status of the target data, wherein the migration status is used to indicate migration permission of the target data; performing migration processing on a target link used to receive a data access request, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data; when the migration status is a target status, performing data migration on the target data and monitoring the data access request through the migrated target link, wherein the target status is used to indicate that data migration of the target data is permitted; and when the data access request is detected, adjusting the migration status from the target status to a protection status to stop the data migration of the target data, wherein the protection status is used to indicate that data migration of the target data is prohibited.
[0006] According to another aspect of the present invention, a data migration control device is also provided, comprising: a first acquisition unit, configured to acquire a data migration request, wherein the data migration request is used to request data migration of target data; a first response unit, configured to respond to the data migration request and acquire a migration status of the target data, wherein the migration status is used to indicate migration permission of the target data; a link unit, configured to migrate a target link used to receive a data access request, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data; a first migration unit, configured to perform data migration of the target data when the migration status is a target status, and monitor the data access request through the migrated target link, wherein the target status is used to indicate permission to migrate the target data; and a first control unit, configured to adjust the migration status from the target status to a protection status when the data access request is detected, thereby suspending the data migration of the target data, wherein the protection status is used to indicate prohibition of data migration of the target data.
[0007] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described data migration control method at runtime.
[0008] According to another aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described data migration control method through the computer program.
[0009] In this embodiment of the invention, a data migration request is obtained, wherein the data migration request is used to request data migration of target data; in response to the data migration request, the migration status of the target data is obtained, wherein the migration status is used to indicate the migration permission of the target data; a target link used to receive a data access request is migrated, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data; when the migration status is a target status, the target data is migrated, and the data access request is monitored through the migrated target link, wherein the target status is used to indicate permission to access the target data. Data migration is performed; upon detecting the aforementioned data access request, the migration status is adjusted from the target status to the protection status to stop the data migration of the target data. The protection status is used to indicate that data migration of the target data is prohibited. By monitoring data access requests during the migration process and stopping data migration in a timely manner based on the monitoring results, the problem of data asynchrony caused by data access requests triggered by access operations is avoided. This achieves the goal of timely preventing data asynchrony and thus reduces the probability of data asynchrony during migration. In this way, the technical problem of data asynchrony caused by access operations during data migration is solved. Attached Figure Description
[0010] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0011] Figure 1 This is a schematic diagram of an application environment for an optional data migration control method according to an embodiment of the present invention;
[0012] Figure 2 This is a schematic diagram of a flowchart of an optional data migration control method according to an embodiment of the present invention;
[0013] Figure 3 This is a schematic diagram of an optional data migration control method according to an embodiment of the present invention;
[0014] Figure 4 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0015] Figure 5 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0016] Figure 6This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0017] Figure 7 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0018] Figure 8 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0019] Figure 9 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0020] Figure 10 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0021] Figure 11 This is a schematic diagram of another optional data migration control method according to an embodiment of the present invention;
[0022] Figure 12 This is a schematic diagram of an optional data migration control device according to an embodiment of the present invention;
[0023] Figure 13 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention will be explained below:
[0027] Cloud Block Storage (CBS): Provides persistent block-level storage services for CVM.
[0028] Storage warehouse: To isolate fault domains, a group of physical storage devices is divided into a logical storage unit;
[0029] Online migration: Migrate cloud disks from one storage warehouse to another without affecting user operations or interrupting business processes;
[0030] Snapshot: A complete backup of data on a cloud drive at a specific point in time;
[0031] Expansion: Increase the capacity of the cloud disk;
[0032] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0033] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.
[0034] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.
[0035] Currently, the storage method of storage systems is as follows: Logical volumes are created. During the creation of a logical volume, physical storage space is allocated to each logical volume. This physical storage space may consist of a single storage device or the disks of several storage devices. Clients store data on a logical volume, which means storing the data on the file system. The file system divides the data into many parts, each part being an object. Each object contains not only the data but also additional information such as a data identifier (ID, ID entity). The file system writes each object to the physical storage space of that logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object.
[0036] The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.
[0037] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.
[0038] A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters or mobile devices; or according to the query language used, such as SQL (Structured Query Language) or XQuery; or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages simultaneously.
[0039] According to one aspect of the present invention, a data migration control method is provided. Optionally, as an optional implementation, the above-described data migration control method may be applied to, but is not limited to, [examples of other methods]. Figure 1 The environment shown may include, but is not limited to, user equipment 102, network 110, and server 112. The user equipment 102 may include, but is not limited to, a display 108, a processor 106, and a memory 104.
[0040] The specific process can be summarized in the following steps:
[0041] In step S102, user equipment 102 obtains a data migration request triggered by the user through a migration operation (such as clicking the corresponding virtual button), wherein the data migration request is used to request the migration target data 1022;
[0042] In steps S104-S106, user equipment 102 sends a data migration request to server 112 via network 110;
[0043] In step S108, server 112 searches for the data status of target data 1022 in database 114 and checks whether a data access request for accessing the target data has been obtained. Then, it processes the data status of target data 1022 and the search results of the data access request through processing engine 116 to generate migration results.
[0044] In steps S110-S112, server 112 sends the migration result to user equipment 102 via network 110. Processor 106 in user equipment 102 performs data migration on target data 1022 according to the migration result, displays the data migration progress on display 108, and stores the migration result in memory 104.
[0045] remove Figure 1 In addition to the example shown, the data migration of target data 1022 in the above steps can be performed by server 112, thereby improving the efficiency of data migration.
[0046] Furthermore, the generation of migration results in the above steps can also be completed independently by user equipment 102, thereby reducing the processing pressure on the server. User equipment 102 includes, but is not limited to, handheld devices (such as mobile phones), laptops, desktop computers, in-vehicle devices, etc., and this invention does not limit the specific implementation of user equipment 102.
[0047] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the data migration control methods include:
[0048] S202, Obtain a data migration request, wherein the data migration request is used to request data migration of the target data;
[0049] S204, Respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permissions of the target data;
[0050] S206, the target link used to receive data access requests is migrated, wherein the migrated target link is used to monitor data access requests, and the data access requests are used to request access to target data.
[0051] S208, when the migration status is the target status, perform data migration on the target data and monitor data access requests through the target link after migration, wherein the target status is used to indicate that data migration on the target data is allowed;
[0052] S210, upon detecting a data access request, the migration state is changed from the target state to the protection state to stop the data migration of the target data. The protection state is used to indicate that data migration of the target data is prohibited.
[0053] Optionally, in this embodiment, the above-mentioned data migration control method may be applied to cloud disk migration scenarios, but is not limited to, the reasons for cloud disk migration may include, but are not limited to, at least one of the following: warehouse resource balancing, cloud disk media upgrade, system architecture upgrade, hardware batch failure, etc. Specifically, due to cloud disk packing issues, there is an imbalance in IO traffic load and data block utilization between different storage warehouses. Cloud disk migration capabilities can be used to balance the load between warehouses, which is called warehouse resource balancing. Currently, cloud disks can be roughly divided into two types: ordinary cloud disks and solid-state drive (SSD) cloud disks. When users are not satisfied with the current performance specifications of cloud disks and want to upgrade the media, they often choose to upgrade ordinary cloud disks to more powerful SSD cloud disks, which is called cloud disk media upgrade. Currently, the CBS system has both old and new architectures. In order to unify operations, it is necessary to migrate cloud disks from old architecture warehouses to new architecture warehouses to complete the replacement of old and new architectures, which is called system architecture upgrade. When a batch quality problem is found in the storage warehouse hardware, it is necessary to migrate the cloud disks in the warehouse with potential failures to normal storage warehouses and then discard the faulty hardware, which is called hardware batch failure.
[0054] Optionally, in this embodiment, migrating the target link used to receive data access requests can be understood, but is not limited to, migrating the target link associated with the original region where the target data was located before migration to a location different from the original region. This serves to detect but not accept data access requests through the target link, thereby achieving the effect of not responding to the data access request when it is detected through the migrated target link. Instead, the migration status is adjusted according to the data access request before responding normally to the data access request. This ensures that inconsistencies between the data before and after migration do not occur due to data access requests during the data migration process.
[0055] Optionally, in this embodiment, the migration state adjustment operation can be performed through a specific virtual device, but is not limited to. Assuming the above adjustment operation is performed, after the migration proxy module adjusts the migration state, it returns the adjusted migration state as information indicating the current migration state of the target data. For example, if a data migration request is received, the data migration request is sent to the migration proxy module, which responds to the request to determine the current migration state of the target data. If the current migration state is the target state, the migration proxy module generates a corresponding first return message to indicate that data migration of the target data is permitted; conversely, if the current migration state is not the target state, the migration proxy module generates a corresponding second return message to indicate that data migration of the target data is prohibited. Furthermore, if a data access request is detected during the data migration process, the migration proxy module further adjusts the migration state of the target data and determines the migration state of the target data after the adjustment. Optionally, the migration proxy module can be, but is not limited to, a migration proxy module determined from multiple proxy modules according to hash rules.
[0056] Optionally, in this embodiment, the above-described data migration control method is applied to cloud disk migration scenarios, for example... Figure 3 As shown, the specific content is as follows:
[0057] First refer to Figure 3 As shown in (a), a data migration request triggered by a user (which could be the user storing the data or the staff responsible for data migration, without limitation here) on the cloud disk migration interface is obtained. This data migration request requests the migration of data from "Cloud Disk A3" (the source cloud disk) to "Cloud Disk B3" (the destination cloud disk). Further, in response to the data migration request, the target data 302 is migrated, as follows: Figure 3 As shown in (b) above; furthermore, as shown in (b) above. Figure 3As shown in (c), when the target data 302 has been migrated to "cloud disk B3", the link 304 associated with "cloud disk A3" for receiving user input / output (I / O) requests is switched to "cloud disk B3" so that "cloud disk B3" not only stores the target data 302 in "cloud disk A3", but also has the same I / O request receiving function as "cloud disk A3".
[0058] Furthermore, in this embodiment, the target data may be, but is not limited to, data stored in a data container with I / O functionality. Therefore, the aforementioned data migration control method can also be applied, but is not limited to, the migration process of data containers with I / O functionality, such as migrating data storage devices with I / O functionality (e.g., cloud hosts, cloud disks, cloud spaces), migrating data acquisition devices with I / O functionality (e.g., audio acquisition devices), and migrating information input devices with I / O functionality (e.g., text input devices). The application in the migration process of cloud disks is merely illustrative and does not constitute a limitation on its application.
[0059] Optionally, in this embodiment, the target data may be, but is not limited to, a data cluster, or a portion of data blocks within a data cluster divided by granularity. For example, if the target data is storage data divided into 1MB granularities within a target data cluster, then data migration of the target data may, but is not limited to, represent migrating all the target data within the target data cluster.
[0060] Optionally, in this embodiment, the migration permission for the target data may include, but is not limited to, allowing data migration of the target data and prohibiting data migration of the target data. If the migration permission for the target data is set to allow data migration, and a data migration request for the target data is obtained, then the target data will be migrated; conversely, if the migration permission for the target data is set to prohibit data migration, even if a data migration request for the target data is obtained, the target data cannot be migrated; thus, the method of obtaining the migration permission for the target data is used to determine whether to migrate the target data.
[0061] Optionally, in this embodiment, the target state may, but is not limited to, indicate that the target data has not been modified or adjusted at present. Therefore, migrating the target data in the target state can ensure that the target data after migration is synchronized with the target data before migration.
[0062] Optionally, in this embodiment, the protection state can be used, but is not limited to, to indicate that the target data has been modified or is about to be modified. If the target data in the protection state is migrated, it is very likely that there will be a data inconsistency problem between the migrated target data and the target data before migration. Optionally, the protection state can also be used, but is not limited to, to indicate that the target data is in a write-protected and / or read-protected state, wherein write protection can be, but is not limited to, indicating that only row access is allowed and modification is not allowed, and read protection can be, but is not limited to, indicating that reading is not allowed.
[0063] Optionally, in this embodiment, the migration status can be adjusted based on the monitored data access request, or based on the user-triggered status adjustment request, or based on the status attributes of the target data itself. For example, if the migration status is the first target status and the time for data migration of the target data reaches the time threshold, the migration status is adjusted from the first target status to the second target status. The target status may include, but is not limited to, the first target status and the second target status.
[0064] Optionally, in this embodiment, during the data migration of the target data, the target data before migration may be retained, but is not limited to this, and after the data migration of the target data is completed, the target data before migration may be cleaned, but is not limited to this.
[0065] Optionally, in this embodiment, suspending the data migration of the target data may include, but is not limited to, temporarily suspending the target data and, when the migration status of the target data is obtained as the target status again, removing the target data and continuing the data migration.
[0066] It's important to note that, considering the target data may be modified during migration due to data access requests, if these modifications aren't addressed promptly and migration continues, the migrated target data could become out of sync with the original data. Therefore, during the migration process, data access requests are monitored in real-time, and the migration status of the target data is recorded. Upon detecting a data access request, the migration status is used to determine if the current migration will cause data discrepancies. If so, the migration is stopped, and the migration status is adjusted; otherwise, the migration continues. This approach not only ensures data synchronization after migration but also eliminates the need to restrict user access to the target data during the migration process, thus minimizing the impact on users. Users can still access and modify the target data normally during the migration, achieving a seamless business experience.
[0067] To further illustrate, given that current CBS operations face scenarios such as resource balancing between warehouses, architecture upgrades, and fault handling, there is a frequent need to migrate cloud disks from one storage warehouse to another. If user access to the cloud disks is granted during the migration process, it could very likely lead to synchronization issues. Therefore, let's assume that the aforementioned data migration control is applied to the cloud disk migration scenario, for example... Figure 4 As shown, the target data (i.e. Figure 4 The target data ("Data 1, Data 2, ..., Data n") is stored in target cloud disk 402 in warehouse A. Specifically, the storage area for the target data is source volume 404 in target cloud disk 402. When a data migration request (not shown in the figure) is received, and the data migration request is used to request the migration of target cloud disk 402 from warehouse A to warehouse B, the storage information of the source volume 404 where the target data is located (such as storage IP, storage address, volume size, etc.) needs to be obtained first, and a destination volume 406 with the same size as the source volume 404 is created in warehouse B. Further, the target data to be migrated is initialized, and a migration agent 408 pre-configured for the migration of target cloud disk 402 is determined. The migration agent 408 may include, but is not limited to, obtaining the migration status of the target data and monitoring data access requests used to access the target data. Based on this, the data migration is performed sequentially according to the size or type of the target data. The following uses "Data 1" as an example for explanation:
[0068] Migration agent 408 obtains the migration status of "data 1" and monitors data access request 410 for accessing target data. Data access request 410 may be, but is not limited to, a data access request for accessing target data or target cloud disk 402 or "data 1".
[0069] Then, based on the migration status of "Data 1" and whether data access request 410 is detected, the relevant operations for "Data 1" (continue migration / stop migration) are determined as follows:
[0070] 1. If the migration status of "Data 1" is the target status and data access request 410 is detected, do not migrate "Data 1" and adjust the migration status of "Data 1" to the protection status.
[0071] 2. If the migration status of “Data 1” is the target status and no data access request 410 is detected, perform data migration on “Data 1” until “Data 1” is migrated to the destination volume 406 in warehouse B, and the data migration of “Data 1” is completed.
[0072] Furthermore, in this embodiment, when all target data has been migrated (i.e., all target data has been migrated to the destination volume 406), the monitoring permission of the migration agent 408 for the data access request 410 can be cancelled, but is not limited to, and the monitoring permission of the data access request 410 can be transferred to the destination volume 406. This transforms the data access request 410, which was originally used to access the target data in the source volume 404, into a data access request 410 used to access the target data in the destination volume 406.
[0073] The embodiments provided in this application obtain a data migration request, wherein the data migration request is used to request data migration of target data; respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permission of the target data; perform migration processing on the target link used to receive the data access request, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data; when the migration status is the target status, perform data migration on the target data and monitor the data access request through the migrated target link, wherein the target status is used to indicate that data migration of the target data is allowed; when a data access request is detected, adjust the migration status from the target status to the protection status to stop the data migration of the target data, wherein the protection status is used to indicate that data migration of the target data is prohibited. By monitoring the data access request during the migration process and stopping the data migration in a timely manner according to the monitoring results, the problem of data asynchrony caused by data access requests triggered by access operations is avoided, thereby achieving the purpose of timely preventing the occurrence of data asynchrony and realizing the technical effect of reducing the probability of data asynchrony during migration.
[0074] As an optional approach, after adjusting the migration state from the target state to the protection state, the following steps are included:
[0075] S1, after the data access request has been responded to, change the migration status from the protected state to the target state;
[0076] S2, when the migration status is the target status, obtain the data migration instruction, wherein the data migration instruction is used to instruct the migration execution module to perform a data migration operation on the target data;
[0077] S3 responds to data migration instructions and performs data migration on the target data through the migration execution module. At the same time, during the data migration process, it monitors data access requests through the migrated target link.
[0078] Optionally, in this embodiment, the protection state and the target state are mutually convertible, meaning that the protection state can be adjusted to the target state, or the target state can be adjusted to the protection state.
[0079] It should be noted that when the data access request has been responded to, the control will change the migration status from the protected state to the target state; when the migration status is the target state, the target data will be migrated, and the data access request will be monitored during the migration process.
[0080] Optionally, in this embodiment, assuming that the relevant migration status adjustment operation is performed by the migration agent module, when the migration agent module determines that the migration status is the target status, a data migration instruction is generated to instruct the migration execution module to perform the corresponding data migration operation according to the data migration instruction.
[0081] To further illustrate, optional examples include... Figure 5 As shown, assuming that a data access request 502 for accessing target data 504 is detected during the migration process, and the migration status of target data 504 is the target status, then as follows: Figure 5 As shown in (a), the migration status of target data 504 is adjusted to the protection status, and the data migration of target data 504 is stopped.
[0082] Furthermore, if the data access request has been successfully responded to and the migration status of the target data 504 is obtained as the target status, continue the data migration of the target data 504, for example... Figure 5 As shown in (b) of the diagram.
[0083] Through the embodiments provided in this application, when the data access request has been responded to, the migration state is adjusted from the protection state to the target state; when the migration state is the target state, a data migration instruction is obtained, wherein the data migration instruction is used to instruct the migration execution module to perform a data migration operation on the target data; in response to the data migration instruction, the target data is migrated, and during the data migration process of the target data, the data access request is monitored through the migrated target link. By determining that the data migration of the target data will not cause the problem of data inconsistency, the data migration of the target data is resumed, thereby achieving the purpose of timely resumption of the data migration of the target data and realizing the effect of improving the data migration efficiency.
[0084] As an optional scenario, the data access request has been completed and a response has been received, including at least one of the following:
[0085] S1, if the data access request is of the first request type and the data access request has ended, the data access request is determined to be a response completion, wherein the data access request of the first request type is used to request access to the target data;
[0086] S2, when the data access request is of the second request type and the data access request has ended, and the target data has completed the modification operation corresponding to the data access request, the data access request is determined to be a response completion. The second request type data access request is used to request access to and modify the target data.
[0087] Optionally, in this embodiment, the data access request of the first and second request types may be, but is not limited to, an access request initiated by a user's read operation, which may include, but is not limited to, at least one of the following: data access, data viewing, data browsing, etc.
[0088] Optionally, in this embodiment, the data access request of the second request type may be, but is not limited to, an access request initiated by a user's write operation, which may include, but is not limited to, at least one of the following: data writing, data deletion, data transfer, etc.
[0089] It should be noted that if the data access request does not cause any change to the target data, and the data access request has been terminated, then the data access request is considered a completed response. However, if the data access request causes any change to the target data, then the data access request is considered a completed response only if the data access request has been terminated and the target data has undergone the changes corresponding to the data access request.
[0090] Through the embodiments provided in this application, when the data access request is of the first request type and the data access request has ended, the data access request is determined to be a response completion. The data access request of the first request type is used to request access to the target data. When the data access request is of the second request type and the data access request has ended, when the target data has completed the modification operation corresponding to the data access request, the data access request is determined to be a response completion. The data access request of the second request type is used to request access to and modify the target data. This achieves the purpose of avoiding the failure of data changes due to data access requests to be synchronized to the data migration process, and realizes the effect of reducing the probability of data asynchrony caused by data access requests.
[0091] As an optional approach, after obtaining the migration status of the target data, the following steps are included:
[0092] S1, when the migration state is the target state, migrate the target data from the first storage area to the second storage area;
[0093] S2, when the target data has been migrated from the first storage area to the second storage area, the migration status is changed from the target status to the migration completed status, and data access requests are monitored through the target link after migration.
[0094] S3, upon detecting a data access request, synchronously adjusts the target data in the first storage area and the target data in the second storage area based on the data access request.
[0095] Optionally, in this embodiment, the storage area may be, but is not limited to, a data container with IO functionality, such as a cloud disk, storage warehouse, volume, cloud host, etc. Optionally, the first storage area and the second storage area may be, but are not limited to, the same type of data container.
[0096] Optionally, in this embodiment, considering that if the target data in the migration completed state is still migrated, it may lead to a situation of repeated migration, the target data in the migration completed state may be migrated, but is not limited to being prohibited from being migrated, and when a data migration request for the target data in the migration completed state is obtained, the data migration request may be recorded, but is not limited to being recorded, as it is likely to be an abnormal request.
[0097] It should be noted that, considering that if the target data has been migrated and then the user makes adjustments to the target data before migration, it will lead to differences between the data before and after migration, resulting in data asynchrony, the above data migration control method also restricts the synchronous adjustment of the target data before migration (in the first storage area) and the target data after migration (in the second storage area) when the target data has been migrated and data access requests are detected.
[0098] To further illustrate, optional examples include... Figure 6 As shown, it is assumed that the target data 604 in the first storage area 602 has been completely migrated to the second storage area 606, and the pre-migration state of the target data 604 has also been adjusted to the migration completed state; based on this, a data access request 608 is also detected, and the data access request 608 is also used to request the adjustment of the target data 604 in the first storage area 602; furthermore, the target data 604 in the first storage area 602 and the target data 604 in the second storage area 606 are adjusted synchronously according to the data access request 608.
[0099] Through the embodiments provided in this application, when the migration state is the target state, the target data is migrated from the first storage area to the second storage area; when a data access request is detected, the target data in the first storage area and the target data in the second storage area are synchronously adjusted based on the data access request; when a data access request is detected, the target data in the first storage area and the target data in the second storage area are synchronously adjusted based on the data access request, thereby achieving the purpose of avoiding the failure of data changed due to data access requests to be synchronized to the migrated data, and realizing the effect of reducing the probability of migration data being out of sync due to data access requests.
[0100] As an optional approach, after receiving the data migration request, the following steps are taken:
[0101] S1, Obtain a first data migration request, wherein the first data migration request is used to request the migration of first data in the first storage area to the second storage area;
[0102] S2, in response to the first data migration request, migrate the first data in the first storage area to the second storage area; or,
[0103] S3, obtain the second data migration request, wherein the second data migration request is used to request the migration of the second data in the first storage area to the second storage area;
[0104] S4, if the migration status of the target data is obtained as migration complete, respond to the second data migration request and migrate the second data in the first storage area to the second storage area.
[0105] Optionally, in this embodiment, the migration type of data migration may be, but is not limited to, distributed migration, asynchronous migration, parallel migration, or serial migration. Distributed migration may be, but is not limited to, used to indicate that the data migration process is completed sequentially, and the next data waits without being migrated before the previous data migration process is completed. Asynchronous migration may be, but is not limited to, used to indicate that the data migration process is completed separately, and the next data can still be migrated even if the previous data migration process is not completed.
[0106] It should be noted that the process involves: obtaining a first data migration request, where the first data migration request is used to request the migration of first data in a first storage area to a second storage area; responding to the first data migration request and migrating the first data in the first storage area to the second storage area; or obtaining a second data migration request, where the second data migration request is used to request the migration of second data in the first storage area to the second storage area; and responding to the second data migration request and migrating the second data in the first storage area to the second storage area when the migration status of the target data is obtained as "migration completed". By using a method of completing the data migration operation one by one, the accuracy of the data migration is ensured.
[0107] To further illustrate, the optional based on Figure 4 The scenario shown continues, for example... Figure 7 As shown, assuming data 1 and data 2 in target cloud disk 402 have been migrated to destination volume 408, and data 3, data 4, and data 5 are in the process of migration. It can be seen that even if data 3 is not completely migrated, it does not affect the migration operations of data 4 and data 5. The migration agent 408 can also detect data access requests 702 in real time during the migration process. Utilizing the simultaneous migration of multiple data sets improves the efficiency of data migration.
[0108] The embodiments provided in this application obtain a first data migration request, wherein the first data migration request is used to request the migration of first data in a first storage area to a second storage area; respond to the first data migration request and migrate the first data in the first storage area to the second storage area; or, obtain a second data migration request, wherein the second data migration request is used to request the migration of second data in the first storage area to the second storage area; when the migration status of the target data is obtained as a migration completed status, respond to the second data migration request and migrate the second data in the first storage area to the second storage area, thereby achieving the purpose of utilizing multiple data migration methods and realizing the effect of improving the comprehensiveness of data migration.
[0109] As an optional approach, after receiving the data migration request, the following steps are taken:
[0110] S1, obtain a first link that has an association relationship with the first storage area, wherein the association relationship is used to indicate that the first storage area receives a target data access request through the first link, the target data access request is used to request access to target data in the first storage area, and the target link includes the first link;
[0111] S2, during the data migration process of the target data, receives the target data access request through the first link.
[0112] Optionally, in this embodiment, the IO function of the first storage area can be implemented through a first link, but is not limited to. The first link can be, but is not limited to, one of multiple links in the first storage area. The first link has an association relationship with the first storage area, and the association relationship can be understood as the first storage area receiving and responding to the target data access request through the first link, or the first link forwarding the received target data access request to the first storage area so that the first storage area responds to the target data access request and performs the corresponding data operation.
[0113] It should be noted that the first link associated with the target data in the first storage area is obtained; during the data migration process of the target data, the target data access request is received through the first link.
[0114] To further illustrate, optional examples include... Figure 3 As shown in (c), the first link may be, but is not limited to, link 304 associated with “cloud disk A3”, wherein link 304 is used to access target data 302 within “cloud disk A3”.
[0115] The embodiments provided in this application obtain a first link associated with target data in a first storage area; during the data migration process of the target data, the target data access request is received through the first link, thereby achieving the purpose of quickly receiving data access requests using the link and improving the response efficiency of data access requests.
[0116] As an optional approach, the target link used to receive data access requests is migrated, including:
[0117] The first link is migrated and the migrated first link is designated as the second link. The second link is used to monitor target data access requests and has no association with the first storage area.
[0118] Optionally, in this embodiment, the first link and the second link may be, but are not limited to, the same link but with different associated objects. For example, the first link and the second link may both receive data access requests for accessing target data in the first storage area, but the first link is associated with the first storage area, while the second link is not associated with the first storage area. The second link may also monitor data access requests for accessing target data in the first storage area. In addition, the first link and the second link may be, but are not limited to, different links, which is not limited here.
[0119] It should be noted that the first link is migrated and the migrated first link is identified as the second link. The second link is used to monitor target data access requests and has no association with the first storage area.
[0120] To further illustrate, optional examples include... Figure 3 As shown in (c), the link 304 originally associated with cloud disk A3 is switched to be associated with cloud disk B3, so that the function of link 302 is changed from receiving data access requests for accessing target data in cloud disk A3 to monitoring data access requests for accessing target data in cloud disk B3.
[0121] Furthermore, once the target data migration is complete, a third link can be determined based on the second link, and the first / second link can be closed. The third link is used to receive target data access requests. An association is established between the third link and the second storage area so that the target data access request is changed to access the target data in the second storage area. This avoids the data changes due to data access requests not being synchronized to the migrated data, and reduces the probability of data synchronization issues caused by data access requests.
[0122] As an optional approach, after adjusting the migration status from the target state to the migration complete state, the following steps are included:
[0123] S1, Obtain a data verification request, wherein the data verification request is used to request data verification of the target data;
[0124] S2, respond to the data verification request and change the migration status from migration completed to verification in progress;
[0125] S3, obtain the data similarity between the target data in the first storage area and the target data in the second storage area;
[0126] S4. When the data similarity reaches the target threshold, the migration status is changed from the verification in progress state to the verification completed state.
[0127] It should be noted that, in order to ensure the accuracy of data migration, after the data migration is completed, a verification operation will be performed on the migrated data. The verification operation may include, but is not limited to, determining whether the data similarity between the data before migration (in the first storage area) and the data after migration (in the second storage area) reaches the target threshold.
[0128] The embodiments provided in this application obtain a data verification request, wherein the data verification request is used to request data verification of target data; in response to the data verification request, the migration status is adjusted from the migration completed status to the verification in progress status; the data similarity between the target data in the first storage area and the target data in the second storage area is obtained; when the data similarity reaches the target threshold, the migration status is adjusted from the verification in progress status to the verification completed status, thereby achieving the purpose of ensuring the accuracy of data migration through verification and realizing the effect of improving the accuracy of data migration.
[0129] As an optional approach, after adjusting the migration status from migration complete to verification, the following steps are included:
[0130] S1, upon detecting a data access request, change the migration status from the verification state to the migration completed state;
[0131] S2, based on the data access request, synchronously adjusts the target data in the first storage area and the target data in the second storage area.
[0132] It should be noted that, upon detecting a data access request, the migration status is changed from "in verification" to "migration complete"; based on the data access request, the target data in the first storage area and the target data in the second storage area are adjusted synchronously.
[0133] To further illustrate, the optional based on Figure 5 The scenario shown continues, for example... Figure 8 As shown, assuming the target data 504 has been migrated and adjusted to the verification state, as follows: Figure 8 As shown in (a) in the text;
[0134] Furthermore, if the target data 504 in the verification state fails the data verification, the migration state of the target data 504 will be adjusted from the verification state back to the migration completed state.
[0135] Through the embodiments provided in this application, when a data access request is detected, the migration status is adjusted from the verification state to the migration completed state; based on the data access request, the target data in the first storage area and the target data in the second storage area are adjusted synchronously, thereby achieving the purpose of ensuring the accuracy of data migration by using verification and realizing the effect of improving the accuracy of data migration.
[0136] As an optional approach, after obtaining the migration status of the target data, the following steps are included:
[0137] When the migration status is in the initialization state, the target data is migrated, and the migration status is adjusted to the migration in progress state. The initialization state is used to indicate that the target data is candidate data to be migrated. The target status includes the initialization state and the migration in progress state.
[0138] Optionally, in this embodiment, the initialization state can be used, but is not limited to, to indicate that the target data is candidate data to be migrated, and the initialization state and the migration state can be converted to each other. Optionally, when the data migration of the target data is the first migration, the target data can be adjusted to the initialization state, but is not limited to.
[0139] Optionally, in this embodiment, the data migration control method may be, but is not limited to, executed by a single executing entity, or may be, but is not limited to, as shown in the example below. Figure 9 As shown, the process is primarily executed by multiple virtual devices working together, and the specific steps are as follows:
[0140] Step S1: The migration system control path entry 906 obtains the control command triggered by the migration interface 904. The control command is used to instruct the execution of the migration task, wherein the migration task is to migrate the target data stored in the source volume in the source warehouse 902 to the destination warehouse 914.
[0141] Step S2: Query the source volume information of source repository 902 at the migration system control path entry 906;
[0142] Step S3: Based on the source volume information, the migration system control path entry 906 creates a destination volume in the target repository 914 with the same specifications as the source volume in the source repository 902.
[0143] Step S4: The migration system control path entry 906 creates a task request and sends the task request to the migration agent module 910;
[0144] Step S5: The migration agent module 910 adjusts all data in the source volume to the initial state;
[0145] Step S6: Switch the link of the source repository 902 to the migration agent module 910 so that the migration agent module 910 can receive user access requests corresponding to the target data in the source volume of the source repository 902.
[0146] Step S7: The migration task scheduling module 908 receives the migration task request sent by the migration system control path entry 906. Step S7 can be executed simultaneously with step S4, or it can be executed after step S6.
[0147] Step S8: The migration task scheduling module 908 sends the migration task request to the migration agent module 910;
[0148] Step S9: The migration agent module 910 returns the response result corresponding to the migration task request based on the received user access request and the migration status of the target data.
[0149] Step S10: The migration execution module 912 receives the response result. If the response result indicates success, proceed to step S11. If the response result indicates failure, repeat step S7.
[0150] Step S11: The migration execution module 912 performs data migration on the target data.
[0151] To further illustrate, an optional cloud disk migration scenario could be... Figure 10 As shown, the specifics are as follows:
[0152] Firstly, as Figure 10 As shown in (a), before data migration, a data access request (e.g., a read / write request) triggered by the control platform 1022 (e.g., KVM) is obtained, and the data access request is responded to on the basis of the original cloud disk 1004;
[0153] Further as Figure 10 As shown in (b), during the data migration process, a distributed access layer migration proxy is introduced into the normal two-layer IO path, and the IO is switched to a group of proxy modules (proxy module 1, proxy module 2, ..., proxy module n). Then, according to the hash rule, the IO is sent to one of the proxy modules in the group (such as the shaded proxy module 2). Alternatively, it can be understood that according to the hash rule, one proxy module is determined as the migration proxy module in the group. The migration proxy module (i.e., proxy module 2) divides the logical address of the original cloud disk 1004 into a group of blocks for state management at a granularity of 1MB. Based on the block state, it determines whether the user IO only writes to the source repository where the original cloud disk 1004 is located or writes to both the source repository and the destination repository where the destination cloud disk 1008 is located.
[0154] Furthermore, after the data migration is complete, the io module switches from the migration agent module (i.e., agent module 2) to the destination repository where the destination cloud disk 1008 is located. This achieves the effect of migrating cloud disks across storage repositories. Figure 10 As shown in (c);
[0155] This also involves the migration system control path entry point (ZoneMaster): responsible for handling control commands triggered by the migration interface (Portal) on the control platform 1022, including migration task configuration, creation, cancellation, and scheduling functions; and also responsible for monitoring the status of the migration agent module and the migration task scheduling module 1006 (snap_scheduler).
[0156] Migration task scheduling module 1006: responsible for receiving migration task requests from ZoneMaster and scheduling data migration from the original cloud disk 1004 to the destination disk at the block level. Before and after scheduling, it needs to request the block status from snap_proxy.
[0157] The data migration module (snap_transfer) can be, but is not limited to, one execution module determined from a group of execution modules (execution module 1, execution module 2, ... execution module n), responsible for receiving snap_scheduler block granular migration requests and migrating data from the original cloud disk 1004 to the destination cloud disk 1008;
[0158] The migration proxy module (snap_proxy) is responsible for receiving user access requests (such as IO requests from the Agent) and managing block status during data migration; it also ensures data consistency between the source and destination repositories for blocks that have completed migration during the migration process.
[0159] Alternatively, the specific steps are as follows:
[0160] Step 1: Create a migration task
[0161] Step 1.1: The user selects the volume to be migrated and the destination repository, and sends the request to the zonemaster;
[0162] Step 1.2: After receiving the request, the zone master records the request into the database (DB);
[0163] Step 1.3: The zone master returns a message indicating that the front-end task has been successfully submitted.
[0164] Step 2: Scheduling and Migration Task Process
[0165] Step 2.1: ZoneMaster selects a migration task from the database for scheduling;
[0166] Step 2.2: ZoneMaster selects a set of available snap_proxy;
[0167] Step 2.3: The ZoneMaster queries the source volume details from the source Master and verifies whether the Portal request is valid;
[0168] Step 2.4: After successful verification, carry the source volume's disk_uuid, disk_size, sid, and other information to create a new volume of the same specifications to the destination master;
[0169] Step 2.5: After successfully creating the destination volume, notify snap_proxy to create a migration task, carrying the volume information;
[0170] Step 2.6: After receiving the migration task, snap_proxy initializes the state of all blocks on the volume;
[0171] Step 2.7: After ZoneMaster receives all successful responses from snap_proxy, it notifies the source disk Agent to switch the link to snap_proxy, and the notification request carries a set of snap_proxy IP and group_ver information;
[0172] Step 2.8: After the Agent switch is successful, for user IO requests, the snap_proxy IP that needs to send the request is calculated using a hash strategy, and the user IO is sent to the snap_proxy.
[0173] Step 2.9: ZoneMaster notifies snap_scheduler to begin migrating data.
[0174] Step 3: Migration Process Flow
[0175] Snap_proxy performs transitions in blocks. For example, the state machine transition can be illustrated using a single block transition process:
[0176] Step 3.1: Snap_scheduler obtains the proxy corresponding to the block through the hash strategy, requests the migration of a block from Snap_proxy, and carries the block's LBA and block state syncing;
[0177] Step 3.2: Snap_proxy checks the request block status:
[0178] If the requested block is in the INIT state, the block state is updated to the syncing state, and a success message is returned. If a user subsequently writes to the block, the I / O is preempted, and the state transitions to the write state.
[0179] If the request is for a blocked state or a synced state, the request will fail.
[0180] If the request's block status is write status, then the request fails.
[0181] If the request is in a blocking state and is in a syncing state, then the request is returned as successful.
[0182] Step 3: After Snap_scheduler receives the response from Snap_proxy:
[0183] If the request fails, please try again next time.
[0184] If the request is successful, it requests snap_transfer to read data from the source disk and write it to the destination disk.
[0185] Step 3.4: After the snap_transfer block migration is successful, the Snap_scheduler requests the corresponding Snap_proxy to set the block to the Synced state;
[0186] If the local block status is syncing or synced, then update it to synced and return snap_scheduler successfully;
[0187] If the local block is in the init or write state, the update fails and the block migration starts from the beginning.
[0188] Step 3.5: If Snap_scheduler receives a successful update response, it continues to migrate the next block until all blocks have been migrated;
[0189] Step 4: Verification Process
[0190] Verification and migration are performed in parallel, and the verification progress is always less than the migration progress.
[0191] Step 4.1: The snap_scheduler calculates the snap_proxy IP using the LBA hash and requests checking;
[0192] Step 4.2: snap_proxy, if the request block status is synced, and the block has not written I / O, and the update status is checking, then return success;
[0193] If the local block status is syncing, then return success;
[0194] If a user writes an I / O request and I / O preemption occurs, the checking status is set to synced.
[0195] Step 4.3: If the snap_scheduler successfully requests snap_proxy block checking, it then requests snap_trsf to read the source and destination volume data, performs consistency checks, and returns the results.
[0196] Step 4.4: If snap_trsf returns a successful verification, request snap_proxy to update the block status to checked; if it fails, start execution from the beginning.
[0197] Step 4.5: If the snap_proxy block status is checking, set it to checked; if the block status is synced, return failure.
[0198] Step 4.6: If snap_proxy checks successfully, snap_proxy will start executing the next block check until all migrated blocks have been checked; if a block check fails, the block check will start from the beginning.
[0199] Step 5: Post-migration cleanup process
[0200] Step 5.1: After Snap_scheduler has migrated all blocks, the zone master first queries the source master for disk information to check if the disk status and capacity have changed; if they have changed, proceed to step 2; otherwise, proceed to step 4.
[0201] Step 5.2: The zone master notifies the agent to switch back to the source repository for IO;
[0202] Step 5.3: The zone master notifies Snap_proxy / snap_scheduler to cancel the migration task, and the migration ends;
[0203] Step 5.4: The zone master notifies the destination master and switches the I / O to the destination repository;
[0204] Step 5.5: If the I / O to the target repository is successful, proceed to the next step; otherwise, proceed to step 2.
[0205] Step 5.6: Update the repository information corresponding to the database disk;
[0206] Step 5.7: The zone master notifies the source master to first unmount the disk and then delete the source disk;
[0207] Step 5.8: The zone master notifies Snap_proxy / snap_scheduler to clean up migration task information;
[0208] Step 5.9: After the zone master notifies the task of successful cleanup, the migration task ends.
[0209] Step Six: Creating a Snapshot During Migration
[0210] Step 6.1: The user selects the volume for which a snapshot needs to be created and sends the volume information and master information to the zone master;
[0211] Step 6.2: The zone master checks if there is a migration task for the volume. If there is a migration task, it notifies the destination volume master to add an SID. If not, it proceeds with the normal snapshot creation process.
[0212] Step 6.3: The destination master returns the zone master result. If successful, proceed with the normal creation process; if it fails, return a failure message to the front end.
[0213] Step 7: Expanding cloud disk capacity during migration;
[0214] Step 7.1: The user selects the volume for which a snapshot needs to be created and sends the volume information and master information to the zone master;
[0215] Step 7.2: The zone master checks for migration tasks. If there are no tasks, it directly requests the destination master to expand its capacity. If there are migration tasks, it executes step 3.
[0216] Step 7.3: Expand the zone master to the destination master. If successful, proceed to the next step; otherwise, return a failure message to the front end.
[0217] Step 7.4: The zone master expands to the source master. If successful, proceed to the next step; otherwise, return a failure message to the front end.
[0218] Step 7.5: The zone master updates the database volume capacity information and group_ver;
[0219] Step 7.6: The Zone master notifies snap_proxy / snap_scheduler to update the volume capacity; if this fails, a failure message is returned to the front end.
[0220] Step 7.7: Successfully returned to the front end.
[0221] To further illustrate, the transformation relationships between the migration states of the target data can be, but are not limited to, as follows: Figure 11 As shown:
[0222] 1. If the migration status is initialization status 1102, the response is successful, indicating migration, and the migration status is adjusted to migration in progress status 1106;
[0223] 2. If the migration status is in the in-migration state 1106, the response is successful, indicating to continue the migration until it is completed, and the migration status is adjusted to the migration completed state 1108.
[0224] 3. If the migration status is "Migration Complete 1108", then migration is prohibited;
[0225] 4. If the migration status is protected (1104), then migration is prohibited;
[0226] 5. If a user-triggered data access request is received and the migration status is in the initialization state 1102, then migration is prohibited and the migration status is adjusted to the protection state 1104.
[0227] 6. If a user-triggered data access request is received and the migration status is in the migration process (1106), then the migration is prohibited and the migration status is changed to the protection status (1104).
[0228] 7. If a user I / O request is received and the migration status is in the migration process (1106), then the migration is prohibited and the migration status is changed to the protection status (1104).
[0229] 8. If a user-triggered data access request is received and the migration status is migration complete (status 1108), then migration shall be prohibited.
[0230] 9. If the migration status is "Verification in progress" (status 1110), then migration is prohibited.
[0231] 10. If the migration status is in the verification process (1110) and the verification is complete, then the migration is prohibited and the migration status is changed to the verification complete state (1112).
[0232] 11. If the migration status is verification completed (status 1112), then migration is prohibited.
[0233] Through the embodiments provided in this application, when the migration state is in the initialization state, the target data is migrated, and the migration state is adjusted to the migration in progress state. The initialization state is used to indicate that the target data is candidate data to be migrated. The target state includes the initialization state and the migration in progress state, thereby achieving the purpose of using the full migration state to complete the data migration and realizing the effect of improving the data migration efficiency.
[0234] As an optional approach, after receiving the data migration request, the following steps are taken:
[0235] S1, obtain a data snapshot request, wherein the data snapshot request is used to request the target data at the current moment of the snapshot;
[0236] S2, responding to the data snapshot request, determines the target data at the current moment as the snapshot data corresponding to the data snapshot request;
[0237] S3, when the migration state is the target state, performs data migration on the target data and snapshot data.
[0238] Optionally, in this embodiment, a snapshot may be, but is not limited to, a fully usable copy of a specified data set, including an image of the data at a certain point in time (the time at which the snapshot begins). A snapshot may be, but is not limited to, a copy of the data it represents, or a replica of that data. Optionally, a snapshot may be, but is not limited to, a disk snapshot, wherein a disk snapshot may be, but is not limited to, a rapid archiving system snapshot of the entire disk volume.
[0239] It should be noted that when a data snapshot request is received, the target data at the current moment is determined as the snapshot data corresponding to the data snapshot request; then, when the migration state is the target state, data migration is performed on the target data and the snapshot data so that snapshot creation can be supported during the migration process.
[0240] The embodiments provided in this application obtain a data snapshot request, wherein the data snapshot request is used to request the target data at the current moment of the snapshot; in response to the data snapshot request, the target data at the current moment is determined as the snapshot data corresponding to the data snapshot request; when the migration state is the target state, data migration is performed on the target data and the snapshot data, thereby achieving the purpose of supporting the creation of snapshots on the cloud disk during the migration process and realizing the effect of improving the functional compatibility of data migration.
[0241] As an optional approach, after receiving the data migration request, the following steps are taken:
[0242] S1, Obtain a region expansion request, wherein the region expansion request is used to request expansion of the storage space of the storage region where the target data is located;
[0243] S2, when a data migration request is used to request the migration of target data from the third storage area to the fourth storage area, respond to the area expansion request and expand the storage space of the fourth storage area.
[0244] S3, after the storage space expansion of the fourth storage area is completed, expand the storage space of the third storage area.
[0245] Optionally, in this embodiment, expansion can be, but is not limited to, increasing the storage space of a specified storage area, such as hard disk expansion, which can be, but is not limited to, expanding the storage capacity of a specified hard disk.
[0246] It should be noted that, upon receiving a request for region expansion, the system responds by first expanding and migrating the storage space of the specified destination storage region (fourth storage region), and then expanding and migrating the storage space of the specified source storage region (third storage region).
[0247] The embodiments provided in this application obtain a region expansion request, wherein the region expansion request is used to request expansion of the storage space of the storage region where the target data is located; when a data migration request is used to request the migration of the target data from the third storage region to the fourth storage region, the region expansion request is responded to and the storage space of the fourth storage region is expanded; when the storage space of the fourth storage region is expanded, the storage space of the third storage region is expanded, thereby achieving the purpose of supporting the creation of snapshots of cloud disks during the migration process and realizing the effect of improving the functional compatibility of data migration.
[0248] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0249] According to another aspect of the present invention, a control apparatus for implementing the above-described data migration control method is also provided. For example... Figure 12 As shown, the device includes:
[0250] The first acquisition unit 1202 is used to acquire a data migration request, wherein the data migration request is used to request data migration of the target data;
[0251] The first response unit 1204 is used to respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permissions of the target data.
[0252] Link unit 1206 is used to switch the target link used to receive data access requests to the migration agent module. The migration agent module is used to adjust the migration status according to the data access request, which is used to request access to target data.
[0253] The first migration unit 1208 is used to migrate target data when the migration status is target status. During the migration process of the target data, the target access request for accessing the target data is monitored through the target link after migration. The target status is used to indicate that the migration of the target data is allowed.
[0254] The first control unit 1210 is configured to change the migration state from the target state to the protection state upon detecting a data access request, thereby suspending the data migration of the target data. The protection state is used to indicate that data migration of the target data is prohibited.
[0255] Optionally, in this embodiment, the above-mentioned data migration control device may be applied to cloud disk migration scenarios, and the reasons for cloud disk migration may include, but are not limited to, at least one of the following: warehouse resource balancing, cloud disk media upgrade, system architecture upgrade, hardware batch failure, etc. Specifically, due to cloud disk packing issues, there is an imbalance in IO traffic load and data block utilization between different storage warehouses. Cloud disk migration capabilities can be used to balance the load between warehouses, which is called warehouse resource balancing. Currently, cloud disks can be roughly divided into two types: ordinary cloud disks and solid-state drive (SSD) cloud disks. When users are not satisfied with the current performance specifications of cloud disks and want to upgrade the media, they often choose to upgrade ordinary cloud disks to more powerful SSD cloud disks, which is called cloud disk media upgrade. Currently, the CBS system has both old and new architectures. In order to unify operations, it is necessary to migrate cloud disks from old architecture warehouses to new architecture warehouses to complete the replacement of old and new architectures, which is called system architecture upgrade. When a batch quality problem is found in the storage warehouse hardware, it is necessary to migrate the cloud disks in the warehouse with potential failures to normal storage warehouses and then discard the faulty hardware, which is called hardware batch failure.
[0256] Optionally, in this embodiment, migrating the target link used to receive data access requests can be understood, but is not limited to, migrating the target link associated with the original region where the target data was located before migration to a location different from the original region. This serves to detect but not accept data access requests through the target link, thereby achieving the effect of not responding to the data access request when it is detected through the migrated target link. Instead, the migration status is adjusted according to the data access request before responding normally to the data access request. This ensures that inconsistencies between the data before and after migration do not occur due to data access requests during the data migration process.
[0257] Optionally, in this embodiment, the migration state adjustment operation can be performed through a specific virtual device, but is not limited to. Assuming the above adjustment operation is performed, after the migration proxy module adjusts the migration state, it returns the adjusted migration state as information indicating the current migration state of the target data. For example, if a data migration request is received, the data migration request is sent to the migration proxy module, which responds to the request to determine the current migration state of the target data. If the current migration state is the target state, the migration proxy module generates a corresponding first return message to indicate that data migration of the target data is permitted; conversely, if the current migration state is not the target state, the migration proxy module generates a corresponding second return message to indicate that data migration of the target data is prohibited. Furthermore, if a data access request is detected during the data migration process, the migration proxy module further adjusts the migration state of the target data and determines the migration state of the target data after the adjustment. Optionally, the migration proxy module can be, but is not limited to, a migration proxy module determined from multiple proxy modules according to hash rules.
[0258] Furthermore, in this embodiment, the target data may be, but is not limited to, data stored in a data container with I / O functionality. Therefore, the aforementioned data migration control device may also be applied, but is not limited to, the migration process of data containers with I / O functionality, such as migrating data storage devices with I / O functionality (e.g., cloud hosts, cloud disks, cloud spaces, etc.), migrating data acquisition devices with I / O functionality (e.g., audio acquisition devices), and migrating information input devices with I / O functionality (e.g., text input devices). The application in the migration process of cloud disks is merely illustrative and does not constitute a limitation on its application.
[0259] Optionally, in this embodiment, after the migration proxy module adjusts the migration status, it displays the adjusted migration status as a return message indicating the current migration status of the target data. For example, upon receiving a data migration request, the request is sent to the migration proxy module, which responds to the request to determine the current migration status of the target data. If the current migration status is the target status, the migration proxy module generates a corresponding first return message to indicate that data migration of the target data is permitted. Conversely, if the current migration status is not the target status, the migration proxy module generates a corresponding second return message to indicate that data migration of the target data is prohibited. Furthermore, if a data access request is detected simultaneously, the migration proxy module adjusts the migration status of the target data and determines the migration status of the target data after adjustment. Optionally, the migration proxy module may be, but is not limited to, a migration proxy module determined from multiple proxy modules based on hash rules.
[0260] Optionally, in this embodiment, the target data may be, but is not limited to, a data cluster, or a portion of data blocks within a data cluster divided by granularity. For example, if the target data is storage data divided into 1MB granularities within a target data cluster, then data migration of the target data may, but is not limited to, represent migrating all the target data within the target data cluster.
[0261] Optionally, in this embodiment, the migration permission for the target data may include, but is not limited to, allowing data migration of the target data and prohibiting data migration of the target data. If the migration permission for the target data is set to allow data migration, and a data migration request for the target data is obtained, then the target data will be migrated; conversely, if the migration permission for the target data is set to prohibit data migration, even if a data migration request for the target data is obtained, the target data cannot be migrated; thus, the method of obtaining the migration permission for the target data is used to determine whether to migrate the target data.
[0262] Optionally, in this embodiment, the target state may, but is not limited to, indicate that the target data has not been modified or adjusted at present. Therefore, migrating the target data in the target state can ensure that the target data after migration is synchronized with the target data before migration.
[0263] Optionally, in this embodiment, the protection state can be used, but is not limited to, to indicate that the target data has been modified or is about to be modified. If the target data in the protection state is migrated, it is very likely that there will be a data inconsistency problem between the migrated target data and the target data before migration. Optionally, the protection state can also be used, but is not limited to, to indicate that the target data is in a write-protected and / or read-protected state, wherein write protection can be, but is not limited to, indicating that only row access is allowed and modification is not allowed, and read protection can be, but is not limited to, indicating that reading is not allowed.
[0264] Optionally, in this embodiment, the migration status can be adjusted based on the monitored data access request, or based on the user-triggered status adjustment request, or based on the status attributes of the target data itself. For example, if the migration status is the first target status and the time for data migration of the target data reaches the time threshold, the migration status is adjusted from the first target status to the second target status. The target status may include, but is not limited to, the first target status and the second target status.
[0265] Optionally, in this embodiment, during the data migration of the target data, the target data before migration may be retained, but is not limited to this, and after the data migration of the target data is completed, the target data before migration may be cleaned, but is not limited to this.
[0266] Optionally, in this embodiment, suspending the data migration of the target data may include, but is not limited to, temporarily suspending the target data and, when the migration status of the target data is obtained as the target status again, removing the target data and continuing the data migration.
[0267] It's important to note that, considering the target data may be modified during migration due to data access requests, if these modifications aren't addressed promptly and migration continues, the migrated target data could become out of sync with the original data. Therefore, during the migration process, data access requests are monitored in real-time, and the migration status of the target data is recorded. Upon detecting a data access request, the migration status is used to determine if the current migration will cause data discrepancies. If so, the migration is stopped, and the migration status is adjusted; otherwise, the migration continues. This approach not only ensures data synchronization after migration but also eliminates the need to restrict user access to the target data during the migration process, thus minimizing the impact on users. Users can still access and modify the target data normally during the migration, achieving a seamless business experience.
[0268] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0269] The embodiments provided in this application obtain a data migration request, wherein the data migration request is used to request data migration of target data; respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permission of the target data; perform migration processing on the target link used to receive the data access request, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data; when the migration status is the target status, perform data migration on the target data and monitor the data access request through the migrated target link, wherein the target status is used to indicate that data migration of the target data is allowed; when a data access request is detected, adjust the migration status from the target status to the protection status to stop the data migration of the target data, wherein the protection status is used to indicate that data migration of the target data is prohibited. By monitoring the data access request during the migration process and stopping the data migration in a timely manner according to the monitoring results, the problem of data asynchrony caused by data access requests triggered by access operations is avoided, thereby achieving the purpose of timely preventing the occurrence of data asynchrony and realizing the technical effect of reducing the probability of data asynchrony during migration.
[0270] As an optional solution, it includes:
[0271] The second control unit is used to adjust the migration state from the protection state back to the target state after the migration state has been adjusted from the target state to the protection state and the data access request has been responded to.
[0272] The second migration unit is used to obtain a data migration instruction when the migration state is the target state after the migration state is adjusted from the target state to the protection state. The data migration instruction is used to instruct the target data to be migrated.
[0273] The third migration unit is used to respond to the data migration command after the migration status is adjusted from the target status to the protection status, to migrate the target data, and to monitor data access requests through the migrated target link during the data migration process.
[0274] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0275] As an optional solution, the second control unit includes at least one of the following:
[0276] The first determining module is used to determine the data access request as a response completion when the data access request is of the first request type and the data access request has ended. The data access request of the first request type is used to request access to the target data.
[0277] The second determining module is used to determine the data access request as a response completion when the target data has completed the modification operation corresponding to the data access request, in cases where the data access request is of the second request type and the data access request has ended. The data access request of the second request type is used to request access to and modify the target data.
[0278] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0279] As an optional solution, it includes:
[0280] The third migration unit is used to migrate the target data from the first storage area to the second storage area after obtaining the migration status of the target data and when the migration status is the target status.
[0281] The third control unit is used to adjust the migration status from the target status to the migration completed status when the target data has been migrated from the first storage area to the second storage area, and at the same time monitor data access requests through the target link after migration.
[0282] The first adjustment unit is used to synchronously adjust the target data in the first storage area and the target data in the second storage area based on the data access request after obtaining the migration status of the target data and detecting the data access request.
[0283] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0284] As an optional solution, it includes:
[0285] The second acquisition unit is used to acquire a first data migration request after acquiring a data migration request, wherein the first data migration request is used to request the migration of the first data in the first storage area to the second storage area;
[0286] The second response unit is configured to, after receiving a data migration request, respond to the first data migration request and migrate the first data in the first storage area to the second storage area; or,
[0287] The third acquisition unit is used to acquire a second data migration request after acquiring a data migration request, wherein the second data migration request is used to request the migration of the second data in the first storage area to the second storage area;
[0288] The third response unit is used to respond to the second data migration request after obtaining the data migration request and if the migration status of the target data is obtained as the migration completed status, and to migrate the second data in the first storage area to the second storage area.
[0289] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0290] As an optional solution, it includes:
[0291] The fourth acquisition unit is used to acquire a first link that has an association relationship with the first storage area after acquiring the data migration request. The association relationship is used to indicate that the first storage area receives the target data access request through the first link. The target data access request is used to request access to the target data of the first storage area. The target link includes the first link.
[0292] The first monitoring unit is used to receive target data access requests through the first link during the data migration process of the target data.
[0293] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0294] As an optional solution, link unit 1206 includes:
[0295] The link module is used to migrate the first link and determine the migrated first link as the second link. The second link is used to monitor target data access requests and has no association with the first storage area.
[0296] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0297] As an optional solution, it includes:
[0298] The fifth acquisition unit is used to acquire a data verification request after the migration status is adjusted from the target status to the migration completed status. The data verification request is used to request data verification of the target data.
[0299] The fourth response unit is used to respond to the data verification request after the migration status is changed from the target status to the migration completed status, and change the migration status from the migration completed status to the verification status.
[0300] The sixth acquisition unit is used to acquire the data similarity between the target data in the first storage area and the target data in the second storage area after the migration status is adjusted from the target status to the migration completed status.
[0301] The fourth control unit is used to adjust the migration status from the verification in progress state to the verification completed state after the migration status has been adjusted from the target state to the migration completed state, and when the data similarity reaches the target threshold.
[0302] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0303] As an optional solution, it includes:
[0304] The fifth control unit is used to change the migration status from the migration completed state to the verification state after the migration status has been changed to the verification state, and to change the migration status from the verification state back to the migration completed state when a data access request is detected.
[0305] The second adjustment unit is used to synchronously adjust the target data in the first storage area and the target data in the second storage area based on the data access request after adjusting the migration status from the migration completed state to the verification state.
[0306] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0307] As an optional solution, it includes:
[0308] The fourth migration unit is used to migrate the target data when the migration state is in the initialization state, and at the same time adjust the migration state to the migration in progress state. The initialization state is used to indicate that the target data is candidate data to be migrated. The target state includes the initialization state and the migration in progress state.
[0309] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0310] As an optional solution, it includes:
[0311] The seventh acquisition unit is used to acquire a data snapshot request after acquiring a data migration request, wherein the data snapshot request is used to request the target data at the current moment of the snapshot;
[0312] The fifth response unit is used to respond to the data snapshot request after obtaining the data migration request, and to determine the target data at the current moment as the snapshot data corresponding to the data snapshot request;
[0313] The fifth migration unit is used to migrate the target data and snapshot data after obtaining a data migration request, provided that the migration status is the target status.
[0314] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0315] As an optional approach, after receiving the data migration request, the following steps are taken:
[0316] The eighth acquisition unit is used to acquire a region expansion request after acquiring a data migration request, wherein the region expansion request is used to request expansion of the storage space of the storage region where the target data is located;
[0317] The sixth response unit is used to respond to the region expansion request and expand the storage space of the fourth storage area after obtaining the data migration request, in the case that the data migration request is to request the migration of target data from the third storage area to the fourth storage area.
[0318] The expansion unit is used to expand the storage space of the third storage area after the storage space expansion of the fourth storage area is completed, following the receipt of a data migration request.
[0319] For specific implementation examples, please refer to the examples shown in the above data migration control method, which will not be repeated here.
[0320] According to another aspect of the present invention, an electronic device for implementing the above-described data migration control method is also provided, such as... Figure 13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps of any of the above method embodiments through the computer program.
[0321] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0322] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0323] S1, Obtain a data migration request, wherein the data migration request is used to request data migration of the target data;
[0324] S2, respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permissions of the target data;
[0325] S3, migrate the target link used to receive data access requests, wherein the migrated target link is used to monitor data access requests, and the data access requests are used to request access to target data.
[0326] S4. When the migration status is the target status, perform data migration on the target data and monitor data access requests through the target link after migration. The target status is used to indicate that data migration on the target data is allowed.
[0327] S5, upon detecting a data access request, changes the migration status from the target status to the protection status to stop the data migration of the target data. The protection status is used to indicate that data migration of the target data is prohibited.
[0328] Alternatively, as those skilled in the art will understand, Figure 13 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 13 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 13 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 13 The different configurations shown.
[0329] The memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data migration control method and apparatus in this embodiment of the invention. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, thereby realizing the aforementioned data migration control method. The memory 1302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include memory remotely located relative to the processor 1304, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1302 may be used, but is not limited to, to store information such as data migration requests, migration status, and data access requests. As an example, such as... Figure 13 As shown, the memory 1302 may include, but is not limited to, the first acquisition unit 1202, the first response unit 1204, the link unit 1206, the first migration unit 1208, and the first control unit 1210 of the data migration control device. Furthermore, it may include, but is not limited to, other module units of the data migration control device, which will not be described in detail in this example.
[0330] Optionally, the transmission device 1306 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1306 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1306 is a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0331] In addition, the aforementioned electronic device also includes: a display 1308 for displaying information such as the data migration request, migration status, and data access request; and a connection bus 1310 for connecting the various module components in the aforementioned electronic device.
[0332] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.
[0333] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, executes the computer instructions, and causes the computer device to perform the aforementioned data migration control method, wherein the computer program is configured to execute the steps of any of the above-described method embodiments at runtime.
[0334] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the following steps:
[0335] S1, Obtain a data migration request, wherein the data migration request is used to request data migration of the target data;
[0336] S2, respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permissions of the target data;
[0337] S3, migrate the target link used to receive data access requests, wherein the migrated target link is used to monitor data access requests, and the data access requests are used to request access to target data.
[0338] S4. When the migration status is the target status, perform data migration on the target data and monitor data access requests through the target link after migration. The target status is used to indicate that data migration on the target data is allowed.
[0339] S5, upon detecting a data access request, changes the migration status from the target status to the protection status to stop the data migration of the target data. The protection status is used to indicate that data migration of the target data is prohibited.
[0340] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0341] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0342] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.
[0343] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0344] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0345] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0346] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0347] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A data migration control method, characterized in that, include: Obtain a data migration request, wherein the data migration request is used to request data migration of target data, the data migration is from the original storage warehouse to the destination storage warehouse, and the target data is cloud disk data; In response to the data migration request, the migration status of the target data is obtained, wherein the migration status is used to indicate the migration permission of the target data; the target link used to receive the data access request is migrated, wherein the migrated target link is used to monitor the data access request, wherein the data access request is used to request access to the target data. When the migration status is the target status, data migration is performed on the target data, and the data access request is monitored through the migrated target link. The target status indicates that data migration of the target data is permitted. During the data migration process, the target link is switched to the migration proxy module group. According to the Hash routing policy, the data migration request is distributed to a specific migration proxy module in the migration proxy module group. The specific migration proxy module divides the target data into a group of data blocks according to a preset granularity and manages the migration status of each data block. Upon detecting the data access request, the migration status is changed from the target status to the protected status to stop the data migration of the target data. The protected status indicates that data migration of the target data is prohibited. During the data migration process, the migration task scheduling module requests the migration data relocation module to relocate the corresponding data block from the original storage warehouse to the destination storage warehouse. The data migration and consistency verification processes are executed in parallel, and the progress of the consistency verification process lags behind the progress of the data migration. When the data block migration is completed, if the migration status is synchronized, the consistency verification process is started to compare the data of the corresponding data block in the original storage warehouse and the destination storage warehouse. After the verification is passed, the migration status is updated to the verification completed status.
2. The method according to claim 1, characterized in that, After adjusting the migration state from the target state to the protection state, the following steps are included: If the data access request has been responded to, the migration state is adjusted from the protected state to the target state; When the migration state is the target state, a data migration instruction is obtained, wherein the data migration instruction is used to instruct the target data to be migrated; In response to the data migration instruction, the target data is migrated, and during the data migration process, the data access request is monitored through the migrated target link.
3. The method according to claim 2, characterized in that, The data access request has been completed and responded to, including at least one of the following: If the data access request is of the first request type and the data access request has ended, the data access request is determined to be a response completion, wherein the data access request of the first request type is used to request access to the target data; When the data access request is of the second request type and the data access request has ended, the data access request is determined to be a response completion when the target data has completed the modification operation corresponding to the data access request. The data access request of the second request type is used to request access to and modify the target data.
4. The method according to claim 1, characterized in that, After obtaining the migration status of the target data, the following steps are included: When the migration status is the target status, the target data is migrated from the first storage area to the second storage area; When the target data has been migrated from the first storage area to the second storage area, the migration status is adjusted from the target status to the migration completed status, and the data access request is monitored through the target link after migration. Upon detecting the data access request, the target data in the first storage area and the target data in the second storage area are adjusted synchronously based on the data access request.
5. The method according to claim 4, characterized in that, Following the acquisition of the data migration request, the following is included: Obtain a first data migration request, wherein the first data migration request is used to request the migration of first data in the first storage area to the second storage area; In response to the first data migration request, migrate the first data in the first storage area to the second storage area; or, Obtain a second data migration request, wherein the second data migration request is used to request the migration of second data in the first storage area to the second storage area; If the migration status of the target data is obtained as migration complete, the second data in the first storage area is migrated to the second storage area in response to the second data migration request.
6. The method according to claim 4, characterized in that, Following the acquisition of the data migration request, the following is included: Obtain a first link that has an association relationship with the first storage area, wherein the association relationship is used to indicate that the first storage area receives a target data access request through the first link, the target data access request is used to request access to target data in the first storage area, and the target link includes the first link; During the data migration process of the target data, the target data access request is received through the first link.
7. The method according to claim 6, characterized in that, The migration process for the target link used to receive data access requests includes: The first link is migrated and the migrated first link is determined to be the second link. The second link is used to monitor the target data access request and has no association with the first storage area.
8. The method according to claim 4, characterized in that, After adjusting the migration status from the target status to the migration completed status, the process includes: Obtain a data verification request, wherein the data verification request is used to request data verification of the target data; In response to the data verification request, the migration status is changed from the migration completed status to the verification in progress status; Obtain the data similarity between the target data in the first storage area and the target data in the second storage area; When the data similarity reaches the target threshold, the migration status is changed from the verification in progress state to the verification completed state.
9. The method according to claim 8, characterized in that, After the migration status is adjusted from the migration completed state to the verification state, the following steps are included: If the data access request is detected, the migration status will be changed from the verification status to the migration completed status. Based on the data access request, the target data in the first storage area and the target data in the second storage area are adjusted synchronously.
10. The method according to any one of claims 1 to 9, characterized in that, After obtaining the migration status of the target data, the following steps are included: When the migration state is in the initialization state, the target data is migrated, and the migration state is adjusted to the migration in progress state. The initialization state is used to indicate that the target data is candidate data to be migrated. The target state includes the initialization state and the migration in progress state.
11. The method according to any one of claims 1 to 9, characterized in that, Following the acquisition of the data migration request, the following is included: Obtain a data snapshot request, wherein the data snapshot request is used to request the target data of the current snapshot time; In response to the data snapshot request, the target data at the current moment is determined as the snapshot data corresponding to the data snapshot request; When the migration state is the target state, data migration is performed on the target data and the snapshot data.
12. The method according to any one of claims 1 to 9, characterized in that, Following the acquisition of the data migration request, the following is included: Obtain a region expansion request, wherein the region expansion request is used to request an expansion of the storage space of the storage region where the target data is located; When the data migration request is used to request the migration of the target data from the third storage area to the fourth storage area, the storage space of the fourth storage area is expanded in response to the area expansion request. Once the storage space expansion of the fourth storage area is completed, the storage space of the third storage area will be expanded.
13. A data migration control device, characterized in that, include: The first acquisition unit is used to acquire a data migration request, wherein the data migration request is used to request data migration of target data, the data migration is from the original storage warehouse to the destination storage warehouse, and the target data is cloud disk data; The first response unit is configured to respond to the data migration request and obtain the migration status of the target data, wherein the migration status is used to indicate the migration permissions of the target data; A link unit is used to migrate a target link used to receive a data access request, wherein the migrated target link is used to monitor the data access request, and the data access request is used to request access to the target data. The first migration unit is configured to migrate the target data when the migration status is the target status, and monitor the data access request through the migrated target link. The target status indicates that data migration of the target data is permitted. During the data migration process, the target link is switched to the migration proxy module group. The data migration request is distributed to a specific migration proxy module in the migration proxy module group according to a hash routing policy. The specific migration proxy module divides the target data into a group of data blocks according to a preset granularity and manages the migration status of each data block. The first control unit is configured to, upon detecting the data access request, adjust the migration status from the target status to the protection status to stop the data migration of the target data. The protection status indicates that data migration of the target data is prohibited. During the data migration process, the migration task scheduling module requests the migration data relocation module to relocate the corresponding data block from the original storage warehouse to the destination storage warehouse. The data migration and consistency verification processes are executed in parallel, with the progress of the consistency verification process lagging behind the progress of the data migration. When the data block relocation is completed, if the migration status is in the synchronized state, the consistency verification process is initiated to compare the data of the corresponding data block in the original storage warehouse and the destination storage warehouse. After successful verification, the migration status is updated to the verification completed state.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 12.
15. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 12 through the computer program.
Citation Information
Patent Citations
Data migration method and device, computer equipment and storage medium
CN107943572A
Storage system, data migration managing system, and data migration managing method
US20060236055A1