CN116450046A - Cloud disk implementation method and device, intelligent network card, server and storage medium - Google Patents

Cloud disk implementation method and device, intelligent network card, server and storage medium Download PDF

Info

Publication number
CN116450046A
CN116450046A CN202310431261.8A CN202310431261A CN116450046A CN 116450046 A CN116450046 A CN 116450046A CN 202310431261 A CN202310431261 A CN 202310431261A CN 116450046 A CN116450046 A CN 116450046A
Authority
CN
China
Prior art keywords
cloud disk
network card
intelligent network
blk
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310431261.8A
Other languages
Chinese (zh)
Inventor
卢祖友
罗向征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202310431261.8A priority Critical patent/CN116450046A/en
Publication of CN116450046A publication Critical patent/CN116450046A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of cloud computing and intelligent network cards, and provides a cloud disk implementation method, a device, an intelligent network card, a server and a storage medium, wherein the method comprises the following steps: when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, and reading the state of the virtual io-blk device in the intelligent network card through the virtual device driver, wherein the state is set by the intelligent network card according to the detected mounting condition of the cloud disk, and a one-to-one corresponding logic relationship exists between the virtual io-blk device and the corresponding cloud disk; judging whether the cloud disk is in a ready state according to the state of the virtio-blk device; and if the cloud disk is in a ready state, continuing to execute the virtual device driver and starting the cloud disk after the execution is completed. The invention can reduce the probability of failure in starting the server by taking the cloud disk as the system disk and improve the reliability of the server.

Description

