Information processing method, device and system

By obtaining the status information of storage devices on the physical machine and utilizing virtualization technology and the NVMe management tool NVMeadm module of the user-mode driver, the problem of the existing technology being unable to achieve full-time and full-state monitoring and management is solved, and timely fault discovery and management of NVMe storage devices are achieved, thereby improving user satisfaction.

CN113312232BActive Publication Date: 2025-10-03ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010930225.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-07
Publication Date
2025-10-03
Estimated Expiration
2040-09-07

AI Technical Summary

Technical Problem

Existing technologies are unable to monitor and manage NVMe storage devices at all times and in all states, resulting in the inability to detect bad disks or faulty devices in a timely manner, affecting user satisfaction.

Method used

By obtaining the status information of the storage device on the physical machine and using virtualization technology to determine whether the storage device is in use by the virtual machine, the corresponding information collection method is selected, the information collection results are obtained and reported to the cloud server, and the NVMeadm module, an NVMe management tool with an integrated user-mode driver, is used for monitoring and management.

Benefits of technology

It realizes full-time and full-state monitoring and management of NVMe storage devices, timely detects bad disks or faulty devices, prevents them from being delivered to users, and improves product quality and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113312232B_ABST
    Figure CN113312232B_ABST
Patent Text Reader

Abstract

This application discloses an information processing method, device, and system. The method comprises: obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is being used by a virtual machine, the virtual machine being obtained by virtualizing the physical machine, and the virtual machine having exclusive access to the storage device; selecting a corresponding information collection method based on the status information to obtain information collection results; and reporting the information collection results to a cloud server. This application solves the technical problem in the prior art of being unable to implement full-time and full-state monitoring and management of NVMe storage devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an information processing method, device, and system. Background Art

[0002] Solid-state drive (SSD) native disk instances on major cloud computing providers offer high-speed native disk services, suitable for business scenarios with extremely high requirements for storage I / O performance and cost-effectiveness of massive storage, such as online businesses such as online gaming, e-commerce, live video streaming, and media. Because these online businesses are not only I / O-intensive but also require low latency and high I / O performance for block storage, most current SSD native disk instances use high-speed Non-Volatile Memory Express (NVMe) storage devices (NVMe devices) in the backend.

[0003] In such Figure 1 In the cloud scenario shown above, where a typical NVMe device is directly connected, the physical machine's host operating system (OS) cannot manage and monitor the NVMe device because the NVMe device is directly connected. Even if the NVMe disk fails or its performance degrades over time, the cloud device management center will not be able to detect it. Furthermore, NVMe device management and health monitoring can only be performed through the customer VM when the VM is started. However, NVMe device management is not possible until the device is sold or the VM is started. This means that existing technologies make it difficult to monitor and manage NVMe devices at all times and in all states, resulting in the inability to detect bad or faulty storage devices in a timely manner. Furthermore, if a bad or faulty disk or device is delivered to the user after monitoring, user satisfaction is reduced.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The embodiments of the present application provide an information processing method, device, and system to at least solve the technical problem in the prior art that it is impossible to monitor and manage NVMe storage devices at all times and in all states.

[0006] According to one aspect of an embodiment of the present application, an information processing method is provided, including: obtaining status information of a storage device on a physical machine, wherein the above status information is used to determine whether the above storage device is in use by a virtual machine, the above virtual machine is obtained by virtualizing the above physical machine, and the above virtual machine exclusively occupies the above storage device; selecting a corresponding information collection method according to the above status information to obtain an information collection result; and reporting the above information collection result to a cloud server.

[0007] According to another aspect of an embodiment of the present application, an information processing device is also provided, including: a first acquisition module, used to obtain status information of a storage device on a physical machine, wherein the above status information is used to determine whether the above storage device is in use by a virtual machine, the above virtual machine is obtained by virtualizing the above physical machine, and the above virtual machine exclusively occupies the above storage device; a second acquisition module, used to select a corresponding information collection method according to the above status information to obtain an information collection result; and a reporting module, used to report the above information collection result to a cloud server.

[0008] According to another aspect of the embodiment of the present application, an information processing system is also provided, including: a user-state driver, an access interface, a performance detection module, a log module, a statistics module, a basic information module and a management reporting module; the above-mentioned user-state driver is used to obtain status information of the storage device on the physical machine through the above-mentioned access interface, wherein the above-mentioned status information is used to determine whether the above-mentioned storage device is in use by a virtual machine, the above-mentioned virtual machine is obtained by virtualizing the above-mentioned physical machine, and the above-mentioned virtual machine exclusively occupies the above-mentioned storage device; the above-mentioned performance detection module is used to perform read and write speed detection by submitting read or write commands in batches; the above-mentioned log module is used to read log information from the above-mentioned storage device, wherein the above-mentioned log information is used to record the operating status of the above-mentioned storage device; the above-mentioned storage device is analyzed based on the above-mentioned log information. The health status of the storage device is obtained by the first information collection result; the above-mentioned statistical module is used to read the statistical information from the above-mentioned storage device to obtain the second information collection result, wherein the above-mentioned statistical information is used to count the input and output times and the input and output throughput of the above-mentioned storage device; the above-mentioned basic information module is used to read the attribute information from the above-mentioned storage device to obtain the third information collection result, wherein the above-mentioned attribute information includes at least one of the following: the name space of the above-mentioned storage device, the storage capacity of the above-mentioned storage device, the storage block size of the above-mentioned storage device, the serial number of the above-mentioned storage device, the firmware version of the above-mentioned storage device, and the manufacturer of the above-mentioned storage device; the above-mentioned management reporting module is used to report at least one of the above-mentioned first information collection result, the above-mentioned second information collection result and the above-mentioned third information collection result to the cloud server.

