Controller switch-back control method, device, apparatus, storage system, and storage medium
Patent Information
- Application Number
- CN202310429964.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-04-20
AI Technical Summary
[0002]为了提高存储系统的整体性能以及可用性,很多存储系统会同时采用多个控制器(例如两控或四控等)进行数据处理,由于每个控制器分别负责一部分LBA(Logical BlockAddress,逻辑区块地址)片段的IO操作,因此当其中某个控制器故障时,便需要进行控制器重新组队,而当故障控制器恢复的时候,则需要进行控制器回切(也即:将修复的控制器重新加入存储系统的控制器阵列中),然而现有技术中在进行控制器回切时,需要暂停存储系统所有的IO操作,从而降低了客户业务的处理效率,降低了用户体验
[0020] This invention provides a controller switchback control method. Considering that the root area synchronization tasks corresponding to all LBAs managed by a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments managed by the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer services and enhancing the user experience.
Smart Images

Figure CN116450415B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage, and in particular to a controller back-off control method. This invention also relates to a controller back-off control device, equipment, storage system, and computer-readable storage medium. Background Technology
[0002] To improve the overall performance and availability of storage systems, many storage systems use multiple controllers (e.g., two or four controllers) for data processing. Since each controller is responsible for the I / O operations of a portion of the LBA (Logical Block Address) segment, when one controller fails, the controllers need to be regrouped. When the failed controller recovers, controller rollback (i.e., adding the repaired controller back to the storage system's controller array) is required. However, in existing technologies, all I / O operations of the storage system need to be paused during controller rollback, which reduces the processing efficiency of customer services and degrades the user experience.
[0003] Therefore, how to provide a solution to the above-mentioned technical problems is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this invention is to provide a controller switchback control method that enables I / O operations during the controller switchback process of a multi-controller storage system, thereby improving the processing efficiency of customer services and enhancing the user experience. Another purpose of this invention is to provide a controller switchback control device, equipment, storage system, and computer-readable storage medium that enables I / O operations during the controller switchback process of a multi-controller storage system, thereby improving the processing efficiency of customer services and enhancing the user experience.
[0005] To address the aforementioned technical problems, this invention provides a controller switchback control method, applied to a controller in a storage system, comprising: Obtain all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided; In response to the controller's switchback command, the root region of each LBA sub-segment under its jurisdiction is synchronized in sequence according to the preset priority; Before all LBA sub-segments have completed root area synchronization, determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization; If not, then perform the IO operation corresponding to the IO request.
[0006] Preferably, after determining whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root region synchronization, the controller switchback control method further includes: If so, add the IO request to the waiting queue; When the LBA sub-segment containing the target LBA finishes root area synchronization, the IO operation corresponding to the IO request located in the waiting queue is executed.
[0007] Preferably, the step of performing root region synchronization on each of the LBA sub-segments under its jurisdiction according to a preset priority specifically involves: The segment to be processed is determined from all the LBA sub-segments under its jurisdiction according to a preset priority; Determine whether a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the root region will be synchronized for the segment to be processed; If it exists, after flushing the write cache corresponding to the segment to be processed to the disk, the segment to be processed is synchronized with the root area.
[0008] Preferably, the preset priority is that the LBA sub-segment without a write cache has a higher priority than the LBA sub-segment with a write cache.
[0009] Preferably, determining the segment to be processed from all the LBA sub-segments under its jurisdiction according to a preset priority specifically involves: According to a preset priority, multiple segments to be processed are determined from all the LBA sub-segments under its jurisdiction; The specific steps for determining whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each of the segments to be processed.
[0010] Preferably, when the LBA sub-segment containing the target LBA finishes root region synchronization, executing the IO operation corresponding to the IO request in the waiting queue specifically involves: Determine whether the LBA sub-segment that has recently completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is included, then the IO request for the target LBA in the waiting queue that is contained in the LBA sub-fragment that has just completed root area synchronization is executed.
[0011] Preferably, each LBA sub-fragment corresponds to at least one tree structure in the disk of the storage system.
[0012] Preferably, each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
[0013] Preferably, the IO operation corresponding to the IO request specifically includes: Determine whether it is the controller in the root area of the controller to be restored specified by the controller back-up command; If the controller is the root area of the controller to be restored, then determine whether the LBA sub-segment where the target LBA of the latest received IO request is located has been synchronized with the root area. If the Root area has not been synchronized, then the IO operation corresponding to the IO request is executed and the Root area updated by the IO operation is synchronized to its corresponding backup controller. If root area synchronization has already been performed, then the IO operation corresponding to the IO request is executed and the root area updated by the IO operation is synchronized to the controller to be restored.
[0014] Preferably, the step of performing the IO operation corresponding to the IO request and synchronizing the Root area updated by the IO operation to the controller to be restored specifically involves: Execute the IO operation corresponding to the IO request; The Root area updated due to the IO operation will be synchronized to the controller to be restored and its corresponding backup controller.
[0015] Preferably, after determining whether it is the controller of the root area of the controller to be restored specified by the controller rollback command, the controller rollback control method further includes: If the controller is not the one that backs up the root area of the controller to be restored, then the IO operation corresponding to the IO request is executed and the root area updated by the IO operation is synchronized to its own corresponding backup controller.
[0016] To address the aforementioned technical problems, the present invention also provides a controller back-cut control device, comprising: The acquisition module is used to acquire all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided. The synchronization module, in response to the controller's switchback command, is used to synchronize the root region of each LBA sub-segment under its jurisdiction according to a preset priority. The judgment module is used to determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization before all LBA sub-segments have completed root area synchronization. If not, the execution module is triggered. The execution module is used to perform the IO operation corresponding to the IO request.
[0017] To address the aforementioned technical problems, the present invention also provides a controller back-off control device, comprising: Memory, used to store computer programs; A processor is used to implement the steps of the controller back-cut control method as described above when executing the computer program.
[0018] To address the aforementioned technical problems, the present invention also provides a storage system, including a storage system body and a controller switchover control device as described above connected to the storage system body.
[0019] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the controller back-switch control method described above.
[0020] This invention provides a controller switchback control method. Considering that the root area synchronization tasks corresponding to all LBAs managed by a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments managed by the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer services and enhancing the user experience.
[0021] The present invention also provides a controller back-off control device, equipment, storage system, and computer-readable storage medium, which have the same beneficial effects as the controller back-off control method described above. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A schematic flowchart of a controller back-cut control method provided by the present invention; Figure 2 This invention provides a schematic diagram of the logical structure of a multi-controller storage system. Figure 3 This is a schematic diagram of the structure of a controller back-cut control device provided by the present invention; Figure 4 This is a schematic diagram of the structure of a controller back-cut control device provided by the present invention; Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0024] The core of this invention is to provide a controller switchback control method that can perform IO operations during the controller switchback process of a multi-controller storage system, thereby improving the processing efficiency of customer services and enhancing the user experience. Another core aspect of this invention is to provide a controller switchback control device, equipment, storage system, and computer-readable storage medium that can perform IO operations during the controller switchback process of a multi-controller storage system, thereby improving the processing efficiency of customer services and enhancing the user experience.
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a controller switchback control method provided by the present invention. This controller switchback control method is applied to a controller in a storage system and includes: S101: Obtain all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided; For a better explanation of the embodiments of the present invention, please refer to Figure 2 , Figure 2 This is a schematic diagram of the logical structure of a multi-controller storage system provided by the present invention.
[0027] Specifically, in Figure 2 In this context, each segment (LBA segment) is managed by a corresponding controller, and each LBA segment corresponds to a domain of allocated memory space. Figure 2 The storage system has four controllers, or four nodes. Each node is responsible for the IO operations of its own LBA segments, as well as the root area generated in the memory space domain corresponding to its own LBA segments. It also needs to act as a backup node for another node to back up the root area of that other node.
[0028] The “Root area” refers to the set of tree root information. Since the IO data corresponding to each LBA segment is organized in a tree structure on the disk, the set of tree root information of each tree structure corresponding to the LBA segment can clearly represent the organization structure of the data corresponding to the LBA segment on the disk. Therefore, the controller and backup controller need to manage the set of tree root information (i.e., the Root area), that is, to put the Root area in the controller’s memory.
[0029] Specifically, considering the technical issues mentioned above, and taking into account that during controller switchback, the root area synchronization tasks corresponding to all LBAs under the jurisdiction of a single controller usually need to be performed in a time-sharing manner (i.e., they cannot be synchronized together), and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application aims to perform state analysis on each small LBA sub-segment during the controller switchback process. This is to enable normal IO processing for LBA sub-segments that are not in the root area synchronization state, while IO can be paused for LBA sub-segments that are in the root area synchronization state, thereby improving business processing efficiency. Therefore, in this step, all LBA sub-segments divided into the logical block address LBA segments under its jurisdiction can be obtained first, so as to use them as the data basis for subsequent steps. When the controller switchback process starts, "time-sharing root area synchronization" and "different processing of IO operations" are performed on each LBA sub-segment.
[0030] In this invention, the LBA segments under the jurisdiction of each controller can be pre-divided, and the specific granularity of the division can be set independently. This invention does not limit the specific granularity of the LBA segments.
[0031] S102: In response to the controller's switchback command, synchronize the root area of each LBA sub-segment under its jurisdiction according to the preset priority. Specifically, after the controller switchback process begins, all write caches in the LBA segment under the controller's jurisdiction need to be flushed to disk and the root area needs to be synchronized to its corresponding backup controller (referred to as root area synchronization). However, the entire LBA segment under its jurisdiction cannot complete root area synchronization at the same time. Therefore, in this step, the root area synchronization of each LBA sub-segment in the LBA segment can be performed in an orderly manner. That is, in response to the controller switchback command, the root area synchronization of each LBA sub-segment under its jurisdiction is performed in sequence according to the preset priority.
[0032] S103: Before all LBA sub-segments have completed root area synchronization, determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization; Specifically, during the "Root area synchronization" step described above, the storage system may receive new IO requests from the host at any time. The target LBA of the IO request may belong to any LBA segment under the jurisdiction of any controller. For the controller that is performing Root area synchronization, the LBA sub-segments in different "Root area synchronization states (simply including synchronizing and not synchronizing)" may handle IO requests differently in order to ensure normal processing of IO requests during controller switchback. Therefore, in this embodiment of the invention, before all LBA sub-segments have completed Root area synchronization, it can be determined whether the LBA sub-segment containing the target LBA of the latest received IO request is performing Root area synchronization, so as to trigger the corresponding actions of subsequent steps based on the determination result.
[0033] S104: If not, then execute the IO operation corresponding to the IO request.
[0034] Specifically, when the judgment result is negative, that is, when the LBA sub-segment where the target LBA is located is not in the root area synchronization state, the IO operation corresponding to the IO request can be executed, thereby realizing that the IO operation does not stop during the controller switchback process.
[0035] This invention provides a controller switchback control method. Considering that the root area synchronization tasks corresponding to all LBAs managed by a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments managed by the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer services and enhancing the user experience.
[0036] Based on the above embodiments: As a preferred embodiment, after determining whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root region synchronization, the controller switchback control method further includes: If so, add the IO request to the waiting queue; When the LBA sub-segment containing the target LBA finishes Root area synchronization, the IO operation corresponding to the IO request in the waiting queue is executed.
[0037] Specifically, if the LBA sub-segment containing the target LBA is undergoing root area synchronization, it is not appropriate to perform IO operations on the IO requests corresponding to that LBA sub-segment at this time. Therefore, in this case, the embodiments of the present invention can add the IO requests to the waiting queue, and when the LBA sub-segment containing the target LBA finishes root area synchronization, execute the IO operations corresponding to the IO requests in the waiting queue, which can ensure the proper handling of all IO requests.
[0038] As a preferred embodiment, the root region synchronization of each LBA sub-segment under its jurisdiction is performed sequentially according to a preset priority, specifically as follows: The segment to be processed is determined from all LBA sub-segments under its jurisdiction according to the preset priority; Determine if a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the fragment to be processed will be synchronized with the root area; If it exists, after flushing the write cache corresponding to the segment to be processed to disk, the segment to be processed is synchronized with the root area.
[0039] Specifically, considering that the write cache presence status varies in different LBA sub-segments when the controller switchback process begins, some LBA sub-segments may have write cache in their memory space, while others may not. The Root area synchronization process differs for LBA sub-segments with different "write cache presence statuses." Therefore, this embodiment of the invention differentiates the Root area synchronization process for LBA sub-segments with different "write cache presence statuses." Specifically, for LBA sub-segments with "write cache in memory space," the write cache is first flushed down before Root area synchronization; for LBA sub-segments without "write cache in memory space," Root area synchronization is performed directly.
[0040] Here, Root area synchronization refers to synchronizing the "Root area" corresponding to the LBA sub-segment to the backup controller. The backup controller is the controller responsible for backing up its own Root area. Each controller has a corresponding "backup controller", which is also known as a cached circular image.
[0041] In a preferred embodiment, the default priority is that LBA sub-fragments without write cache have a higher priority than LBA sub-fragments with write cache.
[0042] Specifically, considering that for LBA sub-segments without unredacted write cache, normal steady-state IO processing can be performed after root area synchronization, while for LBA sub-segments with unredacted write cache, a lengthy write cache flushing process is required before root area synchronization can be performed, and the IO operations corresponding to the LBA sub-segment need to be paused during the write cache flushing process, which has a significant impact on IO, there is a situation where: if root area synchronization is not performed on LBA sub-segments without unredacted write cache in a timely manner, once a write cache is generated for the "LBA sub-segment without unredacted write cache", then the write cache of the LBA sub-segment needs to be flushed before root area synchronization is performed, which increases the blocking time of IO. Therefore, in this embodiment of the invention, the priority of "LBA sub-segments without write cache" can be specified to be higher than that of "LBA sub-segments with write cache", so that the "LBA sub-segments without write cache" can be synchronized to the root area as soon as possible, thereby avoiding the need for an additional "write cache flushing" process.
[0043] Of course, apart from this specific case, the preset priority can also take other specific forms, which are not limited in this embodiment of the invention.
[0044] As a preferred embodiment, the segment to be processed is determined from all LBA sub-segments under its jurisdiction according to a preset priority, specifically as follows: According to the preset priority, it determines multiple segments to be processed from all LBA sub-segments under its jurisdiction; The specific steps to determine whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each segment to be processed.
[0045] Specifically, in order to improve the efficiency of root area synchronization, especially for root area synchronization of "LBA sub-segments that have not been flushed and written to the cache", this embodiment of the invention can use multiple threads to perform root area synchronization on each segment to be processed one by one.
[0046] The number of threads can be set independently, and this embodiment of the invention does not limit it.
[0047] As a preferred embodiment, when the LBA sub-segment containing the target LBA finishes root region synchronization, the IO operation corresponding to the IO request in the waiting queue is specifically executed as follows: Determine whether the latest LBA sub-fragment that has completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is contained, then execute the IO request in the waiting queue for the target LBA to be contained in the LBA sub-fragment that has just completed root area synchronization.
[0048] Specifically, in order to improve the processing efficiency of IO requests in the waiting queue, considering that each LBA sub-segment that has just completed root area synchronization may have pending IO requests in the waiting queue, this embodiment of the invention can determine whether the latest LBA sub-segment that has completed root area synchronization contains the target LBA in the waiting queue when the LBA sub-segment containing the target LBA finishes root area synchronization. If it does, then the IO requests in the waiting queue whose target LBA is contained in the latest LBA sub-segment that has completed root area synchronization can be executed, thereby processing the processable IO requests in the waiting queue as soon as possible and improving work efficiency.
[0049] In a preferred embodiment, each LBA sub-fragment corresponds to at least one tree structure in the disk of the storage system.
[0050] Specifically, dividing LBA segments into multiple sub-segments according to a tree structure has advantages such as clear structure and ease of operation.
[0051] Of course, besides this specific division method, LBA segments can be segmented in many other ways, and this embodiment of the invention does not limit them here.
[0052] In a preferred embodiment, each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
[0053] Specifically, "each LBA sub-segment corresponds to a tree structure on the disk of the storage system" can reduce the granularity of LBA segmentation, thereby further reducing the degree of IO blocking caused by the controller's back-switch process.
[0054] Of course, in addition to this specific form, the segmentation granularity of LBA segments can also be in other forms, and the embodiments of the present invention are not limited here.
[0055] As a preferred embodiment, the IO operation corresponding to the IO request is specifically performed as follows: Determine whether it is the controller in the root area of the controller to be restored specified by the backup controller switchback command; If it is a controller whose root area is being backed up and is to be restored, then determine whether the LBA sub-segment containing the target LBA of the latest received IO request has been synchronized with the root area. If the root area has not been synchronized, the IO operation corresponding to the IO request will be executed and the root area updated by the IO operation will be synchronized to its corresponding backup controller. If root area synchronization has already been performed, then execute the IO operation corresponding to the IO request and synchronize the root area updated due to the IO operation to the controller to be restored.
[0056] Specifically, the controller to be recovered refers to the controller that has recovered from a fault and is about to be reassembled into the storage system controller array. When the controller to be recovered fails, the backup controller of the controller to be recovered takes over the LBA segment managed by the controller to be recovered. Therefore, during the controller handover process, since the backup controller of the controller to be recovered temporarily takes over the LBA segment of the controller to be recovered, special settings are required for the I / O operations of this controller during the controller handover process. Therefore, in this embodiment of the invention, it can first determine whether it is the controller of the root area of the controller to be recovered specified by the backup controller handover command. If so, it can then determine the target LB of the latest received I / O request. The system checks whether the LBA sub-segment containing A has been synchronized with the Root region. This allows for differentiation between two scenarios. If the Root region has not been synchronized, it means that the controller to be restored does not yet have the Root region for the LBA sub-segment. Therefore, the system executes the IO operation corresponding to the IO request and synchronizes the Root region updated by the IO operation to its corresponding backup controller (i.e., the mode when the controller has not switched back). If the Root region has been synchronized, it means that the controller to be restored already has the Root region for the LBA sub-segment. Therefore, the system executes the IO operation corresponding to the IO request and synchronizes the Root region updated by the IO operation to the controller to be restored (i.e., the mode when the controller has been included in the controller array).
[0057] As a preferred embodiment, executing the IO operation corresponding to the IO request and synchronizing the Root area updated due to the IO operation to the controller to be restored specifically involves: Execute the I / O operation corresponding to the I / O request; The root area updated due to IO operations will be synchronized to the controller to be restored and its corresponding backup controller.
[0058] Specifically, considering the possibility of sudden failure of the controller to be recovered during the controller handover process, in order to deal with this situation, the root area corresponding to the IO operation at this time can also be synchronized to the backup controller. In this case, even if the controller to be recovered suddenly fails, it can still smoothly enter the architecture mode before the controller handover by relying on the root area of the LBA segment corresponding to the controller to be recovered synchronized in the backup controller, thereby improving the operational reliability of the storage system.
[0059] As a preferred embodiment, after determining whether it is the controller of the root area of the controller to be restored specified by the backup controller switchback command, the controller switchback control method further includes: If the controller is not the root area of the controller to be restored, then the IO operation corresponding to the IO request is executed and the root area updated by the IO operation is synchronized to its own corresponding backup controller.
[0060] Specifically, for a "backup controller that is not the controller to be recovered", since the LBA segment it currently manages does not involve the LBA segment of the controller to be recovered, as long as the LBA sub-segment where the target LBA is located is not in the state of being flushed to the cache, it can perform the IO operation corresponding to the IO request and synchronize the Root area updated by the IO operation to its own corresponding backup controller.
[0061] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a controller back-cut control device provided by the present invention. The controller back-cut control device includes: The acquisition module 31 is used to acquire all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided. Synchronization module 32 is used to respond to the controller's switchback command and synchronize the root area of each LBA sub-segment under its jurisdiction in sequence according to the preset priority. The judgment module 33 is used to determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization before all LBA sub-segments have completed root area synchronization. If not, the execution module 34 is triggered. Execution module 34 is used to execute the IO operation corresponding to the IO request.
[0062] This invention provides a controller switchback control device. Considering that the root area synchronization tasks corresponding to all LBAs under the jurisdiction of a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments under the jurisdiction of the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer business and enhancing the user experience.
[0063] For a description of the controller back-cut control device provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the controller back-cut control method; the embodiments of the present invention will not be repeated here.
[0064] Please refer to Figure 4 , Figure 4This is a schematic diagram of a controller switchback control device provided by the present invention. The controller switchback control device includes: Memory 41 is used to store computer programs; The processor 42 is used to implement the steps of the controller back-cut control method as described in the foregoing embodiments when executing a computer program.
[0065] Specifically, memory 41 includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer-readable instructions, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. When processor 42 executes the computer program stored in memory 41, it can perform the following steps: obtain all LBA sub-segments into which the logical block address (LBA) segment under its jurisdiction is divided; in response to the controller's back-switch instruction, perform root region synchronization on each LBA sub-segment under its jurisdiction according to a preset priority; before all LBA sub-segments have completed root region synchronization, determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root region synchronization; if not, execute the IO operation corresponding to the IO request.
[0066] This invention provides a controller switchback control device. Considering that the root area synchronization tasks corresponding to all LBAs under the jurisdiction of a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments under the jurisdiction of the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer business and enhancing the user experience.
[0067] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it may perform the following steps: if so, add the I / O request to the waiting queue; When the LBA sub-segment containing the target LBA finishes Root area synchronization, the IO operation corresponding to the IO request in the waiting queue is executed.
[0068] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine the segment to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; Determine if a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the fragment to be processed will be synchronized with the root area; If it exists, after flushing the write cache corresponding to the segment to be processed to disk, the segment to be processed is synchronized with the root area.
[0069] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: the priority of the LBA sub-segment without write cache is preset to be higher than that of the LBA sub-segment with write cache.
[0070] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine multiple segments to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; The specific steps to determine whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each segment to be processed.
[0071] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether the LBA sub-segment that has recently completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is contained, then execute the IO request in the waiting queue for the target LBA to be contained in the LBA sub-fragment that has just completed root area synchronization.
[0072] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it can perform the following steps: each LBA sub-segment corresponds to at least one tree structure in the disk of the storage system.
[0073] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it can perform the following steps: each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
[0074] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether it is the controller of the root area of the controller to be restored specified by the backup controller switchback command; If it is a controller whose root area is being backed up and is to be restored, then determine whether the LBA sub-segment containing the target LBA of the latest received IO request has been synchronized with the root area. If the root area has not been synchronized, the IO operation corresponding to the IO request will be executed and the root area updated by the IO operation will be synchronized to its corresponding backup controller. If root area synchronization has already been performed, then execute the IO operation corresponding to the IO request and synchronize the root area updated due to the IO operation to the controller to be restored.
[0075] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: execute the IO operation corresponding to the IO request; The root area updated due to IO operations will be synchronized to the controller to be restored and its corresponding backup controller.
[0076] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: if it is not a controller whose root area is being backed up and restored, it executes the IO operation corresponding to the IO request and synchronizes the root area updated by the IO operation to its own corresponding backup controller.
[0077] For a description of the controller back-off control device provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the controller back-off control method; the embodiments of the present invention will not be repeated here.
[0078] The present invention also provides a storage system, including a storage system body and a controller switchback control device as described in the foregoing embodiments connected to the storage system body.
[0079] Specifically, the memory 41 in the controller switchback control device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer-readable instructions, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. When the processor 42 executes the computer program stored in the memory 41, it can perform the following steps: obtain all LBA sub-segments into which the logical block address (LBA) segment under its jurisdiction is divided; in response to the controller switchback command, perform root region synchronization on each LBA sub-segment under its jurisdiction according to a preset priority; before all LBA sub-segments have completed root region synchronization, determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root region synchronization; if not, execute the IO operation corresponding to the IO request.
[0080] This invention provides a storage system. Considering that the root area synchronization tasks corresponding to all LBAs managed by a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments managed by the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer business and enhancing the user experience.
[0081] As an optional embodiment, when the controller switches back to the processor 42 in the control device to execute the computer subroutine stored in the memory 41, the following steps can be performed: if so, add the IO request to the waiting queue; When the LBA sub-segment containing the target LBA finishes Root area synchronization, the IO operation corresponding to the IO request in the waiting queue is executed.
[0082] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: determine the segment to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; Determine if a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the fragment to be processed will be synchronized with the root area; If it exists, after flushing the write cache corresponding to the segment to be processed to disk, the segment to be processed is synchronized with the root area.
[0083] As an optional embodiment, when the controller switches back to the processor 42 in the control device to execute the computer subroutine stored in the memory 41, the following steps can be implemented: the priority of the LBA sub-segment without write cache is preset to be higher than that of the LBA sub-segment with write cache.
[0084] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: determine multiple segments to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; The specific steps to determine whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each segment to be processed.
[0085] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether the LBA sub-segment that has just completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is contained, then execute the IO request in the waiting queue for the target LBA to be contained in the LBA sub-fragment that has just completed root area synchronization.
[0086] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: each LBA sub-segment corresponds to at least one tree structure in the disk of the storage system.
[0087] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
[0088] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether it is the controller of the root area of the controller to be restored specified by the backup controller switchback command; If it is a controller whose root area is being backed up and is to be restored, then determine whether the LBA sub-segment containing the target LBA of the latest received IO request has been synchronized with the root area. If the root area has not been synchronized, the IO operation corresponding to the IO request will be executed and the root area updated by the IO operation will be synchronized to its corresponding backup controller. If root area synchronization has already been performed, then execute the IO operation corresponding to the IO request and synchronize the root area updated due to the IO operation to the controller to be restored.
[0089] As an optional embodiment, when the controller switches back to the processor 42 in the control device to execute the computer subroutine stored in the memory 41, it can perform the following steps: execute the IO operation corresponding to the IO request; The root area updated due to IO operations will be synchronized to the controller to be restored and its corresponding backup controller.
[0090] As an optional embodiment, when the processor 42 in the controller switchback control device executes the computer subroutine stored in the memory 41, it can perform the following steps: if it is not the controller that is backing up the Root area of the controller to be restored, it executes the IO operation corresponding to the IO request and synchronizes the Root area updated by the IO operation to its own corresponding backup controller.
[0091] For a description of the storage system provided in the embodiments of the present invention, please refer to the aforementioned embodiments of the controller switchback control method; the embodiments of the present invention will not be repeated here.
[0092] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 50 stores a computer program 51. When the computer program 51 is executed by the processor 42, it implements the steps of the controller back-cut control method as described in the previous embodiment.
[0093] Specifically, the readable storage medium may include various media capable of storing program code, such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk. The storage medium stores a computer program, which, when executed by the processor 42, performs the following steps: obtaining all LBA sub-segments into which the logical block address (LBA) segment under its jurisdiction is divided; responding to a controller switchback instruction, performing root region synchronization on each LBA sub-segment under its jurisdiction according to a preset priority; before all LBA sub-segments have completed root region synchronization, determining whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root region synchronization; if not, executing the IO operation corresponding to the IO request.
[0094] This invention provides a computer-readable storage medium. Considering that the root area synchronization tasks corresponding to all LBAs managed by a single controller usually need to be performed in a time-sharing manner, and that LBAs not in the "root area synchronization" state can theoretically perform IO operations normally, this application can pre-divide the LBA segments managed by the controller into multiple LBA sub-segments, and perform root area synchronization on each LBA sub-segment in sequence according to a preset priority when the controller switches back. Then, for newly received IO requests, as long as the corresponding LBA sub-segment is not in the root area synchronization stage, the IO operation corresponding to the IO request can be executed, thereby improving the processing efficiency of customer business and enhancing the user experience.
[0095] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it may perform the following steps: if so, add the I / O request to the waiting queue; When the LBA sub-segment containing the target LBA finishes Root area synchronization, the IO operation corresponding to the IO request in the waiting queue is executed.
[0096] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine the segment to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; Determine if a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the fragment to be processed will be synchronized with the root area; If it exists, after flushing the write cache corresponding to the segment to be processed to disk, the segment to be processed is synchronized with the root area.
[0097] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: the priority of the LBA sub-segment without write cache is preset to be higher than that of the LBA sub-segment with write cache.
[0098] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine multiple segments to be processed from all LBA sub-segments under its jurisdiction according to a preset priority; The specific steps to determine whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each segment to be processed.
[0099] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether the LBA sub-segment that has recently completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is contained, then execute the IO request in the waiting queue for the target LBA to be contained in the LBA sub-fragment that has just completed root area synchronization.
[0100] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it can perform the following steps: each LBA sub-segment corresponds to at least one tree structure in the disk of the storage system.
[0101] As an optional embodiment, when processor 42 executes a computer subroutine stored in memory 41, it can perform the following steps: each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
[0102] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: determine whether it is the controller of the root area of the controller to be restored specified by the backup controller switchback command; If it is a controller whose root area is being backed up and is to be restored, then determine whether the LBA sub-segment containing the target LBA of the latest received IO request has been synchronized with the root area. If the root area has not been synchronized, the IO operation corresponding to the IO request will be executed and the root area updated by the IO operation will be synchronized to its corresponding backup controller. If root area synchronization has already been performed, then execute the IO operation corresponding to the IO request and synchronize the root area updated due to the IO operation to the controller to be restored.
[0103] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: execute the IO operation corresponding to the IO request; The root area updated due to IO operations will be synchronized to the controller to be restored and its corresponding backup controller.
[0104] As an optional embodiment, when the processor 42 executes the computer subroutine stored in the memory 41, it can perform the following steps: if it is not a controller whose root area is being backed up and restored, it executes the IO operation corresponding to the IO request and synchronizes the root area updated by the IO operation to its own corresponding backup controller.
[0105] For a description of the computer-readable storage medium provided in the embodiments of the present invention, please refer to the foregoing embodiments of the controller switchback control method; the embodiments of the present invention will not be repeated here.
[0106] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should also be noted that in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0107] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A controller back-cut control method, characterized in that, Controllers used in storage systems include: Obtain all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided; In response to the controller's switchback command, the root region of each LBA sub-segment under its jurisdiction is synchronized in sequence according to the preset priority; Before all LBA sub-segments have completed root area synchronization, determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization; If not, then perform the IO operation corresponding to the IO request; If so, add the IO request to the waiting queue; When the LBA sub-segment containing the target LBA finishes root area synchronization, the IO operation corresponding to the IO request located in the waiting queue is executed; The preset priority is that the LBA sub-segment without a write cache has a higher priority than the LBA sub-segment with a write cache.
2. The controller back-cut control method according to claim 1, characterized in that, The specific steps of synchronizing the root region of each LBA sub-segment under its jurisdiction according to a preset priority are as follows: The segment to be processed is determined from all the LBA sub-segments under its jurisdiction according to a preset priority; Determine whether a write cache exists in the memory space corresponding to the segment to be processed; If it does not exist, the root region will be synchronized for the segment to be processed; If it exists, after flushing the write cache corresponding to the segment to be processed to the disk, the segment to be processed is synchronized with the root area.
3. The controller back-cut control method according to claim 2, characterized in that, The specific steps of determining the segment to be processed from all the LBA sub-segments under its jurisdiction according to a preset priority are as follows: According to a preset priority, multiple segments to be processed are determined from all the LBA sub-segments under its jurisdiction; The specific steps for determining whether a write cache exists in the memory space corresponding to the segment to be processed are as follows: A multi-threaded approach is used to determine whether a write cache exists in the memory space corresponding to each of the segments to be processed.
4. The controller back-cut control method according to claim 1, characterized in that, When the LBA sub-segment containing the target LBA finishes root region synchronization, the specific steps for executing the IO operation corresponding to the IO request in the waiting queue are as follows: Determine whether the LBA sub-segment that has recently completed root area synchronization contains the target LBA of the IO request in the waiting queue; If it is included, then the IO request for the target LBA in the waiting queue that is contained in the LBA sub-fragment that has just completed root area synchronization is executed.
5. The controller back-cut control method according to claim 1, characterized in that, Each LBA sub-fragment corresponds to at least one tree structure in the disk of the storage system.
6. The controller back-cut control method according to claim 5, characterized in that, Each LBA sub-segment corresponds to a tree structure on the disk of the storage system.
7. The controller back-cut control method according to any one of claims 1 to 6, characterized in that, The specific IO operation corresponding to the IO request is as follows: Determine whether it is the controller in the root area of the controller to be restored specified by the controller back-up command; If the controller is the root area of the controller to be restored, then determine whether the LBA sub-segment where the target LBA of the latest received IO request is located has been synchronized with the root area. If the Root area has not been synchronized, then the IO operation corresponding to the IO request is executed and the Root area updated by the IO operation is synchronized to its corresponding backup controller. If root area synchronization has already been performed, then the IO operation corresponding to the IO request is executed and the root area updated by the IO operation is synchronized to the controller to be restored.
8. The controller back-cut control method according to claim 7, characterized in that, The specific steps of executing the IO operation corresponding to the IO request and synchronizing the Root area updated by the IO operation to the controller to be restored are as follows: Execute the IO operation corresponding to the IO request; The Root area updated due to the IO operation will be synchronized to the controller to be restored and its corresponding backup controller.
9. The controller back-cut control method according to claim 7, characterized in that, After determining whether it is the controller of the root area of the controller to be restored specified by the controller rollback command, the controller rollback control method further includes: If the controller is not the one that backs up the root area of the controller to be restored, then the IO operation corresponding to the IO request is executed and the root area updated by the IO operation is synchronized to its own corresponding backup controller.
10. A controller back-cut control device, characterized in that, include: The acquisition module is used to acquire all LBA sub-fragments into which the logical block address LBA fragment under its jurisdiction is divided. The synchronization module is used to respond to the controller's switchback command and synchronize the root region of each LBA sub-segment under its jurisdiction in sequence according to a preset priority. The judgment module is used to determine whether the LBA sub-segment containing the target LBA of the latest received IO request is undergoing root area synchronization before all LBA sub-segments have completed root area synchronization. If not, the execution module is triggered. If so, the action is triggered: the IO request is added to the waiting queue. The execution module is used to execute the IO operation corresponding to the IO request; The controller switchback control device is also used for: When the LBA sub-segment containing the target LBA finishes root area synchronization, the IO operation corresponding to the IO request located in the waiting queue is executed; The preset priority is that the LBA sub-segment without a write cache has a higher priority than the LBA sub-segment with a write cache.
11. A controller switchback control device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the controller back-off control method as described in any one of claims 1 to 9 when executing the computer program.
12. A storage system, characterized in that, It includes a storage system body and a controller switchback control device as described in claim 11 connected to the storage system body.
13. 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 controller back-cut control method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Cluster management method, device, equipment and readable storage medium
CN110515557A
Service recovery method and system for offline nodes of storage cluster system and related components
CN112463437A