Cloud disk implementation method and device, intelligent network card, server and storage medium
Technical Field
The invention relates to the technical field of cloud computing and intelligent network cards, in particular to a cloud disk implementation method, a device, an intelligent network card, a server and a storage medium.
Background
In a cloud data center environment, bare metal servers are provided as products to clients, the operating system requirements of each client on the server are different, and the traditional mode that a local disk is used as a system disk is difficult to meet the elastic requirements of the bare metal servers.
And providing a cloud disk for the bare metal server through the intelligent network card and the centralized storage service, and taking the cloud disk as a system disk of the bare metal server. In this way, the bare metal server and the cloud disk are separated from each other, and the elastic configuration requirement of the bare metal server can be effectively improved. The specific implementation mode is as follows: the intelligent network card provides the virtual-blk device for the server as a system disk, the centralized storage provides the physical storage service of the actual virtual-blk device, the cloud disk visible by the server is remotely mounted on a certain physical disk in the centralized storage through the intelligent network card, so that the requirement of the cloud data center on the elastic bare metal is met.
Therefore, in the scene of taking the cloud disk as the system disk of the bare metal server, the probability of the starting failure of the bare metal server is high, and the reliability of the bare metal server is greatly influenced.
Disclosure of Invention
The invention aims to provide a cloud disk implementation method, a cloud disk implementation device, an intelligent network card, a server and a storage medium, which can reduce the probability of failure in starting a server taking a cloud disk as a system disk and improve the reliability of the server.
Embodiments of the invention may be implemented as follows:
in a first aspect, the present invention provides a cloud disk implementation method, applied to a server, where the server is communicatively connected to an intelligent network card through a bus, the method includes:
when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the mounting condition of a cloud disk corresponding to detection, and a one-to-one logic relationship exists between the virtio-blk device and the cloud disk;
judging whether the cloud disk is in a ready state or not according to the state of the virtio-blk device;
And if the cloud disk is in a ready state, continuing to execute the virtual device driver and starting the cloud disk after the execution is completed.
In an optional embodiment, the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and the step of determining whether the cloud disk is in a ready state according to the status of the virtio-blk device includes:
and if the value in the status register is the preset value, judging that the cloud disk is in an unready state, otherwise, judging that the cloud disk is in a readiness state.
In an alternative embodiment, the status register is a feature register or a custom register of the virtio-blk device.
In an optional implementation manner, when the server is powered on, reading the Expansion Rom file from the intelligent network card specifically includes:
and when the server is electrified, reading an Expansion Rom file from a network card chip of the intelligent network card, wherein the Expansion Rom file is loaded into the network card chip from a CPU system of the intelligent network card when the intelligent network card is started.
In an alternative embodiment, the method further comprises:
If the cloud disk is in the non-ready state, continuing to detect the state of the virtio-blk device until the cloud disk is in the ready state, continuing to execute the virtual device driver and starting the cloud disk after execution is completed.
In a second aspect, the present invention provides a cloud disk implementation method, applied to an intelligent network card, where the intelligent network card is connected with a server in a communication manner through a bus, and the method includes:
when the intelligent network card is started, detecting the mounting condition of a cloud disk corresponding to the virtio-blk device;
the method comprises the steps that the state of a virtual device is set according to the mounting condition of a cloud disk, when a server is started, an Expansion Rom file is read from an intelligent network card, a virtual device driver in the Expansion Rom file is loaded, the state of the virtual device in the intelligent network card is read through the virtual device driver, whether the cloud disk is in a ready state or not is judged according to the state of the virtual device, the virtual device driver is continuously executed when the cloud disk is in the ready state, the cloud disk is started after the cloud disk is in the ready state, the state of the virtual device is set by the intelligent network card according to the mounting condition of the cloud disk corresponding to detection, and a one-to-one logic relationship exists between the cloud disk and the virtual device.
In an optional implementation manner, the intelligent network card includes a status register storing the status of the virtio-blk device, the status register is initialized to a preset value, and the step of setting the status of the virtio-blk device according to the mounting condition of the cloud disk includes:
if the cloud disk mounting is successful, modifying a preset value of the status register to be a specified value different from the preset value, wherein the status register is a characteristic register or a custom register of the virtio-blk device.
In an optional embodiment, before the detecting the mounting situation of the cloud disk corresponding to the virtio-blk device, the method further includes:
when the intelligent network card is started, an Expansion Rom file is read from a CPU system, the Expansion Rom file is written into a network card chip of the intelligent network card, so that when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and a virtual device driver in the Expansion Rom file is loaded.
In a third aspect, the present invention provides a cloud disk implementation apparatus, applied to a server, where the server is communicatively connected to an intelligent network card through a bus, the apparatus includes:
The server comprises a reading module, a virtual device driver and a virtual device management module, wherein the reading module is used for reading an Expansion Rom file from the intelligent network card and loading the virtual device driver in the Expansion Rom file when the server is started, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the detection of the mounting condition of a corresponding cloud disk, and a one-to-one logic relationship exists between the virtio-blk device and the cloud disk;
the judging module is used for judging whether the cloud disk is in a ready state according to the state of the virtio-blk device;
and the starting module is used for continuously executing the virtual device driver if the cloud disk is in a ready state and starting the cloud disk after the execution is completed.
In a fourth aspect, the present invention provides a cloud disk implementation apparatus, which is applied to an intelligent network card, where the intelligent network card is connected with a server through a bus in a communication manner, and the apparatus includes:
the detection module is used for detecting the mounting condition of the cloud disk corresponding to the virtio-blk device when the intelligent network card is started;
the setting module is used for setting the state of the virtual io-blk device according to the mounting condition of the cloud disk, so that when the server is started, an Expansion Rom file is read from the intelligent network card, a virtual device driver in the Expansion Rom file is loaded, the state of the virtual io-blk device in the intelligent network card is read through the virtual device driver, whether the cloud disk is in a ready state or not is judged according to the state of the virtual io-blk device, the virtual device driver is continuously executed when the cloud disk is in the ready state, the cloud disk is started after the cloud disk is completed, the state of the virtual io-blk device is set by the intelligent network card according to the cloud disk mounting condition corresponding to detection, and a one-to-one logic relationship exists between the cloud disk and the virtual io-blk device.
In a fifth aspect, the present invention provides an intelligent network card, including a processor and a memory, where the memory is configured to store a program, and the processor is configured to implement the cloud disk implementation method according to any one of the foregoing embodiments when executing the program.
In a sixth aspect, the present invention provides a server, where the server includes a processor, a memory, and a bus, where the server establishes a connection with the intelligent network card according to the foregoing embodiment through the bus, where the memory is used to store a program, and where the processor is used to implement the cloud disk implementation method according to any one of the foregoing embodiments when the program is executed.
In a seventh aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the cloud disk implementation method of any one of the foregoing embodiments, or implements the cloud disk implementation method of any one of the foregoing embodiments.
Compared with the prior art, the method has the advantages that when the intelligent network card is started, the state of the virtio-blk device is set according to the mounting condition of the cloud disk corresponding to the intelligent network card, a one-to-one logic relationship exists between the virtio-blk device and the cloud disk, when the server is started, the state of the virtio-blk device in the intelligent network card is read, whether the cloud disk is in a ready state or not is judged according to the state of the virtio-blk device, a virtual device driver is continuously executed when the cloud disk is in the ready state, the cloud disk is started after execution is completed, and finally the server is normally started.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an exemplary diagram of an application scenario provided in this embodiment.
Fig. 2 is a block diagram of a server according to the present embodiment.
Fig. 3 is a block diagram of an intelligent network card according to the present embodiment.
Fig. 4 is a flowchart illustrating an example of a cloud disk implementation method applied to a server according to the present embodiment.
Fig. 5 is a flowchart illustrating an example of a cloud disk implementation method applied to a server according to the present embodiment.
Fig. 6 is a flowchart illustrating a method for implementing a cloud disk applied to an intelligent network card according to the present embodiment.
Fig. 7 is an exemplary diagram of a logic architecture of the cloud disk implementation method provided in this embodiment.
Fig. 8 is a block schematic diagram of a first cloud disk implementation apparatus provided in this embodiment.
Fig. 9 is a block schematic diagram of a second cloud disk implementation apparatus provided in this embodiment.
Icon: 10-a server; 11-a first processor; 12-a first memory; 13-bus; 20-an intelligent network card; 21-a second processor; 22-a second memory; 23-network card chip; 30-a centralized storage device; 100-a first cloud disk implementation device; 110-a reading module; 120-judging module; 130-a start-up module; 200-a second cloud disk implementation device; 210-a detection module; 220-setting up a module; 230-write module.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, if the terms "upper", "lower", "inner", "outer", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or the azimuth or the positional relationship in which the inventive product is conventionally put in use, it is merely for convenience of describing the present invention and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus it should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, if any, are used merely for distinguishing between descriptions and not for indicating or implying a relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
In general, a system disk is provided for a server in a manner of installing a local system disk, installing a system disk for PXE (Preboot eXecution Environment, pre-boot execution environment) deployment, distributing a file system, and the like, and these technologies cannot meet the requirements of cloud data center elastic bare metal due to deployment, operation and maintenance, security, and other reasons.
The core improvement point of the cloud disk implementation method, the device, the intelligent network card, the server and the storage medium is that the server is started normally under the condition that the cloud disk is started normally through the state of the virtio-blk device in the intelligent network card, so that the failure of the server start caused by the fact that the cloud disk is not ready is avoided, and the method is described in detail below.
Referring to fig. 1, fig. 1 is an exemplary diagram of an application scenario provided in this embodiment, in fig. 1, an intelligent network card 20 may be directly plugged into a server 10, and connected to the server 10 through a bus (such as PCIE), and the intelligent network card 20 communicates with a remote centralized storage device 30 through a network. The intelligent network card 20 provides the virtual io-blk device to the server 10, and a one-to-one logic relationship exists between the virtual io-blk device and the cloud disk (the centralized storage device provides the physical storage space of the virtual io-blk device), and the intelligent network card 20 mounts the virtual io-blk device to the centralized storage device 30 through a network storage protocol, so that the rear end storage access service of the cloud disk is provided for the server.
The server 10 is usually a hardware device with the characteristics of a traditional physical server, and has a virtualized service function of cloud computing technology, which is a product of combining the advantages of hardware and software, namely a BMS (Bare Metal Server ), and the server 10 can provide a dedicated physical server on the cloud for enterprises, and provide excellent computing performance and data security for services such as a core database, a key application system, high-performance computing, big data and the like. The cloud service user can flexibly apply and use the cloud service user according to the requirement.
The intelligent network card 20 is a network card with an independent computing unit and can complete the operation of specific infrastructure functions, and the intelligent network card 20 simulates and stores virtual-blk equipment through a PCIE (Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard) bus, performs conversion of communication protocols and storage protocols through software, communicates with a remote centralized storage device 30, and provides a storage access function of a cloud disk for the server 10.
The centralized storage device 30 is a storage device that provides storage space for a cloud disk.
On the basis of fig. 1, the present embodiment also provides a block diagram of the server 10 in fig. 1, referring to fig. 2, fig. 2 is a block diagram of the server 10 provided in the present embodiment, the server 10 includes a first processor 11, a first memory 12 and a bus 13, and the first processor 11 is electrically connected to the first memory 12 through the bus 13.
The first processor 11 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the cloud disk implementation method applied to the server 10 may be completed by an integrated logic circuit of hardware or an instruction in a software form in the first processor 11. The first processor 11 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The first memory 12 is used for storing programs, such as a first cloud disk implementation apparatus in the following embodiment. The first cloud disk implementation 100 includes at least one software function module that may be stored in the first memory 12 in the form of software or firmware (firmware) or solidified in the server 10. After receiving the execution instruction, the first processor 11 executes a program to implement the cloud disk implementation method applied to the server 10 disclosed in the above embodiment.
The server 10 is started in a UEFI environment (Unified Extensible Firmware Interface ), which is responsible for power-on self-test (Power On Self Test, POST) of the server 10, providing an interface to connect the operating system with the hardware.
On the basis of fig. 1, the present embodiment also provides a block schematic diagram of the intelligent network card 20 in fig. 1, referring to fig. 3, fig. 3 is a block schematic diagram of the intelligent network card 20 provided in the present embodiment, the intelligent network card 20 includes a second processor 21, a second memory 22, and a network card chip 23, and the second processor 21 is electrically connected to both the second memory 22 and the network card chip 23.
The second processor 21 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the cloud disk implementation method applied to the intelligent network card 20 may be completed by an integrated logic circuit of hardware or an instruction in a software form in the second processor 21. The second processor 21 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The second memory 22 is used for storing programs, such as the second cloud disk implementation apparatus 200 in the embodiment described below. The second cloud disk implementation 200 comprises at least one software function module that may be stored in the second memory 22 in the form of software or firmware (firmware) or solidified in the smart network card 20. After receiving the execution instruction, the second processor 21 executes a program to implement the cloud disk implementation method applied to the intelligent network card disclosed in the above embodiment.
The network card chip 23 is a chip of the intelligent network card 20, and is used for storing the state of the virtio-blk device corresponding to the cloud disk. In addition, since the intelligent network card 20 simulates the virtual-blk device through the PCIE bus, for the PCI/PCIE device using the PCIE bus, there is usually an external read-only memory device (Rom) for storing the initialization code or the system start code of the PCI/PCIE device, and in the power-on self-test stage of the intelligent network card 20, the second processor 21 copies an extended read-only memory (Expansion Rom) file in the Rom to the network card chip 23 of the intelligent network card 20, and then the server 10 reads and executes the file from the network card chip 23.
On the basis of fig. 1 and 2, the present embodiment provides a cloud disk implementation method applied to the server 10 in fig. 1 and 2, please refer to fig. 4, fig. 4 is a flowchart illustration of an embodiment of the cloud disk implementation method applied to the server, and the method includes the following steps:
Step S101, when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the mounting condition of the cloud disk corresponding to the detection, and a one-to-one logic relationship exists between the virtio-blk device and the cloud disk.
In this embodiment, the cloud disk is accessed by means of a virtio-blk device, where the virtio-blk device stores information in blocks with fixed sizes, each block has its own address, and may further read a certain length of data from any location of the virtio-blk device, where the intelligent network card 20 provides virtualization of the storage space provided by the centralized storage device 30 into the virtio-blk device, that is, for a preset storage space on the centralized storage device 30, the storage space is seen from the intelligent network card end as a virtio-blk device, and the server 10 regards the virtio-blk device as a cloud disk, so that when the cloud disk is mounted successfully, that means that the access connection between the intelligent network card 20 and the centralized storage device 30 is normal, the server 10 can provide access to the cloud disk by means of the intelligent network card 20, and otherwise, the server 10 can not access the virtio-blk device by means of the intelligent network card.
In this embodiment, in order to enable the state of the cloud disk to be known in time when the server is started, so that the starting flow of the server is performed after the cloud disk is normal, the timeliness between the starting of the server 10 and the normal of the cloud disk is ensured, the mounting condition of the cloud disk is detected in real time when the intelligent network card 20 is started, the state of the virtio-blk device is set according to the mounting condition of the cloud disk, and the state of the virtio-blk device characterizes whether the cloud disk is in a ready state.
Step S102, judging whether the cloud disk is in a ready state according to the state of the virtio-blk device.
In this embodiment, the cloud disk is in a ready state, which means that the cloud disk can normally provide a service of storage access, in this state, the server 10 using the cloud disk as a system disk can be started normally, otherwise, the server 10 fails to start.
Step S103, if the cloud disk is in a ready state, continuing to execute the virtual device driver and starting the cloud disk after execution is completed.
According to the method provided by the embodiment, whether the cloud disk is in the ready state is judged according to the state of the virtio-blk device, the virtual device driver is continuously executed when the cloud disk is in the ready state, and the cloud disk is started after execution is completed, so that the server is finally started normally.
In an alternative embodiment, the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and one implementation manner of determining whether the cloud disk is in a ready state is:
if the value in the status register is a preset value, the cloud disk is judged to be in an unready state, otherwise, the cloud disk is judged to be in a readiness state.
In this embodiment, when the intelligent network card detects that the cloud disk mounting is successful, the value in the status register is set to a specified value, and the preset value may be any value different from the specified value, for example, the preset value is set to 0x5a5a5a5a, or may be set to other special values as long as the preset value is different from the specified value.
In this embodiment, one implementation manner of the status register is to add a register specifically as the status register, which needs to adaptively modify the chip from the hardware, so that it can provide additional support for the status register, so as not to make excessive changes to the existing hardware architecture, and reduce the hardware cost, and another implementation manner is provided in this embodiment, since the virtual-blk device driver of the intelligent network card 20 defines a feature register originally, the embodiment multiplexes the feature register as the status register, that is: the status register is a characteristic register defined by the virtual-blk device driver, so that hardware adaptation modification is not needed, the requirement of the status register can be met only by software adaptation, and the status register can also be a custom register.
In an alternative embodiment, in order to timely detect the state of the virtio-blk device in the intelligent network card when the server is powered on, the server reads the Expansion Rom file from the intelligent network card when the server is powered on, and this embodiment further provides an implementation manner of reading the Expansion Rom file:
when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and is loaded into the network card chip from the CPU system of the server when the intelligent network card is started.
In this embodiment, the Expansion Rom file is an initialization code or a system start code of the PCI/PCIE device stored in the Expansion Rom, when the intelligent network card 20 is started, the Expansion Rom file is read from the Expansion Rom during the power-on self-test stage, the read Expansion Rom file is stored in the network card chip 23, and the server 10 reads and runs the Expansion Rom file from the network card chip 23 to realize detection of the state of the virtio-blk device stored in the intelligent network card 20.
Based on fig. 4, the present embodiment further provides a processing manner when the cloud disk is not in a ready state, referring to fig. 5, fig. 5 is a flowchart illustrating an example of the cloud disk implementation method applied to the server provided in the present embodiment, and the method further includes step S104:
Step S104, if the cloud disk is in a non-ready state, continuing to detect the state of the virtual io-blk device until the cloud disk is in the ready state, continuing to execute the virtual device driver and starting the cloud disk after execution is completed.
In this embodiment, if the cloud disk is in an unready state, which means that the system disk of the server is abnormal, the server blocks waiting, and continues to detect the state of the virtio-blk device in real time or periodically.
In order to cooperate with the server 10, when the intelligent network card 20 is started, it needs to detect the mounting condition of the cloud disk, and set the state of the virtio-blk device according to the mounting condition of the cloud disk, this embodiment also provides a cloud disk implementation method applied to the intelligent network card, please refer to fig. 6, fig. 6 is a flowchart of the cloud disk implementation method applied to the intelligent network card provided in this embodiment, and the method includes the following steps:
step S201, when the intelligent network card is started, detecting the mounting condition of the cloud disk corresponding to the virtio-blk device.
In this embodiment, when the intelligent network card 20 is started, the connection condition of the cloud disk, that is, whether the cloud disk is normally communicated with the centralized storage device or not, whether the storage space provided by the centralized storage device can be normally accessed or not is detected, if the connection is normal, the cloud disk is considered to be successfully mounted, otherwise, the cloud disk is failed to be mounted.
Step S202, setting the state of the virtual-blk device according to the mounting condition of the cloud disk, so that when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, reading the state of the virtual-blk device in the intelligent network card through the virtual device driver, judging whether the cloud disk is in a ready state according to the state of the virtual-blk device, continuously executing the virtual device driver when the cloud disk is in the ready state, and starting the cloud disk after the cloud disk is completely executed, wherein the state of the virtual-blk device is set by the intelligent network card according to the mounting condition of the cloud disk corresponding to detection, and a one-to-one logic relationship exists between the cloud disk and the virtual-blk device.
In an optional embodiment, the intelligent network card includes a status register storing a status of the virtio-blk device, and the status register is initialized to a preset value, and the manner of setting the status of the virtio-blk device according to the mounting condition of the cloud disk may be:
if the cloud disk is successfully mounted, modifying a preset value of a state register into a specified value different from the preset value, wherein the state register is a characteristic register or a custom register of the virtio-blk device.
If the cloud disk mounting fails, no modification is performed on the preset value, so that before the cloud disk mounting succeeds, the server 10 detects that the state register is always the preset value, the server 10 is always in blocking waiting until the cloud disk mounting succeeds, the preset value is modified to be a specified value, at this time, the server 10 judges that the cloud disk mounting succeeds, the cloud disk is started, and the server 10 is started normally.
In an alternative embodiment, in order to enable the server 10 to timely read and run the Expansion Rom file, before detecting the mounting situation of the cloud disk corresponding to the virtio-blk device, the intelligent network card 20 further provides a manner of writing the Expansion Rom file:
when the intelligent network card is started, the Expansion Rom file is read from the CPU system and written into the network card chip of the intelligent network card, so that when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and a virtual device driver in the Expansion Rom file is loaded.
In this embodiment, the network card chip may be the network card chip 23 in fig. 3, and one way to write the Expansion Rom file supporting the cloud disk function into the network card chip is as follows:
and writing the Expansion Rom file supporting the cloud disk function into the network card chip in a boot stage of the intelligent network card or in an operating system boot stage.
In this embodiment, the Expansion Rom file may be written into the network card chip and executed in the boot stage, or may be written into the operating system to execute in the start stage, so long as it is ensured that the Expansion Rom file can be read from the network card chip of the intelligent network card when the server is powered on.
In order to more clearly illustrate the present solution from the aspect of the logic architecture, please refer to fig. 7, fig. 7 is an exemplary diagram of the logic architecture of the cloud disk implementation method provided in the present embodiment, and fig. 7 shows that the server 10 is in a UEFI environment. The cloud disk implementation method relates to interaction among a server 10, a network card chip of an intelligent network card 20 and a network card CPU, wherein the server 10 is operated with an Expansion Rom operation module, the network card chip is operated with an Expansion Rom file storage module and a virtio-blk device module, the network card CPU is operated with an Expansion Rom file loading module and a cloud disk state checking module, and the specific interaction process of the network card chip is as follows:
s1: after the server 10 is powered on, the network card CPU starts to operate, and an Expansion Rom file loading module of the network card CPU is responsible for writing an Expansion Rom file supporting a cloud disk function into a network card chip so as to be read and operated in a UEFI environment by the server 10; the Expansion Rom file loading module can be implemented in a BOOT environment (also called a BOOT environment) or an operating system environment (also called an OS environment);
S2: after the server 10 is powered on, the server 10 reads and executes an Expansion Rom file in a UEFI environment, and actually executes a virtual-blk driver, wherein the virtual-blk driver is a driver of a virtual-blk device realized based on a virtual, the virtual is a universal virtual device simulation standard, the virtual is divided into drivers and devices, the drivers and the devices are producer and consumer mode actions, and the drivers produce memory and the devices consume memory. The virtio-blk driver checks whether the virtio-blk device in the network card chip is ready or not, and if not, the virtio-blk device is blocked and waits; otherwise, normally loading a virtio-blk device driver and starting the cloud disk after loading is completed;
s3: after the network card CPU enters an OS environment, a cloud disk state checking module is started, the module can always check the connection condition of the cloud disk, and if the cloud disk is successfully connected (can be accessed), control information is transmitted to a virtio-blk equipment module, and the cloud disk in the UEFI of the server 10 is allowed to be continuously loaded;
s4: the Expansion Rom running module running in the UEFI environment always checks the control state of the virtio-blk device, if the control state is ready, the driver is normally loaded, and if the control state is not ready, the control state is always waited.
In order to perform the corresponding steps in the foregoing embodiments and the various possible implementations, an implementation manner of the first cloud disk implementation apparatus 100 is given below. Referring to fig. 8, fig. 8 is a block diagram of a first cloud disk implementation apparatus 100 according to the present embodiment. It should be noted that, the basic principle and the technical effects of the first cloud disk implementation apparatus 100 provided in this embodiment are the same as those of the foregoing embodiments, and for brevity, this embodiment is not mentioned in the description.
The first cloud disk implementation apparatus 100 includes a reading module 110, a judging module 120, and a starting module 130.
The reading module 110 is configured to read an Expansion Rom file from the intelligent network card and load a virtual device driver in the Expansion Rom file when the server is started, and read a state of a virtio-blk device in the intelligent network card through the virtual device driver, where the state of the virtio-blk device is set by the intelligent network card according to a detected mounting condition of a corresponding cloud disk, and a one-to-one logical relationship exists between the virtio-blk device and the cloud disk;
in an alternative embodiment, the reading module 110 is further configured to: when the server is powered on, the Expansion Rom file is read from the intelligent network card, and is specifically used for: when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and is loaded into the network card chip from the CPU system of the server when the intelligent network card is started.
The judging module 120 is configured to judge whether the cloud disk is in a ready state according to a state of the virtio-blk device;
in an alternative embodiment, the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and the determining module 120 is specifically configured to: if the value in the status register is a preset value, the cloud disk is judged to be in an unready state, otherwise, the cloud disk is judged to be in a readiness state.
In an alternative embodiment, the status register is a feature register or custom register of the virtio-blk device.
And the starting module 130 is configured to continue executing the virtual device driver if the cloud disk is in a ready state, and starting the cloud disk after execution is completed.
In an alternative embodiment, the starting module 130 is further configured to: if the cloud disk is in the non-ready state, continuously detecting the state of the virtio-blk device until the cloud disk is in the ready state, continuously executing the virtual device driver, and starting the cloud disk after the execution is completed.
In order to perform the corresponding steps in the foregoing embodiments and the various possible implementations, an implementation manner of the second cloud disk implementation apparatus 200 is given below. Referring to fig. 9, fig. 9 is a block diagram of a second cloud disk implementation apparatus 200 according to the present embodiment. It should be noted that, the basic principle and the technical effects of the second cloud disk implementation apparatus 200 provided in this embodiment are the same as those of the foregoing embodiments, and for brevity, this embodiment is not mentioned in the description.
The second cloud disk implementation apparatus 200 includes a detection module 210, a setting module 220, and a writing module 230.
The detection module 210 is configured to detect a mounting condition of a cloud disk corresponding to the virtio-blk device when the intelligent network card is started;
The setting module 220 is configured to set a state of the virtual io-blk device according to a mounting condition of the cloud disk, so that when the server is started, an Expansion Rom file is read from the intelligent network card, a virtual device driver in the Expansion Rom file is loaded, the state of the virtual io-blk device in the intelligent network card is read through the virtual device driver, whether the cloud disk is in a ready state is judged according to the state of the virtual io-blk device, the virtual device driver is continuously executed when the cloud disk is in the ready state, and the server is started Yun Pan after execution is completed, and a one-to-one logical relationship exists between the cloud disk and the virtual io-blk device.
In an alternative embodiment, the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and the setting module 220 is specifically configured to: if the cloud disk is successfully mounted, modifying a preset value of a state register into a specified value different from the preset value, wherein the state register is a characteristic register or a custom register of the virtio-blk device.
In an alternative embodiment, before detecting the mounting situation of the cloud disk corresponding to the virtio-blk device, the writing module 230 is configured to: when the intelligent network card is started, the Expansion Rom file is read from the CPU system and written into the network card chip of the intelligent network card, so that when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and a virtual device driver in the Expansion Rom file is loaded.
In an alternative embodiment, the writing module 230 is specifically configured to: and writing the Expansion Rom supporting the cloud disk function into the network card chip in a boot stage of the intelligent network card or in an operating system boot stage.
The present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the cloud disk implementation method applied to a server in the foregoing embodiment, or implements the cloud disk implementation method applied to an intelligent network card in the foregoing embodiment.
In summary, the embodiment of the invention provides a cloud disk implementation method, a device, an intelligent network card, a server and a storage medium, which are applied to the server, wherein the server is in communication connection with the intelligent network card through a bus, and the method comprises the following steps: when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the mounting condition of a cloud disk corresponding to detection, and a one-to-one corresponding logic relationship exists between the virtio-blk device and the cloud disk; judging whether the cloud disk is in a ready state according to the state of the virtio-blk device; and if the cloud disk is in a ready state, continuing to execute the virtual device driver and starting the cloud disk after the execution is completed. Compared with the prior art, the embodiment of the invention has at least the following advantages: (1) The problem that the cloud disk function of the intelligent network card fails due to the fact that the loading speed of the server is high so that the cloud disk function is faster than the time that the intelligent network card is connected with a remote cloud disk and is ready is solved, and the server cannot be started normally is solved, so that the reliability of the server is improved; (2) The problem that the server cannot be started normally due to improper time sequence control between the starting rate of the server and the cloud disk mounting is solved, so that the cloud disk scheme based on the intelligent network card is more perfect, and the application prospect of the cloud disk scheme is expanded; (3) ROM customization or version upgrading is supported under the condition that the chip firmware is not required to be changed, so that the cloud disk function has good expansibility and adaptability; (4) The intelligent network card and cloud management platform can be well adapted to various servers with different starting speeds, the connection speed of the intelligent network card and the cloud management platform can not influence cloud disk service of the server, and the implementation is simple and easy.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (13)