[0009] According to another aspect of an embodiment of the present application, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned information processing methods.

[0010] According to another aspect of an embodiment of the present application, a computing device is also provided, including: a processor; and a memory, connected to the above-mentioned processor, for providing the above-mentioned processor with instructions for processing the following processing steps: obtaining status information of a storage device on a physical machine, wherein the above-mentioned status information is used to determine whether the above-mentioned storage device is in use by a virtual machine, the above-mentioned virtual machine is obtained by virtualizing the above-mentioned physical machine, and the above-mentioned virtual machine exclusively occupies the above-mentioned storage device; selecting a corresponding information collection method according to the above-mentioned status information to obtain an information collection result; and reporting the above-mentioned information collection result to a cloud server.

[0011] In an embodiment of the present application, by obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine is obtained by virtualizing the physical machine, and the virtual machine exclusively occupies the storage device; according to the status information, a corresponding information collection method is selected to obtain an information collection result; and the information collection result is reported to a cloud server.

[0012] It is easy to notice that the embodiment of the present application obtains status information of whether the storage device on the physical machine is in use by the virtual machine, selects the corresponding information collection method to collect information from the storage device according to the status information, and reports the obtained information collection results to the cloud server.

[0013] Therefore, the embodiment of the present application achieves the purpose of monitoring and managing storage devices at all times and in all states, thereby realizing the technical effect of timely discovering bad disks or faulty storage devices and preventing bad disks or faulty devices from being delivered to users, thereby solving the technical problem in the existing technology that it is impossible to monitor and manage NVMe storage devices at all times and in all states. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0015] Figure 1 This is a schematic diagram of a cloud scenario with a common NVMe device directly connected according to the existing technology;

[0016] Figure 2 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an information processing method according to an embodiment of the present application;

[0017] Figure 3 is a flowchart of an information processing method according to an embodiment of the present application;

[0018] Figure 4is a scenario diagram of an information processing method according to an embodiment of the present application;

[0019] Figure 5 is a flowchart of an optional information processing method according to an embodiment of the present application;

[0020] Figure 6 is a schematic structural diagram of an optional information processing system according to an embodiment of the present application;

[0021] Figure 7 is a flowchart of another optional information processing method according to an embodiment of the present application;

[0022] Figure 8 is a structural diagram of an information processing device according to an embodiment of the present application;

[0023] Figure 9 is a schematic structural diagram of a computing device according to an embodiment of the present application;

[0024] Figure 10 It is a structural block diagram of another computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:

[0028] NVME: refers to the register interface and command set for PCI Express attached storage, as well as industry-standard software for multiple operating systems. It is widely regarded as the de facto industry standard for PCIe SSDs.

[0029] Virtualization: refers to the use of virtualization technology to virtualize a computer into multiple logical computers (virtual machines).

[0030] This disk: refers to the hard disk device on the physical machine where the virtual machine instance is located.

[0031] Block storage: refers to low-latency, persistent, and highly reliable data block-level random storage provided for cloud server VMs.

[0032] Pass-through: allows the VM to exclusively use a PCI device on the physical machine, just as if the device was physically connected to the VM.

[0033] Driver: A special program that enables computers and devices to communicate with each other. The operating system can only control the operation of hardware devices through this interface.

[0034] Cloud device management center: refers to the server responsible for storing and managing all physical devices in the public cloud / private cloud.

[0035] Cloud Inspector: A plug-in that runs in a VM to manage hardware and can communicate with the cloud device management center to report hardware failures.

[0036] PCI device: refers to a device that complies with the peripheral component interconnect bus interface.

[0037] VFIO: It is a framework that can safely expose device I / O, interrupts, DMA, etc. to user space, so that device drivers can be completed in user space.

[0038] IOMMU: refers to the IO device memory management unit, which has two major functions: controlling device DMA address mapping and interrupt remapping.

[0039] Example 1

[0040] According to an embodiment of the present application, an embodiment of an information processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 2A hardware structure block diagram of a computer terminal (or mobile device) for implementing an information processing method is shown. Figure 2 As shown, the computer terminal 10 (or mobile device 10) may include one or more (illustrated as 102a, 102b, ..., 102n) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 2 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 2 More or fewer components than shown, or with Figure 2 Different configurations shown.

