Dual-active NAS (Network Attached Storage) and SAN (Storage Area Network) switching control method based on multi-path redundant link
By identifying and configuring heterogeneous protocol paths in critical business areas such as finance and healthcare, assessing health in real time, and coordinating the switching between NAS and SAN, the system solves the problems of misjudgment and data consistency in the switching control of multi-path redundant links, and achieves a storage system with high availability and fast response.
Patent Information
- Application Number
- CN202510885372.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-07
AI Technical Summary
In critical business areas such as finance and healthcare, existing technologies for switching control of multi-path redundant links are prone to misjudgment, leading to erroneous switching when non-critical paths fail, causing business jitter and data consistency issues, and failing to meet high availability and response time requirements.
By identifying all physical paths from the host to the dual-active storage system, configuring heterogeneous protocol paths, assessing path health in real time, adopting dynamic health assessment and arbitration strategies, freezing associated resources, and coordinating the switching between NAS and SAN, data consistency and business continuity are ensured.
It reduces false positives, improves the accuracy of path switching and system fault tolerance, prevents data corruption, meets the response time requirements of highly sensitive business areas, and ensures high availability and data consistency.
Smart Images

Figure CN120915718A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage system high availability, and in particular to a dual-active NAS and SAN switching control method based on multi-path redundant links. BACKGROUND
[0002] In the financial, medical and other critical business fields, dual-active storage systems provide high availability services through NAS (Network Attached Storage) and SAN (Storage Area Network) coexistence architecture. The multi-path redundant link technology is the core foundation to ensure business continuity, which connects the host and storage devices through multiple physical paths to ensure automatic switching in the event of a single point failure. However, the existing technology has the following essential defects that restrict system reliability:
[0003] The traditional multi-path software (such as Linux DM-MPIO) uses a single path detection model: only monitors the connectivity state of a single path (such as through SCSI command timeout judgment). This model has a serious risk of misjudgment:
[0004] When a non-critical path fails (such as a secondary bandwidth path in a redundant link is interrupted), even if the main path is healthy, the system will still trigger unnecessary switching, causing business jitter;
[0005] The redundancy effectiveness of path combinations is not considered: for example, when two paths actually pass through the same switch core board card, their redundancy may be simultaneously invalidated due to a single board failure, but the existing technology still considers them as valid backups.
[0006] Industry impact: In the context of millisecond-level response in securities trading systems and other scenarios, the business interruption caused by mis-switching can reach seconds, violating the regulatory requirement of RTO < 50ms in the financial industry.
[0007] In addition, the current solution implements separate switching control for NAS file storage and SAN block storage, and SAN switching relies on SCSIPR (Persistent Reservation) protocol to isolate LUN access, and NAS switching implements file session migration through client redirection;
[0008] Critical defect: When associated resources exist across protocols (such as database SAN block devices and transaction log NAS directories), independent switching will destroy data consistency, and more than 60% of Oracle RAC deployments in hybrid cloud architectures use SAN+NAS hybrid storage, which directly leads to 2.3 times of core business data logical damage per year:
[0009] Therefore, there is an urgent need for a dual-active NAS and SAN switching control method based on multi-path redundant links to solve the above problems. SUMMARY
[0010] Based on the above purpose, the application provides a kind of based on the dual-active NAS and SAN switching control method of multi-path redundant link, comprising the following steps:
[0011] Step 1: redundant path topology construction, identify all physical paths from host to dual-active storage system, configure at least two heterogeneous protocol paths through different network switch devices for each storage logical unit;
[0012] Step 2: dynamic health assessment, real-time acquisition of path delay, packet loss rate and error event data, calculate redundant path set health, normalize and weight single path indicators, set health = optimal single path score × health path proportion + protocol difference compensation value;
[0013] Step 3: cross-protocol collaborative switching trigger, when health is lower than dynamic threshold, if there are NAS-SAN associated resources, freeze associated storage resources and suspend application write;
[0014] Step 4: arbitration switching execution, select arbitration strategy according to health, use majority node fast voting arbitration when health is high, use full node pessimistic lock arbitration when health is low, and execute synchronization after arbitration:
[0015] SAN path switching: activate standby port and update host path weight;
[0016] NAS session migration: transfer file access session through protocol mechanism;
[0017] Step 5: back control, when the original path health is continuously better than dynamic threshold, unfreeze and update evaluation baseline.
[0018] Preferably, the configuration of heterogeneous protocol path in step 1 specifically includes:
[0019] Identify the physical connection relationship between host HBA port and storage front-end port, and obtain switch hop information through link layer discovery protocol;
[0020] Configure FC and iSCSI dual-protocol paths for SAN logical unit, and the physical links of each path do not share the same switch power module;
[0021] Configure NFS and CIFS dual-protocol paths for NAS file system, and the network interface cards of each path are located in different physical slots.
[0022] Preferably, the generation of protocol difference compensation value in step 2 includes:
[0023] Establish protocol reliability level table: FC protocol is the highest level, iSCSI is the second, NFS and CIFS are the basic level;
[0024] Detecting the presence of different levels of protocols in the path set:
[0025] When the highest level protocol is included, increase the base compensation value;
[0026] When the highest level and the lower level protocol exist at the same time, increase the compensation value by the proportion of the level difference;
[0027] The upper limit of the compensation value does not exceed the set proportion of the health path.
[0028] Preferably, the setting of the dynamic threshold of step 3 is achieved by the following process:
[0029] Collecting port queue depth and CPU utilization from network switching equipment in real time;
[0030] Calculating the network load coefficient: normalizing the queue depth and CPU utilization and then weighted sum, the weight is matched from the preset configuration library according to the device model;
[0031] Dynamic threshold = initial baseline threshold × (1-network load coefficient adjustment factor), wherein the adjustment factor is positively correlated with the load coefficient.
[0032] Preferably, the identification and freezing of NAS-SAN associated resources in step 3 includes:
[0033] Analyzing the metadata tag of the storage logical unit, if the tag contains cross-protocol dependency identification, it is determined as an associated resource;
[0034] The freezing operation is specifically implemented:
[0035] Send SCSI persistent reservation command to lock logical unit write operation to SAN storage controller;
[0036] Send file system snapshot creation instruction to NAS storage to lock the current state;
[0037] Pause the commit request of the database service through the application agent.
[0038] Preferably, the pessimistic lock arbitration in step 4 when the health degree is low also includes:
[0039] Storage controller cache consistency check:
[0040] Read the latest data block sequence number from the non-volatile cache of the dual-active storage node;
[0041] Compare the sequence number difference through an independent arbitration network;
[0042] If the difference exceeds the safety water level, delay the switchover until synchronization is completed;
[0043] After the arbitration is passed, grant the master node authority to the storage node with higher health degree.
[0044] Preferably, the SAN path switching of step 4 further comprises:
[0045] Path weight updating operation:
[0046] Close the SCSI target port login state of the failure path;
[0047] Recalculate the multi-path IO scheduling weight based on the path health history data;
[0048] Inject an asynchronous event notification to the host HBA driver to refresh the path mapping table.
[0049] Preferably, the specific implementation of the NAS session migration of step 4 comprises:
[0050] For NFSv4.1 and above version clients:
[0051] Initiate a SEQUENCE operation synchronization session state;
[0052] Migrate the file handle through the BACKCHANNEL_CTL callback channel;
[0053] For CIFS clients:
[0054] Send a SESSION_SETUP command to rebuild the authentication session;
[0055] Synchronize the uncommitted write operation by using the DFSR replication protocol.
[0056] Preferably, the back control of step 5 specifically comprises:
[0057] Record the duration of the path health degree returning to the stable state in the historical switching event;
[0058] Calculate the average recovery time: the weighted average value after excluding network abnormal events;
[0059] Set the number of continuous monitoring periods = average recovery time / health degree sampling interval, and the minimum period is 3. Preferably, the configuration of the heterogeneous protocol path further comprises failure isolation, specifically comprising:
[0060] Configure protocol isolation strategies at the switch port: allocate independent virtual channels for FC and iSCSI traffic; automatically enable protocol firewall to block cross-protocol broadcast storm when the path fails;
[0061] The storage controller implements bandwidth reservation on the heterogeneous path to ensure that the switching channel is smooth.
[0062] Advantages of the present application:
[0063] 1、The application comprehensively considers the time delay, packet loss rate and error event data of the path through dynamic health assessment, and no longer simply relies on the state of a single path. This multi-dimensional evaluation mechanism greatly reduces the possibility of misjudgment, ensures the accuracy of path switching decision, and avoids unnecessary service interruption due to non-critical path failure.
[0064] 2、In the redundant path topology construction, the application clearly stipulates that each path passes through different switching devices, thereby avoiding the problem of insufficient path redundancy. In addition, the generation of protocol difference compensation value adjusts the path health assessment according to the protocol reliability level, so that even the combination of different protocol paths can be effectively judged, and the fault tolerance of the system is improved.
[0065] 3、The application combines redundant path topology construction and dynamic health assessment to ensure the diversity of the path and the comprehensiveness of the health assessment, thereby preventing single point failure from affecting the entire system due to insufficient redundancy of path combination.
[0066] 4、The application freezes the associated storage resources and suspends the application write in the cross-protocol cooperative switching trigger, ensuring that the cross-protocol storage resources can be processed synchronously during the switching process, and avoiding the data consistency problem. Through this coordination control mechanism, data damage caused by independent switching of SAN and NAS can be avoided, and the cooperative work of cross-protocol resources in the hybrid storage architecture is ensured.
[0067] 5、The application realizes more accurate switching decision through back switching control and dynamic threshold setting. When the path health degree recovers to above the dynamic threshold, the system will automatically back switch to the original path, avoiding service interruption caused by frequent switching. In addition, the combination of dynamic threshold setting and network load coefficient adjustment factor can respond to load changes in real time, thereby realizing millisecond-level fast response and meeting the strict requirements of financial and other high-sensitive business fields on business continuity and response time. BRIEF DESCRIPTION OF DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0069] Fig. 1 The step flow chart of the method of the application;
[0070] Fig. 2 The step flow chart of the configuration of the heterogeneous protocol path of step 1 of the method of the application;
[0071] Fig. 3A flow chart of the step of generating a protocol difference compensation value for the method step 2 of the present application. DETAILED DESCRIPTION
[0072] The present application will be described in detail below with reference to the drawings and specific embodiments. It should be noted that the following embodiments are the best, preferred embodiments, and other alternative embodiments can also be implemented by those skilled in the art for some known technologies; and the drawings are only used to more specifically describe the embodiments, and are not intended to specifically limit the present application.
[0073] Referring to Figs. 1-3 The embodiment of the present application provides a dual-active NAS and SAN switching control method based on a multi-path redundant link. In step 1, all physical paths between the host and the dual-active storage system need to be identified, including the physical links on all network switching devices. In this process, at least two heterogeneous protocol paths through different network switching devices are configured for each storage logical unit (LUN) to ensure the effectiveness of the redundant link. When implemented, the network administrator can use a storage network topology discovery tool to automatically identify the paths and allocate the paths according to the needs of the storage device and the host. In some cases, the selection of the paths needs to ensure that each path passes through different physical switching devices (such as core switches and edge switches), thereby effectively avoiding the failure of a single switching device to cause the failure of all paths.
[0074] Through the design of the redundant path topology, the system can ensure that when one path fails, the other paths can still effectively provide services, thereby improving the overall availability of the system and ensuring a high-reliability connection between the host and the storage.
[0075] In step 2, the system monitors the running state of the paths in real time, collects the time delay, packet loss rate, and error event data of each path. For the indicators of each path, first, normalization processing is performed, and then the health score of the path is calculated by weighted calculation. Finally, the health score of the redundant path set is calculated by:
[0076] The set health score = optimal single-path score x health path proportion + protocol difference compensation value.
[0077] Among them, the optimal single-path score refers to the health score of the best path in the current redundant path, the health path proportion is the proportion of the healthy path in the current system, and the protocol difference compensation value adjusts the path health score according to the characteristics of different storage protocols.
[0078] Through this dynamic health assessment mechanism, the system can comprehensively and accurately assess the reliability of each path, avoiding the simple judgment of relying on a single path state in traditional solutions, thereby reducing misjudgment and avoiding unnecessary path switching. This improves the efficiency of using redundant paths and ensures high availability.
[0079] In step 3, when the dynamic health is lower than the set threshold, the system determines whether there are associated resources between NAS and SAN (such as database storage and transaction logs). If there are, the system will freeze these associated storage resources and suspend the application's write operation to prevent data inconsistency. The freeze operation ensures that the associated storage is not affected during switching, thereby ensuring data integrity.
[0080] Through cross-protocol collaborative switching, data corruption caused by inconsistent data access when switching independently between NAS and SAN storage devices is avoided. This method ensures the stability and data consistency of the storage system, especially in complex hybrid storage architectures.
[0081] In step 4, the system will select different arbitration strategies based on the health of the path. When the health is high, the system adopts a majority node fast voting arbitration strategy to achieve fast switching; when the health is low, it adopts a full node pessimistic lock arbitration strategy to ensure that only when all nodes agree that the path needs to be switched will the operation be performed. After the arbitration is agreed, the system will perform the path switching operation:
[0082] SAN path switching: activate the standby port and update the host path weight.
[0083] NAS session migration: file session migration is achieved through protocol mechanisms to ensure file system continuity.
[0084] This arbitration mechanism ensures that switching operations can be flexibly performed under different health states, ensuring fast response under high health and preventing risks caused by fast switching under low health. In addition, it ensures more refined management of storage resources during path switching, improving the controllability of switching and the robustness of the system.
[0085] In step 5, when the path health recovers to above the preset dynamic threshold, the system will release the previous frozen state and update the evaluation baseline. At this time, the system will perform a back-switching operation on the recovered path to redirect traffic to the original path, thereby restoring normal service operation state.
[0086] Through the switchover control mechanism, the system can automatically recover normal operation according to the real-time health status, avoid wasting resources due to long-term continuous use of the standby path, and ensure the self-healing ability of the system. The switchover mechanism not only optimizes the utilization of storage resources, but also ensures that the normal service can be quickly restored after the original path recovers, thereby improving the reliability of the system and the continuity of the service.
[0087] Through redundant path topology, dynamic health assessment, cross-protocol collaborative switching, arbitration switching execution, and switchover control, the fault tolerance and switching efficiency of the dual-active NAS and SAN system in the face of network failures or storage device abnormalities are comprehensively improved. Through intelligent path management and efficient switching mechanism, the problems of misjudgment, insufficient path redundancy, and cross-protocol data consistency are effectively reduced, providing a solid guarantee for high-availability and high-reliability storage environment.
[0088] In one possible implementation, when configuring the storage path, the system focuses on how to provide high redundancy and high reliability in the dual-active storage system through heterogeneous protocols such as FC, iSCSI, NFS, CIFS, etc.
[0089] Specifically, first, the physical connection relationship between the host HBA port and the storage system front-end port is discovered through the link layer protocol. The hop count information of the switch is obtained using the link layer discovery protocol (such as LLDP, CDP), which helps to determine the network topology relationship between the host and the storage device, thereby ensuring the accuracy and efficiency of path selection.
[0090] In the storage area network, FC (Fiber Channel) and iSCSI (IP Storage Network) dual-protocol paths are configured for each logical unit to ensure multi-protocol redundancy of storage access. The physical links used by each path do not share the same switch power module, thereby preventing single-point failure of the switch device from causing simultaneous failure of all paths. By ensuring physical isolation between FC and iSCSI paths, the stability and redundancy of the network can be improved, and fault propagation caused by any single device failure can be avoided.
[0091] For network-attached storage (NAS), NFS and CIFS dual-protocol paths are configured for each file system. NFS and CIFS are suitable for different types of clients and operating systems, and through the redundant configuration of these two protocols, the file access requirements of different clients can be guaranteed. At the same time, during the configuration process, the network interface card (NIC) of each path is ensured to be located in different physical slots, avoiding the failure of all paths due to the failure of a single hardware component. For example, the NFS path and the CIFS path can be bound to different network cards or physical slots, thereby achieving physical layer redundancy and improving the availability of the system.
[0092] The system first automatically discovers and identifies the physical link between the host and the storage system through a link layer protocol (such as LLDP), identifies the number of switch hops, the connection relationship of the port, and other information. These data help to draw a network topology diagram between the host and the storage device, and further plan the path. Link layer discovery can accurately identify the health status and hop information of all links, ensuring the rationality of path configuration.
[0093] FC and iSCSI protocols can provide different types of storage access requirements. FC protocol provides high-performance and high-bandwidth storage access, suitable for large-scale data storage scenarios; while iSCSI provides a flexible and economical storage connection solution on standard networks. By configuring redundant paths for SAN logical units with these two protocols, the storage system can continue to provide services through another path when one path fails, while avoiding full path failure caused by sharing the same switch power module.
[0094] NFS and CIFS provide file access for Linux / Unix and Windows clients, respectively. When configuring these two paths, it is necessary to ensure that the network interface card (NIC) is located in different physical slots to ensure hardware redundancy, so that another path can continue to provide services when a certain interface card or physical slot fails. In this way, the impact of single hardware failure on storage services can be minimized, ensuring the availability of the file system.
[0095] By configuring dual-protocol redundant paths for each storage logical unit and ensuring physical isolation of the paths, the system can effectively avoid service interruption caused by single-point failure. Each path uses a different switch power module and the network interface card is located in a different physical slot, which greatly reduces the impact of hardware failure on system stability.
[0096] Path configuration with heterogeneous protocols supports multiple protocols (such as FC, iSCSI, NFS, and CIFS), meeting the storage access requirements of different application needs. Especially in storage area networks (SAN) and network-attached storage (NAS) systems, flexible protocol selection and switching can achieve optimal performance and reliability in different application scenarios.
[0097] In the design of multi-path redundant links, by ensuring that each path does not share the same switch power module and interface card slot, the system can avoid the overall impact of switch, switch power, or interface card failure on storage services. Therefore, the fault tolerance of the storage system has been significantly improved, ensuring high availability and data reliability.
[0098] The configuration mode can ensure that each protocol path does not share the same network hardware resource, thereby minimizing the risk of device overload and congestion, effectively optimizing the utilization of network resources, and improving the performance of the overall storage system.
[0099] Through the above configuration, the system can still maintain high availability and stability when facing hardware failure, link exception or high load, and provide continuous and reliable storage services.
[0100] In a possible implementation, the generation of the protocol difference compensation value is to compensate and adjust each path according to the reliability level of different protocols in the multi-path redundant link, so as to ensure that the system can utilize the ability of different protocol paths in the optimal way during switching and load balancing.
[0101] Specifically, in order to reasonably evaluate the reliability of different protocols, a protocol reliability level table needs to be established. According to the characteristics and transmission efficiency of the protocol, the table defines the reliability level of different protocols:
[0102] FC protocol (Fiber Channel): As a high-speed and high-stability storage protocol, FC protocol is considered to have the highest reliability level. It is suitable for storage systems that require high performance and has strong fault tolerance capability.
[0103] iSCSI protocol: iSCSI provides storage access through IP networks, which is suitable for flexible and low-cost network environments. As a secondary level protocol, its reliability is slightly lower than that of FC protocol, but it can still provide good transmission performance.
[0104] NFS and CIFS protocols: These two protocols are generally used for file-level storage access and are suitable for network-attached storage (NAS). Although they are more suitable for different operating systems (NFS for Unix / Linux and CIFS for Windows), they are defined as basic level due to their greater dependence on network bandwidth and their vulnerability to network delay and other factors.
[0105] When the highest level protocol (FC protocol) is included, a basic compensation value is added: If the path contains the FC protocol, due to the high reliability of the FC protocol, the system will add a basic compensation value. This is to ensure that the high reliability of the FC protocol can be fully utilized during load balancing and switching, and to ensure its priority.
[0106] When the highest level protocol and the lower level protocol exist simultaneously, the compensation value is increased in proportion to the level difference: if FC protocol and iSCSI protocol exist simultaneously in the path, the system will increase the compensation value in proportion to the level difference between the protocols (i.e. FC is the highest level and iSCSI is the lower level). For example, the difference between FC and iSCSI may be adjusted in a certain weight proportion in order to balance the influence of the two protocols in the switching control.
[0107] In order to prevent unnecessary performance loss caused by excessive compensation value, the system stipulates that the upper limit of the compensation value cannot exceed the set proportion of the healthy path proportion. The healthy path proportion refers to the proportion of the paths that can work normally in all available paths. Setting the upper limit of the compensation value can ensure that the compensation value will not affect the overall stability and performance of the system due to the over-optimization of some paths.
[0108] When configuring and managing multi-protocol storage paths, the system first establishes a protocol reliability level table. This table will assign different levels according to the characteristics of each protocol, thereby providing basic data for subsequent compensation value calculation. For example, in an environment that requires high-performance storage and fast data transmission, fiber channel (FC) protocol will be defined as the highest level, while iSCSI protocol suitable for cost-sensitive and flexible deployment will be defined as the lower level, and finally, NFS and CIFS protocols as file-level protocols will be classified as the basic level.
[0109] In the process of path switching or load balancing, the system first analyzes the protocol types used in each path in the current path set. If the path contains FC protocol, the system will preferentially increase the compensation value to ensure the priority of high-reliability protocol.
[0110] When encountering a path containing both FC and iSCSI protocols, the system will increase the compensation value in proportion to the level difference between the two. For example, assuming that the reliability of FC protocol is 1.5 times that of iSCSI, the system can adjust the compensation value in this proportion to ensure that the higher level protocol can be selected preferentially.
[0111] In order to avoid system performance imbalance, the maximum value of the compensation value is set to the limit proportion of the healthy path proportion. Assuming that 80% of the paths in the entire system are in a healthy state, the upper limit of the compensation value cannot exceed this 80% proportion, thereby avoiding the excessive compensation of a small number of paths affecting the normal work of the overall system.
[0112] In one possible implementation, the port queue depth on the network switching device reflects the queuing situation of data packets on the network device. A larger queue depth generally means that the network device is handling a higher load, which can cause packet delays or losses. Therefore, collecting real-time data of the port queue depth can help assess the network load situation, and the queue depth is the packet buffer queue length.
[0113] The CPU utilization of the network switching device is another important indicator, reflecting the degree of load when the device is processing data. If the CPU utilization of the device is too high, it means that the device may be overloaded and the processing capacity is reduced. Collecting this data in real time helps to assess the working pressure of the device.
[0114] In order to convert different indicators (queue depth and CPU utilization) into a unified standard, it is necessary to first normalize these indicators. Normalization can convert data in different units to values between 0 and 1, eliminating the dimensional differences between different indicators, so that they can be combined in the same calculation framework.
[0115] The normalized queue depth and CPU utilization are weighted and summed according to certain weights. The performance difference of different devices will affect the performance of network load, so the setting of weights is based on the model of network device, and is matched from the preset configuration library. For example, for a powerful switch, the queue depth may be assigned a lower weight, because it can efficiently handle more data streams, and for a weak device, the CPU utilization may need a higher weight.
[0116] The calculation formula can be expressed as:
[0117] Network load coefficient = w1 x queue depth normalized value + w2 x CPU utilization normalized value;
[0118] where w1 and w2 are the weights of queue depth and CPU utilization, respectively, and w1 + w2 = 1.
[0119] The system will preset a baseline threshold, which is usually the initial safe threshold of the system under normal load. In the absence of high load or device abnormalities, this value is usually sufficient to meet the system operation requirements.
[0120] The network load coefficient will affect the setting of the dynamic threshold. The higher the network load coefficient, the heavier the network load and the greater the pressure on the device, so the system should lower the threshold to trigger load balancing and path switching in advance to avoid network congestion or performance degradation. Therefore, the adjustment factor is positively correlated with the network load coefficient, and the larger the load coefficient, the larger the adjustment factor.
[0121] The calculation formula of the dynamic threshold is:
[0122] Dynamic threshold = Initial baseline threshold × (1 + network load coefficient adjustment factor)
[0123] Where the network load coefficient adjustment factor is adjusted according to the size of the current load coefficient. Assuming the network load coefficient is 0.8, the dynamic threshold may increase by 80%.
[0124] The system first collects real-time data of port queue depth and CPU utilization from network switching devices. These data are obtained through SNMP (Simple Network Management Protocol) or other real-time monitoring tools, which can provide basic data for subsequent load evaluation.
[0125] The system normalizes the collected port queue depth and CPU utilization data to ensure they are in the same standard range (between 0 and 1). Then, according to the device model, the system matches the corresponding weight from the configuration library and calculates the weighted network load coefficient. For example, for high-end switches, the weight of CPU utilization may be higher, while for low-end devices, the weight of queue depth may be higher.
[0126] According to the calculated network load coefficient, the system will adjust the baseline threshold in real time. For example, when the network load coefficient is high, the adjustment factor will increase, causing the dynamic threshold to rise, and the system will trigger path switching or load balancing control according to the new threshold.
[0127] In one possible implementation, in a multi-path redundancy system, the storage logical unit (LUN) usually contains metadata tags that describe the attributes, dependencies, and associations with other systems of the LUN. Analyzing these metadata tags is the first step in identifying associated resources between NAS and SAN.
[0128] If the cross-protocol dependency identifier is included in the metadata tags of the storage logical unit, the system will determine that the resource is an associated resource. This means that the storage logical unit not only belongs to the SAN storage, but also has an interactive relationship with the NAS device, which may require synchronization or consistency guarantee. This cross-protocol dependency identifier indicates the linkage operation between storage systems, prompting the system to carefully handle data consistency and resource locking issues during switching operations.
[0129] After identifying the associated resource, the freeze operation ensures that the resource states of NAS and SAN are consistent during data switching, and data loss or inconsistency does not occur through a series of control commands.
[0130] Specifically, the SCSI persistent reservation command is sent to the SAN storage controller to lock the logical unit write operation:
[0131] By sending SCSI Persistent Reserve commands, the system can lock the Logical Unit (LUN) write operations on the SAN storage controller. This means that the write operations of the logical unit are suspended, ensuring that all data write operations are locked during the switchover process, and data conflicts or loss will not occur. This operation is crucial for ensuring data consistency, especially in scenarios where multiple storage systems interact.
[0132] On the NAS side, a file system snapshot can be used to freeze the current state of the file system. The system sends instructions to the NAS storage to create a file system snapshot, which can lock the content of the file system at a specific point in time, preventing files from being modified or deleted. This step ensures that the data in the NAS storage is consistent with the data in the SAN storage, providing a stable reference for subsequent switchover.
[0133] In database services, the application agent is responsible for suspending database commit operations to ensure that no new data is committed or operated during the switchover process. By suspending commit requests, the system can ensure that the state of the database remains consistent during the switchover, avoiding conflicts caused by data writing or updating.
[0134] The system first obtains and parses the metadata tags of the storage logical unit (LUN). These tags are usually automatically generated by storage management software when the LUN is created and contain detailed information about the LUN (such as storage location, protocol type, dependency relationship, etc.). If the tag contains a cross-protocol dependency identifier, it indicates that the storage logical unit interacts with multiple protocols or storage devices (such as NAS and SAN), and the system will identify it as an associated resource.
[0135] After identifying the associated resource, the system performs locking operations on the NAS and SAN respectively:
[0136] Send SCSI Persistent Reserve commands to the SAN storage controller to ensure that the logical unit cannot be written by other processes or operations during the switchover process.
[0137] In the NAS storage, the current state of the file system is frozen by creating a file system snapshot. The snapshot provides an accurate time point view, so that the data on the NAS remains consistent during the subsequent switchover operation.
[0138] When operating on the database, the application agent suspends the commit request of the database service to avoid interference of new data in the database with the switchover process.
[0139] Through the above freezing operation, the system can ensure the resource consistency of the NAS and the SAN in the switching process. Whether it is the write locking on the SAN side or the snapshot creation on the NAS side, these operations ensure the data consistency and integrity between the storage systems in the system switching process.
[0140] In a possible implementation, in a dual-active NAS and SAN system based on a multi-path redundant link, the core goal of the switching control strategy is to guarantee data consistency and business continuity. When a node health degree decreases (such as network jitter, I / O exception, heartbeat loss, etc.) and a fault switching needs to be performed, the system adopts a pessimistic lock arbitration mechanism, in combination with cache consistency verification, to ensure data integrity and service stability in the switching process.
[0141] Specifically, each dual-active node is configured with a non-volatile cache (NVRAM, NVDIMM, etc.) for storing the latest written data.
[0142] Before switching, the system extracts the sequence number of the latest data block from the non-volatile cache of the two storage nodes.
[0143] This sequence number is usually automatically incremented with each data submission or write operation, indicating the submission progress of the latest data in the cache.
[0144] An arbitration network physically independent of the data transmission path (such as based on IPMI, InfiniBand, or an independent heartbeat network) is used to send the sequence numbers of the two nodes to the arbitration module.
[0145] The arbitration module compares the latest sequence numbers of the two nodes and calculates the difference (ΔSN=SN_A-SN_B) between them.
[0146] If the difference is within a tolerable range (i.e., less than a preset safe water level, Safe Watermark), it indicates that the data is basically synchronized; otherwise, it is considered that there is a serious risk of desynchronization.
[0147] If it is found that the sequence number difference is greater than the safe water level threshold (for example, exceeding 5-10 data submission batches), it indicates that the low health degree node fails to timely synchronize the written data.
[0148] At this time, to avoid data loss or "split-brain" writing, the system does not immediately perform switching, but enters a delayed switching state.
[0149] A data resynchronization mechanism (such as incremental log synchronization, cache flushing) is triggered at the same time until the data of the two nodes is consistent.
[0150] Once the sequence number difference falls within the safe range and the data synchronization is confirmed through the arbitration network, it is considered that the data consistency of the two nodes meets the switching condition.
[0151] The arbitration module grants the master node authority to the node with higher health degree according to the health degree evaluation index (I / O response time, heartbeat frequency, CPU load, etc.).
[0152] The granted master node takes over the storage control right and executes the write and fault recovery process, while the unhealthy node enters the read-only or recovery state.
[0153] By introducing the non-volatile cache sequence number comparison + independent arbitration network + pessimistic lock mechanism, safe and reliable master control right transfer and system switching in the case of node failure are realized, which is one of the key technologies to ensure high availability and data consistency in dual-active NAS and SAN environments. Pessimistic lock arbitration refers to forcibly freezing the write of dual-active nodes before switching, verifying the consistency of non-volatile cache data block sequence numbers through an independent network, and ensuring zero data loss risk before performing master node switching.
[0154] In one possible implementation, in a dual-active NAS and SAN system, the stability of the SAN path directly affects the I / O access efficiency and storage availability. Since the multi-path I / O (MPIO) mechanism is commonly used to achieve high availability, the system needs to quickly adjust the I / O scheduling strategy after detecting path failure to avoid service interruption. For this purpose, a path weight update mechanism is designed in this method to isolate the failed path, recalculate the weight, and trigger the host path table refresh, thereby realizing intelligent and dynamic SAN path switching control.
[0155] When an abnormality occurs in a SAN path (such as link interruption, switch error, target port failure, etc.), the system first identifies the corresponding SCSI target port (Target Port).
[0156] Through the storage controller interface or SCSI protocol extension, a forced logout operation is performed to close the login state of the target port, preventing the host from continuing to send I / O requests to this path.
[0157] This step blocks the communication link between the host and the abnormal path, ensuring that the failed path no longer participates in I / O scheduling and preventing data retries or I / O congestion.
[0158] The storage system maintains a health history record for each path, including link delay, packet loss rate, transmission success rate, IO error rate, etc.
[0159] During the switching process, the system re-evaluates the quality of each available path based on these historical data and uses a weighted algorithm (such as moving average, exponential decay weighting, etc.) to recalculate the path scheduling weight.
[0160] These weights are used to update the MPIO scheduling policy, such as round robin, shortest queue first, or dynamic weight adjustment.
[0161] After the path state change is completed, the system sends an event notification to the host's HBA driver through an asynchronous mechanism (such as AEN).
[0162] This notification can be achieved through "Send Diagnostic Results", "Path State Change Alarm" and other methods in the SCSI protocol.
[0163] After the host HBA receives the notification, it triggers the multipath module (such as Windows MPIO, Linux DM-Multipath) to rescan the available paths and update the path mapping table.
[0164] This operation ensures that the host I / O traffic can be immediately switched from the failed path to the healthy path without manual intervention.
[0165] Through the "faulty path isolation + path health weight recalculation + host-side asynchronous flushing" three-in-one switching mechanism, fast, accurate, and low-interrupt SAN path switching control is achieved.
[0166] In a possible implementation, in a dual-active NAS environment, a persistent session connection is usually maintained between the NAS client and the storage system, and especially in high-concurrency access or frequent write operation scenarios, ensuring the consistency of session state and incomplete data operations is crucial. To achieve uninterrupted client access in the event of master node failure or link failure, the system needs to support seamless session-level migration. This method designs protocol layer session state synchronization and migration mechanisms for mainstream NAS protocols (NFSv4.1+ and CIFS / SMB), as follows:
[0167] NFSv4.1 introduces a session mechanism, and the client and the server implement continuous synchronization of session state through the SEQUENCE operation.
[0168] When the master node detects the need for session migration (such as network link switching or node failure), the standby node actively negotiates the latest session ID and session sequence number with the client.
[0169] The client obtains the session context state by initiating a SEQUENCE request, ensuring that the order and idempotency of I / O operations after migration are not affected.
[0170] The backchannel mechanism introduced by NFSv4.1 allows the server to actively initiate control messages to the client.
[0171] The system migrates the current active file handle to the standby node by using the BACKCHANNEL_CTL or CB_RECALL, CB_NOTIFY, etc. callback operation.
[0172] The file handle contains file path, open mode, lock state, etc. meta information, and through this way, the client can continue to read and write without re-opening the file after migration.
[0173] The client session in the SMB protocol is based on the Session ID and user authentication context.
[0174] When the master node switches, the system sends the SESSION_SETUP command request to the client through the server to prompt it to re-establish the authentication connection.
[0175] The client credentials (such as Kerberos ticket or NTLM information) are retained during the process, thereby realizing transparent session migration without the need for the user to re-login.
[0176] For data that has not been written to the disk, the system performs block-level data synchronization by means of the DFSR protocol.
[0177] During the window period when the master node has not completely failed, the uncommitted write request in the cache area is synchronized to the corresponding file path of the standby node.
[0178] Even in the case of sudden failure of the master node, the standby node can recover the uncompleted I / O transaction through the last data replication state, thereby guaranteeing the file consistency and integrity.
[0179] The method provides a fine-grained and real-time session migration control scheme for the dual-active NAS system by combining the protocol-level control operation (such as SEQUENCE, SESSION_SETUP) and the data replication mechanism (BACKCHANNEL_CTL, DFSR), which not only guarantees the data consistency and access continuity, but also enhances the stability and recovery ability of the system in a complex network environment.
[0180] In a possible implementation, in the dual-active NAS and SAN environment, the switching operation needs to not only guarantee the high availability of data, but also accurately evaluate the health state of the link path and its recovery ability. The back switching control refers to how to effectively monitor the recovery of the path and formulate the back switching strategy during the process of restoring the link health degree to the stable state after the switching operation is completed. This step mainly records the historical switching events, calculates the recovery time of the link health degree, and continuously monitors according to the recovery situation, thereby realizing intelligent back switching control and ensuring that the system quickly and safely recovers to the normal working mode after the link is recovered.
[0181] Each time a path switch occurs, the system automatically records the time it takes for the path health to recover to a normal stable state, which can be defined by monitoring various performance indicators of the path (such as bandwidth utilization, latency, packet loss rate, link load, etc.).
[0182] By sampling and analyzing the duration of each event, the system can understand the range of time it takes for a path to recover, providing a basis for the switchover. Based on historical switching event statistics, the system calculates the time it takes for the path health to recover to a stable state (such as a 3-period fluctuation of <5%), excludes abnormal events such as network outages (<100ms), generates a weighted average recovery time as the calculation basis for the switchover trigger delay, sets the number of monitoring periods based on historical data, for example, average recovery time 200ms / sampling interval 50ms=4 periods, and ensures that the path health continues to be stable and meets the standards before being unfrozen.
[0183] The system extracts the time data of path health recovery from historical switching records, removes data points affected by network anomalies (such as sudden network failures, device overload, etc.), to avoid abnormal recovery time caused by sudden events affecting the switchover decision.
[0184] By calculating the weighted average of the remaining recovery time data, the system can obtain the standard recovery time of the path, which provides a reference for subsequent switchover strategies.
[0185] The calculation method of the weighted average can be adjusted according to the criticality and historical performance of different paths to ensure that the recovery time of critical paths can appropriately affect the switchover decision.
[0186] During the link recovery process, the system continuously monitors according to the set health sampling interval (i.e., collecting path health data every fixed time interval).
[0187] By dividing the average recovery time by the health sampling interval, the system can calculate the number of periods that need to be continuously monitored. This period number represents the number of times the system needs to observe the path health changes before confirming the link stability.
[0188] Set the minimum period number to 3, even if the calculation result is less than 3, the system will perform at least 3 health monitoring to avoid premature switchover due to short-term health fluctuations.
[0189] By accurately recording the path health recovery time, calculating the weighted average recovery time, and setting a reasonable monitoring cycle number, combined with the minimum cycle number constraint, the return operation is ensured to be performed after the path recovery is stable, avoiding the instability problem caused by frequent return. This return control mechanism improves the high availability and fault tolerance of the system, reduces the need for manual intervention, and provides a more intelligent and reliable link switching solution for enterprise storage systems.
[0190] In one possible implementation, in the dual-active NAS and SAN switching control method of the multi-path redundant link, the configuration of heterogeneous protocol paths is of great significance, especially in the coexistence environment of FC (Fiber Channel) and iSCSI (Internet Small Computer System Interface) protocols. Due to the different working principles and network behaviors of these protocols, without appropriate isolation mechanisms, protocol conflicts or broadcast storm problems may occur. Therefore, the failure isolation strategy is particularly critical.
[0191] Specifically, on the network switch, in order to avoid mutual interference of FC and iSCSI traffic, independent virtual channels must be configured for these two protocols. Specifically, the switch sets different virtual local area networks (VLANs) or virtual channels at the physical port or virtual switch interface level, so that FC and iSCSI data streams are allocated to completely different paths.
[0192] This ensures that in a multi-protocol environment, the transmission of FC and iSCSI traffic will not affect each other. FC protocol is usually used for high-performance, low-latency storage communication, while iSCSI may require more bandwidth and tolerate certain latency. Independent virtual channels can optimize the performance of each protocol and reduce inter-protocol competition.
[0193] In the case of path failure, broadcast at the protocol layer may be transmitted across protocols, causing the occurrence of broadcast storm phenomenon. In order to prevent this situation, the system automatically enables the protocol firewall function to intercept broadcast traffic across protocols.
[0194] This firewall function not only prevents the transmission of data packets between different protocols, but also prevents network congestion caused by single protocol failure. The firewall is automatically triggered when the path failure is detected, and the system immediately blocks broadcast traffic across protocols, effectively isolating the impact of failure and ensuring the stable operation of other paths and protocols.
[0195] The storage controller implements a bandwidth reservation strategy for heterogeneous paths (FC and iSCSI) to ensure that new data traffic can be supported with sufficient bandwidth during switching operations. The specific operation is that the storage controller dynamically allocates bandwidth on each path and reserves a certain amount of bandwidth according to the needs of different protocols.
[0196] Through the bandwidth reservation mechanism, it can be ensured that even in the case of failure switching, the transmission of data traffic will not be affected by insufficient bandwidth, the switching channel remains unblocked, and the continuity of the service is guaranteed.
[0197] By implementing the failure isolation strategy, efficient isolation between heterogeneous protocols (such as FC and iSCSI) in a multi-path redundant link environment is ensured, and network problems such as protocol conflict and broadcast storm are avoided. By configuring independent virtual channels at the switch port, automatically enabling protocol firewall to block cross-protocol broadcast storm, and implementing bandwidth reservation at the storage controller level to ensure the unblocked switching channel, the system can maintain high availability and stability in the face of network failures or path switching. The implementation of these technical features effectively improves the fault tolerance, performance and reliability of the system, and ensures the efficient operation of the storage system in a complex multi-protocol environment.
[0198] The present application encompasses any substitutions, modifications, equivalent methods and solutions made to the essence and scope of the present application. In order to make the public have a thorough understanding of the present application, specific details are described in the following preferred embodiments of the present application, and the present application can also be fully understood without the description of these details to those skilled in the art. In addition, in order to avoid unnecessary confusion to the essence of the present application, well-known methods, processes, procedures, elements and circuits, etc. are not described in detail.
[0199] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can also be made, which should be considered as the protection scope of the present application.
Claims
1. A method for controlling dual-active NAS and SAN switching based on multi-path redundant links, characterized in that, Comprise the following steps: Step 1: Redundant path topology construction, identify all physical paths from host to dual-active storage system, configure at least two heterogeneous protocol paths through different network switches for each storage logical unit; Step 2: Dynamic health assessment, real-time collection of path latency, packet loss rate and error event data, calculation of redundant path set health, normalization and weighting of single path indicators, set health = optimal single path score x health path proportion + protocol difference compensation value; Step 3: Cross-protocol collaborative switching trigger, when the health is lower than the dynamic threshold, if there are NAS-SAN associated resources, freeze the associated storage resources and suspend application writes; Step 4: Arbitration switching execution, select arbitration strategy according to health, use majority node fast voting arbitration for high health, use full node pessimistic lock arbitration for low health, and execute synchronization after arbitration: SAN path switching: activate the standby port and update the host path weight; NAS session migration: transfer file access session through protocol mechanism; Step 5: Back-to-normal control, when the original path health continuously exceeds the dynamic threshold, unfreeze and update the evaluation baseline. 2.The method of claim 1, wherein, The configuration of heterogeneous protocol paths in step 1 specifically includes: Identify the physical connection relationship between host HBA port and storage front-end port, obtain switch hop information through link layer discovery protocol; Configure FC and iSCSI dual-protocol paths for SAN logical units, and the physical links of each path do not share the same switch power module; Configure NFS and CIFS dual-protocol paths for NAS file systems, and the network interface cards of each path are located in different physical slots. 3.The method of claim 1, wherein, The generation of protocol difference compensation value in step 2 includes: Establish a protocol reliability level table: FC protocol is the highest level, iSCSI is the second level, NFS and CIFS are the basic level; Detect the presence of different level protocols in the path set: When containing the highest level protocol, increase the basic compensation value; When there are both the highest level and the higher level protocols, increase the compensation value by the level difference proportion; The upper limit of compensation value does not exceed the set proportion of health path proportion.
4. The method of claim 1, wherein the method further comprises: The setting of dynamic threshold in step 3 is realized through the following process: Real-time collection of port queue depth and CPU utilization from network switches; Calculate network load coefficient: normalize and weight the queue depth and CPU utilization, and the weight is matched from the preconfigured library according to the device model; Dynamic threshold = initial baseline threshold x (1-network load coefficient adjustment factor), where the adjustment factor is positively correlated with the load coefficient.
5. The method of claim 1, wherein the method further comprises: The identification and freezing of NAS-SAN associated resources in step 3 includes: Parse the metadata tag of the storage logical unit, if the tag contains a cross-protocol dependency identifier, it is determined as an associated resource; Freezing operation is specifically implemented: Send SCSI persistent reservation command to SAN storage controller to lock logical unit write operation; Send file system snapshot creation instruction to NAS storage to lock the current state; Pause the commit request of the database service through the application proxy.
6. The method of claim 1, wherein the method further comprises: The pessimistic lock arbitration in step 4 when the health is low also includes: Storage controller cache consistency check: Read the latest data block sequence number from the dual-active storage node non-volatile cache; Compare the sequence number difference through an independent arbitration network; If the difference exceeds the safe water level, delay the switchover until synchronization is complete; After arbitration, grant the master node permission to the storage node with higher health degree.
7. The method of claim 1, wherein the method further comprises: The SAN path switchover of step 4 further includes: Path weight update operation: Close the SCSI target port login state of the failed path; Recalculate the multi-path IO scheduling weight based on the path health history data; Inject an asynchronous event notification to the host HBA driver to refresh the path mapping table.
8. The method for switching control between active NAS and SAN based on multi-path redundant links according to claim 1, characterized in that, The specific implementation of the NAS session migration of step 4 includes: For NFSv4.1 and above version clients: Initiate a SEQUENCE operation to synchronize the session state; Migrate the file handle through the BACKCHANNEL_CTL callback channel; For CIFS clients: Send a SESSION_SETUP command to rebuild the authentication session; Synchronize the uncommitted write operation using the DFSR replication protocol. 9.The method of claim 1, wherein, The back control of step 5 specifically includes: Record the duration of the path health degree returning to the stable state in the historical switchover event; Calculate the average recovery time: the weighted average value after excluding network abnormal events; Set the number of consecutive monitoring periods = average recovery time / health degree sampling interval, and the minimum period is 3.
10. The dual-active NAS and SAN switching control method based on multi-path redundant links according to claim 2, characterized in that, The configuration of heterogeneous protocol paths further includes failure isolation, specifically including: Configure protocol isolation strategies on switch ports: allocate independent virtual channels for FC and iSCSI traffic; Automatically enable protocol firewalls to block cross-protocol broadcast storms when a path fails; The storage controller implements bandwidth reservation on heterogeneous paths to ensure that the switchover channel is smooth.