Cache data processing method and device in virtual machine pass-through mode
Patent Information
- Application Number
- CN202611459347.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-03
AI Technical Summary
In virtual machine passthrough mode, the status of the physical disk is not visible to the SDS management platform, resulting in low efficiency in storage data processing.
The system configures a disk agent module in the virtual machine to collect disk information in real time, configures an intelligent cache module in the software-defined storage node to cache and analyze data, and configures a processing module in the SDS management platform to generate scheduling instructions, thereby realizing distributed agent collection, hierarchical cache analysis and centralized scheduling management.
It enables comprehensive awareness and efficient operation and maintenance of physical disk status, improving the efficiency of stored data processing.
Smart Images

Figure CN123030274A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data operation and maintenance, and in particular to a method and apparatus for processing cached data in virtual machine passthrough mode. Background Technology
[0002] With the rapid development of cloud computing and software-defined storage (SDS) technologies, SDS has been widely applied in finance, healthcare, and the internet sectors due to its advantages of flexible scalability and resource virtualization. In an SDS architecture, storage resources are aggregated from physical disks across multiple SDS nodes. The virtual machine passthrough solution, as a key technology for improving storage input / output (I / O) performance, is commonly used to directly allocate physical disks to virtual machines for exclusive use.
[0003] However, in related technologies, when in virtual machine passthrough mode, the control of the physical disk is completely transferred to the virtual machine, which cuts off the management and monitoring link between the SDS management platform and the physical disk. As a result, the SDS storage domain cannot directly query the real-time status of the disk, leading to the problem that the status of the physical disk is not visible to the SDS management platform, thus reducing the efficiency of processing stored data. Summary of the Invention
[0004] This application provides a method and apparatus for processing cached data in virtual machine passthrough mode, which at least solves the technical problem of low processing efficiency of storage data caused by the invisibility of the physical disk status to the SDS management platform in related technologies.
[0005] This application provides a method for processing cached data in virtual machine passthrough mode, comprising: real-time acquisition of disk information of the physical disk corresponding to the virtual machine based on a disk proxy module; wherein the disk proxy module is configured in each virtual machine; caching and analyzing the disk information based on an intelligent caching module to generate cached data; wherein the intelligent caching module is configured in each software-defined storage node; obtaining the cached data of at least one software-defined storage node based on a processing module, and generating scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data based on the scheduling instructions; wherein the processing module is configured in a software-defined storage management platform.
[0006] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the cached data processing method in any of the above-described virtual machine passthrough modes when executing the computer program.
[0007] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the cache data processing method in any of the above-described virtual machine passthrough modes.
[0008] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described virtual machine passthrough modes for cached data processing.
[0009] This application achieves comprehensive awareness and efficient operation and maintenance of physical disk status in pass-through mode by configuring disk agent modules in each virtual machine to collect disk information of the physical disk corresponding to the virtual machine in real time, configuring intelligent caching modules in each software-defined storage node to cache and analyze disk information to generate cache data, and configuring processing modules in the software-defined storage management platform to obtain cache data of at least one software-defined storage node and generate scheduling instructions. Based on the scheduling instructions, the cache data is then processed for operation and maintenance. By combining distributed agent collection, hierarchical cache analysis and centralized scheduling management, this application solves the technical problem of low storage data processing efficiency caused by the invisibility of the physical disk status to the SDS management platform in related technologies, thus achieving the technical effect of improving storage data processing efficiency. Attached Figure Description
[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the 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.
[0011] Figure 1 A schematic diagram of the software-defined storage architecture for related technologies;
[0012] Figure 2 A flowchart illustrating a cache data processing method in virtual machine passthrough mode provided in this application embodiment;
[0013] Figure 3 This is a schematic diagram of the software-defined storage architecture provided in the embodiments of this application;
[0014] Figure 4 A flowchart illustrating a method for performing data verification based on an intelligent caching module, provided in an embodiment of this application;
[0015] Figure 5 A flowchart illustrating the method by which the main cache module and the slave cache module of the intelligent cache module provided in this application cooperate to process cached data;
[0016] Figure 6 A flowchart illustrating a method for a processing module to determine the alarm level of a preset event based on predicted data, as provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions of 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 of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0018] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0019] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] Figure 1 A schematic diagram of the software-defined storage architecture for related technologies, such as Figure 1 As shown, in related technologies, the software-defined storage management platform acts as a controller to manage and monitor the storage domains of software-defined storage. These storage domains, in turn, function as resource pools, aggregated from multiple physical disks. In normal mode, physical disks (such as...) Figure 1 Physical disks B and C are managed uniformly by the software-defined storage domain, and their status information can be normally reported to the management platform through the storage domain, forming a complete management link. However, when using virtual machine passthrough mode (such as...) Figure 1In this scenario, control of physical disk A is completely transferred to virtual machine A, with the virtual machine driver directly taking over the I / O (input / output) operations of physical disk A. This renders the software-defined storage domain unable to access or manage physical disk A through the original software stack, thus completely severing the management and monitoring link between the software-defined storage management platform and physical disk A. This disconnect prevents the software-defined storage domain from directly querying the real-time status of physical disk A, creating a situation where the status of physical disk A is invisible to the software-defined storage management platform. This leads to a series of problems, including lack of status awareness, delayed fault response, and disconnected resource coordination, significantly reducing the efficiency of stored data processing and operational reliability.
[0021] The embodiments of this application provide a method for processing cached data in virtual machine passthrough mode. Figure 2 A flowchart illustrating a cache data processing method in virtual machine passthrough mode provided in this application embodiment is shown below. Figure 2 As shown, the method includes:
[0022] Step S201: Real-time collection of disk information of the physical disk corresponding to the virtual machine based on the disk agent module; wherein, the disk agent module is configured in each virtual machine;
[0023] In one exemplary implementation, Figure 3 This is a schematic diagram of the software-defined storage architecture provided in the embodiments of this application, such as... Figure 3 As shown, virtual machine A is configured to correspond to physical disk A, virtual machine B is configured to correspond to physical disk B, virtual machine C is configured to correspond to physical disk C, and virtual machine D is configured to correspond to physical disk D. Specifically, virtual machine A integrates a disk proxy module A to collect disk information of physical disk A corresponding to virtual machine A in real time; virtual machine B integrates a disk proxy module B to collect disk information of physical disk B corresponding to virtual machine B in real time; virtual machine C integrates a disk proxy module C to collect disk information of physical disk C corresponding to virtual machine C in real time; and virtual machine D integrates a disk proxy module D to collect disk information of physical disk D corresponding to virtual machine D in real time.
[0024] Step S202: Based on the intelligent caching module, cache and analyze disk information to generate cache data; wherein, the intelligent caching module is configured in each software-defined storage node;
[0025] In one exemplary implementation, such as Figure 3As shown, software-defined storage node A integrates intelligent cache module A, and software-defined storage node B integrates intelligent cache module B. Intelligent cache module A is used to cache and analyze disk information from physical disks A and B to generate cache data A; intelligent cache module B is used to cache and analyze disk information from physical disks C and D to generate cache data B.
[0026] Step S203: The processing module obtains cached data from at least one software-defined storage node and generates scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data based on the scheduling instructions; wherein, the processing module is configured in the software-defined storage management platform.
[0027] In one exemplary implementation, such as Figure 3 As shown, the software-defined storage management platform integrates a processing module. The processing module is used to obtain cached data A and cached data B, and generate scheduling instructions based on cached data A and cached data B, so as to perform operation and maintenance processing on cached data A and cached data B based on the scheduling instructions.
[0028] By employing steps S201 to S203, disk agent modules are configured in each virtual machine to collect disk information of the physical disk corresponding to the virtual machine in real time. Intelligent caching modules are configured in each software-defined storage node to cache and analyze disk information to generate cached data. A processing module is then configured in the software-defined storage management platform to obtain cached data from at least one software-defined storage node and generate scheduling instructions. These instructions are then used to perform maintenance on the cached data. This combination of distributed agent collection, hierarchical cache analysis, and centralized scheduling management enables comprehensive awareness and efficient maintenance of the physical disk status in pass-through mode. Therefore, it solves the technical problem of low storage data processing efficiency caused by the invisibility of the physical disk status to the SDS management platform, thus improving the processing efficiency of storage data.
[0029] In one implementation, the intelligent caching module caches and analyzes disk information to generate cached data, including: determining the disk attributes of the physical disk based on the disk information, and determining the caching period and cached content of the cached data corresponding to the physical disk based on the disk attributes.
[0030] In one exemplary implementation, for example, for SSDs (Solid State Drives, high I / O, high sensitivity solid-state drives), the cache cycle is set to 10-30 seconds, focusing on caching health (write volume, number of bad blocks), I / O load (IOPS, latency), and other cached content. For HDDs (Hard Disk Drives): the cache cycle is set to 1-5 minutes, focusing on caching mount status, capacity usage, and other cached content. For high-risk disks (SMART parameters approaching thresholds): a "pre-caching" mode is triggered: critical information is updated 1-5 minutes in advance.
[0031] In one implementation, the cached data includes: the basic status of the physical disk, associated information, and historical trajectory data; wherein the basic status includes at least one of the following information of the physical disk: mount status, health, temperature, and error rate, and the associated information includes at least one of the following information of the physical disk: the Internet Protocol address of the software-defined storage node to which it belongs, the identifier of the associated virtual machine, the storage pool affiliation, the allocated storage capacity, and the remaining storage capacity.
[0032] In one exemplary implementation, firstly, by collecting basic status data such as mount status, health level, temperature, and error rate, the fundamental problem of the "invisibility" of real-time disk status in the software-defined storage management platform under pass-through mode is solved, enabling the management platform to accurately perceive the operational health status of the disk. Secondly, by binding resource elements such as the Internet Protocol address of the software-defined storage node, the identifier of the associated virtual machine, storage pool affiliation, allocated storage capacity, and remaining storage capacity through association information, the information silos between disks and storage domain resources in pass-through mode are broken down, enabling rapid location of the affected area during fault diagnosis and improving resource coordination and operational efficiency. Furthermore, the continuous recording and accumulation of historical trajectory data provides a data foundation for subsequent trend prediction, proactive alarms, and intelligent scheduling, enabling the software-defined storage management platform to perform forward-looking analysis of the future state of the disk based on historical status change logs, health fluctuation curves, and input / output load trends. Therefore, the organic integration of the basic status, related information and historical trajectory data of cached data jointly supports the technical architecture of "distributed agent collection, hierarchical cache analysis and centralized scheduling management" in this application. This lays the core data foundation for realizing the full life cycle management, intelligent reporting and collaborative operation and maintenance of disk status in the pass-through mode, thereby effectively solving the problem of low storage data processing efficiency caused by the invisibility of disk status in related technologies.
[0033] Figure 4 A flowchart of a method for performing data verification based on an intelligent caching module provided in this application embodiment is shown below. Figure 4 As shown, in one implementation, disk information is cached and analyzed based on an intelligent caching module to generate cache data, including:
[0034] Step S401: Send a status verification request to the disk agent module at a first preset time interval to obtain the actual status of the physical disk and cached data in real time based on the disk agent module.
[0035] In one exemplary implementation, for example, the intelligent caching module sends a status verification request to the disk agent module in the virtual machine every 5 minutes. After receiving the status verification request, the disk agent module obtains the actual status and cache data of the physical disk in real time, and sends the real-time obtained actual status and cache data of the physical disk to the intelligent caching module.
[0036] Step S402: Verify the cached data and the actual state to obtain the verification result; wherein, if the verification result is inconsistent, refresh the cached data and upload the verification exception log to the processing module.
[0037] In one exemplary implementation, the intelligent caching module receives the actual state of the physical disk and cached data, verifies the cached data and the actual state to obtain a verification result. If the verification result is inconsistent, the cached data is refreshed and a verification exception log is uploaded to the processing module.
[0038] By employing steps S401 to S402, the intelligent caching module proactively initiates status verification requests to the disk agent module at fixed intervals. This compares the cached disk information with the actual status of the physical disk in real time. When the cached data is inconsistent with the actual status, a cache refresh operation is automatically triggered, and a verification anomaly log is reported to the processing module. This forms a closed-loop management system of "proactive verification, anomaly detection, automatic correction, and traceable reporting." This mechanism effectively solves the problem of cache obsolescence or inaccuracy caused by data asynchrony between the disk agent and the caching module in pass-through mode, ensuring that the cached data always remains consistent with the real status of the physical disk, significantly improving the accuracy and reliability of the cached data. Simultaneously, the reporting of verification anomaly logs provides the SDS management platform with traceable records of abnormal events, facilitating timely detection of potential data inconsistencies and locating the source of faults by operations and maintenance personnel, thereby further enhancing the data consistency and operational transparency of the storage system.
[0039] Figure 5 A flowchart illustrating the method for the main cache module and the slave cache module of the intelligent cache module provided in this application embodiment to cooperate in processing cached data is shown below. Figure 5 As shown, in one implementation, the method of generating cached data by caching and analyzing disk information based on an intelligent caching module further includes:
[0040] Step S501: Based on the main cache module, cache and analyze disk information to generate cache data;
[0041] In one exemplary implementation, for example, the main cache module serves as the primary processing module of the intelligent cache module, while the secondary cache module serves as an alternative processing module for the intelligent cache module. Therefore, preferably, disk information is cached and analyzed based on the main cache module to generate cached data.
[0042] Step S502: Synchronize the cached data to the cache module in real time;
[0043] In one exemplary implementation, for example, the main cache module synchronizes the cached data to the slave cache module while generating the cached data, with a synchronization delay of ≤1 second (incremental synchronization only transmits changed data).
[0044] Step S503: Perform a data verification operation on the cached data to obtain the verification result;
[0045] In one exemplary implementation, for example, the main cache module performs data validation on the cached data to obtain a validation result. Specifically, the main cache module validates the cached data against the actual state to obtain a validation result. If the validation result is inconsistent, the cached data is refreshed and a validation exception log is uploaded to the processing module.
[0046] Step S504: The verification result is reported to the processing module; wherein, the intelligent caching module includes a main caching module and a slave caching module.
[0047] In one exemplary implementation, for example, when generating a verification result, the main cache module reports the verification result to the processing module so that the processing module can determine the operation and maintenance process based on the verification result.
[0048] By employing steps S501 to S504, the intelligent cache module is divided into a primary cache module and a secondary cache module. The primary cache module is responsible for caching, analyzing, and verifying disk information, and it synchronizes incremental cached data to the secondary cache module in real time. Simultaneously, it reports the verification results to the processing module, thereby achieving redundant deployment and state synchronization of the cache service. This design, on the one hand, eliminates the risk of single-point failure through the primary-secondary dual-copy mechanism, ensuring that the secondary cache module can seamlessly take over when the primary cache module fails, guaranteeing the continuous availability of the cache service and preventing data loss. On the other hand, by integrating data verification operations into the primary cache module and promptly reporting the verification results to the processing module, data inconsistencies discovered during verification can be detected in real time and transmitted to the management platform. Therefore, by deeply integrating the high-availability architecture with the proactive verification mechanism, the fault tolerance, data consistency, and operational observability of the cache system are significantly improved, laying a solid technical foundation for the stable collection and reliable reporting of disk status in pass-through mode.
[0049] In one implementation, the method of generating cached data by caching and analyzing disk information based on the intelligent cache module further includes: replacing the cache module with a new main cache module when the heartbeat of the main cache module is detected to be interrupted for a second preset period of time from the cache module.
[0050] In one exemplary implementation, for example, the second preset time period is 1 second. If the heartbeat interruption of the main cache module is detected from the cache module for at least 1 second, the cache module will be replaced with a new main cache module so that the new main cache module can continue to cache and report data, and at the same time report an alarm message of "main cache failure".
[0051] In one implementation, after the intelligent caching module caches and analyzes disk information to generate cache data, the method further includes: sending the cache data to the processing module while the intelligent caching module analyzes the cache data to correspond to a preset event, so that the processing module can perform operation and maintenance processing based on the cache data; wherein, the preset events include: a status change event, an early warning event, and an abnormal event.
[0052] In one exemplary implementation, for example, if the intelligent caching module analyzes the cached data and it corresponds to a state change event, a warning event, or an abnormal event, the cached data is immediately sent to the processing module so that the processing module can perform operation and maintenance processing based on the cached data. A state change event could correspond to: mount status switching, health score drop ≥10 points, or temperature ≥55℃; a warning event could correspond to: SMART parameters approaching a threshold (e.g., error rate reaching 80% of the threshold), or IO load exceeding a threshold (e.g., SSD IOPS ≥90%); an abnormal event could correspond to: cache verification inconsistency, or synchronization failure between the main cache module and the slave cache module.
[0053] In one implementation, after the intelligent caching module caches and analyzes disk information to generate cache data, the method further includes: when the intelligent caching module analyzes that the cache data corresponds to a non-preset event, sending the cache data to the processing module according to a preset period, so that the processing module can perform operation and maintenance processing based on the cache data.
[0054] In one exemplary implementation, for example, if the smart caching module analyzes the cached data and finds that it corresponds to a non-preset event, where the non-preset event is any event other than any of the following: a status change event, a warning event, or an abnormal event, then the cached data is sent to the processing module according to a preset period so that the processing module can perform operation and maintenance processing based on the cached data.
[0055] Figure 6 A flowchart illustrating the method for determining the alarm level of a preset event based on predicted data by the processing module provided in this application embodiment is shown below. Figure 6 As shown, in one implementation, a processing module acquires cached data from at least one software-defined storage node and generates scheduling instructions based on the cached data to perform operational and maintenance processing on the cached data based on the scheduling instructions, including:
[0056] Step S601: Generate an association ledger between physical disks and storage resources based on the universally unique identifier of the physical disk bound to the cached data, the software-defined storage node, the virtual machine, and the storage domain of the software-defined storage.
[0057] In one exemplary implementation, for example, after obtaining the cached data, the processing module binds the physical disk's universally unique identifier, the software-defined storage node, the virtual machine, and the storage domain of the software-defined storage to generate an association ledger between the physical disk and the storage resources.
[0058] Step S602: Based on historical trajectory data and a preset algorithm, predict the predicted data of the physical disk in the third preset time period in the future, so as to determine the alarm level of the preset event based on the predicted data; wherein, the historical trajectory data is the cached data before the current time.
[0059] In one exemplary implementation, for example, the preset algorithm is a linear regression algorithm. The processing module uses the linear regression algorithm based on historical trajectory data to predict the health and input / output load of the physical disk for the next 7 days to obtain prediction data, and then determines the alarm level of the preset event based on the prediction data.
[0060] By employing steps S601 to S602, firstly, step S601 binds the universally unique identifier of the physical disk with the software-defined storage node, virtual machine, and storage domain of the software-defined storage, generating an association ledger between the physical disk and storage resources. This breaks down the information silos between disks and storage domain resources in pass-through mode, enabling the management platform to clearly grasp the mapping relationship between disks and various resource elements, providing a unified and traceable association view for subsequent fault location and resource scheduling. Secondly, step S602 uses historical trajectory data combined with preset algorithms (such as linear regression algorithms) to predict the health and input / output load of the disk over a future period (such as 7 days), and determines the alarm level of preset events based on the predicted data. This realizes a shift from "post-event response" to "pre-event warning" operation and maintenance mode, enabling the software-defined storage management platform to identify potential fault risks in advance and issue graded alarms. Therefore, steps S601 to S602 significantly improve the resource coordination capability, fault prediction capability, and operation and maintenance foresight of the storage domain by constructing a resource association ledger and introducing a trend prediction mechanism, providing key technical support for intelligent management and proactive operation and maintenance of disk status throughout the entire lifecycle in pass-through mode.
[0061] In one implementation, the method further includes: a processing module determining the alarm level of a preset event based on cached data acquired in real time.
[0062] In one exemplary implementation, for example, the processing module further determines the alarm level of a preset event based on real-time acquired cached data. The alarm level can be: Level 1 alarm (requires immediate handling) or Level 2 alarm (to be handled within 24 hours).
[0063] In one implementation, the processing module acquires cached data from at least one software-defined storage node and generates scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data. The method further includes generating a load balancing instruction to migrate the input / output tasks of the first physical disk to a second physical disk when the input / output load of the cached data corresponding to the first physical disk is overloaded.
[0064] In one exemplary implementation, the processing module can be used to coordinate the workload among various physical disks. For example, if the processing module determines that there is an overload of input / output load on the first physical disk corresponding to cached data, it generates a load balancing instruction to migrate the input / output tasks of the first physical disk to the second physical disk.
[0065] In one implementation, migrating the input / output tasks of the first physical disk to the second physical disk includes: migrating the input / output tasks of the first physical disk to the second physical disk under the same software-defined storage node as the first physical disk.
[0066] In one exemplary implementation, for example, both the first physical disk and the second physical disk are configured in a software-defined storage node A. When the input / output load corresponding to the cached data on the first physical disk is overloaded, a load balancing instruction is generated to migrate the input / output tasks of the first physical disk to the second physical disk.
[0067] In one implementation, migrating the input / output tasks of the first physical disk to the second physical disk includes: migrating the input / output tasks of the first physical disk to the second physical disk under a different software-defined storage node than the first physical disk, so as to realize resource scheduling within a single node.
[0068] In one exemplary implementation, for example, a first physical disk is configured in software-defined storage node A and a second physical disk is configured in software-defined storage node B. When the input / output load corresponding to the cached data on the first physical disk is overloaded, a load balancing instruction is generated to migrate the input / output tasks of the first physical disk to the second physical disk, thereby realizing resource scheduling across nodes.
[0069] In one implementation, the processing module obtains cached data from at least one software-defined storage node and generates scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data based on the scheduling instructions. The method also includes generating a disk replacement work order instruction when the health of the first physical disk corresponding to the cached data continues to decline within a fourth preset time period, instructing the first physical disk to go offline and selecting a second physical disk to be brought online.
[0070] In one exemplary implementation, for example, the fourth preset time period can be 7-14 days. If the health of the first physical disk corresponding to the cached data continues to decline within 7-14 days after the current moment, a disk replacement work order instruction is generated to trigger a "replacement warning" 7-14 days in advance, indicating that the first physical disk is taken offline and selecting the second physical disk to be brought online, prompting the operation and maintenance personnel to replace it.
[0071] In one implementation, if the processing module does not receive cached data within a preset fifth time period, it triggers an alarm to check the communication link between the intelligent cache module and the disk agent module in order to locate the faulty node.
[0072] In one exemplary implementation, for example, if the processing module still does not receive cached data after 5 seconds, an alarm message for "cache disconnection" is triggered to automatically check the communication link between the intelligent cache module and the disk agent module in order to locate the faulty node.
[0073] In summary, this application's embodiments construct a three-tiered collaborative technical architecture of "distributed agent collection, layered cache analysis, and centralized scheduling management." It employs techniques such as deploying a disk agent module within a virtual machine, an intelligent cache module on a software-defined storage node, and a processing module on the software-defined storage management platform. This achieves end-to-end connectivity of physical disk status from collection and caching to operational decisions in pass-through mode. Specifically, the disk agent module is responsible for real-time collection of the raw status information of the pass-through disk, solving the fundamental problem of the physical disk being "invisible" to the software-defined storage management platform in pass-through mode. The intelligent cache module, as an intermediate layer, uses differentiated caching strategies, a master-slave dual-replica high-availability architecture, periodic data verification, and a dual-mode reporting mechanism combining event-driven and periodic triggering to locally cache, analyze, and reliably report disk information, ensuring high availability, accuracy, and transmission efficiency of cached data. The processing module, as the core of centralized management, integrates functions such as physical disk and storage resource association ledgers, historical trajectory-based trend prediction, load balancing scheduling, and proactive operational work order generation, transforming cached data into executable scheduling instructions and operational decisions. The three modules each perform their respective functions while working closely together to form a closed-loop management system of "collection, caching, decision-making, and execution." This system jointly solves the technical problem of low storage data processing efficiency caused by the invisibility of disk status in pass-through mode, significantly improving the controllability, reliability, and intelligent operation and maintenance level of the storage domain.
[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0075] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above embodiments of the cached data processing method in virtual machine pass-through mode.
[0076] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the cached data processing method in virtual machine passthrough mode at runtime.
[0077] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0078] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the cached data processing method in virtual machine passthrough mode.
[0079] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above embodiments of the cached data processing method in virtual machine passthrough mode.
[0080] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0081] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0082] The above provides a detailed description of a cached data processing method and apparatus in virtual machine passthrough mode provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for processing cached data in virtual machine passthrough mode, characterized in that, include: The disk agent module collects disk information of the physical disk corresponding to the virtual machine in real time; wherein, the disk agent module is configured in each virtual machine; The disk information is cached and analyzed based on the intelligent caching module to generate cache data; wherein, the intelligent caching module is configured in each software-defined storage node; The processing module acquires cached data from at least one of the software-defined storage nodes and generates scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data based on the scheduling instructions; wherein, the processing module is configured in the software-defined storage management platform.
2. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, The disk information is cached and analyzed based on the intelligent caching module to generate cached data, including: Based on the disk information, the disk attributes of the physical disk are determined, and the cache period and cache content of the cached data corresponding to the physical disk are determined based on the disk attributes.
3. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, The cached data includes: the basic status of the physical disk, associated information, and historical trajectory data; wherein, the basic status includes at least one of the following information of the physical disk: mount status, health, temperature, and error rate, and the associated information includes at least one of the following information of the physical disk: the Internet Protocol address of the software-defined storage node to which it belongs, the identifier of the associated virtual machine, the storage pool affiliation, the allocated storage capacity, and the remaining storage capacity.
4. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, The disk information is cached and analyzed based on the intelligent caching module to generate cached data, including: A status verification request is sent to the disk agent module at a first preset time interval to obtain the actual status and cached data of the physical disk in real time based on the disk agent module. The cached data and the actual state are verified to obtain a verification result; wherein, if the verification result is inconsistent, the cached data is refreshed and a verification exception log is uploaded to the processing module.
5. The cache data processing method in virtual machine passthrough mode according to claim 4, characterized in that, Based on the intelligent caching module, the disk information is cached and analyzed to generate cached data, and the method further includes: The disk information is cached and analyzed based on the main cache module to generate cache data; The cached data is synchronized to the cache module in real time. Perform a data verification operation on the cached data to obtain the verification result; The verification result is reported to the processing module; wherein, the intelligent caching module includes the main caching module and the slave caching module.
6. The cache data processing method in virtual machine passthrough mode according to claim 5, characterized in that, Based on the intelligent caching module, the disk information is cached and analyzed to generate cached data, and the method further includes: If the slave cache module detects a heartbeat interruption of the master cache module for a second preset time period, the slave cache module will be replaced with a new master cache module.
7. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, After the disk information is cached and analyzed based on the intelligent caching module to generate cache data, the method further includes: While the intelligent caching module analyzes the cached data and finds that it corresponds to a preset event, it sends the cached data to the processing module so that the processing module can perform operation and maintenance processing based on the cached data; wherein, the preset events include: status change events, early warning events, and abnormal events.
8. The cache data processing method in virtual machine passthrough mode according to claim 7, characterized in that, After the disk information is cached and analyzed based on the intelligent caching module to generate cache data, the method further includes: When the intelligent caching module analyzes that the cached data corresponds to a non-preset event, it sends the cached data to the processing module according to a preset period, so that the processing module can perform operation and maintenance processing based on the cached data.
9. The cache data processing method in virtual machine passthrough mode according to claim 7, characterized in that, The processing module acquires cached data from at least one of the software-defined storage nodes and generates scheduling instructions based on the cached data to perform operation and maintenance processing on the cached data based on the scheduling instructions, including: Based on the cached data, a unique identifier for the physical disk, the software-defined storage node, the virtual machine, and the storage domain of the software-defined storage are bound together to generate an association ledger between the physical disk and storage resources. Based on historical trajectory data and a preset algorithm, the predicted data of the physical disk in the third preset time period in the future is predicted, so as to determine the alarm level of the preset event based on the predicted data; wherein, the historical trajectory data is cached data before the current time.
10. The cache data processing method in virtual machine passthrough mode according to claim 9, characterized in that, Also includes: The processing module determines the alarm level of the preset event based on the cached data acquired in real time.
11. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, The system further includes: acquiring cached data from at least one of the software-defined storage nodes based on the processing module, generating scheduling instructions based on the cached data, and performing operation and maintenance processing on the cached data based on the scheduling instructions; and also includes: If the input / output load of the cached data corresponding to the first physical disk is overloaded, a load balancing instruction is generated to migrate the input / output tasks of the first physical disk to the second physical disk.
12. The cache data processing method in virtual machine passthrough mode according to claim 11, characterized in that, Migrating input / output tasks from the first physical disk to the second physical disk includes: The input / output tasks of the first physical disk are migrated to the second physical disk under the same software-defined storage node as the first physical disk.
13. The cache data processing method in virtual machine passthrough mode according to claim 11, characterized in that, Migrating input / output tasks from the first physical disk to the second physical disk includes: The input / output tasks of the first physical disk are migrated to a second physical disk under a different software-defined storage node than the first physical disk.
14. The cache data processing method in virtual machine passthrough mode according to claim 1, characterized in that, The system further includes: acquiring cached data from at least one of the software-defined storage nodes based on the processing module, generating scheduling instructions based on the cached data, and performing operation and maintenance processing on the cached data based on the scheduling instructions; and also includes: If the health of the first physical disk corresponding to the cached data continues to decline within a fourth preset time period, a disk replacement work order is generated to instruct the first physical disk to go offline and select a second physical disk to be brought online.
15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the cached data processing method in virtual machine passthrough mode as described in any one of claims 1 to 14 when executing the computer program.
