A data error positioning method, device, equipment and medium
Patent Information
- Application Number
- CN202411892671.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2044-12-20
AI Technical Summary
[0003]而在常规的测试过程中,这种数据错误定位方法具有很大的滞后性,一般问题发生很久了才被发现,一方面是因为日志数据量庞大且复杂,分析过程可能耗时较长,且需要专业的日志分析工具和技术人员;同时日志中的信息可能包含大量噪声和冗余,需要有效的筛选和聚合才能提取出有用的信息;二方面是需要耗费大量人力:存储系统内部有多个模块,各模块由专人进行负责维护,且模块间保持相对的独立性,日志分析需要多个模块人员同时进行分析比对,则需要投入大量人工干预来查找日志,定位解决问题,就增加了处理问题的时间和成本
[0083]本申请通过脚本工具,在检测到数据不一致时迅速响应,将问题定位到存储端内部的具体单元,缩短了传统手动排查问题的时间,提高了数据错误定位的效率。
Smart Images

Figure CN119739555B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data error location method, apparatus, device, and medium. Background Technology
[0002] Currently, when the host discovers a data inconsistency issue, the storage end uses a detailed logging system to locate the inconsistency. Detailed logging is enabled in the storage system to ensure that all critical operations are recorded, including data read / write, transaction processing, and error messages. When a data inconsistency issue is detected, logs are collected, stored, and analyzed. Through filtering, sorting, and aggregation, log entries related to the data inconsistency are located. Combined with alarm information and log analysis, operations or events that may have caused the data inconsistency within the alarm's timeframe are identified.
[0003] In conventional testing, this data error localization method has a significant time lag, often failing to detect problems long after they occur. This is due to two main reasons: firstly, the log data is massive and complex, making analysis time-consuming and requiring specialized log analysis tools and technical personnel; secondly, the log information may contain a large amount of noise and redundancy, necessitating effective filtering and aggregation to extract useful information; and thirdly, it requires substantial manpower: the storage system has multiple modules, each maintained by dedicated personnel, and these modules maintain relative independence. Log analysis requires simultaneous analysis and comparison by personnel from multiple modules, necessitating significant manual intervention to search logs, locate and resolve problems, thus increasing both time and cost. Summary of the Invention
[0004] To overcome the aforementioned technical deficiencies, the purpose of this application is to provide a data error localization method, apparatus, device, and medium. The method includes: activating a monitoring script to acquire data information from the storage end and the expected data information to be written to the host end for the first time; comparing the data information from the storage end with the expected data information to be written to the host end for the first time to determine whether the data information from the storage end is consistent with the expected data information to be written to the host end for the first time; in response to the inconsistency between the data information from the storage end and the expected data information to be written to the host end for the first time, stopping the host read / write operation and collecting the error data location information, determining the mapping location of the error data in the storage end protocol unit based on the error data location information and the host volume mapping information; determining the mapping address of the error data in each storage unit by executing a script based on the mapping location of the error data in the storage end protocol unit and the mapping relationship of each storage unit; each storage unit reading data according to the mapping address of the error data in each storage unit, and analyzing the data in each storage unit step by step to locate the data error. This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0005] The specific technical solutions provided in this application are as follows:
[0006] In a first aspect, this application provides a data error location method, which is applied to a data error location system. The system includes a host terminal and a storage terminal, the host terminal being connected to the storage terminal, and the storage terminal including a plurality of storage units. The method includes:
[0007] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0008] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0009] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0010] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0011] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0012] In one embodiment, before starting the monitoring script and obtaining data information from the storage end and the expected data information to be written to the host end for the first time, the following steps are included:
[0013] A read / write channel is established between the host and the storage using an IO load read / write tool;
[0014] Perform anomaly verification on the read / write channel;
[0015] The anomaly check of the read / write channel includes:
[0016] Check the status code return value of the read / write channel;
[0017] The data integrity of the read / write channel is verified using a cyclic redundancy check function.
[0018] An error handling mechanism is used to handle abnormal errors in the read / write channel.
[0019] In one embodiment, the storage unit includes a protocol forwarding unit, a cache volume unit, an array management unit, and a hard disk drive unit. The protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit are interconnected. The step of reading data according to the mapping address of the error data in each storage unit and analyzing the data in each storage unit level by level to locate the data error includes:
[0020] Each storage unit reads the corresponding data from the mapped address of its respective storage unit based on the error data;
[0021] The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit.
[0022] Determine whether the data read from each storage unit is consistent with the data written by the host for the first time;
[0023] If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time.
[0024] If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
[0025] In one embodiment, the method further includes:
[0026] If the data information read from the storage terminal is consistent with the expected data information written by the host terminal for the first time, the monitoring script will again compare and monitor the data information from the storage terminal and the expected data information written by the host terminal for the first time.
[0027] In one embodiment, the step of reading data according to the mapping address of the error data in each storage unit, analyzing the data in each storage unit level by level to locate the data error, includes:
[0028] Retrieve error data and operation records before and after the error time;
[0029] Generate a log file from the error data and the operation records before and after the error time, and save and analyze it;
[0030] If the data read from any storage unit is inconsistent with the data written by the host for the first time, an alarm is triggered on the storage side.
[0031] In one embodiment, the method includes:
[0032] The monitoring script and execution script are optimized.
[0033] The optimization of the monitoring script and the execution script includes:
[0034] The monitoring script and execution script are optimized by improving the data structure and algorithms to avoid redundant calculations; and / or
[0035] Accelerate script execution using multi-threading or multi-process modes; and / or
[0036] When the IO load read / write tool experiences intensive read / write operations, the monitoring script is optimized using an asynchronous programming model; and / or when temporary errors occur, retry logic is used to improve the monitoring and execution scripts; and / or
[0037] Record monitoring and execution data logs, and use the monitoring and execution data logs to troubleshoot monitoring scripts and execution scripts in order to optimize the monitoring scripts and execution scripts. The monitoring and execution data logs include at least one of the following: script input parameters, script output results, and script key state change data.
[0038] In one embodiment, the method includes:
[0039] When each storage unit reads data from the mapped address of each storage unit according to the error data, and analyzes the data of each storage unit level by level to locate the data error, the data error is located by logging at the storage end.
[0040] The method of locating data errors by recording logs on the storage side includes:
[0041] Enable logging functionality on the storage device, wherein the logs include data read / write, transaction processing, and error information;
[0042] In response to the discrepancy between the data read from the storage terminal and the expected data written by the host terminal for the first time, the storage terminal log data is filtered and aggregated to determine the log entries related to the discrepancy with the host terminal's expected data, and the event causing the data discrepancy is determined based on the log entries related to the discrepancy with the host terminal's expected data.
[0043] Secondly, this application also provides a data error location device, the device comprising:
[0044] The acquisition module is used to acquire data information from the storage end and the expected data information for the first write from the host end through the monitoring script;
[0045] The judgment module is used to compare the data information on the storage end with the expected data information written by the host end for the first time, and to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0046] The first determining module is used to respond to the inconsistency between the data information on the storage end and the expected data information written by the host end for the first time, to stop the host read and write operation, collect the error data location information, and determine the mapping position of the error data in the storage end protocol unit based on the error data location information and the host volume mapping information.
[0047] The second determining module is used to determine the mapping address of the error data in each storage unit by executing a script based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit;
[0048] The location module is used to read data according to the mapping address of the error data in each storage unit, and analyze the data of each storage unit step by step to locate the data error.
[0049] Thirdly, a data error location device is also provided, comprising:
[0050] One or more processors;
[0051] Storage device for storing one or more programs;
[0052] When the one or more programs are executed by the one or more processors, the one or more processors implement the data error location method as described in any of the first aspects.
[0053] Fourthly, this application also provides a computer device, the device comprising:
[0054] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the data error location method as described in any of the first aspects.
[0055] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data error location method described in any of the first aspects.
[0056] Sixthly, this application also provides a computer storage medium, the medium comprising:
[0057] It stores a computer program that, when executed by a processor, implements the steps of the data error location method described in any of the first aspects.
[0058] Compared with existing technologies, the method of the technical solution provided in this application includes: starting a monitoring script to obtain data information from the storage end and the expected data information to be written to the host end for the first time; comparing the data information from the storage end and the expected data information to be written to the host end for the first time to determine whether the data information from the storage end is consistent with the expected data information to be written to the host end for the first time; in response to the inconsistency between the data information from the storage end and the expected data information to be written to the host end for the first time, stopping the host read / write operation and collecting the error data location information, determining the mapping location of the error data in the storage end protocol unit according to the error data location information and the host volume mapping information; determining the mapping address of the error data in each storage unit by executing the script according to the mapping location of the error data in the storage end protocol unit and the mapping relationship of each storage unit; each storage unit reads data according to the mapping address of the error data in each storage unit, and analyzes the data of each storage unit step by step to locate the data error. This application, through a script tool, responds quickly when data inconsistency is detected, locates the problem to a specific unit inside the storage end, shortens the time of traditional manual troubleshooting, and improves the efficiency of data error location.
[0059] The technical solution provided in this application further refines the traditional testing process through automated processes and tool scripts, enabling timely discovery and resolution of problems during the testing phase. Testers can accurately locate problematic modules and communicate with the corresponding R&D personnel in a timely and accurate manner, reducing the need for manual input from R&D personnel and thus lowering labor costs.
[0060] The technical solution provided in this application enables technicians to quickly locate and repair fault points in the storage system through precise problem localization, thereby enhancing the stability and reliability of the storage system; it helps reduce the risk of business interruption and data loss caused by storage failures; at the same time, the technical solution of this application not only solves the problems in the current data consistency testing of storage systems, but also provides a foundation for future technological innovation. By continuously optimizing and improving the tool scripts and localization methods, the performance and reliability of the storage system can be further improved. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is an architecture diagram of the data error localization system provided in Embodiment 1 of this application;
[0063] Figure 2 This is a first flowchart of the data error localization method provided in Embodiment 1 of this application;
[0064] Figure 3 This is a second flowchart of the data error localization method provided in Embodiment 2 of this application;
[0065] Figure 4 A detailed flowchart of the data error localization method provided in Embodiment 2 of this application;
[0066] Figure 5 This is a structural diagram of the data error location device provided in Embodiment 3 of this application;
[0067] Figure 6 This is an exemplary system provided for Embodiment Seven of this application, which can be used to implement the various embodiments described in this application. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0069] It should be noted that, unless the context explicitly requires it, the words "comprising," "including," and similar terms in the entire specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."
[0070] Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0071] As global informatization continues to increase, massive amounts of high-value data are being generated at an accelerated pace. The amount of data generated and stored within enterprises is rising sharply, and this exponentially growing high-value data presents many challenges to enterprise IT departments. In the era of big data, the explosive growth of data has made data consistency issues in storage systems a key challenge to ensure data reliability and system stability.
[0072] Centralized storage systems achieve centralized management and maintenance of data by storing all data centrally on one or more high-performance storage devices. This storage method not only simplifies data management processes and improves data access efficiency, but also effectively ensures data consistency through centralized control mechanisms. However, centralized storage systems also face some challenges, especially in maintaining data consistency. Since all data is stored centrally, data loss or inconsistency may occur if the storage device fails or the network is interrupted. When data inconsistency occurs, developers need to quickly resolve the problem to reduce the risk to customer data security. This requires first quickly locating the module within the storage system where data inconsistency occurs, narrowing down the scope of the problem, and then focusing on tackling it. Therefore, this application proposes a method for quickly locating data inconsistency during the testing process of a centralized storage system.
[0073] Example 1
[0074] This application provides a method for locating data errors, such as... Figure 1 , 2 As shown, the method is applied to a data error location system. The system includes a host terminal and a storage terminal, the host terminal being connected to the storage terminal, and the storage terminal including several storage units. The method includes:
[0075] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0076] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0077] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0078] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0079] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0080] Specifically, this application proposes an end-to-end method for centrally storing data inconsistencies during testing. When conducting data consistency tests on stored data in a storage system, the method detects inconsistencies by rereading the IO (Input / Output) requests issued by the host. The storage end monitors the IO results from the host end. When a data inconsistency problem is detected, the storage end actively suspends new data read / write operations. By calling script tools and using error data for data analysis, the error is accurately located to the internal storage unit where the problem occurred, thus improving the efficiency of the problem-solving and location method.
[0081] During the test, the host computer uses the Vdbench tool (an I / O load read / write tool) to perform high-pressure I / O load read / write operations on the storage system. Vdbench supports using the -VR parameter for data verification during I / O read / write operations. When this parameter is specified, Vdbench includes three phases: Write phase: Vdbench first performs write operations according to the specified test parameters (such as I / O size, read / write ratio, random or sequential seek, etc.), and the written data is stored on the target storage device according to the test requirements; Verification phase: After the write operation is completed, Vdbench immediately verifies the newly written data. This phase mainly ensures that the data written to the storage unit is consistent with the data expected by the host, and that there is no data corruption or loss; Read phase: After the verification phase, Vdbench also performs read operations, mainly to verify the readability and integrity of the data.
[0082] The beneficial effects of the technical solutions provided in this application are:
[0083] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0084] The technical solution provided in this application further refines the traditional testing process through automated processes and tool scripts, enabling timely discovery and resolution of problems during the testing phase. Testers can accurately locate problematic modules and communicate with the corresponding R&D personnel in a timely and accurate manner, reducing the need for manual input from R&D personnel and thus lowering labor costs.
[0085] The technical solution provided in this application enables technicians to quickly locate and repair fault points in the storage system through precise problem localization, thereby enhancing the stability and reliability of the storage system; it helps reduce the risk of business interruption and data loss caused by storage failures; at the same time, the technical solution of this application not only solves the problems in the current data consistency testing of storage systems, but also provides a foundation for future technological innovation. By continuously optimizing and improving the tool scripts and localization methods, the performance and reliability of the storage system can be further improved.
[0086] Example 2
[0087] This application provides a method for locating data errors, such as... Figure 3 As shown, the method includes:
[0088] Step S01: Establish a read / write channel between the host and the storage end using an IO load read / write tool;
[0089] Perform anomaly verification on the read / write channel;
[0090] The anomaly check of the read / write channel includes:
[0091] Check the status code return value of the read / write channel;
[0092] The data integrity of the read / write channel is verified using a cyclic redundancy check function.
[0093] An error handling mechanism is used to handle abnormal errors in the read / write channel.
[0094] Specifically, the reason why it takes a lot of manpower to locate data inconsistency problems is that it is impossible to determine which unit inside the storage is processing the read and write operations when the data changes. Moreover, after the error is discovered, the storage is still processing new IO read and write operations, which may cover up the error. Here, this application proposes an end-to-end location method for centralized storage data inconsistency during the testing process.
[0095] Configure the storage device to provide read / write volumes to the host and establish read / write channels with the host; ensure that the storage system can perform normal data write operations and that the storage system is free of abnormalities; after configuring the host, use the host to apply IO pressure to the storage device, and set the IO model according to the test requirements.
[0096] Step S02: Start the monitoring script and obtain the data information from the storage end and the expected data information to be written to the host end for the first time through the monitoring script;
[0097] The data information on the storage end is compared with the expected data information written to the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written to the host end for the first time.
[0098] Step S03: In response to the data information read by the storage end being inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping position of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0099] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0100] Specifically, the monitoring script is started to detect the host's IO read and write results. If any data inconsistency is found, the monitoring script immediately stops the read and write scripts on the host side and stops all read and write operations in each unit inside the storage.
[0101] After the monitoring script stops storage read and write operations, the collection and analysis script starts to collect error data from the host. After collecting the error data, the expected data of the host and the actual error data of the storage unit are obtained, and the mapping address of the storage unit where the error occurred is obtained.
[0102] Understandably, this is achieved by encapsulating two tool scripts. These scripts need to update key calculation methods based on the specific operating mode of the storage system and the spatial mapping relationship of each storage unit. The specific functions and processes implemented are as follows:
[0103] Enable the monitoring script to obtain the IO read and write information returned by the vdbench tool in real time;
[0104] When a data inconsistency error is detected, read and write commands are stopped, and the storage device is remotely controlled from the host to stop read and write operations.
[0105] The host collects key read and write information from the vdbench tool, including the location of error data and the time of data writing, the error data, and the host's expected data.
[0106] Based on the location of the error data and the host volume mapping information, calculate the mapping location of the error data in the storage protocol unit;
[0107] The host controls the login to the storage device, sends the error data, the host's expected data, and the location of the error data in the storage-side protocol unit to the execution script, and then starts the execution script.
[0108] In step S04, each storage unit reads data from the mapped address of the error data and analyzes the data of each storage unit step by step to locate the data error.
[0109] Specifically, based on the data collected by the host, the storage end performs data comparison and analysis layer by layer, starting from "protocol unit - cache unit - volume unit - RAID unit - hard disk unit". Each module reads the data and compares it with the expected data of the host. The results are analyzed from top to bottom. If the read data is consistent with the expected data, the analysis continues to the next storage unit; if the read data is inconsistent with the erroneous data, it indicates that there is a data error problem in this unit.
[0110] Based on the comparison results, the faulty storage unit was identified, and the logs of the faulty unit were analyzed to guide the R&D personnel of that unit in confirming the error.
[0111] Step S04 also includes:
[0112] Step S041: Each storage unit reads the corresponding data from the mapped address of each storage unit according to the error data;
[0113] The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit.
[0114] Determine whether the data read from each storage unit is consistent with the data written by the host for the first time;
[0115] If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time.
[0116] If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
[0117] Specifically, after starting the execution script, the data transmitted by the monitoring script is obtained (the location of the error data in the storage protocol unit);
[0118] Based on the location of the transmitted error data in the storage protocol unit, the mapping address of the error data in each unit is calculated using the mapping method and spatial distribution method between the units.
[0119] Each module (unit) reads data according to the calculated mapping address of each unit and compares it with the host's expected data in reverse. A storage unit flag bit Compare_flag is set. If the read data is consistent with the host's expected data, the flag bit is set to 1 (first preset value). If the read data is inconsistent with the host's expected data, the flag bit is set to 0 (second preset value).
[0120] The results of reading data from each storage unit are analyzed by comparing them from top to bottom. The first storage unit to show erroneous data is the faulty module.
[0121] Step S05: In response to the data information read by the storage terminal being consistent with the expected data information written by the host terminal for the first time, the data information of the storage terminal and the expected data information written by the host terminal for the first time are compared and monitored again through the monitoring script.
[0122] Step S06: Obtain the error data and operation record information before and after the error time;
[0123] Generate a log file from the error data and the operation records before and after the error time, and save and analyze it;
[0124] If the data read from any storage unit is inconsistent with the data written by the host for the first time, an alarm is triggered on the storage side.
[0125] Specifically, data is collected and saved based on the positioning information provided by the R&D personnel, such as data information of the error storage unit and operation records before and after the error time, and log files are generated for data analysis.
[0126] If the data read from any storage unit is inconsistent with the data written by the host for the first time, a storage alarm is triggered.
[0127] Step S07: Optimize the monitoring script and the execution script;
[0128] The optimization of the monitoring script and the execution script includes:
[0129] The monitoring script and execution script are optimized by improving the data structure and algorithms to avoid redundant calculations; and / or
[0130] Accelerate script execution using multi-threading or multi-process modes; and / or
[0131] When the IO load read / write tool experiences intensive read / write operations, the monitoring script is optimized using an asynchronous programming model; and / or when temporary errors occur, retry logic is used to improve the monitoring and execution scripts; and / or
[0132] Record monitoring and execution data logs, and use the monitoring and execution data logs to troubleshoot monitoring scripts and execution scripts in order to optimize the monitoring scripts and execution scripts. The monitoring and execution data logs include at least one of the following: script input parameters, script output results, and script key state change data.
[0133] Step S08: When each storage unit reads data from the mapped address of each storage unit according to the error data, analyzes the data of each storage unit level by level, and locates the data error, the data error is located by logging at the storage end.
[0134] The method of locating data errors by recording logs on the storage side includes:
[0135] Enable logging functionality on the storage device, wherein the logs include data read / write, transaction processing, and error information;
[0136] In response to the discrepancy between the data read from the storage terminal and the expected data written by the host terminal for the first time, the storage terminal log data is filtered and aggregated to determine the log entries related to the discrepancy with the host terminal's expected data, and the event causing the data discrepancy is determined based on the log entries related to the discrepancy with the host terminal's expected data.
[0137] like Figure 4 As shown, one of the key technical points of this application is that it can automatically monitor the data consistency in the storage system and respond quickly when inconsistency is detected. This is achieved by introducing a specific monitoring script, which can obtain IO read and write information in real time, and immediately stop read and write operations and collect on-site information when an error is detected, and start the storage side to analyze the data.
[0138] Another key technical aspect is the ability to accurately pinpoint data inconsistency issues to specific units within the storage system. This is achieved through script execution, which utilizes the mapping and spatial distribution between storage units to calculate the mapping address of the erroneous data in each storage unit. By comparing the read data with the expected data, the faulty module is located. This end-to-end localization method, starting from the host side, uses the collaboration of monitoring and execution scripts to locate the problem to a specific module on the storage side. This method ensures the accuracy and comprehensiveness of problem localization.
[0139] The core elements to be protected in this application include the innovativeness of its technical solution, the uniqueness of its tool scripts, and the realization of its technical effects. First, this application provides a novel method for locating data consistency testing problems in storage systems by introducing automated monitoring, precise problem localization, and end-to-end localization methods. Second, the tool scripts of this application, as a core component of the technical solution, achieve automated monitoring and problem localization functions through specific algorithms and logic. The uniqueness and innovation of these scripts make them an important object of protection in this application. Finally, this technical solution can significantly improve the efficiency of problem localization, reduce labor costs, enhance the stability of storage systems, and optimize the testing process.
[0140] In addition, the data error location method further includes:
[0141] The data error localization method is optimized based on the log file generated from the error data and the operation records before and after the error time;
[0142] The optimization of the data error location method based on the log file generated from the error data and the operation records before and after the error time includes:
[0143] The correlation analysis strategy is used to reveal the correlation between statements and execution results in the program execution log.
[0144] The log file statements after correlation analysis are sorted using a sorting strategy to generate an error location report; and / or
[0145] Narrowing the scope of data error location through dynamic slicing; and / or
[0146] Use database management tools to view and analyze error log files, and quickly locate data inconsistency errors in storage units within specific time periods or of specific types using filtering and search functions; and / or
[0147] By analyzing query performance, identify slow or failed log queries to pinpoint potential data inconsistency errors; and / or
[0148] Information-based defect localization methods dynamically adjust the data error localization process based on log events and statement execution information; and / or
[0149] Data is extracted from storage units, cleaned, and distributed to multiple targets. This data is then compared with the expected data on the host, anomaly logs are parsed, and the data is delivered to different logstores. Data analysis is performed on the anomaly logs from different storage units; and / or
[0150] The error localization method is optimized based on the statement coverage information and predicate coverage information of the log file generated from the error data and the operation records before and after the error time.
[0151] In summary, optimizing data error localization methods can be approached from multiple angles, including correlation analysis, error log analysis, query performance analysis, information-based methods, log service data processing and analysis, and model combination methods. These methods can help to more accurately locate and resolve data errors.
[0152] The data error location method provided in this application embodiment can be improved and optimized in several ways without departing from the technical solution of this application, and these improvements and optimizations should also be considered within the protection scope of this application.
[0153] The beneficial effects of the technical solutions provided in this application are:
[0154] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0155] The technical solution provided in this application further refines the traditional testing process through automated processes and tool scripts, enabling timely discovery and resolution of problems during the testing phase. Testers can accurately locate problematic modules and communicate with the corresponding R&D personnel in a timely and accurate manner, reducing the need for manual input from R&D personnel and thus lowering labor costs.
[0156] The technical solution provided in this application enables technicians to quickly locate and repair fault points in the storage system through precise problem localization, thereby enhancing the stability and reliability of the storage system; it helps reduce the risk of business interruption and data loss caused by storage failures; at the same time, the technical solution of this application not only solves the problems in the current data consistency testing of storage systems, but also provides a foundation for future technological innovation. By continuously optimizing and improving the tool scripts and localization methods, the performance and reliability of the storage system can be further improved.
[0157] Example 3
[0158] This application provides a data error location device, such as... Figure 5 As shown, the device includes: a verification module, an acquisition module, a judgment module, a first determination module, a second determination module, a positioning module, an alarm module, and an optimization module.
[0159] In this embodiment, the acquisition module is used to acquire data information from the storage end and expected data information to be written to the host end for the first time through a monitoring script;
[0160] The judgment module is used to compare the data information on the storage end with the expected data information written by the host end for the first time, and to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0161] The first determining module is used to respond to the inconsistency between the data information on the storage end and the expected data information written by the host end for the first time, to stop the host read and write operation, collect the error data location information, and determine the mapping position of the error data in the storage end protocol unit based on the error data location information and the host volume mapping information.
[0162] The second determining module is used to determine the mapping address of the error data in each storage unit by executing a script based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit;
[0163] The location module is used to read data according to the mapping address of the error data in each storage unit, and analyze the data of each storage unit step by step to locate the data error.
[0164] In one embodiment, the verification module is used to establish a read / write channel between the host and the storage via an IO load read / write tool.
[0165] Perform anomaly verification on the read / write channel;
[0166] The anomaly check of the read / write channel includes:
[0167] Check the status code return value of the read / write channel;
[0168] The data integrity of the read / write channel is verified using a cyclic redundancy check function.
[0169] An error handling mechanism is used to handle abnormal errors in the read / write channel.
[0170] In one embodiment, the positioning module is used to read the corresponding data according to the mapping address of the error data in each storage unit;
[0171] The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit.
[0172] Determine whether the data read from each storage unit is consistent with the data written by the host for the first time;
[0173] If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time.
[0174] If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
[0175] In one embodiment, the first determining module is configured to, in response to the data information read by the storage terminal being consistent with the expected data information written by the host terminal for the first time, re-compare and monitor the data information of the storage terminal and the expected data information written by the host terminal for the first time through the monitoring script.
[0176] In one embodiment, the alarm module is used to acquire error data and operation record information before and after the error time;
[0177] Generate a log file from the error data and the operation records before and after the error time, and save and analyze it;
[0178] If the data read from any storage unit is inconsistent with the data written by the host for the first time, an alarm is triggered on the storage side.
[0179] In one embodiment, an optimization module is used to optimize the monitoring script and the execution script;
[0180] The optimization of the monitoring script and the execution script includes:
[0181] The monitoring script and execution script are optimized by improving the data structure and algorithms to avoid redundant calculations; and / or
[0182] Accelerate script execution using multi-threading or multi-process modes; and / or
[0183] When the IO load read / write tool experiences intensive read / write operations, the monitoring script is optimized using an asynchronous programming model; and / or when temporary errors occur, retry logic is used to improve the monitoring and execution scripts; and / or
[0184] Record monitoring and execution data logs, and use the monitoring and execution data logs to troubleshoot monitoring scripts and execution scripts in order to optimize the monitoring scripts and execution scripts. The monitoring and execution data logs include at least one of the following: script input parameters, script output results, and script key state change data.
[0185] In one embodiment, the positioning module is used to locate the data error by recording logs on the storage end when each storage unit reads data according to the error data at the mapping address of each storage unit, analyzes the data of each storage unit level by level, and locates the data error.
[0186] The method of locating data errors by recording logs on the storage side includes:
[0187] Enable logging functionality on the storage device, wherein the logs include data read / write, transaction processing, and error information;
[0188] In response to the discrepancy between the data read from the storage terminal and the expected data written by the host terminal for the first time, the storage terminal log data is filtered and aggregated to determine the log entries related to the discrepancy with the host terminal's expected data, and the event causing the data discrepancy is determined based on the log entries related to the discrepancy with the host terminal's expected data.
[0189] The beneficial effects of the technical solutions provided in this application are:
[0190] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0191] The technical solution provided in this application further refines the traditional testing process through automated processes and tool scripts, enabling timely discovery and resolution of problems during the testing phase. Testers can accurately locate problematic modules and communicate with the corresponding R&D personnel in a timely and accurate manner, reducing the need for manual input from R&D personnel and thus lowering labor costs.
[0192] Example 4
[0193] The present invention also provides a data error location device, comprising:
[0194] One or more processors;
[0195] Storage device for storing one or more programs;
[0196] When the one or more programs are executed by the one or more processors, the one or more processors perform the following data error localization method:
[0197] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0198] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0199] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0200] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0201] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0202] The beneficial effects of the technical solutions provided in this application are:
[0203] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0204] The technical solution provided in this application enables technicians to quickly locate and repair fault points in the storage system through precise problem localization, thereby enhancing the stability and reliability of the storage system; it helps reduce the risk of business interruption and data loss caused by storage failures; at the same time, the technical solution of this application not only solves the problems in the current data consistency testing of storage systems, but also provides a foundation for future technological innovation. By continuously optimizing and improving the tool scripts and localization methods, the performance and reliability of the storage system can be further improved.
[0205] Example 5
[0206] This application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can perform the following method for locating data errors:
[0207] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0208] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0209] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0210] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0211] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0212] The beneficial effects of the technical solutions provided in this application are:
[0213] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0214] The technical solution provided in this application further refines the traditional testing process through automated processes and tool scripts, enabling timely discovery and resolution of problems during the testing phase. Testers can accurately locate problematic modules and communicate with the corresponding R&D personnel in a timely and accurate manner, reducing the need for manual input from R&D personnel and thus lowering labor costs.
[0215] Example 6
[0216] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement a method for locating data errors as follows:
[0217] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0218] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0219] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0220] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0221] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0222] The beneficial effects of the technical solutions provided in this application are:
[0223] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0224] The technical solution provided in this application enables technicians to quickly locate and repair fault points in the storage system through precise problem localization, thereby enhancing the stability and reliability of the storage system; it helps reduce the risk of business interruption and data loss caused by storage failures; at the same time, the technical solution of this application not only solves the problems in the current data consistency testing of storage systems, but also provides a foundation for future technological innovation. By continuously optimizing and improving the tool scripts and localization methods, the performance and reliability of the storage system can be further improved.
[0225] Example 7
[0226] This application provides a computer storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0227] Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end;
[0228] The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time.
[0229] If the data information on the storage end is inconsistent with the expected data information written by the host end for the first time, the host read and write operation is stopped, and the error data location information is collected. The mapping location of the error data in the storage end protocol unit is determined according to the error data location information and the host volume mapping information.
[0230] The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the storage protocol unit and the mapping relationship of each storage unit.
[0231] Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error.
[0232] In one embodiment, before starting the monitoring script and obtaining data information from the storage end and the expected data information to be written to the host end for the first time, the following steps are included:
[0233] A read / write channel is established between the host and the storage using an IO load read / write tool;
[0234] Perform anomaly verification on the read / write channel;
[0235] The anomaly check of the read / write channel includes:
[0236] Check the status code return value of the read / write channel;
[0237] The data integrity of the read / write channel is verified using a cyclic redundancy check function.
[0238] An error handling mechanism is used to handle abnormal errors in the read / write channel.
[0239] In one embodiment, the storage unit includes a protocol forwarding unit, a cache volume unit, an array management unit, and a hard disk drive unit. The protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit are interconnected. The step of reading data according to the mapping address of the error data in each storage unit and analyzing the data in each storage unit level by level to locate the data error includes:
[0240] Each storage unit reads the corresponding data from the mapped address of its respective storage unit based on the error data;
[0241] The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit.
[0242] Determine whether the data read from each storage unit is consistent with the data written by the host for the first time;
[0243] If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time.
[0244] If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
[0245] In one embodiment, the method further includes:
[0246] If the data information read from the storage terminal is consistent with the expected data information written by the host terminal for the first time, the monitoring script will again compare and monitor the data information from the storage terminal and the expected data information written by the host terminal for the first time.
[0247] In one embodiment, the step of reading data according to the mapping address of the error data in each storage unit, analyzing the data in each storage unit level by level to locate the data error, includes:
[0248] Retrieve error data and operation records before and after the error time;
[0249] Generate a log file from the error data and the operation records before and after the error time, and save and analyze it;
[0250] If the data read from any storage unit is inconsistent with the data written by the host for the first time, an alarm is triggered on the storage side.
[0251] In one embodiment, the method includes:
[0252] The monitoring script and execution script are optimized.
[0253] The optimization of the monitoring script and the execution script includes:
[0254] The monitoring script and execution script are optimized by improving the data structure and algorithms to avoid redundant calculations; and / or
[0255] Accelerate script execution using multi-threading or multi-process modes; and / or
[0256] When the IO load read / write tool experiences intensive read / write operations, the monitoring script is optimized using an asynchronous programming model; and / or when temporary errors occur, retry logic is used to improve the monitoring and execution scripts; and / or
[0257] Record monitoring and execution data logs, and use the monitoring and execution data logs to troubleshoot monitoring scripts and execution scripts in order to optimize the monitoring scripts and execution scripts. The monitoring and execution data logs include at least one of the following: script input parameters, script output results, and script key state change data.
[0258] In one embodiment, the method includes:
[0259] When each storage unit reads data from the mapped address of each storage unit according to the error data, and analyzes the data of each storage unit level by level to locate the data error, the data error is located by logging at the storage end.
[0260] The method of locating data errors by recording logs on the storage side includes:
[0261] Enable logging functionality on the storage device, wherein the logs include data read / write, transaction processing, and error information;
[0262] In response to the discrepancy between the data read from the storage terminal and the expected data written by the host terminal for the first time, the storage terminal log data is filtered and aggregated to determine the log entries related to the discrepancy with the host terminal's expected data, and the event causing the data discrepancy is determined based on the log entries related to the discrepancy with the host terminal's expected data.
[0263] This application utilizes script tools to respond quickly when data inconsistency is detected, pinpointing the problem to a specific unit within the storage device. This reduces the time required for traditional manual troubleshooting and improves the efficiency of data error location.
[0264] Figure 6 This is an exemplary system provided for Embodiment Seven of this application, which can be used to implement the various embodiments described in this application;
[0265] like Figure 6 As shown, in some embodiments, the system can function as any of the aforementioned devices for data error localization in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having a result and one or more processors (e.g., one or more processors) coupled to the one or more computer-readable media and configured to execute the result to implement the module thereby performing the actions described in this application.
[0266] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0267] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0268] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for locating data errors, characterized in that, The method is applied to a data error localization system, which includes a host terminal and a storage terminal. The host terminal is connected to the storage terminal, and the storage terminal includes several storage units. Each storage unit includes a protocol forwarding unit, a cache volume unit, an array management unit, and a hard disk drive unit. The protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit are interconnected. The method includes: Enable the monitoring script to obtain data information from the storage end and the expected data information for the first write to the host end; The data information on the storage end is compared with the expected data information written by the host end for the first time to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time. If the data information at the storage end is inconsistent with the expected data information written by the host for the first time, the host read and write operation is stopped, and the location information of the error data is collected. The mapping position of the error data in the protocol forwarding unit is determined based on the location information of the error data and the host volume mapping information. The script is executed to determine the mapping address of the error data in each storage unit based on the mapping location of the error data in the protocol forwarding unit and the mapping relationship of each storage unit. Each storage unit reads data from its mapped address based on the error data, and analyzes the data in each storage unit level by level to locate the data error. The step of reading data according to the mapped addresses of the error data in each storage unit, and analyzing the data in each storage unit level by level to locate the data error includes: Each storage unit reads the corresponding data from the mapped address of its respective storage unit based on the error data; The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit. Determine whether the data read from each storage unit is consistent with the data written by the host for the first time; If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time. If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
2. The data error location method according to claim 1, characterized in that, Before starting the monitoring script and obtaining data information from the storage end and the expected data information written to the host for the first time, the following steps are included: A read / write channel is established between the host and the storage using an IO load read / write tool; Perform anomaly verification on the read / write channel; The anomaly check of the read / write channel includes: Check the status code return value of the read / write channel; The data integrity of the read / write channel is verified using a cyclic redundancy check function. An error handling mechanism is used to handle abnormal errors in the read / write channel.
3. The data error location method according to claim 1, characterized in that, The method further includes: If the data information read from the storage terminal is consistent with the expected data information written by the host terminal for the first time, the monitoring script will again compare and monitor the data information from the storage terminal and the expected data information written by the host terminal for the first time.
4. The data error location method according to claim 1, characterized in that, The step of reading data according to the mapping address of the error data in each storage unit, analyzing the data in each storage unit level by level to locate the data error, includes: Retrieve error data and operation records before and after the error time; Generate a log file from the error data and the operation records before and after the error time, and save and analyze it; If the data read from any storage unit is inconsistent with the data written by the host for the first time, an alarm is triggered on the storage side.
5. The data error location method according to claim 2, characterized in that, The method further includes: The monitoring script and execution script are optimized. The optimization of the monitoring script and the execution script includes: The monitoring script and execution script are optimized by improving the data structure and algorithms to avoid redundant calculations; and / or Accelerate script execution using multi-threading or multi-process modes; and / or When the IO load read / write tool experiences intensive read / write operations, the monitoring script is optimized using an asynchronous programming model; and / or when temporary errors occur, retry logic is used to improve the monitoring and execution scripts; and / or Record monitoring and execution data logs, and use the monitoring and execution data logs to troubleshoot monitoring scripts and execution scripts in order to optimize the monitoring scripts and execution scripts. The monitoring and execution data logs include at least one of the following: script input parameters, script output results, and script key state change data.
6. The data error location method according to claim 1, characterized in that, The method further includes: When each storage unit reads data from the mapped address of each storage unit according to the error data, and analyzes the data of each storage unit level by level to locate the data error, the data error is located by logging at the storage end. The method of locating data errors by recording logs on the storage side includes: Enable logging functionality on the storage device, wherein the logs include data read / write, transaction processing, and error information; In response to the discrepancy between the data read from the storage terminal and the expected data written by the host terminal for the first time, the storage terminal log data is filtered and aggregated to determine the log entries related to the discrepancy with the host terminal's expected data, and the event causing the data discrepancy is determined based on the log entries related to the discrepancy with the host terminal's expected data.
7. A data error location device, characterized in that, The device is applied to a data error localization system. The system includes a host terminal and a storage terminal, with the host terminal connected to the storage terminal. The storage terminal includes several storage units, each including a protocol forwarding unit, a cache volume unit, an array management unit, and a hard disk drive unit. The protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit are interconnected. The device includes: The acquisition module is used to acquire data information from the storage end and the expected data information for the first write from the host end through the monitoring script; The judgment module is used to compare the data information on the storage end with the expected data information written by the host end for the first time, and to determine whether the data information on the storage end is consistent with the expected data information written by the host end for the first time. The first determining module is used to respond to the inconsistency between the data information on the storage end and the expected data information written by the host end for the first time, to stop the host read and write operation, collect the error data location information, and determine the mapping position of the error data in the protocol forwarding unit based on the error data location information and the host volume mapping information. The second determining module is used to determine the mapping address of the error data in each storage unit by executing a script based on the mapping position of the error data in the protocol forwarding unit and the mapping relationship of each storage unit; The positioning module is used to read data according to the mapping address of the error data in each storage unit, and analyze the data of each storage unit step by step to locate the data error; The step of reading data according to the mapped addresses of the error data in each storage unit, and analyzing the data in each storage unit level by level to locate the data error includes: Each storage unit reads the corresponding data from the mapped address of its respective storage unit based on the error data; The data read from each storage unit is compared with the data written by the host for the first time, in the hierarchical order of the protocol forwarding unit, cache volume unit, array management unit, and hard disk drive unit. Determine whether the data read from each storage unit is consistent with the data written by the host for the first time; If the data read by the storage unit is consistent with the data written by the host for the first time, the storage unit flag is set to a first preset value, and data analysis is continued for the next layer of storage units to determine whether the data read by the next layer of storage units is consistent with the data written by the host for the first time. If the data read by the storage unit is inconsistent with the data written by the host for the first time, the storage unit's flag bit is set to a second preset value, and the storage unit is determined to be the storage unit where the data error occurred, so as to locate the data error.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the data error location method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the data error location method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Apparatus and method for handling error in volatile memory of memory system
CN111435321A
Fault positioning method and device, equipment and storage medium
CN115408191A