[0042] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0043] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the information processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned information processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0044] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0045] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0046] Under the above operating environment, this application provides Figure 3 An information processing method shown, Figure 3 is a flow chart of an information processing method according to an embodiment of the present application, such as Figure 3 As shown, the above information processing method includes:

[0047] Step S202: Acquire status information of a storage device on the physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine being obtained by virtualizing the physical machine, and the virtual machine having exclusive use of the storage device;

[0048] Step S204: Select a corresponding information collection method based on the above status information to obtain information collection results;

[0049] Step S206: reporting the above information collection results to the cloud server.

[0050] In an embodiment of the present application, by obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine is obtained by virtualizing the physical machine, and the virtual machine exclusively occupies the storage device; according to the status information, a corresponding information collection method is selected to obtain an information collection result; and the information collection result is reported to a cloud server.

[0051] It is easy to notice that the embodiment of the present application obtains status information of whether the storage device on the physical machine is in use by the virtual machine, selects the corresponding information collection method to collect information from the storage device according to the status information, and reports the obtained information collection results to the cloud server.

[0052] Therefore, the embodiment of the present application achieves the purpose of monitoring and managing storage devices at all times and in all states, thereby realizing the technical effect of timely discovering bad disks or faulty storage devices and preventing bad disks or faulty devices from being delivered to users, thereby solving the technical problem in the existing technology that it is impossible to monitor and manage NVMe storage devices at all times and in all states.

[0053] Optionally, the above-mentioned storage device is a high-speed NVMe storage device, i.e., an NVMe device, and the above-mentioned cloud server is a cloud device management center.

[0054] In an optional embodiment, before the NVMe device of each server is sold to the customer, the information collection results corresponding to the status information of the NVMe device need to be reported to the cloud device management center. Optionally, the above information collection results include but are not limited to: the server to which the NVMe device belongs, the slot number, the local bus standard PCI address, capacity, block size, available space, health status, etc.

[0055] As an optional embodiment, when the health status or performance of the NVMe device changes, the information collection results are promptly reported to the cloud device management center so that appropriate operation and maintenance operations can be taken. For example, when the NVMe device fails to work, online isolation operations must be performed through work order operation and maintenance to prevent the bad disk from affecting customer business; the cloud device management center must also be notified after a new disk is added or repaired so that online recovery or expansion can be performed.

[0056] In an optional embodiment, selecting a corresponding information collection method according to the above-mentioned state information, and obtaining the above-mentioned information collection result includes:

[0057] Step S302: determining, based on the state information, that the storage device is in use by the virtual machine, and obtaining the information collection result using a first application, wherein the first application runs inside the virtual machine.

[0058] Optional, such as Figure 4 As shown, the first application is a cloud inspection module in a built-in virtual machine, which is connected to the cloud device management center. Figure 5 As shown, when the storage device is in use by the above-mentioned virtual machine, the embodiment of the present application monitors and manages the NVMe device through the cloud inspection module built into the virtual machine VM to obtain the above-mentioned information collection results.

[0059] As an optional embodiment, Figure 4 As shown, the virtual machine also has a built-in virtual machine monitor QEMU.

[0060] In an optional embodiment, selecting a corresponding information collection method according to the above-mentioned state information, and obtaining the above-mentioned information collection result includes:

[0061] Step S304: determining, based on the status information, that the storage device is not in use by the virtual machine, and using a second application to obtain the information collection result, wherein the second application runs outside the virtual machine.

[0062] Optional, still as Figure 4 As shown, the second application is the NVMeadm module of the integrated user mode driver on the physical machine, which is connected to the cloud device management center for communication. Figure 5 As shown, when the storage device is not in use by the above-mentioned virtual machine, that is, when the NVMe device is not used by the virtual machine, for example, the NVMe device may not have been sold yet, or the VM is in an unstarted state, the embodiment of the present application can monitor and manage the NVMe device through the NVMeadm module on the physical machine to obtain the above-mentioned information collection results.

[0063] To overcome the technical problem in traditional solutions that the physical machine can no longer manage the quality of the NVMe device after it is directly connected, the embodiment of the present application designs an NVMe management tool NVMeadm module that integrates a user mode driver. This module provides the user mode driver with a VFIO interface to access the hardware device to control the NVMe device without relying on the NVMe driver. After the NVMe device is directly connected to the virtual machine, the management and monitoring of the NVMe device can also be completed.

[0064] Through the embodiments of the present application, based on the NVMe management tool NVMeadm module, it is possible to monitor and manage NVMe devices even after the NVMe devices are directly connected to the virtual machine. Therefore, the present application solution can monitor NVMe devices in all states and all time periods and obtain management from the cloud device management center.

[0065] It should be noted that the cloud inspection module within the VM and the NVMeadm module on the physical machine cannot simultaneously manage and monitor the same pass-through NVMe device through the VFIO interface. For example, if the NVMeadm module attempts to manage and open a pass-through NVMe device while the VM is booting, it will fail. Therefore, the two must work together to fully manage the NVMe device.

