A high availability testing method and device for a file storage gateway
By automating the construction of test environments and meticulously recording simulations of various fault scenarios, the system addresses the problems of complex construction, low efficiency, and insufficient flexibility in existing test systems, achieving accurate testing and improved stability of file storage gateways with high availability.
Patent Information
- Application Number
- CN202411421133.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-10-12
AI Technical Summary
Existing high availability testing systems for file storage gateways are complex to build, rely on manual configuration, have low testing efficiency and insufficient flexibility, cannot fully simulate failure scenarios, and lack comprehensive test results and detailed test records, making it impossible to accurately determine high availability.
A high availability testing method and apparatus for file storage gateways are proposed, including a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module. By automatically constructing the test environment, simulating various fault scenarios, recording and analyzing read and write logs in detail, accurate test results are achieved.
It improves the flexibility and efficiency of testing, comprehensively covers a variety of fault scenarios, ensures the normal operation and rapid recovery of the file storage gateway under complex faults, improves reliability and stability, and provides detailed data analysis support.
Smart Images

Figure CN119316314B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of distributed file storage technology, and in particular relates to a high availability testing method and apparatus for a file storage gateway. Background Technology
[0002] A file storage gateway is a network device or software system that acts as a bridge between an enterprise's local file storage system and cloud storage. Its main function is to integrate internal enterprise file storage with external cloud storage services, allowing users to access cloud storage resources through standard file access protocols. High availability testing of file storage gateways primarily involves simulating scenarios such as single points of failure, network outages, and power failures to verify whether the gateway can automatically switch to a backup node in the face of failures, ensuring uninterrupted service. During the test, the system's fault detection, automatic switching, and recovery times are observed to evaluate the gateway's fault tolerance and service continuity performance.
[0003] High availability testing methods and devices for file storage gateways are often used in large-scale computer systems, especially in file storage scenarios that require high reliability and high performance. High availability testing of file storage gateways can ensure that the system can continue to provide file access services in the event of unforeseen circumstances such as network interruptions or node failures. These methods and devices can effectively test the switching and recovery capabilities of file storage gateways in failure situations to ensure the continuity and stability of services.
[0004] However, existing testing systems are complex to build, requiring manual configuration or dependence on specific hardware, resulting in low testing efficiency and insufficient flexibility. During fault simulation, they can only simulate some fault scenarios, leading to incomplete test results and limited test record data. Consequently, there is a lack of sufficient test information when analyzing the impact of faults, making it impossible to accurately determine the high availability of the file storage gateway. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, in order to solve the technical problems of existing test systems being complex to build test environments, requiring manual configuration or relying on specific hardware, having low testing efficiency and insufficient flexibility, being able to simulate only some fault scenarios during fault simulation, having incomplete test results, and having limited test record data, resulting in a lack of sufficient test information when analyzing the impact of faults and being unable to accurately determine the high availability of file storage gateways, this invention provides a high availability testing method and device for file storage gateways.
[0006] In a first aspect, the present invention provides a high availability testing method for a file storage gateway, applied to a high availability testing platform for the file storage gateway. The high availability testing platform includes a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected sequentially. The method includes:
[0007] S1, Obtain client-side services;
[0008] S2, builds the test environment for the file storage gateway using the test environment building module;
[0009] S3 uses the result recording module to record the first data read / write log under the client business;
[0010] S4. In the test environment, the fault simulation module is used to simulate client services under different fault types by using the file storage gateway node as a virtual fault node.
[0011] S5, using the result recording module, records the second data read / write log under the faulty virtual node and the drift time for the faulty virtual node to recover to normal;
[0012] S6. Analyze the first data read / write log and the second data read / write log through the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, output the test result of the file storage gateway as normal; otherwise, proceed to step S7.
[0013] S7, through the monitoring and alarm module, outputs an abnormal test result of the file storage gateway and issues an alarm message.
[0014] Furthermore, S2 specifically includes:
[0015] S201, Create a file gateway group for the file storage gateway, where the file gateway group includes multiple nodes;
[0016] S202, the storage sharing service, i.e. the client service, is mounted on the file storage gateway;
[0017] S203 configures each node with IPMI to complete the construction of the test environment.
[0018] Furthermore, S201 specifically includes:
[0019] S201A, Create a file storage group for the file storage gateway;
[0020] S201B, storage device for configuration file storage gateway;
[0021] S201C: Configure file sharing permissions for the file storage gateway and complete the creation of the file gateway group.
[0022] Furthermore, S202 specifically refers to:
[0023] Connect each client to the file storage system corresponding to the file storage gateway, and set the relevant parameters for each client, including access permissions, read / write operation type, and read / write data size.
[0024] Furthermore, S203 specifically refers to:
[0025] Configure IPMI for each node by setting the node IPMI address, node username, and node password.
[0026] Furthermore, the results recording module includes the vdbench tool.
[0027] Furthermore, S4 specifically includes:
[0028] S401, retrieve the node to which the virtual IP used by the file storage gateway belongs under the current file sharing service;
[0029] S402, set the file storage gateway node corresponding to the node to which the virtual IP belongs as a faulty virtual node;
[0030] S403, designed to simulate different types of faults in client services, uses the IPMI tool to power off faulty virtual nodes according to predetermined rules and schedules.
[0031] Furthermore, S5 specifically includes:
[0032] S501, with the goal of ensuring the file storage gateway responds to the fault, waits for a first preset time before powering on the faulty virtual node;
[0033] S502, wait for the second preset duration, record the second data read / write log and drift duration.
[0034] Furthermore, the first and second data read / write logs are analyzed through the results analysis module, specifically including:
[0035] Verify that the first and second data read / write logs are consistent by checking the execution logs and the vdbench business-generated logs.
[0036] By checking the node to which the virtual IP of the file gateway group belongs, determine whether the faulty virtual node has successfully migrated to another node, and record the migration duration.
[0037] A second aspect of the present invention provides a high availability testing apparatus for a file storage gateway, used to implement the high availability testing method for a file storage gateway according to any one of the first aspects, and applied to a high availability testing platform for a file storage gateway. The high availability testing platform for the file storage gateway includes a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected in sequence. The apparatus includes:
[0038] The acquisition module is used to acquire client business information;
[0039] The building module is used to build a test environment for the file storage gateway through the test environment building module;
[0040] The first recording module is used to record the first data read and write logs under the client business using the result recording module;
[0041] The simulation module is used in a test environment to simulate client services under different fault types by using the file storage gateway node as a virtual fault node.
[0042] The second recording module is used to record the second data read / write log under the faulty virtual node and the drift time when the faulty virtual node recovers to normal, using the result recording module.
[0043] The analysis module is used to analyze the first data read / write log and the second data read / write log through the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, the test result of the file storage gateway is output as normal; otherwise, the alarm module is entered.
[0044] The alarm module is used to issue alarm messages when the test results of the file storage gateway are abnormal, based on the output of the monitoring alarm module.
[0045] Furthermore, the building modules specifically include:
[0046] Create a submodule to create a file gateway group for the file storage gateway, where the file gateway group includes multiple nodes;
[0047] Mounting submodules are used to mount the storage sharing services, i.e., client services, of the file storage gateway;
[0048] The configuration submodule is used to configure each node using IPMI and complete the construction of the test environment.
[0049] Furthermore, the mounting submodule is specifically used for:
[0050] Connect each client to the file storage system corresponding to the file storage gateway, and set the relevant parameters for each client, including access permissions, read / write operation type, and read / write data size.
[0051] Furthermore, the configuration submodule is specifically used for:
[0052] Configure IPMI for each node by setting the node IPMI address, node username, and node password.
[0053] Furthermore, the simulation module specifically includes:
[0054] The acquisition submodule is used to obtain the node to which the virtual IP used by the file storage gateway belongs under the current file sharing service;
[0055] The configuration submodule is used to set the file storage gateway node corresponding to the node to which the virtual IP belongs as a faulty virtual node;
[0056] The power-off module is designed to simulate different types of faults in client services. Based on predetermined rules and schedules, it uses the IPMI tool to power off faulty virtual nodes.
[0057] Furthermore, the second recording module specifically includes:
[0058] The electronic module is used to ensure that the file storage gateway responds to the fault and waits for a first preset time before powering on the faulty virtual node.
[0059] The recording submodule is used to wait for the second preset duration, record the second data read / write log and drift duration.
[0060] A third aspect of the present invention provides a high availability testing system for a file storage gateway, comprising: a memory and one or more processors.
[0061] The memory stores one or more applications, which are suitable for execution by one or more processors to implement the high availability testing method for the file storage gateway of the first aspect.
[0062] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program being loadable and executed by a processor in accordance with the high availability testing method for a file storage gateway of the first aspect.
[0063] The beneficial effects of this invention are as follows:
[0064] In this embodiment of the invention, the test environment construction module can automatically create a test environment for the file storage gateway, reducing the complexity of manual configuration and improving the flexibility and efficiency of testing. The fault simulation module can simulate different types of fault scenarios, comprehensively covering a variety of fault conditions, and more comprehensively testing the file storage gateway in business scenarios. This ensures that the file storage gateway can still maintain normal operation and rapid recovery under various complex fault conditions. The result recording module records the read and write logs of client services under normal and fault conditions in detail, making data analysis and comparison more comprehensive and accurate. This enables precise testing of the high availability and security of the file gateway, further improving the reliability and stability of the file storage gateway. Attached Figure Description
[0065] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.
[0066] Figure 1 This is a flowchart illustrating a high availability testing method for a file storage gateway provided in an embodiment of the present invention;
[0067] Figure 2 This is a schematic diagram of the structure of a high availability testing platform for a file storage gateway provided in an embodiment of the present invention;
[0068] Figure 3 This is a schematic diagram of the structure of a high availability testing device for a file storage gateway provided in an embodiment of the present invention;
[0069] Figure 4 This is a schematic diagram of the structure of a high availability testing system for a file storage gateway provided in an embodiment of the present invention. Detailed Implementation
[0070] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0071] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.
[0072] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "installed," "connected," and "linked" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0073] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.
[0074] This invention proposes a high availability testing method and apparatus for file storage gateways. It addresses the problems of existing testing systems, such as the complexity of building test environments, the need for manual configuration or reliance on specific hardware, low testing efficiency and insufficient flexibility, the inability to simulate only some fault scenarios during fault simulation, incomplete test results, and limited test record data, which leads to a lack of sufficient test information when analyzing the impact of faults and makes it impossible to accurately determine the high availability of file storage gateways.
[0075] Method Implementation Examples
[0076] Reference Figure 1 The diagram illustrates a flowchart of a high availability testing method for a file storage gateway provided by an embodiment of the present invention.
[0077] Reference Figure 2 The diagram shows a structural schematic of a high availability testing platform for a file storage gateway provided in an embodiment of the present invention.
[0078] This invention provides a high availability testing method for a file storage gateway, applied to a high availability testing platform for the file storage gateway. The high availability testing platform includes a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected sequentially. The method includes:
[0079] Specifically, the method includes steps S1 to S7.
[0080] S1, obtain client services.
[0081] Client-side services refer to data access operations and related business processes initiated by clients (such as servers, user devices, etc.) in the file storage gateway system, including operations such as reading, writing, and deleting files. This is the actual workload that the gateway needs to handle.
[0082] It should be noted that by acquiring client-side business data, we can ensure that the business simulated in the test environment is consistent with the workload in the actual production environment, reflecting real-world usage scenarios.
[0083] S2 builds the test environment for the file storage gateway using the test environment building module.
[0084] The file storage gateway test environment is used to simulate the normal operation and failure scenarios of the file storage gateway. It includes the hardware or virtualization nodes of the file storage gateway, the file storage system, and the corresponding network and client connection configurations.
[0085] In one possible implementation, S2 specifically includes:
[0086] S201, Create a file gateway group for the file storage gateway, where the file gateway group includes multiple nodes.
[0087] The file storage gateway is a system that connects an enterprise's internal storage system with external storage services (such as cloud storage). It is responsible for providing data access and protocol conversion between users and storage resources. The file gateway group is a cluster composed of multiple file storage gateway nodes, which provides redundancy and load balancing functions to improve the reliability and availability of file storage. A node is an independent unit in the file gateway group, which is responsible for handling some storage requests. Multiple nodes work together to provide high availability and distributed file storage services.
[0088] In one possible implementation, S201 specifically includes:
[0089] S201A, Create a file storage group for the file storage gateway.
[0090] In a file storage gateway, a file storage group is a logical structure that includes multiple physical or virtual storage devices for centralized management and organization of file storage space. A file storage group can integrate multiple storage devices to provide higher storage capacity and performance.
[0091] S201B, storage device for configuration file storage gateway.
[0092] Storage devices refer to the physical or virtual storage hardware connected to the file storage gateway, typically including hard drives, SSDs, storage arrays, or network attached storage (NAS). Storage devices are used to actually store user data and are accessible to clients through the file storage gateway.
[0093] S201C: Configure file sharing permissions for the file storage gateway and complete the creation of the file gateway group.
[0094] In the file storage gateway, file sharing permissions are the configuration settings that control the access permissions of different users or clients to file storage resources. By setting permissions, administrators can restrict or allow specific users to read, write, modify or delete shared files, ensuring data security and access control.
[0095] It should be noted that by creating a file gateway group containing multiple nodes, redundancy and load balancing can be provided, giving the system strong fault tolerance. When a node fails, other nodes can take over its work, ensuring service continuity and reliability.
[0096] S202, the storage sharing service, i.e. the client service, is mounted on the file storage gateway.
[0097] Among them, the storage sharing service of the file storage gateway refers to the storage resources and services provided by the file storage gateway, which allow multiple clients to access shared files or storage space through network protocols (such as NFS and SMB).
[0098] In one possible implementation, S202 specifically includes:
[0099] Connect each client to the file storage system corresponding to the file storage gateway, and set the relevant parameters for each client, including access permissions, read / write operation type, and read / write data size.
[0100] Access permissions are the permission rules configured for each client, controlling the scope of client operations on files or folders in the storage system. Read / write operation type refers to the type of operation performed by the client when accessing the storage system, including reading and writing files. Read / write data size refers to the amount of data involved when the client performs read / write operations, which can be adjusted according to business needs and affects the efficiency and performance of data transmission.
[0101] It should be noted that by mounting the storage sharing service of the file storage gateway, the client can transparently access the storage resources provided by the file storage gateway, realizing an effective connection between the client and the storage system. This ensures that the client can perform data read and write operations seamlessly. This step supports multiple clients accessing shared resources simultaneously, improving the flexibility and scalability of the storage system and facilitating efficient data management and collaboration in complex business scenarios.
[0102] S203 configures each node with IPMI to complete the construction of the test environment.
[0103] IPMI (Intelligent Platform Management Interface) is an industry-standard hardware management interface specification used for remote management and monitoring of hardware devices such as servers. Through IPMI tools, administrators can perform various management operations on servers remotely, such as power management, temperature monitoring, and fault diagnosis.
[0104] In one possible implementation, S203 specifically includes:
[0105] Configure IPMI for each node by setting the node IPMI address, node username, and node password.
[0106] It should be noted that by using the test environment building module to automatically create standardized test environments, not only is testing efficiency improved, but the consistency of the environment is also ensured, the possibility of human configuration errors is reduced, the testing process is made faster, different testing requirements can be responded to quickly, and the environment is ensured to meet actual production conditions.
[0107] S3 uses the result recording module to record the first data read / write log under the client business.
[0108] In one possible implementation, the results recording module includes the vdbench tool.
[0109] vdbench (Veritas Storage Benchmark) is a tool used to evaluate and compare the performance of different storage devices. vdbench can simulate real workloads and test the read and write performance, durability, consistency and other metrics of storage devices.
[0110] It should be noted that by recording the first data read and write logs under the client business in detail through the result recording module, it can be ensured that the data operations under normal business operation are completely saved, providing accurate benchmark data for subsequent fault simulation and performance comparison. This facilitates precise analysis of the performance of the file storage gateway and the differences in system behavior before and after the fault, and improves the reliability and traceability of the test results.
[0111] S4, in the test environment, uses the fault simulation module to simulate client services under different fault types by using the file storage gateway node as a virtual fault node.
[0112] Among them, the file storage gateway node refers to an independent physical or virtual node in the file storage gateway system, which is responsible for handling the client's file storage requests. The faulty virtual node is a node that is artificially simulated as a faulty state during the test to evaluate the performance of the file storage gateway under fault conditions.
[0113] In one possible implementation, S4 specifically includes:
[0114] S401, retrieve the node to which the virtual IP used by the file storage gateway belongs under the current file sharing service.
[0115] Virtual IPs are IP addresses allocated to achieve high availability. They are not bound to a specific physical network interface and can dynamically migrate between different nodes, so that clients do not need to be aware of node changes when accessing the file storage gateway.
[0116] It should be noted that by obtaining the node to which the virtual IP used under the current file sharing service belongs, the specific node that handles client requests can be determined, and the faulty node can be accurately simulated when the system fails.
[0117] S402, designate the file storage gateway node corresponding to the node to which the virtual IP belongs as the faulty virtual node.
[0118] S403, designed to simulate different types of faults in client services, uses the IPMI tool to power off faulty virtual nodes according to predetermined rules and schedules.
[0119] It should be noted that by using the fault simulation module to simulate faults in the file storage gateway node, the gateway's response capabilities and recovery mechanisms under different types of faults can be comprehensively tested, verifying its high availability, fault tolerance, and automatic switching capabilities. This ensures that the system can still operate stably when faults occur in the actual production environment, minimizing the risk of business interruption.
[0120] S5 uses the result recording module to record the second data read / write logs under the faulty virtual node and the drift time for the faulty virtual node to recover to normal.
[0121] The drift duration refers to the time interval between the file storage gateway switching from the failed node to another normal node and restoring service after a node failure (i.e., the time it takes for the failed node to recover and switch back).
[0122] In one possible implementation, S5 specifically includes:
[0123] S501, with the goal of ensuring the file storage gateway responds to the fault, waits for a first preset time before powering on the faulty virtual node.
[0124] It should be noted that those skilled in the art can set the size of the first preset duration according to actual needs, and the present invention does not limit this.
[0125] S502, wait for the second preset duration, record the second data read / write log and drift duration.
[0126] The drift duration refers to the time required for the virtual IP to automatically switch (drift) from the failed node to another normal node when a node failure occurs in the file storage gateway. This time represents the process from the detection of the fault to the restoration of normal service.
[0127] It should be noted that those skilled in the art can set the size of the second preset duration according to actual needs, and the present invention does not limit this.
[0128] It should be noted that by recording the second data read / write logs and drift duration during the failure, the system's performance under failure conditions can be tracked in detail. This provides an accurate data foundation for evaluating the system's high availability, enabling the system to quickly switch over and restore services when a failure occurs, reducing downtime and ensuring business continuity.
[0129] S6. Analyze the first data read / write log and the second data read / write log through the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, output the test result of the file storage gateway as normal; otherwise, proceed to step S7.
[0130] The results analysis module includes a shell script, which can be used to determine the test results. Specifically, it extracts the start and end timestamps of consecutive zero data regions from the first and second log records. The start and end timestamps together form a time region. The duration of the start and end timestamps is calculated. The number of time regions with a duration of not less than 30 seconds is counted. If the number of time regions exceeds a certain limit, the file storage gateway is determined to be unqualified, i.e., its high availability is insufficient, and the test fails.
[0131] It should be noted that those skilled in the art can set the preset drift duration according to actual needs, and this invention does not limit it.
[0132] In one possible implementation, the first data read / write log and the second data read / write log are analyzed through a result analysis module, specifically including:
[0133] Verify the consistency between the first and second data read / write logs by checking the execution logs and the vdbench business generation logs.
[0134] By checking the node to which the virtual IP of the file gateway group belongs, determine whether the faulty virtual node has successfully migrated to another node and record the migration duration.
[0135] It should be noted that by using the results analysis module to compare the first and second data read and write logs in detail and check the drift duration, the performance of the file storage gateway under fault conditions can be accurately evaluated. This enables the file storage gateway to recover quickly and maintain data consistency after a fault occurs, and determines whether the test results meet the preset standards. This helps to identify potential problems and improve the stability and reliability of the system.
[0136] S7, through the monitoring and alarm module, outputs an abnormal test result of the file storage gateway and issues an alarm message.
[0137] It should be noted that the monitoring and alarm module can automatically detect and report test anomalies of the file storage gateway, enabling real-time fault alarms, shortening the time for problem discovery and handling, and allowing maintenance personnel to quickly locate and resolve problems, thus preventing further impact from system failures.
[0138] The beneficial effects of this invention are as follows:
[0139] In this embodiment of the invention, the test environment construction module can automatically create a test environment for the file storage gateway, reducing the complexity of manual configuration and improving the flexibility and efficiency of testing. The fault simulation module can simulate different types of fault scenarios, comprehensively covering a variety of fault conditions, and more comprehensively testing the file storage gateway in business scenarios. This ensures that the file storage gateway can still maintain normal operation and rapid recovery under various complex fault conditions. The result recording module records the read and write logs of client services under normal and fault conditions in detail, making data analysis and comparison more comprehensive and accurate. This enables precise testing of the high availability and security of the file gateway, further improving the reliability and stability of the file storage gateway.
[0140] Device Examples
[0141] Reference manual attached Figure 3The diagram shows a structural schematic of a high availability testing device for a file storage gateway provided in an embodiment of the present invention.
[0142] Another specific embodiment of the present invention discloses a high availability testing device for a file storage gateway, used to implement the high availability testing method for a file storage gateway according to any one of the method embodiments, and applied to a high availability testing platform for a file storage gateway. The high availability testing platform for the file storage gateway includes a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected in sequence. The high availability testing device 20 for the file storage gateway includes:
[0143] Module 201 is used to obtain client business information;
[0144] Module 202 is used to build a test environment for the file storage gateway through the test environment building module;
[0145] The first recording module 203 is used to record the first data read and write log under the client business using the result recording module;
[0146] Simulation module 204 is used in a test environment to simulate client services under different fault types by using the file storage gateway node as a virtual fault node.
[0147] The second recording module 205 is used to record the second data read / write log under the faulty virtual node and the drift time when the faulty virtual node recovers to normal using the result recording module.
[0148] Analysis module 206 is used to analyze the first data read / write log and the second data read / write log through the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, the test result of the file storage gateway is output as normal; otherwise, the alarm module is entered.
[0149] The alarm module 207 is used to issue alarm information when the test results of the file storage gateway are abnormal, by monitoring the alarm module output.
[0150] In one possible implementation, the building module specifically includes:
[0151] Create a submodule to create a file gateway group for the file storage gateway, where the file gateway group includes multiple nodes;
[0152] Mounting submodules are used to mount the storage sharing services, i.e., client services, of the file storage gateway;
[0153] The configuration submodule is used to configure each node using IPMI and complete the construction of the test environment.
[0154] In one possible implementation, the mounting submodule is specifically used for:
[0155] Connect each client to the file storage system corresponding to the file storage gateway, and set the relevant parameters for each client, including access permissions, read / write operation type, and read / write data size.
[0156] In one possible implementation, the configuration submodule is specifically used for:
[0157] Configure IPMI for each node by setting the node IPMI address, node username, and node password.
[0158] In one possible implementation, the simulation module specifically includes:
[0159] The acquisition submodule is used to obtain the node to which the virtual IP used by the file storage gateway belongs under the current file sharing service;
[0160] The configuration submodule is used to set the file storage gateway node corresponding to the node to which the virtual IP belongs as a faulty virtual node;
[0161] The power-off module is used to simulate different types of faults in client services and, according to predetermined rules and schedules, to power off faulty virtual nodes using IPMI tools.
[0162] In one possible implementation, the second recording module specifically includes:
[0163] The electronic module is used to ensure that the file storage gateway responds to the fault and waits for a first preset time before powering on the faulty virtual node.
[0164] The recording submodule is used to wait for the second preset duration, record the second data read / write log and drift duration.
[0165] The beneficial effects of this invention are as follows:
[0166] In this embodiment of the invention, the test environment construction module can automatically create a test environment for the file storage gateway, reducing the complexity of manual configuration and improving the flexibility and efficiency of testing. The fault simulation module can simulate different types of fault scenarios, comprehensively covering a variety of fault conditions, and more comprehensively testing the file storage gateway in business scenarios. This ensures that the file storage gateway can still maintain normal operation and rapid recovery under various complex fault conditions. The result recording module records the read and write logs of client services under normal and fault conditions in detail, making data analysis and comparison more comprehensive and accurate. This enables precise testing of the high availability and security of the file gateway, further improving the reliability and stability of the file storage gateway.
[0167] System Implementation Examples
[0168] Reference manual attached Figure 4 The diagram shows a structural schematic of a high availability testing system for a file storage gateway provided in an embodiment of the present invention.
[0169] The present invention proposes a high availability testing system 30 for a file storage gateway, comprising: a memory 303 and one or more processors 301.
[0170] The memory 303 stores one or more applications, which are adapted to be executed by one or more processors 301 to implement the high availability testing method for the file storage gateway of the method embodiment.
[0171] The high availability test system 30 for the file storage gateway includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302.
[0172] The structure of the high availability testing system 30 for the file storage gateway does not constitute a limitation on the embodiments of the present invention.
[0173] Processor 301 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0174] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI bus or an EISA bus, etc. Bus 302 may be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus.
[0175] The memory 303 may be a ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0176] Computer-readable storage medium embodiments
[0177] The present invention proposes a computer-readable storage medium having a computer program stored thereon, the computer program being loadable and executed by a processor for a high availability testing method for a file storage gateway, as described in the first aspect.
[0178] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A high availability testing method for a file storage gateway, characterized in that, A high availability testing platform for file storage gateways, comprising a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected in sequence; the method includes: S1, Obtain client-side services; S2, construct the test environment for the file storage gateway using the test environment construction module; S3, using the result recording module, record the first data read / write log under the client service; S4. In the test environment, the fault simulation module is used to simulate client services under different fault types by using the file storage gateway node as a virtual fault node. S5, using the result recording module, record the second data read / write log under the faulty virtual node and the drift time for the faulty virtual node to recover to normal; S6, the first data read / write log and the second data read / write log are analyzed by the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, the test result of the file storage gateway is output as normal; otherwise, proceed to step S7. S7, the monitoring and alarm module outputs an abnormal test result of the file storage gateway and issues an alarm message.
2. The high availability testing method for a file storage gateway according to claim 1, characterized in that, S2 specifically includes: S201, Create a file gateway group for the file storage gateway, wherein the file gateway group includes multiple nodes; S202, The storage sharing service that mounts the file storage gateway is the client service; S203, Configure IPMI on each node to complete the construction of the test environment.
3. The high availability testing method for a file storage gateway according to claim 2, characterized in that, S201 specifically includes: S201A, Create a file storage group for the file storage gateway; S201B, Configure the storage device of the file storage gateway; S201C, Set the file sharing permissions of the file storage gateway to complete the creation of the file gateway group.
4. The high availability testing method for a file storage gateway according to claim 2, characterized in that, Specifically, S202 is as follows: Connect each client to the file storage system corresponding to the file storage gateway, and set the relevant parameters for each client, including access permissions, read / write operation type, and read / write data size.
5. The high availability testing method for a file storage gateway according to claim 2, characterized in that, Specifically, S203 is: Configure IPMI for each node by setting the node IPMI address, node username, and node password.
6. The high availability testing method for a file storage gateway according to claim 1, characterized in that, The results recording module includes the vdbench tool.
7. The high availability testing method for a file storage gateway according to claim 1, characterized in that, S4 specifically includes: S401, Obtain the node to which the virtual IP used by the file storage gateway belongs under the current file sharing service; S402, set the file storage gateway node corresponding to the node to which the virtual IP belongs as a faulty virtual node; S403, with the aim of simulating different fault types of the client service, the faulty virtual node is powered off using the IPMI tool according to predetermined rules and schedule.
8. The high availability testing method for a file storage gateway according to claim 1, characterized in that, S5 specifically includes: S501, with the goal of ensuring that the file storage gateway responds to the fault, wait for a first preset time and power on the faulty virtual node; S502, wait for the second preset time, and record the second data read / write log and the drift time.
9. The high availability testing method for a file storage gateway according to claim 2, characterized in that, The analysis of the first data read / write log and the second data read / write log by the result analysis module specifically includes: Verify the consistency between the first data read / write log and the second data read / write log by checking the execution log and the vdbench service generation log. By checking the node to which the virtual IP of the file gateway group belongs, it can be determined whether the faulty virtual node has successfully migrated to another node, and the migration duration can be recorded.
10. A high availability testing device for a file storage gateway, characterized in that, A high availability testing platform for file storage gateways, comprising a test environment construction module, a fault simulation module, a result recording module, a result analysis module, and a monitoring and alarm module connected in sequence, and the high availability testing device for the file storage gateway includes: The acquisition module is used to acquire client business information; A building module is used to build a test environment for the file storage gateway through the test environment building module; The first recording module is used to record the first data read / write log under the client service using the result recording module; The simulation module is used in the test environment to simulate client services under different fault types by using the file storage gateway node as a virtual fault node. The second recording module is used to record the second data read / write log under the faulty virtual node and the drift time when the faulty virtual node recovers to normal using the result recording module. The analysis module is used to analyze the first data read / write log and the second data read / write log through the result analysis module. If the first data read / write log and the second data read / write log are consistent and the drift time is less than the preset drift time, the test result of the file storage gateway is output as normal; otherwise, the alarm module is entered. The alarm module is used to issue alarm information when the test results of the file storage gateway are abnormal, as indicated by the monitoring and alarm module.
Citation Information
Patent Citations
Bus robustness testing method and system
CN108733523A
Fault monitoring period test method and system and computer storage medium
CN111459734A