Method for managing a storage system and electronic device
By establishing cache mirror pairs in the storage system and dynamically advancing the processing flow, the problem of business interruption caused by cache mirror pair anomalies was solved, the stability and data redundancy of the storage system were improved, and system performance was optimized.
Patent Information
- Application Number
- CN202511405803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In storage systems, when the storage controller of a cache mirror pair malfunctions, existing technologies can easily lead to caching service interruptions, affecting the stability of the storage system and data integrity.
By establishing cache mirror pairs in the storage system, the cache processing flow is dynamically advanced, ensuring cache data redundancy in abnormal situations, avoiding prolonged periods of inactivity, and optimizing the business reliability and data validity of the storage system through cache re-mirroring and cleanup mechanisms.
It reduces the impact of cache service interruptions on the storage system, improves data redundancy and system stability, and optimizes the performance and reliability of the storage system.
Smart Images

Figure CN120872873B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a management method of a storage system and an electronic device. BACKGROUND
[0002] When a storage system such as a server, a switch, a storage device, a PC (Personal Computer) and the like includes at least three storage controllers, a plurality of cache mirroring pairs can be formed. When a storage controller in a cache mirroring pair is in an abnormal running state such as a fault, a current cache service flow process of a service is usually maintained in a silent phase to interrupt the service of the cache mirroring pair to which the abnormal storage controller belongs. After the abnormal storage controller is recovered, the cache module triggers a subsequent phase of the service flow process when a storage system controller recovery event is received, so as to complete the recovery of the service. However, during the recovery of the storage controller, a problem of an abnormal storage system is prone to occur. SUMMARY
[0003] The present application provides a management method of a storage system and an electronic device, so as to at least solve the problem of the influence of cache remirroring process service interruption and recovery on the stability of a storage system in the related art.
[0004] The present application provides a management method of a storage system, the storage system including a cache module and at least three storage controllers connected with each other; the management method includes: performing cache mirroring pair formation on the storage controllers, and controlling the storage controllers to perform cache mirroring in the cache mirroring pair to which the storage controllers belong; in response to determining that the cache mirroring pair is an abnormal mirroring pair, controlling the storage system to be in a write blocking state, controlling the cache module to promote a complete service flow process of a current cache service to complete the service flow process, and dynamically promoting a cache processing flow; wherein the abnormal mirroring pair indicates that the running states of two storage controllers in the abnormal mirroring pair are both abnormal; in response to the storage system exiting the write blocking state, performing a cache processing flow of the current cache service according to current mirroring group queuing information; wherein the cache processing flow includes cache remirroring and / or cache cleaning.
[0005] The present application also provides an electronic device, the electronic device including: a memory and a processor; the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of any one of the management methods of the storage system.
[0006] By the present application, when the running states of the storage controllers in the cache mirror pair are both abnormal, that is, one of the storage controllers is abnormal, the cache processing procedure performed by the abnormal storage controller in the same mirror pair is superimposed, the control reasoning business process processing is performed to not interrupt the current cache business started, the risk that the current cache business is continuously in the silent stage and the input and output are not processed for a long time to affect the storage system is reduced, and the cache processing procedure is dynamically promoted in the process, the cache data redundancy can be further ensured through mirror pair synchronization and re-mirroring, thereby facilitating to reduce the data damage risk. Therefore, the technical problem of cache re-mirroring process business interruption and recovery affecting the stability of the storage system can be solved, the business reliability and data effectiveness are considered to improve, and the technical effect of optimizing the performance of the storage system can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0007] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0008] Figure 1 The application scenario diagram of the management method of the storage system of the present application is shown.
[0009] Figure 2 The structure diagram of the storage system of the present application is shown.
[0010] Figure 3 The flow diagram of the management method of the storage system of the present application is shown.
[0011] Figure 4 The structure diagram of the electronic equipment of the present application is shown. DETAILED DESCRIPTION
[0012] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0013] It should be noted that in the description of the present application, the term "comprising", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0014] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0015] In combination with the specific application environment architecture or specific hardware architecture on which the management method of the storage system depends, the specific application environment architecture or specific hardware architecture is described herein.
[0016] Please refer to Figure 1 and Figure 2 , Figure 1 is a schematic diagram of the application scenario of an embodiment of the management method of the storage system of the present application, Figure 2 is a structural schematic diagram of an embodiment of the storage system of the present application.
[0017] In an embodiment, the storage system can generally include a state machine and a business processing module. The state machine is used to obtain a business event notification, for example, it can be responsible for receiving the processing of events from the storage system, computer cluster, other modules or business processes, and can implement specific business processing of the module according to the situation of the event.
[0018] The state machine processing part can be divided into three stages, namely QAR, to realize the response of various events and notify the corresponding business process processing. QAR respectively represents quiesce (quiet phase), ack (acknowledgment phase) and resume (resume phase), and the switching of business process processing is completed by sequentially completing the three stages.
[0019] Specifically, when the state machine acquires the service event notification, it can be determined whether the mode and process of the specific service need to be switched. First, the state machine can execute the queise process, and notify the service processing module to suspend the service processing of the current stage through the delivery mechanism of the state machine and the service processing module. When the suspension of the service is completed, the state machine can switch the service mode according to the specific service event request content, complete the update of the mode data through the ack stage and pass it to the service end, complete the switching of the service mode in the service suspension stage, and then resume the service through the resume stage after the switching of the service mode is completed. The service processing module can notify the state machine to resume the service. In addition, if the service event is initiated through a storage system such as a cluster, the cluster module can be notified to complete the entire processing process, so as to achieve the purpose of safe switching of the service.
[0020] The storage system usually includes at least two storage controllers, and the cache mirroring is performed to realize the redundancy of the cache data, so as to guarantee the data security when a single storage controller fails. In order to further improve the data security, at least three storage controllers can be included in some storage systems, such as Figure 2 As exemplarily shown in the foregoing, one iogrp (transmission group) in the storage system can include four storage controllers. The four storage controllers can form four groups of cache mirroring pairs in a cyclic mirroring manner, such as Figure 2 As exemplarily shown in the foregoing, the same filled square is used to represent two cache mirrors of the same data, that is, the same mirroring pair. Correspondingly, the two storage controllers with the same filled square belong to the same cache mirroring pair. Among them, Figure 2 The cylinder in the foregoing can be regarded as a volume virtually formed by the transmission group.
[0021] In the related art, when the same mirroring pair storage controllers in the four-control (that is, four storage controllers) storage architecture fail at the same time, the storage system receives the cluster event of the storage controller failure, and performs the quiesce action to interrupt the service of the cache mirroring pair to which the failed storage controller belongs. At the same time, since there is no surviving storage controller in the dual-control cabinet storage system at this time, there is no service running for the cache mirroring pair, and therefore the cache module remains in the quiesce state. After the storage controller is restored, the cache module receives the cluster storage controller recovery event, triggers the ack and resume processes, and finally completes the recovery of the service.
[0022] When two storage controllers in a mirror pair fail, the cache module remains in the quiesce state until the storage controllers are restored, and then the service is restored. However, for a four-control storage system, when two storage controllers in a mirror pair fail, there are still other surviving storage controllers in the iogrp that were normally processing services before the storage controllers failed. Therefore, if the cache module remains in the quiesce state at this time, considering that the process flow between the modules in the IO stack may not be completely synchronized in time, and there are still surviving storage controllers at this time, the cache module may receive an IO issued by the upper layer after the quiesce flow ends. If the storage controllers are not restored in time, the storage system will have a more serious problem due to the long time of IO processing.
[0023] To solve the above technical problems existing in the related art, embodiments of the present application provide a storage system management method, which is described in detail in combination with the execution flow of the storage system management method.
[0024] Please refer to Figure 3 , Figure 3 The flowchart of an embodiment of the storage system management method of the present application is shown.
[0025] S101: Perform cache mirror pair construction on the storage controllers, and control the storage controllers to perform cache mirroring in the cache mirror pair to which the storage controllers belong.
[0026] In this embodiment, the storage system can include at least three storage controllers.
[0027] In this embodiment, the storage controllers can be constructed in cache mirror pairs, and two-by-two combinations are selected from at least three interconnected storage controllers according to preset strategies such as load balancing, physical location isolation, etc., to form a plurality of cache mirror pairs. The cache mirror pair is composed of two storage controllers, and the two storage controllers establish a dedicated data synchronization channel through an internal communication mechanism.
[0028] In addition, as Figure 2As shown in the examples, the storage controller can belong to two cache mirroring pairs, that is, the storage controller can store the cache mirror of another storage controller to form a cache mirroring pair, and the cache mirror of the storage controller can also be stored by another storage controller to form another cache mirroring pair. In other words, the two storage controllers in the same mirroring pair can be controlled to perform cache mirroring operations, that is, when the cache module of one of the storage controllers generates new data in a case such as receiving a write request, temporarily calculating a result, and the like, the new cache data can be mirrored to the cache of the other storage controller, ensuring that the cache contents of the two are completely consistent, to build a cache data redundancy mechanism, reduce the risk of cache data loss caused by single storage controller failure through mirroring pair synchronization, and also provide a basis for supporting business continuity in subsequent abnormal scenarios.
[0029] S102: In response to determining that the cache mirroring pair is an abnormal mirroring pair, controlling the storage system to be in a write blocking state, controlling the cache module to proceed with the complete business process processing of the current cache business to complete the business process processing, and dynamically proceeding with the cache processing flow; wherein the abnormal mirroring pair indicates that the running states of the two storage controllers in the mirroring pair are abnormal.
[0030] In this embodiment, when it is determined that a certain cache mirroring pair is an abnormal mirroring pair, that is, both storage controllers in the mirroring pair have running abnormalities and cannot normally perform cache synchronization and data processing, a targeted abnormal response mechanism is started. Generally, when one of the storage controllers in the cache mirroring pair has a running abnormality, the abnormal response mechanism of the storage system is performed. In this embodiment, the abnormal response mechanism can further consider the possibility of an abnormality, that is, the running abnormality of the other storage controller in the cache mirroring pair when one of the storage controllers has already run abnormally.
[0031] The entire storage system can be switched to a write blocking state, thereby suspending the reception of new write requests, reducing the risk of further confusion, loss, or inconsistency of cache data caused by new data writing in the case of both controllers in the cache mirroring pair being abnormal, and leaving a safe window for subsequent data protection and business processing.
[0032] Moreover, unlike the silent state in the related art, in this embodiment, the cache module is preferentially controlled to proceed with the complete business process processing of the current cache business that has been started, thereby facilitating the execution of cache tasks that have entered the processing flow before the abnormality occurs, reducing the risk of partial data not landing and even affecting the stability of the storage system caused by interruption of the business in the middle.
[0033] Meanwhile, the dynamic pushing cache processing flow can adjust the processing logic inside the cache in real time according to the current abnormal state, for example, recording the state snapshot of the current cache data, temporarily saving the incomplete synchronization information, marking the data block that needs to be recovered preferentially, dynamically confirming whether cache remirroring and / or cache cleaning is needed, and the like.
[0034] S103: in response to the storage system exiting the write blocking state, performing cache processing flow of the current cache service according to the current mirroring group queuing information; wherein the cache processing flow includes cache remirroring and / or cache cleaning.
[0035] In this embodiment, when the storage system exits the write blocking state, it can be considered that the problem of the double controller failure causing the blocking, such as the abnormal mirroring pair, has been alleviated, which can be that part of the controller is restored to normal, or a new controller is added to replace, or the system completes the mirroring group reconstruction, and the like, so that the cache processing flow of the current cache service can be performed according to the current mirroring group queuing information.
[0036] That is, in this embodiment, when the running state of the storage controller in the cache mirroring pair is abnormal, that is, the cache processing flow of one of the storage controllers is abnormal, the control reasoning service flow processing is added to the abnormal storage controller of the same mirroring pair, the current cache service is not interrupted, the risk that the input and output are not processed for a long time to affect the storage system is reduced when the current cache service is in the silent stage for a long time, and the cache processing flow is dynamically pushed in this process, which can further ensure the cache data redundancy through mirroring pair synchronization and remirroring, thereby reducing the risk of data damage, and further improving the business reliability and data effectiveness, so as to optimize the performance of the storage system.
[0037] The detailed management principles of the management method of the storage system of the present application are described by example in combination with the working principle of the storage system.
[0038] In an embodiment, the running state of the storage controller can be monitored; in response to the abnormal running state of the storage controller, it is determined as an abnormal controller and the cache mirroring pair to which it belongs is determined as an observation mirroring pair, and the other storage controller of the observation mirroring pair is determined as an observation controller.
[0039] The observation controller is selected to perform mirroring pair reconstruction with other storage controllers in the storage system, to form a new cache mirroring pair of the observation controller and perform cache data processing, wherein the cache data processing includes cache remirroring and cache cleaning; in response to the monitoring of the abnormal running state of the observation controller during the cache data processing, the two storage controllers of the observation mirroring pair are determined as abnormal controllers.
[0040] That is, the embodiment can take into account the quick repair of single-point exception and the accurate identification of double-point exception, form multi-level fault protection, and thus improve the response capability of the storage system to complex faults, that is, improve the fault-tolerant capability of the storage system. Moreover, the re-mirroring during reorganization ensures that the effective data is not lost, and the cleaning operation avoids interference of invalid data, thus ensuring the consistency and integrity of the cache data, thereby facilitating the realization of data reliability enhancement. The storage system is also endowed with system self-healing capability, which can complete the exception determination, mirror reorganization and data adaptation without manual intervention, shorten the fault recovery time, and reduce the operation and maintenance cost. In the exception handling process, the mirror redundancy mechanism can also be maintained to reduce the impact on the upper-layer business, thereby facilitating the guarantee of business continuity.
[0041] The following takes the exception controller for the cache mirror of the storage observation controller as an example to illustrate the detailed working principle of forming a new cache mirror pair of the observation controller and processing the cache data.
[0042] Specifically, the other storage controller that constitutes the new cache mirror pair can be taken as a cache receiving controller.
[0043] Triggering cache re-mirroring to control the cache receiving controller to store the cache mirror of the observation controller.
[0044] In response to the completion of cache mirror receiving by the cache receiving controller, triggering cache cleaning to clean the cache mirror of the observation controller stored in the exception controller.
[0045] As can be seen, in the embodiment, the old data is cleaned after the new mirror data is confirmed to be complete, which can take into account the guarantee of data security and the timeliness of releasing invalid resources, thereby facilitating the improvement of cache utilization.
[0046] As described in the foregoing, in the embodiment, the situation of superimposing new storage controller faults in cache re-mirroring can be concerned, that is, under normal circumstances, when an exception controller appears, cache re-mirroring and cache cleaning can be performed in the above-mentioned manner. However, in the embodiment, further consideration is given to the situation that a storage controller exception may further occur in this process, so when the cache re-mirroring process superimposes the storage controller fault of the same mirror pair, the storage system management can be performed in the manner of steps S102 to S103 as illustrated in the foregoing. That is, the current cache business process of the complete business process can be promoted and the cache processing process can be dynamically promoted.
[0047] Specifically, dynamically promoting the cache processing process can identify the current cache processing process of the exception mirror pair.
[0048] In response to the current cache processing process of the exception mirror pair being cache re-mirroring, whether to perform cache data synchronization can be selectively controlled according to the current state of the cache receiving controller.
[0049] The current cache processing procedure in response to the abnormal mirror pair is cache cleaning, which can adaptively control whether to trigger cache cleaning before the cache cleaning is started according to whether the abnormal time is earlier than the abnormal time, wherein the abnormal time represents the later time of the abnormal time of the two storage controllers in the abnormal mirror pair.
[0050] It can be considered that in the embodiment, the re-mirroring is regulated by adapting the cache receiving controller state, so as to reduce the occurrence of invalid synchronization, and the necessity of cleaning can be judged based on the abnormal time, the cache processing efficiency can be improved by reducing redundant operations, thereby facilitating to improve the efficiency of the storage system management process. It can also reduce data damage caused by forced synchronization when the cache receiving end is unstable, reduce the possibility of cleaning the effective data that may be left after the abnormality, and can be beneficial to further protect the data integrity. In addition, the process can also be dynamically adjusted according to the real-time state, so that the cache processing is more suitable for the actual running scene, reduces the failure risk of rigid process under complex abnormality, improves the overall adaptability of the system, and further optimizes the performance of the storage system.
[0051] The various cache processing procedures are detailed below.
[0052] The following describes the case of the abnormality of the same mirror pair storage controller superimposed on the cache re-mirroring stage in detail.
[0053] In this embodiment, in response to the current cache receiving controller being in an online state, the cache receiving controller is controlled not to perform service processing of the current cache service, and waits for the storage system to exit the write blocking state. In response to the storage system triggering cache re-mirroring, the new cache mirror is overlaid on the cached data of the cache receiving controller.
[0054] In response to the current cache receiving controller being in an offline state, the cache receiving controller is monitored, and when the cache receiving controller recovers to an online state, the cache receiving controller is initialized. In response to completing the cache initialization, the cache re-mirroring is re-initiated, and the cache receiving controller performs cache data synchronization.
[0055] In detail, in the embodiment, whether the cache receiving controller is online is further refined and managed. Specifically, when the cache receiving controller is online, the service can be paused and the data can be overwritten, reducing the repeated synchronization situation; when the cache receiving controller is offline, initialization and blank synchronization are performed, reducing the risk of repeated cache mirroring caused by dirty data, improving the cache processing efficiency, and also being beneficial to eliminating the interference of historical data and new service data on the repeated mirroring, thereby improving the consistency of the cache data of the new mirror pair. The differentiated steps designed for different states can also reduce the risk of process jamming and data transmission failure caused by state mismatch, which can be beneficial to reducing the number of system abnormal retries, and further improving the performance of the storage system.
[0056] In general, when the four-control storage system fails or the storage controller recovers, the cache module triggers cache data mirroring. At this time, if single storage controller or multiple storage controller failure occurs again, triggering the same mirror pair storage controller simultaneous or continuous failure scenario, there is a risk of affecting the cache data mirroring process. Therefore, in the embodiment, this scenario is processed.
[0057] When the cache module triggers cache data mirroring due to storage controller events, the same mirror pair storage controller fails simultaneously due to superimposed storage controller failure. At this time, the two storage controllers of the abnormal mirror pair are abnormal, and they are data storage controllers of the same mirror pair. Therefore, there is no effective data storage controller in the abnormal mirror pair, and it can be considered that the cache data mirroring initiation storage controller is offline at this time. The cache data mirroring process is stopped, and the cache module state machine completes the quiesce, ack, and resume phases in sequence according to the stall (write blocking) state process, that is, completes the complete service process, reduces the risk of affecting the storage system due to continuous stay in the quiesce phase, and improves the reliability of the storage system to further optimize the performance of the storage system.
[0058] In the data mirroring phase, the storage controller newly established as a cache mirror pair by the observation controller is used as a cache receiving controller. If the cache receiving controller is online at this time, the storage controller does not perform any service processing before the cluster exits the stall state due to storage controller recovery; after the cluster exits the stall state due to storage controller recovery, the cache data mirroring process is retriggered through the cache module state machine control, and the cache data of the storage controller of the mirror pair is synchronized through data overwriting, thereby completing the entire cache data mirroring process.
[0059] If the cache receiving controller is not online at this time, when the storage controller recovers online again, because the storage controller before the failure did not complete the synchronization of the cache data, the storage controller in the cache module does not belong to the effective storage controller of the mirror pair, so during the initialization phase of the storage controller recovery, the cache data cleaning process is triggered, and part of the cache data received by the storage controller before the failure is cleaned, and then after the cluster exits the stall state, according to the latest cluster mirror pair team information, the cache data remirroring process is reinitiated, and the cache module data synchronization process is completed.
[0060] The following describes the cache cleaning phase superimposed with the mirror pair storage controller exception in detail.
[0061] As described in the foregoing, the time sequence of the exception moment and the cache cleaning start moment can also be dynamically considered during the process.
[0062] In the storage controller recovery process of the storage system, the cache module adopts a three-copy mechanism of the controller recovery process, that is, the same cache data is stored in two storage controllers of the original cache mirror pair, which is two copies; when the storage controller in the original cache mirror pair is abnormal, the cache remirroring phase is entered, and the cache data is written to another storage controller of the newly formed cache mirror pair as a third copy. After the cache remirroring phase, there are three copies of the cache mirror, and after the cache data synchronization is completed, the double-copy is switched according to the cluster mirror pair team information, and the controller removed in the second phase needs to perform data cleaning, that is, discard operation, on the cache data belonging to the mirror pair. The discard operation is superimposed with the mirror pair controller failure scenario.
[0063] The following describes the management principle of the discard (that is, cache cleaning) process superimposed with the mirror pair controller failure before the process is started.
[0064] In this embodiment, in response to the exception moment being earlier than the cache cleaning start moment, the storage controller to be executed for cache cleaning is taken as a to-be-cleaned controller.
[0065] The current running state of the to-be-cleaned controller is identified to adapt to whether the to-be-cleaned controller is currently abnormal, and whether the cache cleaning of the to-be-cleaned controller is dynamically controlled to be retriggered.
[0066] Specifically, the business process processing includes a silent phase, a confirmation phase, and a recovery phase.
[0067] The current running state of the to-be-cleaned controller is identified to adapt to whether the to-be-cleaned controller is abnormal currently, and whether the cache cleaning of the to-be-cleaned controller is retriggered dynamically. In this way, the controller sequence of the to-be-cleaned cache image stored in the cache module can be obtained. The controller sequence is matched with the image acquisition time sequence of the three storage controllers storing the to-be-cleaned cache image.
[0068] The storage controller at the intermediate position in the controller sequence can be taken as the to-be-cleaned controller. The current running state of the to-be-cleaned controller is obtained.
[0069] In response to the current running state of the to-be-cleaned controller being abnormal and the to-be-cleaned controller being offline, it is determined that no additional cache cleaning is needed.
[0070] In response to the current running state of the to-be-cleaned controller being normal, the storage system being in a write blocking state, and the business process being in a confirmation stage, the cache cleaning of the to-be-cleaned controller is triggered.
[0071] It can be seen that in the embodiment, the storage controller node at the intermediate position can be selected and the state can be determined. The to-be-cleaned controller is determined by clear rules, which is beneficial to guarantee that the cleaning object is the real redundant cache data. Moreover, the cache cleaning in the write blocking state and the confirmation stage is clearly constrained, which can isolate new data interference and avoid the business core processing period, thereby being beneficial to reduce the influence of cleaning on the business, so as to be beneficial to guarantee the business security. Moreover, the invalid cleaning is not performed on the abnormal offline controller, which can reduce the system idling operation, thereby optimizing the resource efficiency, further enhancing the stability and resource utilization rate of the storage system, and further realizing the optimization of the storage system performance.
[0072] In a simple way, since the three-copy phase cache data synchronization process has ended, the cluster has switched the image pair group information to the double-copy mode, and therefore the storage controller removed from the three-copy image pair must complete the cache data cleaning, otherwise the residual old data will exist the risk of data inconsistency. Therefore, the specific fault storage controller can be further divided into the following two cases.
[0073] When the storage controller that needs to perform the discard process fails, the storage controller has already failed to exit, and when the storage controller recovers again, the cleaning of invalid cache data is performed in the initialization phase, so in the stall state processing flow after the failure, no additional processing is needed for the discard process that has not been initiated, that is, in the embodiment, the necessity of the cache cleaning operation can be identified again, so that when the cache cleaning can be implemented through initialization, no additional cache cleaning is performed, so as to further improve the performance of the storage system, and the necessity of cache cleaning is identified to optimize the operation simplicity of the storage system.
[0074] When the storage controller that needs to perform the discard process does not fail, the storage controller needs to be re-initiated to trigger the discard operation in the stall flow. The number of online storage controllers of the mirror pair saved by the cache module is still 3, and the number of online storage controllers in the latest cluster mirror pair is 2, so it is considered that the discard process can be re-initiated. For example, the controller sequence can include pos0, pos1, and pos2 positions, when the cluster three-copy mode is switched to the double-copy mode, the removed storage controller in the mirror pair is the storage controller at the second position of the three storage controllers, that is, the Pos1 position, and the other two storage controllers correspond to the Pos0 and Pos2 positions. Therefore, it can be determined whether the storage controller corresponding to the pos1 position of the mirror pair saved by the cache module is still a valid storage controller of the cluster at this time. If the storage controller corresponding to the pos1 position is still a valid storage controller of the cluster at this time, it indicates that the discard action needs to be performed on the previous Pos1 storage controller in the mirror pair, and the process has not been initiated in time. At this time, the trigger action of the process needs to be supplemented in the ack flow of the stall, so that the cache module data consistency can be effectively ensured.
[0075] The following is an example of the management principle of the discard (i.e., cache cleaning) process after the mirror pair controller failure.
[0076] In response to the abnormal time being later than the cache cleaning start time, the current running state of the controller to be cleaned is obtained.
[0077] In response to the abnormal current running state of the controller to be cleaned and the offline state, it is determined that no additional cache cleaning is needed.
[0078] In response to the normal current running state of the controller to be cleaned, the cache cleaning is promoted, and based on the time relationship between the storage system exiting the write blocking state and the cache cleaning completion time, it is determined whether to trigger the state machine.
[0079] Furthermore, in response to the storage system exiting the write blocking state, a command to resume cache services is sent to the cache module.
[0080] Get the cache cleanup flag within the cache module.
[0081] In response to the cache cleanup flag indicating that cache cleanup is not complete, wait for cache cleanup and monitor whether the cache cleanup flag is updated to indicate that cache cleanup is complete.
[0082] In response to the cache cleanup flag indicating that cache cleanup is complete, the state machine is triggered to run in order to complete the state synchronization of the storage controller within the storage system and the recovery of cache services.
[0083] This implementation example demonstrates a design that differentiates between the timing of anomalies and cache cleanup initiation, specifically addressing scenarios where anomalies occur before cleanup begins. This reduces process failures caused by timing discrepancies. Furthermore, the cache cleanup flag checking and waiting mechanism ensures cleanup is completed before business recovery, mitigating the risk of data conflicts between old and new data. Utilizing a state machine for controller state synchronization reduces the impact of local state deviations on overall business collaboration, ensuring the stability of the storage system after recovery. This, in turn, improves the global consistency of the storage system state and further optimizes storage system performance.
[0084] In layman's terms, after the discard process is initiated, the mirror pair controller fails, which can also be divided into the following two situations based on the controller at the point of failure.
[0085] When the storage controller executing the discard process fails during the stacking of the same image pair, since the storage controller has already exited due to the failure, and invalid cached data will be cleaned up during the initialization phase when the storage controller recovers, no additional processing is required for the discard process that was not initiated in the stall process after the failure.
[0086] When the discard process is executed in the storage controller that is not failed in the mirror pair of storage controllers, the cache data discard process will not be interrupted by the storage controller event and the quiesce process, so when the storage system enters the stall state due to the continuous failure of the mirror pair of storage controllers, the cache module completes the ack-resume operation according to the normal stall process, at this time, the discard process continues to proceed without being affected. If the discard process is completed before the storage system exits the stall due to the recovery of the storage controller, it is processed according to the normal process; if the storage system exits the stall and notifies the cache module to resume the business, the discard process is not completed, and the flag indicating whether the discard in the cache module is completed is identified, the discard process is first completed, and the state machine is triggered again to complete the synchronization of the storage controller state of the storage system and the recovery and processing of the cache business.
[0087] Further, a load prediction model can be introduced to dynamically reorganize the cache mirror pair according to the predicted load of the storage controller, which is conducive to the adaptive adjustment of the cache mirror pair. For example, the load of the storage controller can be predicted in combination with historical load data, business transmission data volume characteristics, hardware health degree, etc. of the storage controller, so as to facilitate the dynamic change of the cache mirror pair topology with the business and hardware state, and take into account the continuity of cache synchronization and data consistency. At the same time, it can also help to pre-knowledge the abnormal situation of the storage controller, and timely control to reduce the risk of abnormal controller from the source.
[0088] For example, the controller utilization rate, cache hit rate, IO (input / output) response delay, hardware temperature, etc. of each storage controller can be collected in real time, and the load prediction model can be used to predict the load peak of the storage controller in the future target time period, so as to identify the potential overloaded controller and idle controller.
[0089] When it is predicted that the load of the main controller (i.e. the storage controller that originally obtains cache data) in the cache mirror pair will exceed the load threshold (such as 75%, 80%, 85%, etc.), the mirror pair can be split and reorganized, and the storage controller with lower load in the original mirror pair and the idle controller can be organized into a new mirror pair, and the original main controller can be reorganized with another low-load controller to ensure that the load difference of the new mirror pair is less than the difference threshold (such as 10%, 15%, 17%, etc.). When the current health degree of the storage controller hardware is lower than the health degree threshold, it is preferred to remove it from the cache mirror pair and replace it with a backup controller, and trigger incremental remirroring to synchronize only the undamaged data, so as to reduce the amount of data migration. For example, the health degree can be represented by the hard disk bad track rate, etc.
[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software necessary for a general hardware platform, and of course can also be realized by hardware, but in many cases the former is a better embodiment.
[0091] Embodiments of the present application also provide a management device of a storage system.
[0092] The description of the features in the embodiments of the management device of the storage system can refer to the related description of the embodiments of the management method of the storage system, which will not be repeated here.
[0093] Embodiments of the present application also provide an electronic device. Please refer to Figure 4 , Figure 4 The structure diagram of an embodiment of the electronic device of the present application.
[0094] In an embodiment, the electronic device includes a memory 11 and a processor 12, the memory 11 stores a computer program, and the processor 12 is configured to run the computer program to perform the steps in any of the above embodiments of the management method of the storage system.
[0095] For example, the electronic device can be a server. The electronic device includes a processor, a memory, a network interface and a database connected by a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a management method of a storage system.
[0096] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to run to perform the steps in any of the above embodiments of the management method of the storage system.
[0097] In an exemplary embodiment, the above computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0098] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program realizes the steps in the management method of the storage system when executed by a processor.
[0099] The embodiment of the present application further provides another computer program product, which comprises a nonvolatile computer readable storage medium, and the nonvolatile computer readable storage medium stores a computer program, and the computer program realizes the steps in the management method of the storage system when executed by a processor.
[0100] Those skilled in the art can further understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0101] The above describes in detail the management method of the storage system and the electronic device provided by the present application. The principles and implementation manners of the present application are described by applying specific examples herein. The above description of the embodiments is only applicable to help understand the method of the present application and its core idea. It should be pointed out that those skilled in the art can make some improvements and modifications to the present application without departing from the principles of the present application. These improvements and modifications also fall within the protection scope of the present application.
Claims
1. A management method of a storage system, characterized by, The storage system comprises a cache module and at least three storage controllers connected with each other; the management method comprises: performing cache mirroring on the storage controllers, and controlling the storage controllers to perform cache mirroring in the cache mirroring pairs to which the storage controllers belong; in response to determining that the cache mirroring pair is an abnormal mirroring pair, controlling the storage system to be in a write blocking state, controlling the cache module to complete a service flow processing of a current cache service and dynamically promote a cache processing flow; wherein the abnormal mirroring pair means that the running states of the two storage controllers in the abnormal mirroring pair are both abnormal; the service flow processing comprises a silent phase, a confirmation phase and a recovery phase; in response to the storage system exiting the write blocking state, performing a cache processing flow of the current cache service according to current mirroring group queuing information; wherein the cache processing flow comprises cache re-mirroring and / or cache cleaning; the dynamic promotion of the cache processing flow comprises: identifying a current cache processing flow of the abnormal mirroring pair; in response to the current cache processing flow of the abnormal mirroring pair being the cache re-mirroring, selectively controlling whether to perform cache data synchronization according to a current state of a cache receiving controller; in response to the current cache processing flow of the abnormal mirroring pair being the cache cleaning, selectively triggering cache cleaning according to whether an abnormal time is earlier than a cache cleaning start time; wherein the abnormal time means a later time of the abnormal time of the two storage controllers in the abnormal mirroring pair.
2. The management method according to claim 1, characterized in that, the selective control of whether to perform cache data synchronization according to the current state of the cache receiving controller comprises: in response to the cache receiving controller being in an online state, controlling the cache receiving controller not to perform service processing of the current cache service; waiting for the storage system to exit the write blocking state; in response to the storage system triggering cache re-mirroring, covering new cache mirroring on cached data of the cache receiving controller; in response to the cache receiving controller being in an offline state, monitoring the cache receiving controller, performing cache initialization on the cache receiving controller when the cache receiving controller returns to the online state, reinitiating cache re-mirroring in response to completing the cache initialization, and causing the cache receiving controller to perform cache data synchronization.
3. The management method according to claim 1, characterized by, the selective triggering of cache cleaning according to whether the abnormal time is earlier than the cache cleaning start time comprises: in response to the abnormal time being earlier than the cache cleaning start time, taking a storage controller to be cleaned as a to-be-cleaned controller; identifying whether a current running state of the to-be-cleaned controller is abnormal, so as to dynamically control whether to retrigger cache cleaning of the to-be-cleaned controller according to whether the to-be-cleaned controller is currently abnormal.
4. The management method according to claim 3, characterized in that, the identification of whether the current running state of the to-be-cleaned controller is abnormal, so as to dynamically control whether to retrigger cache cleaning of the to-be-cleaned controller according to whether the to-be-cleaned controller is currently abnormal comprises: acquire a controller sequence of the cache module storing the to-be-cleaned cache image; wherein the controller sequence matches with the sequence of the image acquisition time of the three storage controllers storing the to-be-cleaned cache image; take the storage controller at the middle position of the controller sequence as the to-be-cleaned controller; acquire the current running state of the to-be-cleaned controller; in response to the current running state of the to-be-cleaned controller being abnormal and the to-be-cleaned controller being in an offline state, determine that no additional cache cleaning is needed for the to-be-cleaned controller; in response to the current running state of the to-be-cleaned controller being normal, trigger cache cleaning of the to-be-cleaned controller when the storage system is in a write blocking state and the business process processing is in the confirmation stage.
5. The management method according to claim 1, characterized by, The adaptive abnormal time selectively controls whether to trigger cache cleaning before cache cleaning starts, which further includes: in response to the abnormal time being later than the cache cleaning start time, acquire the current running state of the to-be-cleaned controller; in response to the current running state of the to-be-cleaned controller being abnormal and the to-be-cleaned controller being in an offline state, determine that no additional cache cleaning is needed for the to-be-cleaned controller; in response to the current running state of the to-be-cleaned controller being normal, advance cache cleaning, and determine whether to trigger the state machine based on the time relationship between the storage system exiting the write blocking state and the cache cleaning completion time.
6. The management method according to claim 5, characterized in that, The determination whether to trigger cache cleaning of the to-be-cleaned controller based on the time relationship between the storage system exiting the write blocking state and the cache cleaning completion time includes: in response to the storage system exiting the write blocking state, send a cache business resuming instruction to the cache module; acquire a cache cleaning identifier in the cache module; in response to the cache cleaning identifier indicating that cache cleaning is not completed, wait for cache cleaning and monitor whether the cache cleaning identifier is updated to indicate that cache cleaning is completed; in response to the cache cleaning identifier indicating that cache cleaning is completed, trigger the state machine to run to complete the storage controller state synchronization and cache business resuming processing in the storage system.
7. The management method according to claim 1, characterized by, The determination of the two storage controllers in the cache image pair as abnormal controllers before the determination includes: monitor the running state of the storage controller; in response to the running state of the storage controller being abnormal, determine the storage controller as an abnormal controller and take the cache image pair to which the abnormal controller belongs as an observation image pair, and take the other storage controller of the observation image pair as an observation controller; select other storage controllers in the storage system to reorganize the mirror image pair of the observation controller, form a new cache image pair of the observation controller, and perform cache data processing; wherein the cache data processing includes cache re-imaging and cache cleaning; in response to the cache data processing process monitoring the running state of the observation controller being abnormal, determine that the two storage controllers of the observation image pair are abnormal controllers.
8. The management method according to claim 7, characterized in that, in response to the abnormal controller being used to store the cache image of the observation controller, the forming of the new cache image pair of the observation controller and the cache data processing include: taking the other storage controllers constituting the new cache image pair as cache receiving controllers; triggering a cache flush to flush the cache mirror of the observation controller stored in the exception controller in response to the cache receiving controller completing cache mirror reception. triggering a cache flush to flush the cache mirror of the observation controller stored in the exception controller in response to the cache receiving controller completing cache mirror reception.
9. An electronic device, comprising: The electronic device comprises: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the management method of the storage system according to any one of claims 1 to 8.
Citation Information
Patent Citations
Controller cache method, storage controller and multi-controller storage system
CN106775472A
Data processing method and device, electronic equipment and storage medium
CN117093141A