[0066] In an optional embodiment, the second application program is integrated with a user-mode driver and an access interface, and the user-mode driver is used to drive and control the storage device through the access interface.

[0067] In an optional embodiment, the user-mode driver accesses the storage device through the access interface to perform direct memory access operations and interrupt response operations.

[0068] Still Figure 4 As shown, the access interface is the VFIO interface, which is set in the operating system OS kernel and communicates with the user mode driver.

[0069] In an optional embodiment, the user-mode driver drives and controls the storage device by submitting a control command to a command queue in the storage device and reading a control response corresponding to the control command from the command queue.

[0070] In an optional embodiment, the present application provides an optional information processing system (schematic diagram of the structure as shown in FIG. Figure 6 As shown, the information processing system 600 (i.e., the NVMeadm module in this application) includes: a user-mode driver 602, an access interface 604, a performance detection module 606, a log module 608, a statistics module 610, a basic information module 612, and a management reporting module 614; wherein:

[0071] The access interface 604 (i.e., VFIO interface) is used to provide the user-mode driver 602 with an interface for accessing NVMe hardware registers, completing direct memory access (DMA) and interrupt response operations; the user-mode driver 602 (NVMe user-mode driver) has similar functions to the NVMe kernel driver and is used to submit commands to the NVMe hardware queue and read responses from the NVMe hardware queue to complete the driving and control of the NVMe hardware; the performance detection module 606 is used to complete basic read and write speed detection by submitting read or write commands in batches; the log module 608 (MART log module) , used to obtain NVMe device SMART log information to provide a basis for judging the health status of NVMe devices; statistical module 610 (I / O statistics module), used to obtain I / O statistical information of NVMe devices, including statistics on the number of I / Os and throughput; basic information module 612, used to obtain basic information such as namespace, capacity, block size, serial number, firmware version, manufacturer, etc.; management reporting module 614, used to organize the collected information collection results of NVMe devices and report them to the cloud device management center to complete the health monitoring of NVMe devices directly connected to virtual machines.

[0072] In an optional embodiment, using the second application to obtain the information collection result includes:

[0073] Step S402: Use the second application to send multiple read commands and / or write commands to the storage device, perform read and write speed detection on the storage device, and obtain the information collection result.

[0074] In the above optional embodiment, the following can be used: Figure 6 The performance detection module 606 shown completes basic read and write speed detection by submitting multiple read commands and / or write commands to the NVMe device in batches to obtain read and write speed detection results.

[0075] In an optional embodiment, using the second application to obtain the information collection result includes:

[0076] Step S502: Using the second application to read log information from the storage device, wherein the log information is used to record the operating status of the storage device;

[0077] Step S504: Analyze the health status of the storage device based on the log information to obtain the information collection result.

[0078] In the above optional embodiment, the following can be used: Figure 6 The log module 608 shown obtains the SMART log information of the NVMe device, provides a basis for judging the health status of the NVMe device, and obtains the health status detection result.

[0079] In an optional embodiment, using the second application to obtain the information collection result includes:

[0080] Step S602: Using the second application program to read statistical information from the storage device to obtain the information collection result, wherein the statistical information is used to count the number of input and output times and the input and output throughput of the storage device.

[0081] In the above optional embodiment, the following can be used: Figure 6 The statistical module 610 shown obtains I / O statistical information of the NVMe device, including statistics on the number of I / Os and throughput.

[0082] In an optional embodiment, using the second application to obtain the information collection result includes:

[0083] Step S702: Use the second application to read attribute information from the storage device to obtain the information collection result, wherein the attribute information includes at least one of the following: the namespace of the storage device, the storage capacity of the storage device, the storage block size of the storage device, the serial number of the storage device, the firmware version of the storage device, and the manufacturer of the storage device.

[0084] In the above optional embodiment, the following can be used: Figure 6 The basic information module 612 shown obtains the basic attribute information of the NVMe device, such as namespace, capacity, block size, serial number, firmware version, manufacturer, etc., to obtain the above information collection results.

[0085] In another optional embodiment, Figure 6 As shown, the management reporting module 614 is used to collect and organize the information of the NVMe devices collected and report it to the cloud device management center to complete the health monitoring of the NVMe devices directly connected to the virtual machine.

[0086] In an optional embodiment, the above method further includes:

[0087] Step S802, determining whether the storage device is in use by the virtual machine based on the status information;

[0088] Step S804: when it is determined according to the state information that the storage device is not in use by the virtual machine, attempting to start the storage device through an access interface;

[0089] Step S806: When the startup fails, delay for a preset time period and restart the storage device through the access interface until the storage device is successfully started or the number of startup failures reaches a preset number.

[0090] As an optional embodiment, the NVMeadm module is called regularly on the physical machine, such as Figure 7 As shown, the number of retries N is pre-set. Each time the NVMeadm module is called, it first detects whether the NVMe device is in use by the VM. If the detection result is no, it attempts to open the VFIO interface of the NVMe device and open the NVMe device through the VFIO interface. If the VFIO interface fails to be opened, it will retry N times, that is, after a delay of 500ms, it will re-detect whether the NVMe device is in use by the VM, and continue to try to open the VFIO interface of the NVMe device if the detection result is no. If the VFIO interface is opened successfully, it can start collecting the status information of the direct-passed NVMe device, and perform health monitoring on the NVMe device. Finally, the information collection results are reported to the cloud device management center.

[0091] In a normal NVMe pass-through cloud scenario, since the NVMe device is passed through, the host OS of the physical machine has no way to manage and monitor the NVMe device. Even if the NVMe disk fails or its performance degrades over time, the cloud device management center cannot perceive it. Moreover, in a normal NVMe pass-through cloud scenario, the NVMe device can only be managed and health-monitored through the cloud inspection module inside the VM when the customer VM is started. However, when the device has not been sold or the VM is not started, the NVMe pass-through device cannot be managed. By developing an NVMe management tool NVMeadm module with an integrated user-mode driver through the application embodiment, the pass-through NVMe device can be managed and health-inspected. Moreover, by cooperating with the cloud inspection module inside the VM, the pass-through NVMe device can be managed and monitored at all times and in all states.

[0092] This solution prevents bad or problematic NVMe devices from being delivered to users. Furthermore, through full-status and all-time monitoring and management, bad or problematic storage devices can be promptly detected and customers can be alerted early, rather than requiring customers to discover and report issues. This improves product quality and significantly increases customer satisfaction.

[0093] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above-mentioned methods of each embodiment of the present application.

[0095] Example 2

[0096] According to an embodiment of the present application, a system embodiment for implementing the above information processing method is also provided. Figure 6As shown, the information processing system 600 includes: a user-mode driver 602, an access interface 604, a performance detection module 606, a log module 608, a statistics module 610, a basic information module 612, and a management reporting module 614; wherein:

[0097] The user-mode driver 602 is configured to obtain status information of a storage device on a physical machine through the access interface 604, wherein the status information is used to determine whether the storage device is being used by a virtual machine. The virtual machine is obtained by virtualizing the physical machine, and the virtual machine has exclusive use of the storage device.

[0098] The performance detection module 606 is used to detect the read and write speed by submitting read or write commands in batches;

[0099] The log module 608 is configured to read log information from the storage device, wherein the log information is used to record the operating status of the storage device; and analyze the health status of the storage device based on the log information to obtain a first information collection result;

[0100] The statistical module 610 is configured to read statistical information from the storage device to obtain a second information collection result, wherein the statistical information is used to count the number of input and output times and the input and output throughput of the storage device.

[0101] The basic information module 612 is configured to read attribute information from the storage device to obtain a third information collection result, wherein the attribute information includes at least one of the following: a namespace of the storage device, a storage capacity of the storage device, a storage block size of the storage device, a serial number of the storage device, a firmware version of the storage device, and a manufacturer of the storage device;

[0102] The management reporting module 614 is configured to report at least one of the first information collection result, the second information collection result, and the third information collection result to a cloud server.

[0103] As an optional embodiment, the access interface 604 (i.e., VFIO interface) is used to provide the user-mode driver 602 with an interface for accessing NVMe hardware registers to complete direct memory access DMA and interrupt response operations; the user-mode driver 602 (NVMe user-mode driver) is similar to the NVMe kernel driver in that it is used to submit commands to the NVMe hardware queue and can also read responses from the NVMe hardware queue to complete the driving and control of the NVMe hardware; the performance detection module 606 is used to complete basic read and write speed detection by submitting read or write commands in batches; the log module 608 (MA RT log module), used to obtain SMART log information of NVMe devices to provide a basis for judging the health status of NVMe devices; statistics module 610 (I / O statistics module), used to obtain I / O statistical information of NVMe devices, including statistics of I / O number and throughput; basic information module 612, used to obtain basic information such as namespace, capacity, block size, serial number, firmware version, manufacturer, etc.; management reporting module 614, used to organize the collected information collection results of NVMe devices and report them to the cloud device management center to complete the health monitoring of NVMe devices directly connected to virtual machines.

[0104] In an embodiment of the present application, by obtaining status information of whether the storage device on the physical machine is in use by the virtual machine, a corresponding information collection method is selected according to the status information to collect information from the storage device, and the obtained information collection results are reported to the cloud server.

[0105] Therefore, the embodiment of the present application achieves the purpose of monitoring and managing storage devices at all times and in all states, thereby realizing the technical effect of timely discovering bad disks or faulty storage devices and preventing bad disks or faulty devices from being delivered to users, thereby solving the technical problem in the existing technology that it is impossible to monitor and manage NVMe storage devices at all times and in all states.

[0106] Example 3

[0107] According to an embodiment of the present application, there is also provided an embodiment of a device for implementing the above information processing method. Figure 8 is a structural diagram of an information processing device according to an embodiment of the present application, such as Figure 8 As shown, the apparatus includes: a first acquisition module 800, a second acquisition module 802 and a reporting module 804, wherein:

[0108] The first acquisition module 800 is used to obtain status information of the storage device on the physical machine, wherein the above status information is used to determine whether the above storage device is in use by a virtual machine. The above virtual machine is obtained by virtualizing the above physical machine, and the above virtual machine exclusively uses the above storage device; the second acquisition module 802 is used to select a corresponding information collection method according to the above status information to obtain information collection results; the reporting module 804 is used to report the above information collection results to the cloud server.

[0109] It should be noted that the first acquisition module 800, the second acquisition module 802, and the reporting module 804 correspond to steps S202 to S206 in Example 1. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.

[0110] It should also be noted that the preferred implementation of this embodiment can be found in the relevant description in Example 1 and will not be repeated here.

[0111] Example 4

[0112] According to an embodiment of the present application, an embodiment of a computing device is also provided. The computing device can be any computing device in a computing device group. Figure 9 is a schematic diagram of the structure of a computing device according to an embodiment of the present application, such as Figure 9 As shown, the computing device includes: a processor 900 and a memory 902, wherein:

[0113] Processor 900; and memory 902, connected to the above-mentioned processor 900, used to provide the above-mentioned processor with instructions for processing the following processing steps: obtaining status information of the storage device on the physical machine, wherein the above-mentioned status information is used to determine whether the above-mentioned storage device is in use by a virtual machine, the above-mentioned virtual machine is obtained by virtualizing the above-mentioned physical machine, and the above-mentioned virtual machine exclusively occupies the above-mentioned storage device; selecting a corresponding information collection method according to the above-mentioned status information to obtain information collection results; and reporting the above-mentioned information collection results to a cloud server.

[0114] In an embodiment of the present application, by obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine is obtained by virtualizing the physical machine, and the virtual machine exclusively occupies the storage device; according to the status information, a corresponding information collection method is selected to obtain an information collection result; and the information collection result is reported to a cloud server.

[0115] It is easy to notice that the embodiment of the present application obtains status information of whether the storage device on the physical machine is in use by the virtual machine, selects the corresponding information collection method to collect information from the storage device according to the status information, and reports the obtained information collection results to the cloud server.

[0116] Therefore, the embodiment of the present application achieves the purpose of monitoring and managing storage devices at all times and in all states, thereby realizing the technical effect of timely discovering bad disks or faulty storage devices and preventing bad disks or faulty devices from being delivered to users, thereby solving the technical problem in the existing technology that it is impossible to monitor and manage NVMe storage devices at all times and in all states.

[0117] It should also be noted that the preferred implementation of this embodiment can be found in the relevant description in Example 1 and will not be repeated here.

[0118] Example 5

[0119] According to an embodiment of the present application, a computer terminal embodiment is also provided, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0120] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.