1. The cloud disk implementation method is characterized by being applied to a server, wherein the server is in communication connection with an intelligent network card through a bus, and the method comprises the following steps:
when the server is started, reading an Expansion Rom file from the intelligent network card, loading a virtual device driver in the Expansion Rom file, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the mounting condition of a cloud disk corresponding to detection, and a one-to-one logic relationship exists between the virtio-blk device and the cloud disk;
judging whether the cloud disk is in a ready state or not according to the state of the virtio-blk device;
and if the cloud disk is in a ready state, continuing to execute the virtual device driver and starting the cloud disk after the execution is completed.
2. The cloud disk implementation method of claim 1, wherein the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and the step of determining whether the cloud disk is in a ready state according to the status of the virtio-blk device includes:
and if the value in the status register is the preset value, judging that the cloud disk is in an unready state, otherwise, judging that the cloud disk is in a readiness state.
3. The cloud disk implementation method of claim 2, wherein the status register is a feature register or a custom register of the virtio-blk device.
4. The cloud disk implementation method of claim 1, wherein when the server is powered on, reading an Expansion Rom file from the intelligent network card specifically includes:
and when the server is electrified, reading an Expansion Rom file from a network card chip of the intelligent network card, wherein the Expansion Rom file is loaded into the network card chip from a CPU system of the intelligent network card when the intelligent network card is started.
5. The cloud disk implementation method of any of claims 1-4, wherein the method further comprises:
If the cloud disk is in the non-ready state, continuing to detect the state of the virtio-blk device until the cloud disk is in the ready state, continuing to execute the virtual device driver and starting the cloud disk after execution is completed.
6. The cloud disk implementation method is characterized by being applied to an intelligent network card, wherein the intelligent network card is in communication connection with a server through a bus, and the method comprises the following steps:
when the intelligent network card is started, detecting the mounting condition of a cloud disk corresponding to the virtio-blk device;
the method comprises the steps that the state of a virtual device is set according to the mounting condition of a cloud disk, when a server is started, an Expansion Rom file is read from an intelligent network card, a virtual device driver in the Expansion Rom file is loaded, the state of the virtual device in the intelligent network card is read through the virtual device driver, whether the cloud disk is in a ready state or not is judged according to the state of the virtual device, the virtual device driver is continuously executed when the cloud disk is in the ready state, the cloud disk is started after the cloud disk is in the ready state, the state of the virtual device is set by the intelligent network card according to the mounting condition of the cloud disk corresponding to detection, and a one-to-one logic relationship exists between the cloud disk and the virtual device.
7. The cloud disk implementation method of claim 6, wherein the intelligent network card includes a status register storing a status of the virtio-blk device, the status register is initialized to a preset value, and the step of setting the status of the virtio-blk device according to a mounting condition of the cloud disk includes:
if the cloud disk mounting is successful, modifying a preset value of the status register to be a specified value different from the preset value, wherein the status register is a characteristic register or a custom register of the virtio-blk device.
8. The cloud disk implementation method of claim 6, wherein before the detecting the mounting condition of the cloud disk corresponding to the virtio-blk device, the method further comprises:
when the intelligent network card is started, reading an Expansion Rom file from a CPU system and writing the Expansion Rom file into a network card chip of the intelligent network card, so that when the server is electrified, the Expansion Rom file is read from the network card chip of the intelligent network card, and a virtual device driver in the Expansion Rom file is loaded.
9. The cloud disk realizing device is characterized by being applied to a server, wherein the server is in communication connection with an intelligent network card through a bus, and the device comprises:
The server comprises a reading module, a virtual device driver and a virtual device management module, wherein the reading module is used for reading an Expansion Rom file from the intelligent network card and loading the virtual device driver in the Expansion Rom file when the server is started, and reading the state of a virtio-blk device in the intelligent network card through the virtual device driver, wherein the state of the virtio-blk device is set by the intelligent network card according to the detection of the mounting condition of a corresponding cloud disk, and a one-to-one logic relationship exists between the virtio-blk device and the cloud disk;
the judging module is used for judging whether the cloud disk is in a ready state according to the state of the virtio-blk device;
and the starting module is used for continuously executing the virtual device driver if the cloud disk is in a ready state and starting the cloud disk after the execution is completed.
10. The utility model provides a cloud dish realization device, its characterized in that is applied to intelligent network card, intelligent network card passes through bus and server communication connection, the device includes:
the detection module is used for detecting the mounting condition of the cloud disk corresponding to the virtio-blk device when the intelligent network card is started;
the setting module is used for setting the state of the virtual io-blk device according to the mounting condition of the cloud disk, so that when the server is started, an Expansion Rom file is read from the intelligent network card, a virtual device driver in the Expansion Rom file is loaded, the state of the virtual io-blk device in the intelligent network card is read through the virtual device driver, whether the cloud disk is in a ready state or not is judged according to the state of the virtual io-blk device, the virtual device driver is continuously executed when the cloud disk is in the ready state, the cloud disk is started after the cloud disk is executed, the state of the virtual io-blk device is set by the intelligent network card according to the mounting condition of the cloud disk corresponding to detection, and a one-to-one logic relationship exists between the cloud disk and the virtual io-blk device.
11. An intelligent network card, comprising a processor and a memory, wherein the memory is configured to store a program, and the processor is configured to implement the cloud disk implementation method according to any one of claims 6-8 when the program is executed.
12. A server, characterized in that it comprises a processor, a memory and a bus, said server establishing a connection with the intelligent network card according to claim 11 via said bus, said memory being adapted to store a program, said processor being adapted to implement the cloud disk implementation method according to any of claims 1-5 when said program is executed.
13. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, implements the cloud disk implementation method of any of claims 1-5 or implements the cloud disk implementation method of any of claims 6-8.
CN202310431261.8A 2023-04-20 2023-04-20 Cloud disk implementation method and device, intelligent network card, server and storage medium Pending CN116450046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310431261.8A CN116450046A (en) 2023-04-20 2023-04-20 Cloud disk implementation method and device, intelligent network card, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310431261.8A CN116450046A (en) 2023-04-20 2023-04-20 Cloud disk implementation method and device, intelligent network card, server and storage medium

