Data migration method and system for multi-controller storage systems with cross-controller RAID stripe lock-free operation
By dividing the multi-controller storage system into stripes and assigning controller affiliations, and sorting them according to task priority, the problem of operational conflicts between controllers caused by data migration in the multi-controller storage system is solved, thereby improving the reliability and performance of data migration.
Patent Information
- Application Number
- CN202211281506.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-10-19
AI Technical Summary
In a multi-controller storage system, when data migration causes a change in the stripe's assigned controller, two controllers may operate on the same stripe simultaneously, affecting data reliability.
By assigning ownership of stripes and controllers, each stripe has a unique controller affiliation. Furthermore, by classifying the task types and priorities of RAID background tasks, the priority of data migration is ensured to be higher than or equal to the priority of background tasks, thus avoiding mutual exclusion of I/O processing between controllers.
It improves the reliability and performance of data migration, and avoids locking between controllers by prioritizing and stripe ownership management, thus ensuring data consistency.
Smart Images

Figure CN115525234B_ABST
Abstract
Description
Technical Field
[0001] This invention specifically relates to the field of data migration technology, and more specifically to a data migration method and system for a multi-controller storage system with cross-controller RAID stripe lock-free operation. Background Technology
[0002] Data migration refers to the transfer of data between different storage devices, moving data to a new storage space and freeing up the original storage space to accommodate the new data. With the development of information technology, data migration is frequently encountered in the field of storage software, such as migrating data from mechanical hard drives to SSDs.
[0003] RAID 5 and RAID 6 are the most commonly used parity RAID types. RAID not only needs to handle upper-layer business I / O, but also needs to perform various background tasks such as inspection, initialization, and reconstruction. These background tasks and business I / O often interact. To ensure data consistency between business I / O and between business I / O and background tasks, stripe locks are usually added between controllers in dual-controller storage systems. Stripe locks ensure mutual exclusion of I / O between the two controllers at the same time. However, with the horizontal scaling of multi-controller storage systems, high-end storage systems with 4 or even 8 controllers have gradually matured and will likely evolve to horizontal scaling with even more controllers. Frequent information synchronization between more controllers will inevitably further exacerbate the performance impact. Therefore, RAID should achieve controller isolation for stripes as much as possible, that is, stripes are bound to controllers, with one stripe belonging to one controller. This way, stripe operations are concentrated on one controller, avoiding communication between controllers to ensure RAID stripe and data consistency.
[0004] Volume-level data migrations are initiated at the RAID module level. RAID treats these migrations as business I / O, so the RAID background tasks are unaware of them. For volumes with ownership, data migration inevitably causes changes to the RAID stripes and their ownership controllers. If a data migration causes a change in the stripe's ownership controller, and before the change is complete, a RAID background task (such as a rebuild) is processing that stripe on another controller. This creates a possibility of two controllers operating on the same stripe simultaneously, impacting data reliability. Summary of the Invention
[0005] The purpose of this invention is to provide a data migration method and system for a multi-controller storage system that does not require cross-controller RAID stripe locks, in order to solve the problem mentioned in the background art that when data migration causes a change in the controller to which a stripe belongs, and before the change of ownership of the stripe is completed, a RAID background task (such as reconstruction) on another controller is processing the stripe, there is a possibility that two controllers may operate on the same stripe at the same time, which affects the reliability of the data.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A data migration method for a multi-controller storage system without cross-controller RAID stripe lock includes the following steps:
[0008] S10. Assign ownership of stripes and controllers, so that each stripe has a unique controller affiliation, in order to break down the background tasks of RAID into independent subtasks based on the controller.
[0009] RAID not only needs to handle upper-layer business I / O, but also needs to perform various types of background tasks. There are multiple types of RAID background tasks, such as data inspection, data initialization, and data reconstruction. Since volume-level data migration is initiated at the upper layer of the RAID module, RAID treats upper-layer data migration as business I / O. Therefore, RAID background tasks are unaware of data migration. For volumes with a home, volume data migration will inevitably cause changes in RAID stripes and home controllers. For example, when migrating a volume from a mechanical hard disk RAID to an SSD hard disk RAID, assuming the volume's home controller is B, the home node of the stripe corresponding to the volume in the destination RAID (SSD hard disk RAID) changes (assuming the home controller of the stripe corresponding to the volume in the destination RAID was A before the migration), changing from the previous home node A to the home node B of the migrated volume. Therefore, when data migration causes a change in the controller to which a stripe belongs, and before the stripe's ownership is changed, a RAID background task (such as reconstruction) is processing that stripe on another controller. This could result in two controllers operating on the same stripe simultaneously, affecting data reliability. Therefore, by assigning ownership to stripes and controllers, each stripe has a unique controller ownership, ensuring that the stripe's ownership does not change while background tasks are being executed. This avoids the situation where two controllers operate on the same stripe simultaneously, thus ensuring data reliability.
[0010] S20. Divide the task types and priorities of RAID background tasks, and set the task priorities for data migration;
[0011] S30. During data migration, confirm whether there is an ongoing background task in the stripe to which the data belongs. If so, compare the priority of the data migration with the priority of the ongoing background task and execute the task with the higher priority. Otherwise, execute the data migration task.
[0012] As a further aspect of the present invention: In step S10, the method for dividing stripes and controllers is as follows: the controller affiliation of a stripe is the same as the controller affiliation of the upper-level management unit to which the stripe belongs. The upper-level management unit is the upper-level logical volume to which the stripe belongs. If the upper-level logical volume also has a controller affiliation, the controller affiliation of the stripe and its upper-level logical volume is the same. The advantage of doing this is that the migration of the same stripe and the background task processing are all on one controller, avoiding IO mutual exclusion processing between controllers.
[0013] As a further aspect of the present invention: step S20 includes:
[0014] S21. Identify the task type of the RAID background task and prioritize the RAID background task based on the task type;
[0015] S22. Set the task priority for data migration;
[0016] S23. Sort the priority of the data migration task with the priority of the RAID background task to obtain a priority sequence.
[0017] As a further aspect of the present invention, the method for prioritizing RAID background tasks is as follows: based on the task type of the RAID background tasks, the RAID background tasks are divided into high-priority and low-priority tasks. For example, data reconstruction tasks and RAID initialization tasks are divided into high-priority tasks, and RAID inspection tasks are divided into low-priority tasks.
[0018] Then, the data migration task priority is set between high-priority tasks and low-priority tasks, and the final priority sequence is: high-priority tasks, data migration tasks, and low-priority tasks;
[0019] For high-priority or low-priority tasks containing multiple RAID background tasks, specific divisions can be made. For example, in high-priority tasks, the priority of the data reconstruction task is higher than the priority of RAID initialization. The final priority sequence is: data reconstruction task priority > RAID initialization priority > data migration priority > RAID inspection priority.
[0020] As a further aspect of the present invention: a method for executing a high-priority task includes the following steps:
[0021] S31. Get the task priority of the ongoing background task;
[0022] S32. Determine the priority order of data migration tasks based on the priority sequence. If the priority order of data migration tasks is higher than the priority of ongoing background tasks, execute the data migration task; otherwise, proceed to step S33.
[0023] S33. Pause the data migration task and wait for the ongoing background task to complete before proceeding with the data migration. When the upper-layer logical volume is being migrated, first confirm whether there are any stripes with ongoing background tasks in the data portion being migrated. If the ongoing background task is a high-priority task, such as a reconstruction background task or an initialization background task, the migration needs to be paused and the higher-priority task executed because the data migration may cause a change in the stripe's ownership. After the RAID background task of the migrated data stripe is completed, the data migration module is asynchronously notified, and the data migration module restarts the migration of that data area. When the data is migrated again, the background task for that area has been completed.
[0024] If the ongoing background task is a low-priority task, such as a RAID inspection background task, then pause the low-priority task and asynchronously notify the RAID inspection background task to continue execution after the data migration is complete.
[0025] As a further aspect of the present invention: the granularity of the migration data is an integer multiple of the stripe, and each stripe belongs to the same controller. The size of the upper-level logical volume to which the migration data belongs should be an integer multiple of the stripe.
[0026] As a further aspect of the present invention: suppose the upper-layer logical volume contains N complete stripes (N is an integer greater than or equal to 1), and the controllers of the N stripes belong to the same entity, and the migration data granularity contains M stripes (M is an integer greater than or equal to 1 and less than or equal to N).
[0027] A data migration system for a multi-controller storage system with cross-controller RAID stripe lock-free configuration, characterized in that it includes:
[0028] The stripe allocation module is used to assign stripes and controllers in the upper-layer logical volume of RAID, so that each stripe has a unique controller to which it belongs. The controller is used to execute background tasks for the assigned stripe.
[0029] The query module is used to query whether there are ongoing background tasks for the stripe to which the migration data belongs, and to send comparison instructions and migration instructions when the query result shows that they exist;
[0030] The priority allocation module is used to classify the task types and priorities of RAID background tasks, set the task priorities of data migration, and also to obtain comparison instructions and compare the priority of data migration with the priority of ongoing background tasks to obtain the comparison results.
[0031] The data migration module is used to obtain migration instructions and execute data migration tasks; it is also used to execute data migration tasks based on comparison results.
[0032] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described data migration method for a multi-controller storage system with cross-controller RAID stripe lock-free architecture.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention aligns the granularity of migration with RAID stripes, prioritizes the migration background task and the RAID background task at the upper layer of RAID, and when the priority of the RAID background task, such as reconstruction, is higher than that of the migration background task, the migration background task needs to be aware of the change in stripe ownership and wait for the changed stripe group to complete its background task. After the RAID stripe background task is completed, the migration task is notified asynchronously, and the migration task restarts the migration. When the priority of the RAID background task is lower than that of the migration background task, the RAID background task needs to be aware of the migration background task, pause the RAID background task, and continue execution asynchronously through the RAID background task after the migration is completed. Through the above processing scheme to release the locking between back-end controllers, data consistency is guaranteed while improving migration performance. Attached Figure Description
[0034] Figure 1 A flowchart illustrating a data migration method for multi-controller storage systems that avoids cross-controller RAID stripe lockout;
[0035] Figure 2 A flowchart of step S20 of the data migration method for multi-controller storage systems that are exempt from cross-controller RAID stripe locks;
[0036] Figure 3 A flowchart of step S30 of the data migration method for multi-controller storage systems that are exempt from cross-controller RAID stripe locks;
[0037] Figure 4 A structural diagram of a data migration system for multi-controller storage systems that are designed to avoid cross-controller RAID stripe lockouts. Detailed Implementation
[0038] Various embodiments and / or forms are described below with reference to the accompanying drawings. In the following description, numerous specific details are disclosed for illustrative purposes to provide a general understanding of more than one form. However, those skilled in the art will understand that these forms can be implemented without specific details. Specific examples of more than one form will be described in detail in the following description and drawings. However, these forms are merely illustrative and may utilize a portion of the principles and methods of various forms; the descriptions are intended to encompass all forms and their equivalents. Specifically, the terms "embodiment," "example," "form," "illustration," etc., as used in this specification can be interpreted as meaning that any form or design described may be better or more advantageous than other forms or designs.
[0039] Furthermore, various forms and characteristics can be embodied in systems that include more than one device, terminal, server, equipment, component, and / or module. It should be understood and recognized that various systems may include additional devices, terminals, servers, equipment, components, and / or modules, and / or may not include all of the multiple devices, terminals, servers, equipment, components, and modules shown in the figure.
[0040] The terms "computer program," "component," "module," and "system" used in this specification are used interchangeably, and "computer" refers to related entities, hardware, firmware, software, combinations of software and hardware, or the execution of software. For example, a component can be a process executing on a processor, a processor, an object, a thread of execution, a program, and / or a computer, but is not limited thereto. For example, it can be an application program executing on a computer device and / or all components of the computing device. More than one component can be installed within a processor and / or a thread of execution. A component can be localized within a single computer. A component can also be distributed between two or more computers.
[0041] Furthermore, these components can be executed by various computer-readable media constructed to internally store various data. These components, for example, can communicate locally and / or remotely based on signals having more than one data packet (e.g., data emitted by a component interacting with other components on a local system or a distributed system, and data transmitted to other systems via networks such as the Internet).
[0042] Hereinafter, regardless of the symbols used in the drawings, the same or similar constituent elements will be assigned the same symbols, and repeated descriptions of these elements will be omitted. Furthermore, when describing the embodiments disclosed in this specification, detailed descriptions of well-known technologies will be omitted if it is determined that such detailed descriptions would obscure the essence of the invention. Moreover, the accompanying drawings are only for easier understanding of the embodiments disclosed in this specification, and the technical concepts disclosed in this specification are not limited to the drawings.
[0043] The terminology used in this specification is for illustrative purposes and not for limiting the invention. Unless otherwise specified, the singular includes the plural. The use of “comprises” and / or “comprising” in this specification does not exclude the presence or addition of more than one other constituent element in addition to the mentioned constituent elements.
[0044] The terms "first," "second," etc., can be used to describe various elements or components, but the elements or components are not limited to those terms. The terms are used to distinguish one element or component from others. Therefore, the first element or component mentioned below can also be a second element or component within the technical concept of this invention.
[0045] Unless otherwise defined, all terms used in this specification (including technical and scientific terms) are to be understood in the sense commonly understood by one of ordinary skill in the art to which this invention pertains. Furthermore, terms defined in commonly used dictionaries should not be interpreted ideally or excessively unless specifically defined otherwise.
[0046] Furthermore, the term "or" does not mean exclusive "or" but inclusive "or". That is, unless otherwise specific or contextually ambiguous, "X uses A or B" implies one of the natural connotations. That is, "X uses A or B" can be any of the above when X uses A or B; X uses B or X uses both A and B. And it should be understood that the term "and / or" as used in this specification refers to all possible combinations of more than one of the related items listed.
[0047] In addition, the terms “information” and “data” used in this specification are generally used interchangeably.
[0048] The suffixes “module” and “section” used in the following description of the constituent elements are merely assigned or used interchangeably for the convenience of writing the specification, and they do not have any distinguishing meaning or function in themselves.
[0049] Volume-level data migrations are initiated at the RAID module level. RAID treats these migrations as business I / O, so the RAID background tasks are unaware of them. For volumes with ownership, data migration inevitably causes changes to the RAID stripes and their ownership controllers. If a data migration causes a change in the stripe's ownership controller, and before the change is complete, a RAID background task (such as a rebuild) is processing that stripe on another controller. This creates a possibility of two controllers operating on the same stripe simultaneously, impacting data reliability.
[0050] Example 1
[0051] Please see Figure 1-3 In this embodiment of the invention, a data migration method for a multi-controller storage system with cross-controller RAID stripe lock-free configuration includes the following steps:
[0052] S10. Assign stripes to controllers so that each stripe has a unique controller affiliation. This breaks down the background tasks of RAID into independent subtasks based on the controller. That is, each controller performs background tasks on its assigned stripe. In this way, a RAID binds stripes to different controllers, and each controller is only responsible for the background tasks of its assigned stripe. If there are no migration tasks or controller failures, the stripe affiliation will not change.
[0053] RAID5 and RAID6 are the most commonly used parity RAID types. RAID not only needs to handle upper-layer business I / O, but also needs to perform various types of background tasks. There are multiple types of RAID background tasks, such as data inspection, data initialization, and data reconstruction. Since volume-level data migration is initiated at the upper layer of the RAID module, RAID treats upper-layer data migration as business I / O. Therefore, RAID background tasks are unaware of data migration. For volumes with a home, volume data migration will inevitably cause changes in RAID stripes and home controllers. For example, when migrating a volume from a mechanical hard disk RAID to an SSD hard disk RAID, assuming the volume's home controller is B, the home node of the stripe corresponding to the volume in the destination RAID (SSD hard disk RAID) changes (assuming the home controller of the stripe corresponding to the volume in the destination RAID was A before the migration), changing from the previous home node A to the home node B of the migrated volume. Therefore, when data migration causes a change in the controller to which a stripe belongs, and before the stripe's ownership is changed, a RAID background task (such as reconstruction) is processing the stripe on another controller. At this time, there is a possibility that two controllers are operating on the same stripe at the same time, which affects the reliability of the data. Therefore, by dividing the ownership of stripes and controllers, each stripe has a unique controller ownership, so that the ownership of the stripe does not change when the background task is executed, avoiding the situation that two controllers operate on the same stripe at the same time, and ensuring the reliability of the data.
[0054] In this embodiment of the invention, the method for dividing the strip and the controller is as follows:
[0055] The controller affiliation of a stripe is the same as the controller affiliation of the upper-level management unit to which the stripe belongs. The upper-level management unit is the upper-level logical volume to which the stripe belongs. If the upper-level logical volume also has a controller affiliation, the controller affiliation of the stripe and its upper-level logical volume is the same. The advantage of doing this is that the migration and background task processing of the same stripe are all on the same controller, avoiding IO mutual exclusion between controllers.
[0056] In this embodiment of the invention, it should be noted that when performing data migration, the granularity of the migrated data needs to be an integer multiple of the stripe, and each stripe belongs to the same controller. In order to meet the above conditions, the size of the upper-layer logical volume where the migrated data belongs should be an integer multiple of the stripe. At this time, the granularity of the migrated data is aligned with the RAID stripe.
[0057] In this embodiment of the invention, it is necessary to define the relationship between the upper-level logical volume and the stripe. The upper-level logical volume is the upper-level logical volume where the stripe to which the migration data belongs is located. Suppose that the upper-level logical volume contains N complete stripes (N is an integer greater than or equal to 1), and the controllers of the N stripes belong to the same entity. The granularity of the migration data contains M stripes (M is an integer greater than or equal to 1 and less than or equal to N).
[0058] S20. Divide the task types and priorities of RAID background tasks, and set the task priorities for data migration;
[0059] To further prevent two controllers from operating the same stripe simultaneously during data migration, it is necessary to prioritize data migration and RAID background tasks. Since RAID background tasks have various types, each with different priorities compared to data migration, it is essential to categorize the background tasks and set priorities for data migration and each background task. This involves the following steps:
[0060] S21. Identify the task type of the RAID background task and prioritize the RAID background task based on the task type;
[0061] S22. Set the task priority for data migration;
[0062] S23. Sort the data migration task priority with the RAID background task priority to obtain a priority sequence;
[0063] In this embodiment of the invention, the method for prioritizing RAID background tasks is as follows: based on the task type of the RAID background tasks, the RAID background tasks are divided into high-priority and low-priority tasks. For example, data reconstruction tasks and RAID initialization tasks are divided into high-priority tasks, and RAID inspection tasks are divided into low-priority tasks.
[0064] Then, the data migration task priority is set between high-priority tasks and low-priority tasks, and the final priority sequence is: high-priority tasks, data migration tasks, and low-priority tasks;
[0065] In addition, for high-priority or low-priority tasks containing multiple RAID background tasks, specific divisions can be made. For example, in high-priority tasks, the priority of the data reconstruction task is greater than the priority of the RAID initialization task. The final priority sequence is: data reconstruction task priority > RAID initialization priority > data migration priority > RAID inspection priority.
[0066] S30. During data migration, confirm whether there is an ongoing background task in the stripe to which the data belongs. If so, compare the priority of the data migration with the priority of the ongoing background task and execute the task with the higher priority; otherwise, execute the data migration task.
[0067] Furthermore, in step S30 of this embodiment of the invention, the method for executing a higher-priority task includes the following steps:
[0068] S31. Get the task priority of the ongoing background task;
[0069] S32. Determine the priority order of data migration tasks based on the priority sequence. If the priority order of data migration tasks is higher than the priority of ongoing background tasks, execute the data migration task; otherwise, proceed to step S33.
[0070] S33. Pause the data migration task and wait for the ongoing background task to complete before proceeding with the data migration.
[0071] When the upper-layer logical volume is migrated, it is first confirmed whether there are stripes with background tasks in progress in the data portion being migrated. If the background tasks in progress are high-priority tasks, such as reconstruction background tasks and initialization background tasks, the migration needs to be paused and the higher-priority tasks are executed because the data migration may cause a change in the stripe ownership. After the RAID background task of the stripe to which the migrated data belongs is completed (except for inspection background tasks, which do not need to wait, while initialization and reconstruction need to wait for reconstruction to be completed), the data migration module is notified asynchronously. The data migration module restarts the migration of the data area. When the data is migrated again, the background task of the area has been completed (the stripe ownership has changed, and there will be no scenario where two controllers operate on the same stripe at the same time, eliminating data security risks).
[0072] Since the migration speed and reconstruction speed are not the same, and the migration space range and reconstruction range are also not the same, in most scenarios the migration strip will not be reconstructing at the same time. Therefore, the overall pause time for the migration task is very short.
[0073] If the ongoing background task is a low-priority task, such as a RAID inspection background task, then pause the low-priority task and asynchronously notify the RAID inspection background task to continue execution after the data migration is complete.
[0074] Example 2
[0075] In Example 1, this invention discloses a data migration method for a multi-controller storage system that does not require cross-controller RAID stripe locks, comprising the following steps:
[0076] S10. Assign ownership of stripes and controllers, so that each stripe has a unique controller affiliation, in order to break down the background tasks of RAID into independent subtasks based on the controller.
[0077] S20. Divide the task types and priorities of RAID background tasks, and set the task priorities for data migration;
[0078] S30. During data migration, confirm whether there is an ongoing background task in the stripe to which the data belongs. If so, compare the priority of the data migration with the priority of the ongoing background task and execute the task with the higher priority. Otherwise, execute the data migration task.
[0079] Step S20 includes:
[0080] S21. Identify the task type of the RAID background task and prioritize the RAID background task based on the task type;
[0081] S22. Set the task priority for data migration;
[0082] S23. Sort the data migration task priority with the RAID background task priority to obtain a priority sequence;
[0083] Step S30, the method for executing higher-priority tasks, includes the following steps:
[0084] S31. Get the task priority of the ongoing background task;
[0085] S32. Determine the priority order of data migration tasks based on the priority sequence. If the priority order of data migration tasks is higher than the priority of ongoing background tasks, execute the data migration task; otherwise, proceed to step S33.
[0086] S33. Pause the data migration task and wait for the ongoing background task to complete before proceeding with the data migration.
[0087] The difference between this embodiment and Embodiment 1 is that:
[0088] Please see Figure 4The present invention also discloses a data migration system for a multi-controller storage system that eliminates the need for cross-controller RAID stripe locks, comprising:
[0089] The stripe allocation module 100 is used to assign stripes and controllers in the upper-layer logical volume of RAID, so that each stripe has a unique controller to which it belongs. The controller is used to execute background tasks for the assigned stripe.
[0090] The query module 200 is used to query whether there is an ongoing background task for the stripe to which the migration data belongs, and to send a comparison instruction and a migration instruction when the query result shows that it exists;
[0091] The priority division module 300 is used to classify the task type and priority of RAID background tasks, set the task priority of data migration, and also to obtain comparison instructions and compare the priority of data migration with the priority of ongoing background tasks to obtain the comparison result.
[0092] The data migration module 400 is used to obtain migration instructions and execute data migration tasks; it is also used to execute data migration tasks based on comparison results.
[0093] An embodiment of the present invention provides a computer device including a memory and a processor. The memory stores at least one instruction, at least one program, code set, or instruction set. When the processor loads and executes at least one instruction, at least one program, code set, or instruction set, it implements the steps in the above-described method embodiments.
[0094] Furthermore, some embodiments may include a storage medium having a program for executing the methods described herein on a computer, having stored thereon at least one instruction, at least one program segment, code set, or instruction set, which, when loaded and executed by a processor, implements the steps in the above-described method embodiments. Examples of computer-readable recording media include hardware devices specifically configured for storing and executing program commands: magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floppy disks; and ROM, RAM, flash memory, etc. Examples of program commands may include machine language code written by a compiler and high-level language code executed by a computer using an interpreter, etc.
[0095] Those skilled in the art will understand that implementing all or part of the processes in the methods of the above embodiments can be accomplished by instructing related hardware with at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set can be stored in a non-volatile computer-readable storage medium. When executed, the at least one instruction, at least one program, code set, or instruction set can include the processes of the embodiments of the above methods. Furthermore, any references to memory, storage, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory.
[0096] In summary, this invention aligns the migration granularity with RAID stripes and prioritizes the migration background task and RAID background task at the RAID upper layer. When the priority of the RAID background task, such as reconstruction, is higher than that of the migration background task, the migration background task needs to be aware of the change in stripe ownership and wait for the changed stripe group to complete its background task. After the RAID stripe background task is completed, it asynchronously notifies the migration task, and the migration task restarts the migration. When the priority of the RAID background task is lower than that of the migration background task, the RAID background task needs to be aware of the migration background task, pause the RAID background task, and asynchronously resume execution through the RAID background task after the migration is completed. Through the above processing scheme, the locking between backend controllers is removed, ensuring data consistency while improving migration performance.
[0097] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0098] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A data migration method for a multi-controller storage system with cross-controller RAID stripe lock-free operation, characterized in that, Includes the following steps: S10. Assign ownership of stripes and controllers, so that each stripe has a unique controller affiliation, in order to break down the background tasks of RAID into independent subtasks based on the controller. S20. Divide the task types and priorities of RAID background tasks, and set the task priorities for data migration; S30. During data migration, confirm whether there is an ongoing background task in the stripe to which the data belongs. If so, compare the priority of the data migration with the priority of the ongoing background task and execute the task with the higher priority. Otherwise, execute the data migration task. The granularity of the migration data is an integer multiple of the stripe size, and all stripes belonging to the same controller are of the same size. The size of the upper logical volume to which the migration data belongs should be an integer multiple of the stripe size. Suppose the upper logical volume contains N complete stripes, where N is an integer greater than or equal to 1, and the controllers of these N stripes belong to the same controller. The granularity of the migration data contains M stripes, where M is an integer greater than or equal to 1 and less than or equal to N. In step S10, the method for dividing stripes and controllers is as follows: the controller affiliation of a stripe is the same as the controller affiliation of the upper-level management unit to which the stripe belongs, and the upper-level management unit is the upper-level logical volume to which the stripe belongs; Step S20 includes: S21. Identify the task type of the RAID background task and prioritize the RAID background task based on the task type; S22. Set the task priority for data migration; S23. Sort the priority of the data migration task with the priority of the RAID background task to obtain a priority sequence.
2. The data migration method for a multi-controller storage system with a cross-controller RAID stripe lock-free architecture according to claim 1, characterized in that, The method for prioritizing RAID background tasks is as follows: based on the task type, RAID background tasks are divided into high-priority and low-priority tasks.
3. The data migration method for a multi-controller storage system with a cross-controller RAID stripe lock-free architecture according to claim 2, characterized in that, The priority sequence is: high priority tasks, data migration tasks, and low priority tasks.
4. The data migration method for a multi-controller storage system with a cross-controller RAID stripe lock-free architecture according to claim 1, characterized in that, The method for executing high-priority tasks includes the following steps: S31. Get the task priority of the ongoing background task; S32. Determine the priority order of data migration tasks based on the priority sequence. If the priority order of data migration tasks is higher than the priority of ongoing background tasks, execute the data migration task; otherwise, proceed to step S33. S33. Pause the data migration task and wait for the ongoing background task to complete before proceeding with the data migration.
5. A data migration system for a multi-controller storage system with a cross-controller RAID stripe lock-free architecture, characterized in that, include: The stripe allocation module is used to assign stripes and controllers in the upper-layer logical volume of RAID, so that each stripe has a unique controller to which it belongs. The controller is used to execute background tasks for the assigned stripe. The query module is used to query whether there are ongoing background tasks for the stripe to which the migration data belongs, and to send comparison instructions and migration instructions when the query result shows that they exist; The priority allocation module is used to classify the task types and priorities of RAID background tasks and set the task priorities for data migration. It is also used to obtain comparison instructions and compare the priority of data migration with the priority of ongoing background tasks to obtain comparison results; The data migration module is used to obtain migration instructions and execute data migration tasks; it is also used to execute data migration tasks based on comparison results. The granularity of the migration data is an integer multiple of the stripe size, and all stripes belonging to the same controller are of the same size. The size of the upper logical volume to which the migration data belongs should be an integer multiple of the stripe size. Suppose the upper logical volume contains N complete stripes, where N is an integer greater than or equal to 1, and the controllers of these N stripes belong to the same controller. The granularity of the migration data contains M stripes, where M is an integer greater than or equal to 1 and less than or equal to N. The stripe allocation module is also used to assign the controller of the stripe to the same controller of the upper management unit to which the stripe belongs, wherein the upper management unit is the upper logical volume to which the stripe belongs. The query module is also used to: identify the task type of the RAID background task, and classify the priority of the RAID background task based on the task type; set the task priority of data migration; and sort the task priority of data migration with the task priority of RAID background task to obtain a priority sequence.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data migration method for a multi-controller storage system with a cross-controller RAID stripe lock as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data migration method, system and equipment of storage server and storage medium
CN114816278A
RAID inspection method, system and device and storage medium
CN115129551A