[0121] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the information processing method: obtaining status information of the storage device on the physical machine, wherein the above-mentioned status information is used to determine whether the above-mentioned storage device is in use by a virtual machine, the above-mentioned virtual machine is obtained by virtualizing the above-mentioned physical machine, and the above-mentioned virtual machine exclusively occupies the above-mentioned storage device; selecting a corresponding information collection method according to the above-mentioned status information to obtain information collection results; and reporting the above-mentioned information collection results to the cloud server.

[0122] Optionally, Figure 10 is a structural block diagram of another computer terminal according to an embodiment of the present application, such as Figure 10 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 1002 , a memory 1004 , and a peripheral interface 1006 .

[0123] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the information processing method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned information processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0124] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the status information of the storage device on the physical machine, wherein the above status information is used to determine whether the above storage device is in use by a virtual machine, the above virtual machine is obtained by virtualizing the above physical machine, and the above virtual machine exclusively uses the above storage device; select the corresponding information collection method according to the above status information to obtain the information collection result; report the above information collection result to the cloud server.

[0125] Optionally, the processor may also execute the program code of the following steps: determining that the storage device is in use of the virtual machine based on the status information, and obtaining the information collection result using a first application, wherein the first application runs inside the virtual machine.

[0126] Optionally, the processor may also execute the program code of the following steps: determining based on the status information that the storage device is not in use by the virtual machine, and using a second application to obtain the information collection result, wherein the second application runs outside the virtual machine.