Publications (1)

Publication Number Publication Date
CN116450046A true CN116450046A (en) 2023-07-18

Family

ID=87129941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310431261.8A Pending CN116450046A (en) 2023-04-20 2023-04-20 Cloud disk implementation method and device, intelligent network card, server and storage medium

Country Status (1)

Country Link
CN (1) CN116450046A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112044A (en) * 2023-10-23 2023-11-24 腾讯科技(深圳)有限公司 Instruction processing method, device, equipment and medium based on network card

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112044A (en) * 2023-10-23 2023-11-24 腾讯科技(深圳)有限公司 Instruction processing method, device, equipment and medium based on network card
CN117112044B (en) * 2023-10-23 2024-02-06 腾讯科技(深圳)有限公司 Instruction processing method, device, equipment and medium based on network card

Similar Documents

Publication Publication Date Title
US10102170B2 (en) System and method for providing input/output functionality by an I/O complex switch
US8141094B2 (en) Distribution of resources for I/O virtualized (IOV) adapters and management of the adapters through an IOV management partition via user selection of compatible virtual functions
US8141093B2 (en) Management of an IOV adapter through a virtual intermediary in an IOV management partition
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
JPH04263349A (en) Apparatus and method for loading bios into computer from remote memory position
US10372639B2 (en) System and method to avoid SMBus address conflicts via a baseboard management controller
WO2016074127A1 (en) Computer device and memory starting method for computer device
US20200394076A1 (en) Information Handling System And Method To Allocate Peripheral Component Interconnect Express (PCIE) Bus Resources
US9417886B2 (en) System and method for dynamically changing system behavior by modifying boot configuration data and registry entries
US10572434B2 (en) Intelligent certificate discovery in physical and virtualized networks
US11334427B2 (en) System and method to reduce address range scrub execution time in non-volatile dual inline memory modules
US20160378509A1 (en) Systems and methods for reducing bios reboots
US20210240831A1 (en) Systems and methods for integrity verification of secondary firmware while minimizing boot time
CN109426527B (en) Computer system and method for sharing Bluetooth data between UEFI firmware and operating system
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
CN114238236A (en) Shared file access method, electronic device and computer readable storage medium
CN110688235A (en) System and method for sharing wireless connection information between UEFI firmware and OS
CN115686877A (en) Data interaction method and device, storage medium and computing equipment
US11003778B2 (en) System and method for storing operating life history on a non-volatile dual inline memory module
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
US11204704B1 (en) Updating multi-mode DIMM inventory data maintained by a baseboard management controller
CN116635858A (en) Safety isolation device and method
US20230350755A1 (en) Coordinated operating system rollback
US11169740B1 (en) Simultaneous initiation of multiple commands for configuring multi-mode DIMMS using a BMC

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination