Cache data cleaning method and device, electronic equipment and storage medium
By replacing the faulty controller with a transition controller in the storage system for mirroring reorganization and data cleaning, the data loss problem caused by concurrent failures during the recovery of the faulty controller is solved, data consistency and security are achieved, and fault tolerance and recovery speed of the storage system are improved.
Patent Information
- Application Number
- CN202510217168.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-26
AI Technical Summary
In storage systems, the faulty controller is susceptible to interference from other controller failure events when recovering, resulting in cached data loss and business process interruption. It is difficult for the existing technology to effectively deal with concurrent failure situations and ensure the consistency and security of data between different controllers.
By replacing the faulty controller with the transition controller, mirroring reorganization is performed to form a temporary mirror pair, and after the fault controller is repaired, the transition controller is removed from the temporary mirror pair to perform the data cleaning process. At the same time, monitor whether the controller in the storage system has undergone concurrent failures, and adjust the data cleaning process to deal with complex failure scenarios based on the execution status and concurrent failure information of the data cleaning process.
It effectively avoids data loss and business interruption caused by concurrent failures, ensures the consistency and security of data between different controllers, improves the fault tolerance and recovery speed of the storage system, shortens the fault downtime, and improves the overall performance and efficiency of the system.
Smart Images

Figure CN119718760A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer data storage, and in particular to a method and device for cleaning cache data, an electronic device, and a storage medium. Background Art
[0002] In the field of data storage technology, with the explosive growth of data volume and the increasing requirements of business for real-time and reliability of data processing, the performance and stability of storage systems are crucial. In order to meet these requirements, centralized storage systems generally adopt a multi-controller architecture and use back-end interconnection technology to achieve data sharing and synchronization. Cache modules also often use technologies such as circular mirroring to improve data storage and read and write efficiency.
[0003] During the operation of such storage systems, controller failure and recovery are inevitable. When a controller fails, the system needs to readjust the architecture to maintain data redundancy and business continuity, which involves the re-teaming of mirror pairs and data re-mirroring operations. However, in order to speed up the recovery of the controller, some existing cache data synchronization processing solutions use data re-mirroring technology. Although the controller joining time is reduced to a certain extent, in a multi-controller storage system, due to the extremely complex failure scenario, it is very easy to be disturbed by other controller failure events during the data synchronization process, which in turn causes cache data loss and interrupts the business process. At the same time, the traditional simple control process is difficult to adapt to the complex requirements of the multi-controller storage cache data re-mirroring process, which significantly increases the complexity of business processing and further increases the risk of system operation. It can be seen that in the current development of storage technology, how to effectively deal with concurrent failures that occur when the storage system controller is restored, ensure that the cache data re-mirroring process can be correctly controlled when the multi-controller storage device faces cluster controller events during the cache data cleanup process, maintain data consistency between different controllers, and ensure data security, has become a key technical problem that needs to be solved in this field. Summary of the invention
[0004] The present disclosure provides a method and device for cleaning cache data, an electronic device and a storage medium, which are mainly intended to solve the problem that when a faulty controller in a storage system is restored, other controllers fail, resulting in cache data errors. According to a first aspect of the present disclosure, a method for cleaning cache data is provided, comprising: Using a transition controller to replace a faulty controller in the storage system, and reorganizing the mirror image of the initial mirror image pair where the faulty controller is located to obtain a first reorganized mirror image pair; adding the repaired faulty controller to the first reorganized mirror image pair to obtain a temporary mirror image pair; After the faulty controller that has been repaired completes data mirroring, the transition controller is removed from the temporary mirror pair, and a data cleanup process is performed on the transition controller; Monitor whether the controllers in the storage system have concurrent failures and monitor the execution status of the data cleaning process; When a concurrent failure occurs in a controller in the storage system, the execution process of the data cleaning process is adjusted according to the execution status information of the data cleaning process and the concurrent failure information of the concurrent failure controller where the concurrent failure occurs; and data is cleaned on the transition controller according to the adjusted data cleaning process.
[0005] In some embodiments, replacing a failed controller in a storage system with a transition controller and reorganizing an initial mirror pair where the failed controller is located to obtain a first reorganized mirror pair includes: According to the team information of the initial mirror pair where the faulty controller is located, a transition controller that replaces the faulty controller is selected from controllers that have not failed; The transition controller and the normal controller in the initial mirror pair where the faulty controller is located are mirrored and reorganized to obtain a first reorganized mirror pair.
[0006] In some embodiments, selecting a transition controller to replace the failed controller from controllers that have not failed according to the team information of the initial mirror pair in which the failed controller is located includes: Obtaining a set of device identifiers of controllers other than the faulty controller in the storage system, wherein the device identifiers in the set of device identifiers are arranged in order; Based on the team information, determine a normal device identifier corresponding to a normal controller in the initial mirror pair where the faulty controller is located; Find a transition controller that replaces the faulty controller based on the device identification set and the normal device identification.
[0007] In some embodiments, searching for a transition controller that replaces a faulty controller according to a device identification set and a normal device identification includes: Find the target device ID that is one digit behind the normal device ID in the device ID set; The controller corresponding to the target device ID is used as the transition controller.
[0008] In some embodiments, mirroring and reorganizing the transition controller with a normal controller in the initial mirror pair where the faulty controller is located to obtain a first reorganized mirror pair includes: According to the circular mirroring principle, the device identifiers of the transition controller and the device identifiers of the normal controllers are sorted, and the arrangement order of the transition controller and the normal controller is determined to generate a first recombined mirror pair.
[0009] In some embodiments, before replacing a failed controller in a storage system with a transition controller, the method for cleaning cache data further includes: Monitor the operating status of controllers in the storage system and identify faulty controllers.
[0010] In some embodiments, the method for cleaning cache data further includes: The device ID of the faulty controller is identified, the device IDs of the controllers in the storage system other than the faulty controller are collected and sorted, and a device ID set is generated.
[0011] In some embodiments, after adding the faulty controller that has repaired the fault to the first reorganized mirror pair to obtain a temporary mirror pair, the method for cleaning cache data further includes: The faulty controller that controls the repair fault performs data mirroring with the transition controller.
[0012] In some embodiments, the method for cleaning cache data further includes: If no concurrent failure occurs in the controllers in the storage system, clean up the data on the transition controller according to the data cleanup process.
[0013] In some embodiments, adjusting the execution process of the data cleaning process according to the execution state information of the data cleaning process and the concurrent fault information of the concurrent fault controller where the concurrent fault occurs includes: Based on the execution status information, determining whether the transition controller starts executing the data cleaning process; Before the data cleaning process is started, the mirror pair where the concurrent fault controller is located is reorganized to obtain a second reorganized mirror pair; Based on the teaming information of the second reorganized mirror pair, it is determined whether the transition controller belongs to the second reorganized mirror pair to determine whether to continue to execute the data cleaning process.
[0014] In some embodiments, when the data cleaning process has begun to be executed, the method for cleaning cache data further includes: Based on the concurrent fault information, determining whether the transition controller is a concurrent fault controller; If the transition controller is a concurrently failed controller, then when the transition controller rejoins the mirror pair, the data cleanup process is re-executed on the transition controller; If the transition controller is not a concurrent fault controller, after executing the data cleaning process on the transition controller, data mirroring is performed on the transition controller, and the mirror pair where the concurrent fault controller is located is mirror reorganized to obtain a third reorganized mirror pair.
[0015] In some embodiments, based on the concurrent fault information, determining whether the transition controller is a concurrent fault controller includes: Based on the concurrent fault information, obtain the device identification of the concurrent fault controller and the team information of the mirror pair to which it belongs; The device identification of the concurrent fault controller is compared with the device identification of the transition controller, and the team information of the mirror pair where the concurrent fault controller is located is compared with the team information of the temporary mirror pair where the transition controller is located to determine whether the transition controller is a concurrent fault controller.
[0016] In some embodiments, performing mirror reorganization on the mirror pair where the concurrently failed controller is located to obtain a second reorganized mirror pair includes: According to the concurrent fault information, searching for the teaming information of the first fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the first faulty mirror pair, determining whether the first faulty mirror pair is a temporary mirror pair for removing the transition controller, If the first faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a second reconstructed mirror pair; If the first faulty mirror pair is not a temporary mirror pair from which the transition controller is removed, a normal controller in the first faulty mirror pair is mirror-reorganized with its adjacent subsequent controller to obtain a second reorganized mirror pair.
[0017] In some embodiments, judging whether the transition controller belongs to the second recombinant mirror pair based on the team information of the second recombinant mirror pair to determine whether to continue to execute the data cleaning process includes: If the transition controller belongs to the second reorganized mirror pair, there is no need to continue to execute the data cleaning process for the transition controller in the second reorganized mirror pair; If the transition controller does not belong to the second reorganized mirror pair, the data cleaning process continues to be executed on the transition controller that does not belong to the second reorganized mirror pair.
[0018] In some embodiments, performing mirror reorganization on the mirror pair where the concurrently failed controller is located to obtain a third reorganized mirror pair includes: According to the concurrent fault information, find the team information of the second fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the second faulty mirror pair, determining whether the second faulty mirror pair is a temporary mirror pair for removing the transition controller, If the second faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a third reconstructed mirror pair; If the second faulty mirror pair is not a temporary mirror pair with the transition controller removed, mirroring is performed between the normal controller in the second faulty mirror pair and its adjacent subsequent controller to obtain a third reconstructed mirror pair.
[0019] In some embodiments, the method for cleaning cache data further includes: The status information of each mirror pair in the storage system is obtained, and the device identifier of the transition controller that needs to execute the data cleaning process in each mirror pair is marked.
[0020] According to a second aspect of the present disclosure, a device for cleaning cache data is provided, comprising: The reorganization unit is used to replace the faulty controller in the storage system with the transition controller, and to reorganize the mirror image of the initial mirror image pair where the faulty controller is located to obtain a first reorganized mirror image pair; and to add the repaired faulty controller to the first reorganized mirror image pair to obtain a temporary mirror image pair; A removal unit, used to remove the transition controller from the temporary mirror pair after the repaired faulty controller completes data mirroring, and to perform a data cleanup process on the transition controller; A first monitoring unit, used to monitor whether a concurrent failure occurs in a controller in the storage system, and to monitor the execution status of a data cleaning process; The adjustment unit is used to adjust the execution process of the data cleaning process when a concurrent failure occurs in the controller in the storage system according to the execution status information of the data cleaning process and the concurrent failure information of the concurrent failure controller where the concurrent failure occurs; and perform data cleaning on the transition controller according to the adjusted data cleaning process.
[0021] In some embodiments, the recombination unit comprises: A screening module, used for screening a transition controller to replace a failed controller from controllers that have not failed, according to team information of an initial mirror pair in which the failed controller is located; The reorganization module is used to perform mirror reorganization on the transition controller and the normal controller in the initial mirror pair where the faulty controller is located to obtain a first reorganized mirror pair.
[0022] In some embodiments, the screening module is further configured to: Obtaining a set of device identifiers of controllers other than the faulty controller in the storage system, wherein the device identifiers in the set of device identifiers are arranged in order; Based on the team information, determine a normal device identifier corresponding to a normal controller in the initial mirror pair where the faulty controller is located; Find a transition controller that replaces the faulty controller based on the device identification set and the normal device identification.
[0023] In some embodiments, searching for a transition controller that replaces a faulty controller according to a device identification set and a normal device identification includes: Find the target device ID that is one digit behind the normal device ID in the device ID set; The controller corresponding to the target device ID is used as the transition controller.
[0024] In some embodiments, the recombination module is also used to: According to the circular mirroring principle, the device identifiers of the transition controller and the device identifiers of the normal controllers are sorted, and the arrangement order of the transition controller and the normal controller is determined to generate a first recombined mirror pair.
[0025] In some embodiments, the cache data cleaning device further includes: The second monitoring unit is used to monitor the operating status of the controller in the storage system and identify the faulty controller before the reorganization unit replaces the faulty controller in the storage system with the transition controller.
[0026] In some embodiments, the cache data cleaning device further includes: The collecting unit is used to identify the device identification of the faulty controller, collect and sort the device identifications of the controllers in the storage system except the faulty controller, and generate a device identification set.
[0027] In some embodiments, the cache data cleaning device further includes: The control unit is used to control the faulty controller that has been repaired to perform data mirroring processing with the transition controller after the reorganization unit adds the faulty controller that has been repaired to the first reorganization mirror pair to obtain a temporary mirror pair.
[0028] In some embodiments, the cache data cleaning device further includes: The cleaning unit is used to clean up data on the transition controller according to the data cleaning process when no concurrent failure occurs to the controller in the storage system.
[0029] In some embodiments, the adjusting unit comprises: A first judgment module, used for judging whether the transition controller starts to execute the data cleaning process based on the execution state information; The determination module is used to reorganize the mirror pair where the concurrent fault controller is located before the data cleaning process is started, obtain a second reorganized mirror pair, and judge whether the transition controller belongs to the second reorganized mirror pair based on the team information of the second reorganized mirror pair to determine whether to continue the data cleaning process.
[0030] In some embodiments, the adjusting unit further comprises: A second judgment module is used to judge whether the transition controller is a concurrent fault controller based on the concurrent fault information when the data cleaning process has started to be executed; An execution module, configured to re-execute the data cleaning process on the transition controller when the transition controller rejoins the mirror pair if the transition controller is a concurrent fault controller; The processing module is used for, if the transition controller is not a concurrent fault controller, after executing a data cleaning process on the transition controller, performing data mirroring processing on the transition controller and performing mirror reorganization on the mirror pair where the concurrent fault controller is located to obtain a third reorganized mirror pair.
[0031] In some embodiments, the second determination module is further configured to: Based on the concurrent fault information, obtain the device identification of the concurrent fault controller and the team information of the mirror pair to which it belongs; The device identification of the concurrent fault controller is compared with the device identification of the transition controller, and the team information of the mirror pair where the concurrent fault controller is located is compared with the team information of the temporary mirror pair where the transition controller is located to determine whether the transition controller is a concurrent fault controller.
[0032] In some embodiments, the determination module is further configured to: According to the concurrent fault information, searching for the teaming information of the first fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the first faulty mirror pair, determining whether the first faulty mirror pair is a temporary mirror pair for removing the transition controller; If the first faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a second reconstructed mirror pair; If the first faulty mirror pair is not a temporary mirror pair from which the transition controller is removed, a normal controller in the first faulty mirror pair is mirror-reorganized with its adjacent subsequent controller to obtain a second reorganized mirror pair.
[0033] In some embodiments, the determination module is further configured to: If the transition controller belongs to the second reorganized mirror pair, there is no need to continue to execute the data cleaning process for the transition controller in the second reorganized mirror pair; If the transition controller does not belong to the second reorganized mirror pair, the data cleaning process continues to be executed on the transition controller that does not belong to the second reorganized mirror pair.
[0034] In some embodiments, the processing module is further configured to: According to the concurrent fault information, find the team information of the second fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the second faulty mirror pair, determining whether the second faulty mirror pair is a temporary mirror pair for removing the transition controller; If the second faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a third reconstructed mirror pair; If the second faulty mirror pair is not a temporary mirror pair with the transition controller removed, mirroring is performed between the normal controller in the second faulty mirror pair and its adjacent subsequent controller to obtain a third reconstructed mirror pair.
[0035] In some embodiments, the cache data cleaning device further includes: The marking unit is used to obtain the status information of each mirror pair in the storage system, and mark the device identifier of the transition controller in each mirror pair that needs to execute the data cleaning process.
[0036] According to a third aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cache data cleaning method described in the first aspect above.
[0037] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the cache data cleaning method described in the first aspect.
[0038] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for cleaning cache data as described in the first aspect is implemented.
[0039] The present disclosure provides a method and device for cleaning cache data, an electronic device and a storage medium, and relates to the technical field of computer data storage. In an embodiment of the present disclosure, a transition controller is used to replace a faulty controller for mirror reorganization, and after the faulty controller is repaired, the controller is added to a first reorganized mirror pair to form a temporary mirror pair; it can ensure that the basic data redundancy and read-write functions of the storage system are not seriously affected; when the faulty controller is restored, by continuously monitoring whether a controller in the storage system has a concurrent fault and the execution status of a data cleaning process, the system can perceive complex fault conditions in real time; once a concurrent fault occurs, the data cleaning process is adjusted according to the execution status information of the data cleaning process and the concurrent fault information of the concurrent faulty controller; so as to flexibly respond to complex fault scenarios, reduce the impact of the fault on the system, ensure that the data of the transition controller can be effectively cleaned up in the case of a concurrent fault, ensure that the system can quickly resume normal operation after the fault, and improve the fault tolerance of the storage system; when cleaning the cache data of the transition controller, through an effective fault handling mechanism and accurate data cleaning process adjustment, the storage system can resume normal working state faster when facing a fault; whether it is a single controller fault or a concurrent fault, the system can handle it in an orderly manner, shorten the fault downtime, and improve the overall performance and efficiency of the storage system.
[0040] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. Figure 1 A flowchart of a method for cleaning cache data provided by an embodiment of the present disclosure; Figure 2 A schematic flow chart of a method for reassembling a mirror pair is provided for an embodiment of the present disclosure; Figure 3 A flowchart of another method for cleaning cache data provided by an embodiment of the present disclosure; Figure 4 A flowchart of another method for cleaning cache data provided by an embodiment of the present disclosure; Figure 5 A schematic diagram of the structure of a cache data cleaning device provided in an embodiment of the present disclosure; Figure 6 A schematic diagram of the structure of another cache data cleaning device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0043] The following describes the method and device for cleaning cache data, electronic device, and storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.
[0044] Figure 1 A flowchart of a method for cleaning cache data provided by an embodiment of the present disclosure.
[0045] like Figure 1 As shown, the method comprises the following steps: Step 101, using a transition controller to replace a faulty controller in a storage system, and reorganizing the mirror image of the initial mirror pair where the faulty controller is located to obtain a first reorganized mirror pair; adding the repaired faulty controller to the first reorganized mirror pair to obtain a temporary mirror pair.
[0046] In an embodiment of the present disclosure, a storage system includes multiple controllers and multiple mirror pairs. In order to achieve efficient data storage, management, redundant backup and other functions in the storage system, multiple controllers are usually equipped. These controllers are combined respectively through specific strategies and mechanisms. Specifically, according to the architecture design of the storage system and the requirements of data processing, different controllers are matched and combined in pairs or according to certain logical rules, thereby obtaining multiple mirror pairs. The controllers in each mirror pair cooperate with each other and jointly undertake important tasks such as data storage, reading, synchronization and fault recovery to ensure the stability, reliability and data consistency of the storage system. A faulty controller is a controller in the storage system that cannot normally perform its data storage, processing, transmission and other functions due to hardware damage, software failure, power supply problem or other abnormal conditions. For example, a controller that cannot work normally due to the burning of the chip on the circuit board belongs to a faulty controller. A transition controller is a controller that temporarily replaces the faulty controller to participate in the mirror pair in order to maintain the normal operation of the system and the continuity of data processing when a controller in the storage system fails. It undertakes the corresponding work tasks during the repair of the faulty controller until the faulty controller returns to normal. A temporary mirror pair is a mirror pair composed of a transition controller and other normal controllers during the repair process of a faulty controller, which is used to maintain data storage and processing functions during the fault. This mirror pair is temporary, and its composition structure will change once the faulty controller is repaired. An initial mirror pair is a mirror pair pre-composed according to specific rules in the storage system, which is used for data redundancy backup and storage management to ensure data security and availability. Each mirror pair usually consists of two controllers that work together to ensure data consistency.
[0047] In the storage system architecture, multiple controllers working together are integrated. When one of the controllers fails and affects the normal operation of the system, the system will quickly start the fault response mechanism to minimize the interference of the fault on data storage and business continuity. At this time, a transition controller will be used to accurately replace the failed controller in the storage system.
[0048] After the transition controller is successfully connected to the system, the initial mirror pair where the failed controller was originally located will be reorganized. This process involves replanning and adjusting the data storage structure and data flow. Through complex algorithms and logical processing, the data associations and backup relationships between the controllers are reorganized and reconstructed, so as to successfully obtain the first reorganized mirror pair. In this new mirror pair, the data storage and reading methods are optimized and adjusted to adapt to the system status after the failure. It should be noted that the first reorganized mirror pair is a classification name for mirror pairs, and does not limit its number and other characteristics.
[0049] After that, when the faulty controller is repaired and restored to normal working state, the system will add the repaired faulty controller to the first reorganized mirror pair according to the established process. This operation is not a simple access, but requires the structure and data synchronization mechanism of the entire mirror pair to be adapted and adjusted again to ensure that the newly added controller can work seamlessly with other controllers. After this series of operations, a temporary mirror pair is finally obtained. In this temporary mirror pair, stable data interaction and backup relationships are re-established between the controllers, laying a solid foundation for the subsequent stable operation of the storage system.
[0050] Assume that there is a storage system A, which is equipped with four controllers 0, 1, 2, and 3. Based on the circular mirroring principle, these four controllers are combined in pairs to form four mirror pairs in "State 1" (0,1) (1,2) (2,3) (3,0). During the normal operation of the system, each mirror pair works together to ensure the stability of data storage and processing. These four mirror pairs are the initial mirror pairs when the system is working normally.
[0051] When controller 0 in mirror pair 1 (0,1) fails suddenly, a controller needs to be introduced to temporarily replace controller 0 to maintain normal operation of the system. The transition controller is selected according to the established circular mirror principle, that is, based on the device ID of the normally working controller in the mirror pair where the faulty controller is located, the controller with the device ID one digit behind is selected as the transition controller.
[0052] In the event of a failure of controller 0, the storage system can identify that the controllers in normal working state are 1, 2, and 3. At this time, mirror pair 1 and mirror pair 4 are affected by the failure of controller 0 and need to use the transition controller to replace the failed controller to perform mirror reorganization. After the reorganization is completed, the combination of the mirror pairs changes to "state 2": (1,2) (1,2) (2,3) (3,1). Among them, mirror pair 1 and mirror pair 4 belong to the first reorganized mirror pair after reorganization, while mirror pair 2 and mirror pair 3 remain in the state of the initial mirror pair. After the failure of controller 0 is repaired, it is added to mirror pair 1 (the first reorganized mirror pair). At this time, the temporary mirror pair composition is (0,1,2), and all mirror pairs of the storage system are in "state 3": (0,1,2) (1,2) (2,3) (3,1,0). For ease of understanding, this embodiment explains one mirror pair. After controller 0 (failed controller) recovers, controller 2 (transition controller) needs to exit and suspend the data caching task in mirror pair 1. After controller 2 exits, it is necessary to clear the data cached by controller 2 when it replaced controller 0. It should be noted that, in order to facilitate understanding, in this embodiment, the controllers of the storage system are illustrated as four controllers, but this does not constitute a limitation on the embodiment of the present disclosure.
[0053] It is worth noting that the concept of "transition controller" has certain limitations. Take controller 2 as an example. There are obvious differences in the roles and functions it plays in mirror pair 1 and mirror pair 2. In mirror pair 1, controller 2 temporarily replaces the failed controller 0 to carry out work; while in mirror pair 2, controller 2 participates in work according to the original settings of the system, and there is no temporary replacement. Therefore, only in the first reorganized mirror pair and the temporary mirror pair, the corresponding controller is called a transition controller.
[0054] Step 102: After the repaired faulty controller completes data mirroring, the transition controller is removed from the temporary mirror pair, and a data cleanup process is performed on the transition controller.
[0055] In the embodiments of the present disclosure, data mirroring is the process of copying data from one storage location to another or more storage locations in a storage system to ensure data security, availability, and redundancy. Through data mirroring, when a storage location fails, the system can still obtain data from other mirror locations to ensure business continuity. For example, an important user data is stored in two different controllers at the same time, and the data in the two controllers are mirrored to each other. The data cleaning process is a series of operations to clear temporary data stored in the transition controller that is no longer needed after the system returns to normal. These temporary data may include intermediate data generated during the transition period, temporary copies stored to maintain the work of the temporary mirror pair, etc.
[0056] In the actual operation of the storage system, when a controller fails, the system will quickly start the fault response mechanism, introduce a transition controller to replace the faulty controller, and form the first reorganized mirror pair with other normal controllers to ensure that the system can continue to store and process data stably. During this period, the technicians will repair the faulty controller, troubleshoot the cause of the fault and take corresponding repair measures, such as replacing damaged hardware components and repairing software vulnerabilities. When the faulty controller is repaired, the repaired faulty controller is added to the first reorganized mirror pair to form a temporary mirror pair. In order to enable the controller to participate in the system work normally again, data mirroring operation is required. The system will copy the latest data stored in other controllers to the repaired faulty controller to ensure that it has a complete and accurate copy of the data to ensure data consistency. When the data mirroring operation is successfully completed and the system verifies that the repaired faulty controller can work normally and process data in collaboration with other controllers, the system will remove the previously temporarily added transition controller from the temporary mirror pair. This operation is to restore the system to a normal mirror pair structure and ensure the stability of the system architecture. Then, the system will perform a data cleanup process on the transition controller. During the cleanup process, the system will identify and delete all temporary data stored by the transition controller while replacing the faulty controller. These data are no longer valuable after the system returns to normal. Timely cleanup can free up the storage resources of the controller and improve the operating efficiency of the system.
[0057] Assume that there is a storage system consisting of controllers 0, 1, 2, and 3. Under normal circumstances, they form a mirror pair (0, 1) (1, 2) (2, 3) (3, 0). When controller 0 fails, the system selects controller 2 as the transition controller according to the set rules, and forms a temporary mirror pair (1, 2) with controller 1. After repairing controller 0, the system mirrors the data in controller 2 to controller 0 to ensure that 0 has the latest and complete data. During the recovery process of the failed controller, the mirror pair of the storage system needs to switch from "state 3" to "state 1", so the transition controller in the temporary mirror pair needs to be removed. After confirming that controller 0 can work normally, the system removes controller 2 from the temporary mirror pair (0, 1, 2) to restore the mirror pair to the original (0, 1). Finally, the system performs a data cleanup process on controller C to delete the temporary data stored by 2 during the replacement of 0, such as some temporary cache data generated during data transmission and processing.
[0058] In this way, when the failed controller is restored, the use of three copies (i.e., controllers 0, 1, and 2 exist in the temporary mirror pair) can ensure that the data of the entire storage system remains consistent and complete after the failed controller is repaired and rejoins the system. By first mirroring the data, then removing the transition controller and cleaning up the data, data loss or inconsistency is avoided, the accuracy of business data is guaranteed, and reliable data services are provided to users.
[0059] Timely cleaning of temporary data in the transition controller releases the storage and processing resources of the controller. This helps improve the overall performance of the system, reduces problems such as slow system operation caused by redundant data occupying resources, and enables the system to process new business requests more efficiently. Removing the transition controller from the temporary mirror pair restores the system to a normal mirror pair structure, enhancing the stability of the system architecture. This avoids potential risks that may be caused by the long-term existence of the transition controller, such as compatibility issues with other controllers or system errors caused by role confusion, and ensures the stable operation of the storage system.
[0060] Step 103, monitor whether a concurrent failure occurs in the controller in the storage system, and monitor the execution status of the data cleaning process.
[0061] In the embodiments of the present disclosure, concurrent failure refers to the situation where multiple controllers fail simultaneously or successively within a short period of time during the operation of the storage system. This type of failure is more complex than the failure of a single controller and may have a greater impact on the normal operation of the storage system. The embodiments of the present disclosure are mainly to deal with the situation where other controllers also fail during the recovery process of the failed controller. Concurrent failure refers to the failure of the failed controller superimposed on other controllers in the storage system.
[0062] In the daily operation of storage systems, it is crucial to maintain stable and reliable system operation. To this end, the system will continuously monitor the status of each controller. Specifically, the monitoring mechanism will collect the working parameters and status information of each controller in real time, such as the controller's CPU usage, memory usage, data transmission rate, and error log. Through in-depth analysis of this information, it is determined whether there is a controller failure. Especially when monitoring concurrent failures, the system will focus on the status change trends of multiple controllers. Once multiple controllers are found to be abnormal at the same time, such as a sudden sharp increase in CPU usage, a sudden interruption in data transmission, etc., it will be determined that a concurrent failure has occurred and an alarm will be issued quickly.
[0063] During the data cleaning process of the faulty controller, the system will conduct a full range of monitoring, and will not relax the monitoring of concurrent faults. This is because concurrent faults are very likely to have a negative impact on the data cleaning process, reduce cleaning efficiency, or even cause cleaning failure. Before the data cleaning process is started, the monitoring mechanism will not only check whether the configuration of the cleaning task is accurate, covering the target scope of the cleaning, data screening conditions, etc., but also evaluate whether there are hidden dangers of concurrent faults in the current system status. If there is a potential risk, an early warning will be issued and a corresponding response strategy will be formulated.
[0064] When the data cleaning process is started, the system will track the progress of the process in real time, and record in detail key information such as the amount of data cleaned, the amount of remaining data, and the estimated completion time; on the other hand, it will continue to monitor the status of each controller. Once a concurrent fault is detected, the data cleaning process will be suspended and concurrent faults will be handled first to avoid concurrent faults interfering with the data cleaning work. After the fault is handled, the cleaning process will be reasonably adjusted according to the system status and data cleaning progress at the time, and then the cleaning work will be resumed. If errors occur during the cleaning process, such as data read failures and write errors, the monitoring system will quickly capture these anomalies and record the error information in detail to facilitate subsequent troubleshooting and repair by technical personnel, ensure that the data cleaning process can be completed smoothly, and maintain the stable operation of the storage system.
[0065] Step 104, when a concurrent failure occurs in a controller in the storage system, the execution process of the data cleaning process is adjusted according to the execution status information of the data cleaning process and the concurrent failure information of the concurrent failure controller where the concurrent failure occurs; and data is cleaned on the transition controller according to the adjusted data cleaning process.
[0066] In the embodiments of the present disclosure, the execution status information is information describing the current state of the data cleaning process, including whether it has been started, the execution progress (the proportion of the cleaned data volume to the total data volume, etc.), whether an error or abnormal situation has been encountered (such as data read failure, write error, etc.), whether it is paused, etc. Concurrent fault information is relevant information about controllers where concurrent faults occur, such as which controllers have failed, the specific type of fault (hardware fault, software fault, etc.), the time when the fault occurred, the severity of the fault, etc.
[0067] During the recovery process of the failed controller, the cached data in the transition controller needs to be cleaned up. The system will monitor the working status of each controller in real time. Once it detects that other controllers in the storage system have failed, that is, when a concurrent failure occurs, the corresponding response mechanism will be triggered. At this time, the system will quickly collect two important information: on the one hand, the execution status information of the current data cleaning process, including whether the data cleaning process has been started, if it has been started, to understand which specific step it has been executed to, whether there have been any errors or exceptions and how they were handled, etc.; on the other hand, it collects detailed fault information of the controller where the concurrent failure occurred, such as the fault controller number, fault type (such as hardware chip damage or software program crash), and the exact time when the fault occurred.
[0068] Based on the information collected, the system will adjust the execution process of the current data cleaning process. There are many ways to adjust. For example, if part of the data cleaning process has been executed, but the failure of a key concurrent fault controller affects the subsequent data cleaning operations, the system will suspend the current data cleaning process, give priority to fault repair or data migration, and after the fault is resolved to a certain extent, re-plan the execution steps of the data cleaning process to determine where to continue cleaning and what method to use. Alternatively, if the data cleaning process has not yet started, and the occurrence of concurrent failures has caused a major change in the architecture of the storage system, the system will re-evaluate the goals, scope, and methods of data cleaning and formulate a new data cleaning execution process.
[0069] After the adjustment of the data cleaning process is completed, the system will perform data cleaning operations on the transition controller according to the new process. During the cleaning process, the system will continue to monitor the progress and status of the cleaning to ensure that the data cleaning work can be completed smoothly and will not interfere with the normal operation of other parts of the storage system.
[0070] When complex concurrent failures occur in the storage system, the data cleaning process can be adjusted in time according to the actual situation, so that the system can better cope with various emergencies, reduce the impact of failures on data cleaning work, and improve the overall adaptability and fault tolerance of the system. By reasonably adjusting the data cleaning process, incomplete or incorrect data cleaning caused by concurrent failures is avoided, and the correct cleaning of data in the transition controller is ensured, thereby ensuring the integrity and consistency of data in the storage system and reducing the risk of data loss or inconsistency.
[0071] The present disclosure provides a method for cleaning cache data. In an embodiment of the present disclosure, a transition controller is used to replace a faulty controller for mirror reorganization, and after the faulty controller is repaired, the controller is added to a first reorganized mirror pair to form a temporary mirror pair. This ensures that the basic data redundancy and read / write functions of a storage system are not seriously affected. When the faulty controller is restored, the system can perceive complex fault conditions in real time by continuously monitoring whether a controller in the storage system has a concurrent fault and the execution status of a data cleaning process. Once a concurrent fault occurs, the data cleaning process is adjusted according to the execution status information of the data cleaning process, the team information of the temporary mirror pair, and the concurrent fault information of the concurrent faulty controller. This allows for flexible response to complex fault scenarios, reduces the impact of the fault on the system, ensures that the data of the transition controller can be effectively cleaned up in the case of a concurrent fault, ensures that the system can quickly resume normal operation after the fault, and improves the fault tolerance of the storage system. When cleaning the cache data of the transition controller, the storage system can resume normal operation faster in the face of a fault through an effective fault handling mechanism and precise data cleaning process adjustment. Whether it is a single controller fault or a concurrent fault, the system can handle it in an orderly manner, shorten the fault downtime, and improve the overall performance and efficiency of the storage system.
[0072] Further, in a possible implementation of the present disclosure, the storage system is a four-controller storage system. A four-controller storage system is a storage system with four controllers. The following embodiments are all illustrated by using a four-controller storage system as an example, but it should be clear that this description is not intended to limit the number of controllers in the storage system.
[0073] In order to clearly illustrate the embodiments of the present disclosure, the embodiments of the present disclosure provide a flowchart of a method for reassembling a mirror pair.
[0074] like Figure 2 As shown, the method comprises the following steps: Step 201: monitor the operating status of controllers in the storage system and identify faulty controllers.
[0075] The operating status refers to various status information of the controller during operation, including but not limited to the controller's CPU usage, memory usage, data transfer rate, temperature, power status, error log, etc. This status information can reflect the controller's workload, health status, and whether it is operating normally. When the controller is abnormal and cannot perform its data storage, processing and other related duties normally, it becomes a faulty controller. The causes of the fault may be various, such as hardware damage (such as chip failure, circuit board short circuit, etc.), software errors (such as program crashes, driver failures, etc.), network connection problems, etc.
[0076] During the daily operation of the storage system, the operating status of each controller is continuously monitored in real time through a preset monitoring mechanism. This monitoring mechanism can obtain the status information of the controller in a variety of ways. For example, the system log of the controller can be read regularly through a software program to obtain error information and warning information that occur during the operation of the controller; sensors can be used to monitor the hardware status of the controller in real time, such as temperature sensors to monitor the operating temperature of the controller, and power sensors to monitor whether the power supply is stable; and the performance indicators of the controller can also be obtained through network connections, such as CPU usage, memory occupancy, data transmission rate, etc.
[0077] After obtaining this status information, the monitoring mechanism will analyze and process it. Through preset rules and algorithms, the current status information is compared with the standard status during normal operation. For example, if the CPU usage of the controller exceeds 90% for a long time, and the data transmission rate is significantly reduced, it is judged that the controller has performance problems; if frequent hardware error records are found in the system log, such as hard disk read and write errors, it means that the storage device connected to the controller or the hardware of the controller itself is faulty.
[0078] Once the monitoring mechanism determines through analysis that the operating status of a controller is abnormal and meets the preset fault judgment criteria, it will identify the controller as a faulty controller and promptly issue an alarm to notify the system administrator or automatically trigger the corresponding fault handling mechanism.
[0079] Step 202 : Identify the device identification of the faulty controller, collect and sort the device identifications of controllers in the storage system except the faulty controller, and generate a device identification set.
[0080] The device ID is a unique identifier for each controller in the storage system. It is used to distinguish different controllers and facilitate system management and scheduling. It can be in the form of a number, letter code, etc. A device ID set is a set formed by combining multiple device IDs in a certain order to facilitate unified management and operation of these controllers.
[0081] The storage system continuously monitors the operating status of each controller through a built-in monitoring mechanism. Once a controller is detected to be abnormal, such as frequent errors, data transmission interruption, or excessive hardware temperature, the system will determine that the controller is a faulty controller and identify the device ID of the faulty controller. This can be done by, but not limited to, querying the controller's configuration file, interacting with the controller's management interface, and other operations to obtain an accurate device ID.
[0082] After the faulty controller is identified, the system starts to traverse all controllers in the storage system and screen out controllers that are working normally except for the faulty controller. For each normal controller, the device identification of each normal controller is collected by reading its device information, querying the system management database, etc. The collected device identifications of normal controllers are sorted according to certain rules. The sorting rules need to be determined according to the type of device identification. For example, if the device identification is a digital number, it can be sorted in order from small to large or from large to small; if it is an alphabetical code, it can be sorted in alphabetical order. After the sorting is completed, these ordered device identifications are combined into a device identification set and stored in a specific data structure of the system to facilitate subsequent operation calls.
[0083] Assume that a storage system has four controllers, with device IDs C01, C02, C03, and C04. The system detects that controller C03 has a fault, which is manifested by the inability to respond to data read and write requests and a large number of hardware error prompts in the system log. The system first identifies the device ID of the faulty controller as C03. Then, it starts to collect the device IDs of other controllers except C03, namely C01, C02, and C04. Then, these IDs are sorted in alphabetical order, and the sorted results are C01, C02, and C04. Finally, they are combined into a device ID set {C01, C02, C04} and stored in the system's management database for subsequent use in troubleshooting.
[0084] Step 203 , based on the teaming information of the initial mirror pair where the faulty controller is located, a transition controller that replaces the faulty controller is selected from controllers that have not failed.
[0085] Step 2031: Obtain a set of device identifications of controllers other than the failed controller in the storage system.
[0086] Step 2032: Based on the teaming information, determine the normal device identifier corresponding to the normal controller in the initial mirror pair where the faulty controller is located.
[0087] Step 2033: Find a transition controller that replaces the faulty controller based on the device identification set and the normal device identification.
[0088] Furthermore, a target device identifier that is one digit behind the normal device identifier in the device identifier set is searched, and a controller corresponding to the target device identifier is used as a transition controller.
[0089] Specifically, in step 203, the team information is used to describe the relevant information of how each controller forms a mirror pair, including the corresponding relationship of the controllers in each mirror pair, which is the key basis for determining the composition of the mirror pair where the faulty controller is located. A normal controller is a controller in the storage system that can normally perform tasks such as data processing, storage, and transmission without any faults. A normal device identifier is a unique device identifier corresponding to a normal controller, which is used to accurately identify and locate the controller in the system.
[0090] In step 2031, obtaining a set of device identifications of controllers other than the failed controller in the storage system may be performed by, but not limited to, the following methods, specifically including: The storage system has a management mechanism that records and manages the device IDs of all controllers. When a controller failure is detected, the system first uses this management mechanism to traverse all controllers in the storage system. The system reads the configuration information of each controller one by one, extracts their respective device IDs, and aggregates these IDs to form a set that includes the device IDs of all controllers except the failed controller. This set provides basic data for subsequent screening of transition controllers.
[0091] Wherein, step 2032, based on the team information, determines the normal device identifier corresponding to the normal controller in the initial mirror pair where the faulty controller is located, specifically including: Based on the team information pre-recorded by the system, the system can quickly locate the initial mirror pair where the faulty controller is located. In this initial mirror pair, the system identifies another controller that is working normally except the faulty controller, and obtains the device identifier corresponding to the normal controller, that is, the normal device identifier. This normal device identifier is the key reference for determining the transition controller.
[0092] Among them, step 2033, searching for a transition controller to replace the faulty controller according to the device identification set and the normal device identification, specifically includes: The system compares and analyzes the device identification set obtained in step 2031 with the normal device identification determined in step 2032. According to the circular mirroring rule, the system searches for the target device identification in the device identification set that is one digit after the normal device identification (the "one digit" here is determined according to the encoding rule of the device identification, for example, if the device identification is numbered in numerical order, then the one digit is the value plus 1; if it is coded in alphabetical order, it is the next letter). Once the target device identification is found, the system can determine the controller corresponding to the target device identification and select this controller as the transition controller to replace the faulty controller. Subsequently, the transition controller will regroup with the normal controller in the initial mirroring pair where the faulty controller is located to form a temporary mirroring pair to continue to maintain the data processing and storage functions of the storage system.
[0093] Assume that a storage system has four controllers 0, 1, 2, and 3, and the device IDs are C00, C01, C02, and C03 respectively, and the initial mirror pair is formed according to the circular mirror principle, such as (0,1) (1,2) (2,3) (3,0). When controller 3 fails, step 2031: the system obtains the controller device ID set {C00, C01, C02} except controller 3. Step 2032: According to the team information, the normal controllers 2 and 0 in the initial mirror pair (2,3) and (3,0) where controller 3 is located are determined, and their corresponding normal device IDs are C02 and C00. Step 2033: According to the alphabetical order of the device ID, search the device ID set for the last digit of C02, that is, C00; according to the circular mirror principle, when the controller is ranked last, its next digit is ranked first. Therefore, for the initial mirror pair (2,3), the controller 0 corresponding to C00 is determined as the transition controller; for the initial mirror pair (3,0), the controller 1 corresponding to C01 is determined as the transition controller. At this time, controllers 0 and 1 are used to replace the work of controller 3 in the initial mirror pair, that is, two first reorganized mirror pairs (2,0) (0,1) are formed. At this time, the mirror pairs in the storage system include two initial mirror pairs and two first reorganized mirror pairs, that is, (0,1) (1,2) (2,0) (0,1).
[0094] Step 204 : Reorganize the transition controller and the normal controller in the initial mirror pair where the faulty controller is located by mirroring to obtain a first reorganized mirror pair.
[0095] Furthermore, according to the circular mirroring principle, the device identifications of the transition controller and the device identifications of the normal controllers are sorted, and the arrangement order of the transition controller and the normal controller is determined to generate a first recombined mirror pair.
[0096] Specifically in step 204, after the storage system detects a controller failure and determines the transition controller, the two controllers that need to be mirrored are identified, namely the transition controller and the normal controller in the initial mirror pair where the failed controller is located. The system obtains the device identifiers of the transition controller and the normal controller respectively. These device identifiers are the unique identity identifiers of each controller in the system, which can be in the form of digital numbers, letter codes, etc., and are used to accurately identify and distinguish different controllers. According to the established circular mirroring principle of the storage system, the device identifiers of the transition controller and the normal controller are sorted. If the circular mirroring principle is to combine in alphabetical order or numerical order, the system will determine the order of the two device identifiers according to this rule. For example, if the device identifier is an alphabetic code and the circular mirroring principle is in alphabetical order, then first compare the alphabetical order of the two identifiers to determine their arrangement order in the new mirror pair.
[0097] According to the sorting results, the transition controller and the normal controller are combined in a determined order to form the first reorganized mirror pair. This new mirror pair will replace the original initial mirror pair containing the failed controller and take on the task of data storage and processing to ensure that the storage system can continue to operate normally during the failure.
[0098] Based on the example of step 203, for the initial mirror pair (2,3), the controller 0 corresponding to C00 is determined as the transition controller; for the initial mirror pair (3,0), the controller 1 corresponding to C01 is determined as the transition controller. At this time, controllers 0 and 1 are used to replace the work of controller 3 in the initial mirror pair, that is, two first reorganized mirror pairs (2,0) (0,1) are formed. At this time, the mirror pairs in the storage system include two initial mirror pairs and two first reorganized mirror pairs, that is, (0,1) (1,2) (2,0) (0,1).
[0099] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides a flowchart of another method for cleaning cache data.
[0100] like Figure 3 As shown, the method comprises the following steps: Step 301: Add the repaired faulty controller to the first reorganized mirror pair to obtain a temporary mirror pair.
[0101] Step 302: Control the faulty controller that has been repaired to perform data mirroring with the transition controller.
[0102] Step 303: After the repaired faulty controller completes data mirroring, the transition controller is removed from the temporary mirror pair, and a data cleanup process is performed on the transition controller.
[0103] Specifically, in step 301 to step 303, in the storage system, after the faulty controller is repaired or automatically repaired by the system, the storage system detects that the faulty controller has returned to normal working state. The system adds the repaired faulty controller to the first reorganized mirror pair generated previously. For example, storage system A is equipped with four controllers 0, 1, 2, and 3. These four controllers form four mirror pairs of "state 1" (0,1) (1,2) (2,3) (3,0), which are the initial mirror pairs when they are initially working normally.
[0104] When controller 0 in mirror pair 1 (0,1) suddenly fails, a controller needs to be introduced to temporarily replace controller 0 to maintain normal operation of the system. The transition controller is selected according to the established circular mirroring principle, that is, based on the device ID of the normally working controller in the mirror pair where the failed controller is located, the controller with the device ID one digit after the device ID is selected as the transition controller. In the case of a failure in controller 0, the storage system can identify that the controllers in normal working state are 1, 2, and 3. At this time, mirror pair 1 and mirror pair 4 are affected by the failure of controller 0 and need to use the transition controller to replace the failed controller to perform mirror reorganization operation. After the reorganization is completed, the combination of the mirror pairs changes to "State 2": (1,2) (1,2) (2,3) (3,1). Among them, mirror pair 1 and mirror pair 4 belong to the first reorganized mirror pair after the reorganization, while mirror pair 2 and mirror pair 3 remain in the state of the initial mirror pair. After the faulty controller 0 is repaired, it is added to mirror pair 1 (the first reorganized mirror pair). At this time, the temporary mirror pair composition is (0,1,2), and all mirror pairs of the storage system are in "state 3": (0,1,2) (1,2) (2,3) (3,1,0).
[0105] After the temporary mirror pair is formed, the system starts the data mirroring process. The faulty controller that controls the repair fault mirrors the data with the transition controller. The system first determines the data range that needs to be synchronized, which includes the data newly written or modified by other controllers during the faulty controller failure.
[0106] When the repaired faulty controller completes data mirroring, that is, the data in the transition controller is completely and accurately copied to the repaired faulty controller, the system confirms that data synchronization is complete. The system removes the transition controller from the temporary mirror pair. This operation includes updating the configuration information of the storage system and deleting the transition controller from the relevant mirror pair configuration so that it no longer participates in the data storage and processing of the mirror pair. That is, the above "state 3" is switched to "state 1". Next, the data cleanup process is performed on the transition controller. The system first scans the storage area of the transition controller to identify temporary data generated during its replacement of the faulty controller. These data are stored in specific directories or data structures, and the system deletes, archives, or otherwise processes these temporary data according to pre-set cleanup rules.
[0107] Step 304, monitor whether a concurrent failure occurs in the controller in the storage system, and monitor the execution status of the data cleaning process.
[0108] Specifically, in step 304, the operating parameters and status information of each controller are collected in real time, such as the CPU usage, memory usage, data transmission rate, error log, etc. of the controller. By analyzing and judging this information, it is determined whether any controller has failed. In particular, for the monitoring of concurrent failures, the system will pay attention to the status change trends of multiple controllers.
[0109] At the same time, the system will also conduct comprehensive monitoring of the data cleaning process of the faulty controller. Before the data cleaning process is started, the monitoring mechanism will check whether the configuration of the cleaning task is correct, including the target range of the cleaning, data screening conditions, etc. When the data cleaning process is started, the execution progress of the process will be tracked in real time, and information such as the amount of data cleaned, the amount of data remaining, and the estimated completion time will be recorded. If errors occur during the cleaning process, such as data reading failures and write errors, the monitoring system will capture these abnormal situations in a timely manner and record detailed error information for technical personnel to investigate and repair.
[0110] Step 305: When a concurrent failure occurs in a controller in the storage system, it is determined based on the execution status information whether the transition controller starts to execute a data cleaning process.
[0111] Specifically, in step 305, once a concurrent fault is detected, the system triggers an operation to obtain the execution status information of the data cleaning process. The data cleaning process management module in the system is responsible for recording and maintaining the execution status information of the data cleaning process. The data cleaning process management module queries the relevant status record file or database table to obtain detailed information about the data cleaning process of the transition controller. This information includes whether the data cleaning process has been started, if it has been started, what is the current execution progress, whether any errors or abnormalities have been encountered during the execution process, and whether the process is in a suspended state.
[0112] Based on the acquired execution status information, the system will determine whether the transition controller has started to execute the data cleaning process. If the execution status information shows that the start flag of the data cleaning process is "started", it means that the transition controller has started to execute the data cleaning process; if the start flag is "not started", it means that the transition controller has not yet started to execute the data cleaning process. For the case where the data cleaning process has already started, the system will further analyze the execution progress, error information, etc. to fully understand the current status of the data cleaning process and provide a basis for subsequent decision-making. To determine whether the concurrent fault controller will affect the data cleaning process.
[0113] When it is determined that the data cleaning process has not started, step 306 is executed.
[0114] Step 306: reorganize the mirror pair where the concurrently failed controller is located to obtain a second reorganized mirror pair.
[0115] Furthermore, the mirror pair where the concurrent fault controller is located is mirrored and reorganized to obtain a second reorganized mirror pair, including: according to the concurrent fault information, searching for the teaming information of the first fault mirror pair where the concurrent fault controller is located; based on the teaming information of the first fault mirror pair, determining whether the first fault mirror pair is a temporary mirror pair for removing the transition controller; if the first fault mirror pair is a temporary mirror pair for removing the transition controller, then pulling the transition controller back to the temporary mirror pair and mirroring it with the normal controller in the temporary mirror pair to obtain a second reorganized mirror pair; if the first fault mirror pair is not a temporary mirror pair for removing the transition controller, then mirroring the normal controller in the first fault mirror pair and its adjacent next controller to obtain a second reorganized mirror pair.
[0116] Specifically, in step 306, the fault monitoring module running in real time in the storage system will continuously monitor the working status of each controller. Once multiple controllers are detected to have failed at the same time, it is determined to be a concurrent fault, and the fault monitoring module will collect detailed concurrent fault information. It will record the unique device identifier of each concurrent fault controller to accurately identify the source of the fault; record the timestamp of the fault occurrence for subsequent fault analysis and system recovery strategy formulation; and record the fault type in detail, such as chip overheating damage and circuit board short circuit at the hardware level, program crash and driver error at the software level, and the impact of these faults on the current data transmission, storage and processing functions of the system, such as data transmission interruption, data loss risk prompt, etc. The first fault mirror pair is a mirror pair containing concurrent fault controllers. These mirror pairs cannot perform the duties of data storage and backup normally due to the failure of one or more of the controllers, and need to be reassembled and adjusted.
[0117] After obtaining concurrent fault information, the system searches for the team information of the first fault mirror pair containing the concurrent fault controller based on the internally stored mirror pair configuration database. This configuration database records the composition of each mirror pair in detail. By querying the ID of the faulty controller, the system can quickly locate the first fault mirror pair where it is located and obtain relevant information of other controllers in the mirror pair, including their device IDs, cooperation relationship with the faulty controller, etc.
[0118] The system compares the team information of the first fault mirror pair found with the relevant records of the temporary mirror pair. The information of the temporary mirror pair is also stored in a specific database table of the system, including the composition history of the temporary mirror pair, the use record of the transition controller, and the association information with the original fault controller. By comparing the composition structure of the first fault mirror pair, whether the transition controller is involved, and the removal record of the transition controller, it is determined whether the first fault mirror pair is a temporary mirror pair with the transition controller removed. If the first fault mirror pair is a temporary mirror pair with the transition controller removed, the system first pulls the transition controller back to the temporary mirror pair. This involves updating the configuration information of the system and reestablishing the communication connection and cooperation relationship between the transition controller and other normal controllers in the temporary mirror pair. Then, the system performs mirror reorganization on the transition controller and the normal controllers in the temporary mirror pair. According to the established mirror reorganization algorithm and rules, their arrangement order and data interaction mode in the new second reorganized mirror pair are determined. For example, according to specific priority rules or load balancing principles, data storage and processing tasks are redistributed to ensure that the new mirror pair can run efficiently and stably.
[0119] If the first faulty mirror pair is not a temporary mirror pair for removing the transition controller: The system finds a normally functioning controller from the first faulty mirror pair. According to the mirror reorganization strategy pre-set by the storage system, find the controller next to the normal controller (the "next" here is determined according to the controller numbering rule or the order defined by the system). Mirror the normal controller and the controller next to it. During the reorganization process, the system will reconfigure the data synchronization mechanism, communication protocol, and data storage strategy between the two controllers to generate a second reorganized mirror pair. At the same time, the system will conduct comprehensive testing and verification on the newly generated second reorganized mirror pair to ensure that it can complete data storage and backup tasks normally, and ensure the stable operation of the storage system after concurrent failures.
[0120] For example, in order to recover the failed controller 0, it is necessary to remove the transition controllers 2 (in mirror pair 1) and 1 (in mirror pair 4). Then, the data cleaning process is performed, and all mirror pairs of the storage system are in "state 3": (0,1,2) (1,2) (2,3) (3,1,0). If a concurrent failure occurs in controller 1 at this time (a concurrent failure relative to the failed controller), the controller of the storage system performs mirror reorganization and updates the mirror pair team to "state 4": (0,2) (2,3) (2,3) (3,0). At this time, the mirror pairs that undergo mirror reorganization are mirror pair 1 (the second reorganized mirror pair) and mirror pair 2 (the second reorganized mirror pair); mirror pair 3 and mirror pair 4 are restored to the state of the initial mirror pair. In "state 4", controller 2 (transition controller) of mirror pair 1 is pulled back to mirror pair 1, so there is no need to perform the data cleaning process; and controller 1 (transition controller) that is cleared in mirror pair 4 needs to continue to perform the data cleaning process.
[0121] Step 307 : Based on the teaming information of the second reorganized mirror pair, determine whether the transition controller belongs to the second reorganized mirror pair to determine whether to continue to execute the data cleaning process.
[0122] If the transition controller belongs to the second reorganized mirror pair, there is no need to continue to execute the data cleaning process on the transition controller in the second reorganized mirror pair; if the transition controller does not belong to the second reorganized mirror pair, continue to execute the data cleaning process on the transition controller that does not belong to the second reorganized mirror pair.
[0123] Specifically, in step 307, the second reorganized mirror pair is a new mirror pair obtained by reorganizing the mirror pair of the concurrently failed controller when a concurrent failure occurs in the storage system. The purpose is to rebuild the mirror structure of the storage system in the case of complex failures to maintain the stability and reliability of data storage and processing.
[0124] When the storage system completes the reorganization of the mirror pair where the concurrently failed controller is located and generates the second reorganized mirror pair, the system will extract the team information of the mirror pair from its configuration management module. The configuration management module is responsible for recording and maintaining the detailed configuration data of all mirror pairs in the storage system. The system obtains information such as the device identification of each controller in the second reorganized mirror pair, their position relationship in the mirror pair, and the data synchronization and collaboration rules between them by querying specific data tables or configuration files. This information is stored in a structured form, which is convenient for the system to quickly read and analyze.
[0125] The system compares the device ID of the transition controller with the controller ID in the team information of the second recombinant mirror pair one by one. This comparison process can be implemented by a simple string matching algorithm. If a matching ID is found, it is determined that the transition controller belongs to the second recombinant mirror pair; if no match is found, it is determined that the transition controller does not belong to the second recombinant mirror pair.
[0126] Since the transition controller is still participating in normal work in the second reorganized mirror pair, executing the data cleanup process on it at this time will result in data loss or system operation abnormality. Therefore, the system will stop arranging the data cleanup process for the transition controller and record relevant information in the system log, indicating that the data cleanup will not be performed temporarily because the transition controller is still in the working mirror pair. At the same time, the system will continue to monitor the working status of the transition controller in the second reorganized mirror pair to ensure that it performs its duties normally until there are new system changes or instructions requiring further processing.
[0127] The system confirms that the transition controller has completed its temporary task and is no longer involved in the current core mirror pair work. At this time, in order to optimize storage system resources and improve system performance, the system will continue to execute the data cleanup process for the transition controller. The system will start the data cleanup task according to the pre-set data cleanup rules and steps. First, the system scans the storage area of the transition controller and identifies temporary data, invalid data, etc. that need to be cleaned. Then, according to the type and storage location of the data, the corresponding cleanup method is adopted, such as directly deleting files, formatting specific storage areas, etc. During the cleanup process, the system will monitor the cleanup progress in real time and record any errors or abnormalities that occur during the cleanup process for subsequent investigation and processing to ensure the smooth completion of the data cleanup process. The data cleanup process referred to in the present disclosure embodiment is specifically the invalid data cleanup of the cache module (discard) Continuing with the example of step 306, the mirror pair in the storage system is in "state 4": (0,2) (2,3) (2,3) (3,0). At this time, the mirror pairs undergoing mirror reorganization are mirror pair 1 (the second reorganized mirror pair) and mirror pair 2 (the second reorganized mirror pair); mirror pair 3 and mirror pair 4 are restored to the state of the initial mirror pair. In "state 4", controller 2 (transition controller) of mirror pair 1 is pulled back to mirror pair 1, so there is no need to perform the data cleanup process; while controller 1 (transition controller) that is cleared in mirror pair 4 needs to continue to perform the data cleanup process.
[0128] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides a flowchart of another method for cleaning cache data.
[0129] like Figure 4 As shown, the method comprises the following steps: Step 401: Add the repaired faulty controller to the first reorganized mirror pair to obtain a temporary mirror pair.
[0130] Step 402: Control the faulty controller that has been repaired to perform data mirroring with the transition controller.
[0131] Step 403: After the repaired faulty controller completes data mirroring, the transition controller is removed from the temporary mirror pair, and a data cleanup process is performed on the transition controller.
[0132] Step 404, monitor whether a concurrent failure occurs in the controller in the storage system, and monitor the execution status of the data cleaning process.
[0133] Step 405: When a concurrent failure occurs in a controller in the storage system, it is determined based on the execution status information whether the transition controller starts to execute a data cleaning process.
[0134] For the description of step 405, please refer to the description of the above embodiment, which will not be described in detail in this embodiment.
[0135] When it is determined that the data cleaning process has started, step 406 is executed.
[0136] Step 406: Based on the concurrent fault information, determine whether the transition controller is a concurrent fault controller.
[0137] Specifically in step 406, based on the concurrent fault information, the device identification of the concurrent fault controller and the team information of the mirror pair to which it belongs are obtained; the device identification of the concurrent fault controller is compared with the device identification of the transition controller, and the team information of the mirror pair to which the concurrent fault controller belongs is compared with the team information of the temporary mirror pair to which the transition controller belongs, to determine whether the transition controller is a concurrent fault controller.
[0138] The data cleaning process monitoring module built into the storage system will track the execution of the data cleaning process in real time. Once it detects that the data cleaning process has been started, the monitoring module will trigger the next judgment operation. At the same time, the fault monitoring module of the storage system continues to monitor the operating status of each controller. When a concurrent fault is detected in a controller, the fault monitoring module will record the detailed information of all concurrent fault controllers and generate concurrent fault information.
[0139] The system compares the device identification of the transition controller with the device identification of the concurrent fault controller one by one. If the device identification of the transition controller is consistent with the device identification of a concurrent fault controller, and the team information of the mirror pair is also consistent, then it can be determined that the transition controller is a concurrent fault controller. If after comparison, the device identification of the transition controller does not match the device identification of the concurrent fault controller, it means that the transition controller is not a concurrent fault controller. If the transition controller is a concurrent fault controller, execute step 407; if the transition controller is not a concurrent fault controller, execute step 408.
[0140] Step 407: When the transition controller rejoins the mirror pair, the data cleaning process is re-executed on the transition controller.
[0141] Specifically, in step 407, during the daily operation of the storage system, the controller may fail, and a transition controller is introduced to maintain the normal operation of the system. When the faulty controller is repaired and is ready to rejoin the mirror pair, this is the scenario where the transition controller rejoins the mirror pair. Prior to this, the system operation is in multiple states. For example, when the controller recovery is in the second stage and the cache module has initiated a data cleanup process, if the controller executing the discard fails, the cluster will update the mirror pair team information according to the current online controller status. This is because during the execution of the discard process, after the controller executing the discard starts executing the discard, the cache module has removed the corresponding mirror pair of the controller. Therefore, after the controller rejoins the cluster, the discard process will be initiated again for the corresponding uncleaned cache data during the controller initialization phase.
[0142] Step 408, after executing the data cleaning process on the transition controller, data mirroring is performed on the transition controller, and mirror reorganization is performed on the mirror pair where the concurrent fault controller is located to obtain a third reorganized mirror pair.
[0143] Furthermore, the data mirroring processing is performed on the transition controller, and the mirror reorganization is performed on the mirror pair where the concurrent fault controller is located to obtain a third reorganized mirror pair, including: according to the concurrent fault information, searching for the team information of the second fault mirror pair where the concurrent fault controller is located; based on the team information of the second fault mirror pair, determining whether the second fault mirror pair is a temporary mirror pair for removing the transition controller; if the second fault mirror pair is a temporary mirror pair for removing the transition controller, then pulling the transition controller back to the temporary mirror pair and performing mirror reorganization with the normal controller in the temporary mirror pair to obtain the third reorganized mirror pair; if the second fault mirror pair is not a temporary mirror pair for removing the transition controller, then performing mirror reorganization with the normal controller in the second fault mirror pair and its adjacent next controller to obtain the third reorganized mirror pair.
[0144] Specifically, in step 408, during the operation of the storage system, when the system detects concurrent failures of multiple controllers, a series of complex and critical response measures will be taken, and step 408 is an important part of them.
[0145] After the data cleaning process is completed for the transition controller, in order to ensure the integrity and consistency of the system data, the transition controller needs to be mirrored, and the mirror pair where the concurrent fault controller is located needs to be reorganized, thereby obtaining the third reorganized mirror pair. This operation is crucial for restoring the stable operation of the storage system and ensuring data security. Specifically, when performing this step, work must first be carried out based on the concurrent fault information. The system will accurately find the team information of the second fault mirror pair where the concurrent fault controller is located based on the concurrent fault information collected and recorded in real time, including key data such as which controllers have failed, the type and time of the failure. These team information records in detail the combination relationship of each controller in the second fault mirror pair, which is an important basis for subsequent operations. Next, based on the obtained team information of the second fault mirror pair, the system needs to determine whether the mirror pair is a temporary mirror pair for removing the transition controller. If the second fault mirror pair is a temporary mirror pair for removing the transition controller, the system will pull the transition controller back to the temporary mirror pair. This involves re-establishing the communication connection and data interaction relationship between the transition controller and the normal controller in the temporary mirror pair, and then reorganizing them according to the established mirror reorganization rules to obtain the third reorganized mirror pair. If the result of the judgment is that the second fault mirror pair is not a temporary mirror pair for removing the transition controller, the system will mirror the normal controller in the second fault mirror pair and the controller after it (here "the next one" is determined according to the controller sorting rules preset by the storage system) to reorganize. During the reorganization process, the system will reconfigure key parameters such as data synchronization strategy and communication protocol, and finally obtain the third reorganized mirror pair. Through such a rigorous process, the storage system can effectively restore the normal order of data storage and management after concurrent failures occur, ensuring the stable operation of the system.
[0146] Exemplarily, the normal state of the mirror pair team in the storage system is "state 1": (0,1) (1,2) (2,3) (3,0); after controller 0 fails, the mirror pair team in the storage system temporarily changes to "state 2": (1,2) (1,2) (2,3) (3,1); the failed controller 0 joins the first reorganized mirror pair to obtain temporary mirror pairs (0,1,2) and (3,1,0); at this time, the mirror pair team in the storage system changes to "state 3": (0,1,2) (1,2) (2,3) (3,1,0). After the transition controller 2 is removed from the mirror pair 1, the discard process needs to be performed on the transition controller 2. Similarly, when the transition controller 1 is removed from the mirror pair 4, the discard process needs to be performed on the transition controller 1. Assuming that the transition controller 1 fails and exits at this time, for the transition controller 2, it is not a concurrent fault controller that has a concurrent fault, but because the controller 1 fails and exits the mirror pair 1, the mirror pair 1 is also a temporary mirror pair to remove the transition controller.
[0147] When controller 1 fails and exits, the cluster will immediately update the mirror pair teaming. At the same time, the system will record the discard information as (2,32,32,1). This set of information shows that in the first mirror pair, the controller 2 executed the discard operation; in the fourth mirror pair, the controller 1 executed the discard operation; and in the remaining two mirror pairs, no controller executed the discard operation. Here, 32 is the default setting representing an invalid value.
[0148] Specifically, for the first mirror pair, before controller 1 exits, the data read and write operations are performed in the teaming mode of state 1. Therefore, even if controller 2 is re-incorporated into the mirror pair team, the data stored in it is already old data. In this case, it is necessary to wait for the discard process to be completed before the cache data can be mirrored from controller 0 to controller 2 again to ensure data consistency and accuracy. When the discard process is completed, the system will clear all recorded discard status information and restore it to the default invalid value state (32,32,32,32), preparing for subsequent system operations and data management.
[0149] It should be noted that, in the embodiment of the present disclosure, the mirror pair team information of the storage system includes the ordering relationship between the mirror pairs.
[0150] Furthermore, in a possible implementation of the embodiment of the present disclosure, the method for cleaning cache data further includes: if no concurrent failure occurs in the controller in the storage system, cleaning data on the transition controller according to the data cleaning process.
[0151] Specifically, while the storage system is running continuously, the system will continuously monitor the operating status of each controller in real time. If it is determined through monitoring that no concurrent failures have occurred in the controllers in the storage system, it means that the overall operation of the system is relatively stable. At this time, the data of the transition controller can be cleaned in an orderly manner according to the pre-set data cleaning process. Before the data cleaning process is started, the system will check whether the relevant configuration is accurate, including the cleaning scope, data screening conditions, etc. After startup, the system will track the cleaning progress in real time, record the amount of data that has been cleaned and the amount of remaining data, and ensure that the cleaning process is completed smoothly, thereby releasing the storage resources of the transition controller and improving the overall performance of the storage system.
[0152] Furthermore, in a possible implementation of the embodiment of the present disclosure, the method for cleaning cache data also includes: obtaining status information of each mirror pair in the storage system, and marking the device identifier of the transition controller in each mirror pair that needs to execute the data cleaning process.
[0153] Specifically, the system will periodically scan each mirror pair in the storage system and collect its status information, including data synchronization status, data read and write rate, and communication status between controllers. For example, if controller 1 fails and exits at a certain moment, the cluster will update the mirror pair team accordingly, such as updating to "status 4" (0,2) (2,3) (2,3) (3,0), and record information related to the operation, such as discard information (2,32,32,1), to identify the controller that performs the discard operation in each mirror pair. In this process, the system will determine whether there is a transition controller that needs to perform the initial cleanup process based on the mirror pair status and related operation records. For example, in the first mirror pair, controller 1 reads and writes data according to the original teaming method before failing and exiting. As a result, although controller 2 is pulled back into the mirror pair, the data is old data and needs to wait for the discard process to complete before re-caching the data mirror. At this time, controller 2 becomes a transition controller that needs to perform the initial cleanup process. Once such a transition controller is identified, the system will quickly mark its device ID so that a targeted initial cleanup process can be carried out later. After the discard process is completed, the relevant records will be cleared to invalid values to ensure timely updating of the system status and accurate management of data.
[0154] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers do not limit the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.
[0155] Corresponding to the above-mentioned method for cleaning cache data, the present invention also provides a device for cleaning cache data. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.
[0156] Figure 5 A schematic diagram of a cache data cleaning device provided in an embodiment of the present disclosure, such as Figure 5 As shown, including: The reorganization unit 51 is used to replace the faulty controller in the storage system with the transition controller, and to reorganize the mirror image of the initial mirror image pair where the faulty controller is located to obtain a first reorganized mirror image pair; and to add the repaired faulty controller to the first reorganized mirror image pair to obtain a temporary mirror image pair; A removal unit 52, configured to remove the transition controller from the temporary mirror pair after the repaired faulty controller completes data mirroring, and perform a data cleanup process on the transition controller; A first monitoring unit 53, used to monitor whether a concurrent failure occurs in a controller in the storage system, and to monitor the execution status of a data cleaning process; The adjustment unit 54 is used to adjust the execution process of the data cleaning process according to the execution status information of the data cleaning process and the concurrent fault information of the concurrent fault controller where the concurrent fault occurs when a concurrent fault occurs in the controller in the storage system; and perform data cleaning on the transition controller according to the adjusted data cleaning process.
[0157] The present disclosure provides a cache data cleaning device. In the embodiment of the present disclosure, a transition controller is used to replace a faulty controller for mirror reorganization. After the faulty controller is repaired, the controller is added to a first reorganized mirror pair to form a temporary mirror pair. The basic data redundancy and read / write functions of a storage system can be ensured not to be seriously affected. When the faulty controller is restored, the system can perceive complex fault conditions in real time by continuously monitoring whether a controller in the storage system has a concurrent fault and the execution status of a data cleaning process. Once a concurrent fault occurs, the data cleaning process is adjusted according to the execution status information of the data cleaning process, the team information of the temporary mirror pair, and the concurrent fault information of the concurrent faulty controller. The present disclosure can flexibly respond to complex fault scenarios, reduce the impact of the fault on the system, ensure that the data of the transition controller can be effectively cleaned up in the case of a concurrent fault, ensure that the system can quickly resume normal operation after the fault, and improve the fault tolerance of the storage system. When cleaning the cache data of the transition controller, the storage system can resume normal operation faster in the face of a fault through an effective fault handling mechanism and precise data cleaning process adjustment. Whether it is a single controller fault or a concurrent fault, the system can handle it in an orderly manner, shorten the fault downtime, and improve the overall performance and efficiency of the storage system.
[0158] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the recombination unit 51 comprises: A screening module 511 is used to screen a transition controller that replaces a failed controller from controllers that have not failed, according to the team information of the initial mirror pair where the failed controller is located; The reorganization module 512 is used to perform mirror reorganization on the transition controller and the normal controller in the initial mirror pair where the faulty controller is located, to obtain a first reorganized mirror pair.
[0159] Furthermore, in a possible implementation of this embodiment, the screening module 511 is further configured to: Obtaining a set of device identifiers of controllers other than the faulty controller in the storage system, wherein the device identifiers in the set of device identifiers are arranged in order; Based on the team information, determine a normal device identifier corresponding to a normal controller in the initial mirror pair where the faulty controller is located; Find a transition controller that replaces the faulty controller based on the device identification set and the normal device identification.
[0160] Furthermore, in a possible implementation of this embodiment, searching for a transition controller that replaces the faulty controller according to the device identification set and the normal device identification includes: Find the target device ID that is one digit behind the normal device ID in the device ID set; The controller corresponding to the target device ID is used as the transition controller.
[0161] Furthermore, in a possible implementation of this embodiment, the reorganization module 512 is further configured to: According to the circular mirroring principle, the device identifiers of the transition controller and the device identifiers of the normal controllers are sorted, and the arrangement order of the transition controller and the normal controller is determined to generate a first recombined mirror pair.
[0162] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the cache data cleaning device also includes: The second monitoring unit 55 is used to monitor the operating status of the controller in the storage system and identify the faulty controller before the reorganization unit 51 replaces the faulty controller in the storage system with the transition controller.
[0163] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the cache data cleaning device also includes: The collecting unit 56 is used to identify the device identification of the faulty controller, collect and sort the device identifications of controllers in the storage system except the faulty controller, and generate a device identification set.
[0164] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the cache data cleaning device also includes: The control unit 57 is used to control the faulty controller that has been repaired to perform data mirroring processing with the transition controller after the reorganization unit 51 adds the faulty controller that has been repaired to the first reorganized mirror pair to obtain a temporary mirror pair.
[0165] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the cache data cleaning device also includes: The cleaning unit 58 is used to clean up data on the transition controller according to the data cleaning process when no concurrent failure occurs in the controller in the storage system.
[0166] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the adjustment unit 54 includes: A first determination module 541 is used to determine whether the transition controller starts to execute the data cleaning process based on the execution status information; The determination module 542 is used to reorganize the mirror pair where the concurrent faulty controller is located before the data cleaning process is started, obtain a second reorganized mirror pair, and judge whether the transition controller belongs to the second reorganized mirror pair based on the team information of the second reorganized mirror pair to determine whether to continue the data cleaning process.
[0167] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the adjustment unit 54 also includes: A second judgment module 543 is used to judge whether the transition controller is a concurrent fault controller based on the concurrent fault information when the data cleaning process has started to be executed; An execution module 544 is used for re-executing the data cleaning process on the transition controller when the transition controller rejoins the mirror pair if the transition controller is a concurrently failed controller; The processing module 545 is used to perform data mirroring on the transition controller after executing the data cleaning process on the transition controller if the transition controller is not the concurrent fault controller, and to perform mirror reorganization on the mirror pair where the concurrent fault controller is located to obtain a third reorganized mirror pair.
[0168] Furthermore, in a possible implementation of this embodiment, the second determination module 543 is further configured to: Based on the concurrent fault information, obtain the device identification of the concurrent fault controller and the team information of the mirror pair to which it belongs; The device identification of the concurrent fault controller is compared with the device identification of the transition controller, and the team information of the mirror pair where the concurrent fault controller is located is compared with the team information of the temporary mirror pair where the transition controller is located to determine whether the transition controller is a concurrent fault controller.
[0169] Furthermore, in a possible implementation of this embodiment, the determining module 542 is further configured to: According to the concurrent fault information, searching for the teaming information of the first fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the first faulty mirror pair, determining whether the first faulty mirror pair is a temporary mirror pair for removing the transition controller; If the first faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a second reconstructed mirror pair; If the first faulty mirror pair is not a temporary mirror pair from which the transition controller is removed, a normal controller in the first faulty mirror pair is mirror-reorganized with its adjacent subsequent controller to obtain a second reorganized mirror pair.
[0170] Furthermore, in a possible implementation of this embodiment, the determining module 542 is further configured to: If the transition controller belongs to the second reorganized mirror pair, there is no need to continue to execute the data cleaning process for the transition controller in the second reorganized mirror pair; If the transition controller does not belong to the second reorganized mirror pair, the data cleaning process continues to be executed on the transition controller that does not belong to the second reorganized mirror pair.
[0171] Furthermore, in a possible implementation of this embodiment, the processing module 545 is further configured to: According to the concurrent fault information, find the team information of the second fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the second faulty mirror pair, determining whether the second faulty mirror pair is a temporary mirror pair for removing the transition controller; If the second faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain a third reconstructed mirror pair; If the second faulty mirror pair is not a temporary mirror pair with the transition controller removed, mirroring is performed between the normal controller in the second faulty mirror pair and its adjacent subsequent controller to obtain a third reconstructed mirror pair.
[0172] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the cache data cleaning device also includes: The marking unit 59 is used to obtain the status information of each mirror pair in the storage system, and mark the device identifier of the transition controller in each mirror pair that needs to execute the data cleaning process.
[0173] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.
[0174] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0175] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned cache data cleaning method embodiments.
[0176] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned cache data cleaning method embodiments when running.
[0177] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0178] An embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned cache data cleaning method embodiments are implemented.
[0179] An embodiment of the present disclosure also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned cache data cleaning method embodiments are implemented.
[0180] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0181] The above is a detailed introduction to a cache data cleaning method provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present disclosure, several improvements and modifications can be made to the present disclosure, and these improvements and modifications also fall within the scope of protection of the claims of the present disclosure.
Claims
1. A method for cleaning cache data, characterized in that: The method is applied to a storage system, and the method comprises: Using a transition controller to replace the faulty controller in the storage system, and reorganizing the mirror image of the initial mirror pair where the faulty controller is located to obtain a first reorganized mirror pair; adding the repaired faulty controller to the first reorganized mirror pair to obtain a temporary mirror pair; After the faulty controller that has been repaired completes data mirroring, the transition controller is removed from the temporary mirror pair, and a data cleanup process is performed on the transition controller; Monitoring whether a concurrent failure occurs in a controller in the storage system, and monitoring the execution status of the data cleaning process; When a concurrent failure occurs in a controller in the storage system, the execution process of the data cleaning process is adjusted according to the execution status information of the data cleaning process and the concurrent failure information of the concurrent failure controller where the concurrent failure occurs; and data is cleaned on the transition controller according to the adjusted data cleaning process.
2. The method for cleaning cache data according to claim 1, characterized in that: The method of replacing the faulty controller in the storage system with a transition controller and reorganizing the initial mirror pair where the faulty controller is located to obtain a first reorganized mirror pair includes: Selecting the transition controller to replace the failed controller from controllers that have not failed according to the teaming information of the initial mirror pair where the failed controller is located; The transition controller is mirrored and reorganized with a normal controller in the initial mirror pair where the faulty controller is located to obtain the first reorganized mirror pair.
3. The method for cleaning cache data according to claim 2, characterized in that: The step of selecting the transition controller to replace the faulty controller from controllers that have not failed according to the teaming information of the initial mirror pair in which the faulty controller is located comprises: Acquire a set of device identifications of controllers in the storage system except the faulty controller, wherein the device identifications in the set of device identifications are arranged in order; Based on the team information, determine a normal device identifier corresponding to a normal controller in the initial mirror pair where the faulty controller is located; The transition controller that replaces the faulty controller is searched for according to the device identification set and the normal device identification.
4. The method for cleaning cache data according to claim 3, characterized in that: The searching, according to the device identification set and the normal device identification, for the transition controller that replaces the faulty controller comprises: Searching for a target device identifier that is one digit behind the normal device identifier in the device identifier set; The controller corresponding to the target device identifier is used as the transition controller.
5. The method for cleaning cache data according to claim 2, characterized in that: The step of reorganizing the transition controller with a normal controller in the initial mirror pair where the faulty controller is located to obtain the first reorganized mirror pair includes: According to the circular mirroring principle, the device identification of the transition controller and the device identification of the normal controller are sorted, and the arrangement order of the transition controller and the normal controller is determined to generate the first recombined mirror pair.
6. The method for cleaning cache data according to claim 1, characterized in that: Before replacing the failed controller in the storage system with the transition controller, the method further includes: The operating status of the controller in the storage system is monitored to identify the faulty controller.
7. The method for cleaning cache data according to claim 3, characterized in that: The method further comprises: The device identification of the faulty controller is identified, and the device identifications of controllers in the storage system other than the faulty controller are collected and sorted to generate the device identification set.
8. The method for cleaning cache data according to claim 1, characterized in that: After adding the faulty controller that has repaired the fault to the first reorganized mirror pair to obtain a temporary mirror pair, the method further includes: The fault controller that controls the repair fault performs data mirroring with the transition controller.
9. The method for cleaning cache data according to claim 1, characterized in that: The method further comprises: If no concurrent failure occurs to the controller in the storage system, data cleaning is performed on the transition controller according to the data cleaning process.
10. The method for cleaning cache data according to claim 1, characterized in that: The step of adjusting the execution process of the data cleaning process according to the execution state information of the data cleaning process and the concurrent fault information of the concurrent fault controller where the concurrent fault occurs includes: Based on the execution status information, determining whether the transition controller starts to execute the data cleaning process; Before the data cleaning process is started, the mirror pair where the concurrent fault controller is located is mirrored and reorganized to obtain a second reorganized mirror pair; Based on the teaming information of the second recombined mirror pair, it is determined whether the transition controller belongs to the second recombined mirror pair to determine whether to continue to execute the data cleaning process.
11. The method for cleaning cache data according to claim 10, characterized in that: When the data cleaning process has begun to be executed, the method further includes: Based on the concurrent fault information, determining whether the transition controller is the concurrent fault controller; If the transition controller is the concurrent fault controller, then when the transition controller rejoins the mirror pair, the data cleaning process is re-executed on the transition controller; If the transition controller is not the concurrent fault controller, after executing the data cleaning process on the transition controller, data mirroring is performed on the transition controller, and the mirror pair where the concurrent fault controller is located is mirror reorganized to obtain a third reorganized mirror pair.
12. The method for cleaning cache data according to claim 11, characterized in that: The determining, based on the concurrent fault information, whether the transition controller is the concurrent fault controller includes: Based on the concurrent fault information, obtaining the device identification of the concurrent fault controller and the team information of the mirror pair to which it belongs; The device identification of the concurrent fault controller is compared with the device identification of the transition controller, and the team information of the mirror pair where the concurrent fault controller is located is compared with the team information of the temporary mirror pair where the transition controller is located to determine whether the transition controller is the concurrent fault controller.
13. The method for cleaning cache data according to claim 10, characterized in that: The mirror reorganization of the mirror pair where the concurrent fault controller is located to obtain a second reorganized mirror pair includes: According to the concurrent fault information, searching for teaming information of the first fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the first faulty mirror pair, determining whether the first faulty mirror pair is a temporary mirror pair for removing the transition controller, If the first faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain the second reconstituted mirror pair; If the first faulty mirror pair is not a temporary mirror pair after the transition controller is removed, a normal controller in the first faulty mirror pair is mirrored and reassembled with its adjacent controller to obtain the second reassembled mirror pair.
14. The method for cleaning cache data according to claim 13, characterized in that: The step of judging whether the transition controller belongs to the second recombined mirror pair based on the teaming information of the second recombined mirror pair to determine whether to continue to execute the data cleaning process includes: If the transition controller belongs to the second reorganized mirror pair, there is no need to continue to execute the data cleaning process for the transition controller in the second reorganized mirror pair; If the transition controller does not belong to the second recombined mirror pair, the data cleaning process continues to be performed on the transition controller that does not belong to the second recombined mirror pair.
15. The method for cleaning cache data according to claim 11, characterized in that: The mirror reorganization of the mirror pair where the concurrent fault controller is located to obtain a third reorganized mirror pair includes: According to the concurrent fault information, searching for teaming information of the second fault mirror pair where the concurrent fault controller is located; Based on the teaming information of the second faulty mirror pair, determining whether the second faulty mirror pair is a temporary mirror pair for removing the transition controller, If the second faulty mirror pair is a temporary mirror pair from which the transition controller is removed, the transition controller is pulled back into the temporary mirror pair and mirrored with a normal controller in the temporary mirror pair to obtain the third reconstituted mirror pair; If the second faulty mirror pair is not a temporary mirror pair after the transition controller is removed, the normal controller in the second faulty mirror pair is mirrored and reorganized with its adjacent controller to obtain the third reorganized mirror pair.
16. The method for cleaning cache data according to claim 11, characterized in that: The method further comprises: The status information of each mirror pair in the storage system is obtained, and the device identifier of the transition controller that needs to execute the data cleaning process is marked in each mirror pair.
17. A device for cleaning cache data, characterized in that: The device is applied to a storage system, and comprises: A reorganization unit, configured to replace a faulty controller in the storage system with a transition controller, so as to reorganize the mirror image of the initial mirror pair where the faulty controller is located, and obtain a first reorganized mirror pair; and to add the repaired faulty controller to the first reorganized mirror pair, and obtain a temporary mirror pair; A removal unit, configured to remove the transition controller from the temporary mirror pair after the repaired faulty controller completes data mirroring, and perform a data cleanup process on the transition controller; A first monitoring unit, configured to monitor whether a concurrent failure occurs in a controller in the storage system, and to monitor an execution status of the data cleaning process; An adjustment unit is used to adjust the execution process of the data cleaning process when a concurrent failure occurs in the controller in the storage system according to the execution status information of the data cleaning process and the concurrent failure information of the concurrent failure controller where the concurrent failure occurs; and perform data cleaning on the transition controller according to the adjusted data cleaning process.
18. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the cache data cleaning method described in any one of claims 1-16.
19. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the cache data cleaning method according to any one of claims 1-16.
20. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method for cleaning cache data according to any one of claims 1 to 16.
Citation Information
Patent Citations
Cache data processing method, device and equipment and readable storage medium
CN109491609A
Cache data processing method and system under four-control storage device fault
CN115237683A
Data caching method and device, equipment and storage medium
CN115563028A
Re-mirroring process processing method and device, electronic equipment and storage medium
CN116955005A
Cache mirror image management method, device and equipment and computer readable storage medium
CN117608482A
Cited By
Storage configuration adjustment method, storage medium, electronic equipment and program product
CN119902722A
Fault processing method of storage controller and electronic equipment
CN120803798A
Management method of storage system and electronic equipment
CN120872873A
Fault processing method of multi-control storage system and electronic equipment
CN120929313A
Cache data cleaning method and apparatus, and electronic device and storage medium
WO2026179185A1