[0127] Optionally, the processor may also execute the program code of the following steps: using the second application to send multiple read commands and / or write commands to the storage device, performing read and write speed detection on the storage device, and obtaining the information collection result.

[0128] Optionally, the processor may also execute the program code of the following steps: using the second application to read log information from the storage device, wherein the log information is used to record the operating status of the storage device; analyzing the health status of the storage device based on the log information to obtain the information collection results.

[0129] Optionally, the processor may also execute the program code of the following steps: using the second application to read statistical information from the storage device to obtain the information collection results, wherein the statistical information is used to count the input and output times and the input and output throughput of the storage device.

[0130] Optionally, the processor may also execute the program code of the following steps: using the second application to read attribute information from the storage device to obtain the information collection result, wherein the attribute information includes at least one of the following: the namespace of the storage device, the storage capacity of the storage device, the storage block size of the storage device, the serial number of the storage device, the firmware version of the storage device, and the manufacturer of the storage device.

[0131] Optionally, the processor may also execute the program code of the following steps: determining whether the storage device is in use by the virtual machine based on the status information; when it is determined that the storage device is not in use by the virtual machine based on the status information, attempting to start the storage device through the access interface; when the startup fails, delaying for a preset period of time, and re-starting the storage device through the access interface until the storage device is successfully started, or the number of startup failures reaches a preset number.

[0132] An embodiment of the present application provides an information processing solution. The solution obtains status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is being used by a virtual machine, the virtual machine being obtained by virtualizing the physical machine and having exclusive access to the storage device; selects a corresponding information collection method based on the status information to obtain an information collection result; and reports the information collection result to a cloud server.

[0133] It is easy to notice that the embodiment of the present application obtains status information of whether the storage device on the physical machine is in use by the virtual machine, selects the corresponding information collection method to collect information from the storage device according to the status information, and reports the obtained information collection results to the cloud server.

[0134] Therefore, the embodiment of the present application achieves the purpose of monitoring and managing storage devices at all times and in all states, thereby realizing the technical effect of timely discovering bad disks or faulty storage devices and preventing bad disks or faulty devices from being delivered to users, thereby solving the technical problem in the existing technology that it is impossible to monitor and manage NVMe storage devices at all times and in all states.

[0135] It can be understood by those skilled in the art that Figure 10The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (MID), a PAD, or other terminal devices. Figure 10 It does not limit the structure of the above electronic device. For example, the computer terminal may also include Figure 10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 10 Different configurations shown.

[0136] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0137] Example 6

[0138] According to an embodiment of the present application, an embodiment of a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the namespace processing method provided in the above embodiment.

[0139] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0140] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine is obtained by virtualizing the physical machine, and the virtual machine exclusively occupies the storage device; selecting a corresponding information collection method according to the status information to obtain information collection results; and reporting the information collection results to a cloud server.

[0141] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining that the above-mentioned storage device is in use of the above-mentioned virtual machine based on the above-mentioned status information, and using a first application to obtain the above-mentioned information collection results, wherein the above-mentioned first application runs inside the above-mentioned virtual machine.

[0142] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining that the storage device is not in use of the virtual machine based on the status information, and using a second application to obtain the information collection results, wherein the second application runs outside the virtual machine.

[0143] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: using the above-mentioned second application to send multiple read commands and / or write commands to the above-mentioned storage device, performing read and write speed detection on the above-mentioned storage device, and obtaining the above-mentioned information collection results.

[0144] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: using the above-mentioned second application to read log information from the above-mentioned storage device, wherein the above-mentioned log information is used to record the operating status of the above-mentioned storage device; analyzing the health status of the above-mentioned storage device based on the above-mentioned log information to obtain the above-mentioned information collection results.

[0145] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: using the above-mentioned second application to read statistical information from the above-mentioned storage device to obtain the above-mentioned information collection results, wherein the above-mentioned statistical information is used to count the input and output times and input and output throughput of the above-mentioned storage device.

[0146] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: using the above-mentioned second application to read attribute information from the above-mentioned storage device to obtain the above-mentioned information collection results, wherein the above-mentioned attribute information includes at least one of the following: the namespace of the above-mentioned storage device, the storage capacity of the above-mentioned storage device, the storage block size of the above-mentioned storage device, the serial number of the above-mentioned storage device, the firmware version of the above-mentioned storage device, and the manufacturer of the above-mentioned storage device.

[0147] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: determining whether the above-mentioned storage device is in use by the above-mentioned virtual machine based on the above-mentioned status information; when it is determined based on the above-mentioned status information that the above-mentioned storage device is not in use by the above-mentioned virtual machine, attempting to start the above-mentioned storage device through the access interface; when the startup fails, delaying for a preset period of time, and re-starting the above-mentioned storage device through the above-mentioned access interface until the above-mentioned storage device is successfully started, or the number of startup failures reaches a preset number.

[0148] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0149] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0150] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0151] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0152] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0154] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An information processing method, comprising: Obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine being obtained by virtualizing the physical machine, and the virtual machine exclusively occupying the storage device; Selecting a corresponding information collection method according to the status information to obtain information collection results; Reporting the information collection results to the cloud server; Among them, selecting a corresponding information collection method according to the status information, and obtaining the information collection result includes: judging whether the storage device is in use of the virtual machine according to the status information, and obtaining a judgment result; in response to determining that the storage device is not in use of the virtual machine according to the judgment result, using a second application to obtain the information collection result, wherein the second application runs outside the virtual machine, and a user-state driver and an access interface are integrated in the second application, and the user-state driver is used to drive and control the storage device through the access interface.

2. The method according to claim 1, wherein The information processing method further includes: In response to determining, according to the judgment result, that the storage device is in use by the virtual machine, a first application is used to obtain the information collection result, wherein the first application runs inside the virtual machine.

3. The method according to claim 1, wherein Using the second application to obtain the information collection result includes: The second application is used to send multiple read commands and / or write commands to the storage device, perform read and write speed detection on the storage device, and obtain the information collection result.

4. The method according to claim 1, wherein Using the second application to obtain the information collection result includes: Using the second application to read log information from the storage device, wherein the log information is used to record the operating status of the storage device; The health status of the storage device is analyzed based on the log information to obtain the information collection result.

5. The method according to claim 1, wherein Using the second application to obtain the information collection result includes: The second application program is used to read statistical information from the storage device to obtain the information collection result, wherein the statistical information is used to count the number of input and output times and the input and output throughput of the storage device.

6. The method according to claim 1, wherein Using the second application to obtain the information collection result includes: The second application is used to read attribute information from the storage device to obtain the information collection result, wherein the attribute information includes at least one of the following: the namespace of the storage device, the storage capacity of the storage device, the storage block size of the storage device, the serial number of the storage device, the firmware version of the storage device, and the manufacturer of the storage device.

7. The method according to claim 1, wherein The user mode driver accesses the storage device through the access interface to perform direct memory access operations and interrupt response operations.

8. The method according to claim 1, wherein The user-mode driver drives and controls the storage device by submitting a control command to a command queue in the storage device and reading a control response corresponding to the control command from the command queue.

9. The method according to claim 1, wherein The method further comprises: Determining whether the storage device is in use by the virtual machine according to the status information; When it is determined according to the state information that the storage device is not in use by the virtual machine, attempting to start the storage device through an access interface; When the startup fails, the preset time period is delayed and the storage device is restarted through the access interface until the storage device is successfully started or the number of startup failures reaches a preset number.

10. An information processing system comprising: User-mode driver, access interface, performance detection module, log module, statistics module, basic information module and management reporting module; The user-mode driver is configured to obtain, through the access interface, status information of a storage device on the physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine being obtained by virtualizing the physical machine and having exclusive use of the storage device; The performance detection module is used to detect the reading and writing speed by submitting read or write commands in batches; The log module is configured to read log information from the storage device, wherein the log information is used to record the operating status of the storage device; and analyze the health status of the storage device based on the log information to obtain a first information collection result; The statistical module is configured to read statistical information from the storage device to obtain a second information collection result, wherein the statistical information is used to count the number of input and output times and the input and output throughput of the storage device; The basic information module is configured to read attribute information from the storage device to obtain a third information collection result, wherein the attribute information includes at least one of the following: a namespace of the storage device, a storage capacity of the storage device, a storage block size of the storage device, a serial number of the storage device, a firmware version of the storage device, and a manufacturer of the storage device; The management reporting module is used to report at least one of the first information collection result, the second information collection result, and the third information collection result to the cloud server.

11. An information processing device, comprising: A first acquisition module is configured to acquire status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine being obtained by virtualizing the physical machine and the virtual machine having exclusive use of the storage device; A second acquisition module is used to select a corresponding information collection method according to the status information and obtain an information collection result; A reporting module, used to report the information collection results to the cloud server; Among them, the second acquisition module is also used to: determine whether the storage device is in use of the virtual machine based on the status information, and obtain a judgment result; in response to determining that the storage device is not in use of the virtual machine based on the judgment result, use a second application to obtain the information collection result, wherein the second application runs outside the virtual machine, and a user-state driver and an access interface are integrated in the second application, and the user-state driver is used to drive and control the storage device through the access interface.

12. A storage medium comprising a stored program, wherein: When the program is running, the device where the storage medium is located is controlled to execute the information processing method according to any one of claims 1 to 9.

13. A computing device comprising: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Obtaining status information of a storage device on a physical machine, wherein the status information is used to determine whether the storage device is in use by a virtual machine, the virtual machine being obtained by virtualizing the physical machine, and the virtual machine exclusively occupying the storage device; Selecting a corresponding information collection method according to the status information to obtain information collection results; Reporting the information collection results to the cloud server; Among them, selecting a corresponding information collection method according to the status information, and obtaining the information collection result includes: judging whether the storage device is in use of the virtual machine according to the status information, and obtaining a judgment result; in response to determining that the storage device is not in use of the virtual machine according to the judgment result, using a second application to obtain the information collection result, wherein the second application runs outside the virtual machine, and a user-state driver and an access interface are integrated in the second application, and the user-state driver is used to drive and control the storage device through the access interface.

Citation Information

Patent Citations

  • Hardware resource access method and hardware resource access device

    CN104424034A

  • Hardware to make remote storage access appear as local in a virtualized environment

    CN109496296A