WO2018171728A1 - Server, storage system and related method - Google Patents

Server, storage system and related method Download PDF

Info

Publication number
WO2018171728A1
WO2018171728A1 PCT/CN2018/080248 CN2018080248W WO2018171728A1 WO 2018171728 A1 WO2018171728 A1 WO 2018171728A1 CN 2018080248 W CN2018080248 W CN 2018080248W WO 2018171728 A1 WO2018171728 A1 WO 2018171728A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
disk
server
address
file
Prior art date
Application number
PCT/CN2018/080248
Other languages
French (fr)
Chinese (zh)
Inventor
王燊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018171728A1 publication Critical patent/WO2018171728A1/en

Links

Images

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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Definitions

  • the present invention relates to the field of IT technologies, and in particular, to a server, a storage system, and related methods.
  • a virtual machine is installed on the server, and an application and a virtual hard disk are set in the virtual machine.
  • the server manages the virtual machine through the virtual machine monitor, and the server establishes a data connection with the network disk, and the server is installed with
  • the network disk component is used to manage the storage space allocated by the network disk to the server.
  • an IO command is generated, and the IO command is obtained by the virtual machine monitor.
  • the disk component obtains the IO command from the virtual machine monitor and sends it to the network disk.
  • the network disk performs the IO operation according to the IO command, and returns the IO operation response information carrying the IO operation result to the network disk component, and the network disk component will perform the IO operation.
  • the response message is sent to the virtual machine monitor, which sends the IO operation response information to the virtual machine so that the virtual machine's application can obtain the IO operation result.
  • the embodiment of the present invention provides a server, a storage system, and a related method, which can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
  • an embodiment of the present invention provides a storage system, including a server cluster and a network disk connected through a network, where the server cluster includes:
  • the first server includes:
  • the first server accesses the network disk through the first network disk component
  • a virtual machine is provided with an application, a file system, and a virtual disk.
  • the application is used to generate a file command for operating a file system user file, and the file system is configured to generate an operation of the virtual disk IO address according to the file command.
  • the virtual machine monitor is configured to generate a read/write instruction to the volume file in the network disk according to the IO command for operating the virtual disk IO address, and send the read/write instruction to the first network disk component, and determine that the read/write instruction fails to execute. Send notification information to the monitoring device;
  • a monitoring device configured to receive a notification message, construct an abnormality information according to the notification message, and send the information to the IO redirection device;
  • the IO redirection device is configured to obtain a read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a network address of the second server in a normal state of the communication link between the network cluster and the network disk, and generate the first network packet. And sending to the second server, where the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of the second server;
  • the second server includes:
  • the IO processing proxy device is configured to receive the first network packet, parse the read/write command from the first network packet, and send the read/write command to the second network disk component.
  • a second network disk component configured to generate an IO command for reading and writing an IO address of a physical disk in the network disk according to the read/write command, and send an IO command for reading and writing an IO address of the physical disk in the network disk to the network Disk.
  • the read/write command is sent to the second server with the normal communication link state with the network disk, and the second server is used.
  • the network disk component processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk, so that when the read/write instruction fails to execute, the network disk component can still pass
  • the processing of another server enables read and write operations on the network disk 40.
  • the monitoring apparatus is specifically configured to detect, according to the notification message, an operating state of the first network disk component and a communication link state between the first server and the network disk, where the network disk component is The abnormality information is constructed when the working state is abnormal or the communication link state between the first server and the network disk is abnormal.
  • the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk.
  • the virtual machine monitor records the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual machine.
  • the first network disk component and the second network disk component respectively record that the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster corresponds to the volume file.
  • an embodiment of the present invention provides a method for processing an IO command, where the method is applied to a storage system, where the storage system includes a first server, a second server, and a network disk, and the first server is configured with a virtual machine and a first network disk. a component, a virtual machine monitor, an IO redirection device, and a monitoring device, the virtual machine is provided with a virtual disk, the first server accesses the network disk through the first network disk component, and the second server sets the IO processing proxy device and the second network disk component.
  • the method includes:
  • the virtual machine generates an IO command that operates on the IO address of the virtual disk
  • the virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, sends a read/write command to the first network disk component, and sends a notification when it is determined that the read/write instruction fails to execute.
  • Information to the monitoring device ;
  • the monitoring device receives the notification message, constructs the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
  • the IO redirecting device obtains the read/write command from the virtual machine monitor in response to the abnormality information, and searches for the network address of the second server in the server cluster that is in a normal state of the communication link with the network disk, and generates the first network packet and sends the a second server, wherein the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of the second server;
  • the IO processing proxy device receives the first network packet, parses the read/write command from the first network packet, and sends the read/write command to the second network disk component.
  • the second network disk component generates an IO command for reading and writing the IO address of the physical disk in the network disk according to the read/write command, and sends an IO command for reading and writing the IO address of the physical disk in the network disk to the network disk.
  • the monitoring device receives the notification information
  • the step of constructing the abnormal information according to the notification message specifically includes:
  • the monitoring device detects, according to the notification message, the working state of the first network disk component and the communication link state between the first server and the network disk, where the working state of the first network disk component is abnormal, or between the first server and the network disk When the communication link status is abnormal, an exception information is constructed.
  • the virtual machine is further provided with an application program and a file system, and the file system manages a correspondence between the user file in the file system and the IO address of the virtual disk, and the virtual machine generates a virtual
  • the steps of the IO command for operating the IO address of the disk specifically include:
  • the application generates a file command to operate on the file system's user file
  • the file system converts the file command into an IO address of the virtual disk to operate according to the correspondence between the user file in the file system and the IO address of the virtual disk.
  • the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of the volume file allocated by the network disk to the virtual machine, and the virtual machine monitor is configured according to the virtual machine monitor.
  • the step of generating an IO command for operating the IO address of the virtual disk to generate a read/write command to the volume file in the network disk includes:
  • the virtual machine monitor obtains the volume number of the volume file corresponding to the IO address of the virtual disk according to the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual disk;
  • the virtual machine generates read and write instructions for the volume files in the network disk based on the volume number of the volume file.
  • the first network disk component and the second network disk component respectively record that the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster corresponds to the volume file.
  • an embodiment of the present invention provides a server, including a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device.
  • the server is disposed in a server cluster, and the server cluster is connected to the network disk via a network.
  • the server accesses the network disk through the network disk component, which is set up with applications, file systems, and virtual disks, where:
  • a file system for generating an IO command for operating an IO address of a virtual disk according to a file command
  • the virtual machine monitor is configured to generate a read/write command for a volume file in the network disk according to an IO command for operating the virtual disk IO address, send a read/write command to the network disk component, and send when the read/write instruction execution failure is determined. Notifying the information to the monitoring device;
  • a monitoring device configured to receive a notification message, construct an abnormality information according to the notification message, and send the information to the IO redirection device;
  • the IO redirection device is configured to obtain a read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a network address of another server in a server cluster that is in a normal state of communication link with the network disk, and generate a first network packet. And sending to another server, where the first network packet carries a read/write command, and the source address of the first network packet is the network address of the first server, and the destination address is the network address of the other server.
  • the monitoring apparatus is specifically configured to detect, according to the notification message, the working state of the network disk component and the communication link state between the server and the network disk, where the working state of the network disk component is abnormal. Or when the communication link status between the server and the network disk is abnormal, construct an exception information.
  • the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk.
  • the virtual machine monitor records the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual machine.
  • the network disk component records the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster and the IO address of the physical disk corresponding to the volume file. Correspondence relationship.
  • an embodiment of the present invention provides a method for processing an IO command, where the method is applied to a server, where the server includes a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device, and the server is configured in the server cluster.
  • the server cluster is connected to the network disk via the network, and the server accesses the network disk through the network disk component, and the virtual machine is provided with an application, a file system, and a virtual disk, and the method includes:
  • the application generates a file command to operate on the file system's user file
  • the file system generates an IO command to operate the IO address of the virtual disk according to the file command;
  • the virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, sends a read/write command to the network disk component, and sends a notification message when it is determined that the read/write instruction fails to execute.
  • the monitoring device receives the notification message, constructs the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
  • the IO redirecting device acquires the read/write command from the virtual machine monitor in response to the abnormality information, and searches for the network address of another server in the server cluster that is in a normal state of the communication link with the network disk, generates the first network packet, and sends the Another server, wherein the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of another server.
  • the monitoring device receives the notification information
  • the step of constructing the abnormal information according to the notification message specifically includes:
  • the monitoring device detects the working state of the network disk component and the communication link state between the server and the network disk according to the notification message, and constructs when the working state of the network disk component is abnormal, or the communication link state between the server and the network disk is abnormal. Abnormal information.
  • the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk, and the virtual machine generates an IO command for operating the IO address of the virtual disk.
  • the virtual machine generates an IO command for operating the IO address of the virtual disk.
  • the file system converts the file command into an IO address of the virtual disk to operate according to the correspondence between the user file in the file system and the IO address of the virtual disk.
  • the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of the volume file allocated by the network disk to the virtual machine, and the virtual machine monitor is configured according to the virtual machine monitor.
  • the step of generating an IO command for operating the IO address of the virtual disk to generate a read/write command to the volume file in the network disk includes:
  • the virtual machine monitor obtains the volume number of the volume file corresponding to the IO address of the virtual disk according to the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual disk;
  • the virtual machine generates read and write instructions for the volume files in the network disk based on the volume number of the volume file.
  • the network disk component records the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster and the IO address of the physical disk corresponding to the volume file. Correspondence relationship.
  • an embodiment of the present invention provides a server, including a memory, a processor, and a bus.
  • the memory and the processor are respectively connected to a bus.
  • the memory stores program instructions, and the processor executes program instructions of the memory to implement setting on the server.
  • the virtual machines are configured with applications, file systems, and virtual disks, where:
  • the processor executes the first program instructions in the memory to perform the steps: the application generates a file command to operate the user file of the file system;
  • the processor executes a second program instruction in the memory to perform the step: the file system generates an IO command to operate on the IO address of the virtual disk according to the file command;
  • the processor executes the third program instruction in the memory to perform the step: the virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, and sends the read/write instruction to the network disk.
  • the component sends a notification message to the monitoring device when it is determined that the execution of the read/write instruction fails;
  • the processor executes a fourth program instruction in the memory to perform the step of: the monitoring device receives the notification message, constructs the exception information according to the notification message, and sends the information to the IO redirection device;
  • the processor executes the fifth program instruction in the memory to perform the step: the IO redirection device acquires the read/write instruction from the virtual machine monitor in response to the exception information, and searches for another communication link state between the network cluster and the network disk in the server cluster.
  • the network address of the server generates the first network packet and sends the message to the server.
  • the first network packet carries the read/write command, and the source address of the first network packet is the network address of the first server, and the destination address is The network address of another server.
  • FIG. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention.
  • FIG. 2 is a data interaction diagram of a storage system in accordance with an embodiment of the present invention.
  • FIG. 3 is another data interaction diagram of a storage system in accordance with an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method of processing an IO command according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus of a server according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention.
  • the storage system includes a server cluster 100 and a network disk 40.
  • the server cluster 100 includes at least a first server 10 and a second.
  • Server 20, server cluster 100, and network disk 40 establish a communication link connection over network 30.
  • the network 30 is specifically, for example, INETERNET (Internet), a local area network, or a mixture of INETERNET and a local area network.
  • INETERNET Internet
  • a local area network or a mixture of INETERNET and a local area network.
  • Network disk 40 has a network address consisting of a plurality of physical disks 1-n that provide an interface to provide storage resources for servers in server cluster 100.
  • the network disk 40 is provided with a network address, and the storage spaces of the plurality of physical disks 1-n included in the network disk 40 are respectively set to a plurality of volume files, and are identified by a volume number, and the network disk 40 records the volume number and the physical disk IO.
  • the relationship between addresses is
  • the IO redirection device 1025 is configured to receive a communication link state between the server where each monitoring device reported by each monitoring device in the server cluster 100 and the network disk 40 (described in detail below).
  • the first server 10 runs on at least one virtual machine.
  • the first server 10 includes a virtual machine 101, an operating system 102, and hardware 103.
  • the virtual machine 101 includes an application 1011, a virtual disk 1012, and a file system 1013.
  • the operating system 102 includes a virtual machine monitor 1021, a network disk component 1022, a physical network card driver 1023, and a monitoring device 1024.
  • the hardware 103 includes a physical network card 1031, and the virtual machine 101 runs on the operating system 102.
  • hardware 103 also includes a processor, memory (not shown), etc., and hardware 103 is used to carry the operation of operating system 102.
  • virtual machine monitor 1021, network disk component 1022, physical network card driver 1023 can be disposed in the kernel of operating system 102.
  • the network disk component 1022, the physical network card driver 1023 can be installed as an application software to the operating system 102 and run directly on the operating system 102.
  • the physical network card driver 1023 is used to drive the physical network card 1031.
  • the physical network card driver 1023 provides an interface for the physical network card 1031 in the operating system 102, and the operating system 102 or software installed in the operating system 102 (such as the network disk component 1022, the monitoring device 1024, and the IO heavy The orientation device 1025) can control the physical network card 1031 to send or receive data through the interface.
  • Network disk component 1022, monitoring device 1024, and IO redirecting device 1025 are provided with respective network ports in operating system 102.
  • the network disk component 1022 records the network address of the network disk 40.
  • the network disk component 1022 can control the physical network card 1031 to send and receive data to access the network disk 40 through the interface provided by the physical network card driver 1023.
  • the monitoring device 1024 records the network address of the network disk 40.
  • the monitoring device can control the physical network card 1031 to send and receive data through the interface provided by the physical network card driver 1023.
  • the monitoring device 1024 can send a command to the network disk 40 to detect the server 10 and the network disk 40. Communication link status.
  • the monitoring device 1024 can monitor the working state of the network disk component 1022. For example, by detecting the process list of the operating system 102, if the key process in the network disk component 1022 is not in the process list, the working state of the network disk component 1022 can be confirmed. abnormal.
  • the monitoring device 1024 can monitor the status of the communication link between the first server 10 and the network disk 40.
  • the monitoring device 1024 controls the physical network card 1031 to send PING (Packet Internet Groper, Internet) through the interface provided by the physical network card driver 1023.
  • PING Packet Internet Groper, Internet
  • the packet explorer commands the network disk 40, and uses the PING command to detect the communication link state between the physical network card 2031 and the network disk 40.
  • the PING command can utilize the uniqueness of the network address of the device on the network to the network disk. 40 sends a data packet, and then requests the network disk 40 to return a data packet of the same size to determine whether the first server 10 and the network disk 40 are connected, and what is the delay.
  • the monitoring device 1024 confirms that the communication link state between the first server 10 and the network disk 40 is abnormal.
  • An operating system is provided on the virtual machine 101 and is provided with a file system 1013 compatible with the operating system.
  • the virtual machine 101 may be provided with a WINDOWS operating system
  • the file system 1013 may be a NTFS (New Technology File System).
  • the virtual machine 101 may be provided with a UNIX or LINUX operating system
  • the file system 1013 may be, for example, an EXT (Extended File System) or an XFS (Extension of the Extent File System). File system.
  • the file system 1013 is provided with a user file, the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, and the application 1011 issues a file command for operating the user file, and the file system 1013 can receive the file command and The above correspondence converts the file command into an IO command for reading and writing the IO address of the virtual disk 1012.
  • the virtual machine 101 runs on a virtual machine monitor 1021 (in some examples, the virtual machine monitor 1021 can run multiple virtual machines), and the virtual machine monitor 1021 can allow an operating system set by a virtual machine running thereon and The application shares hardware 103.
  • virtual machine monitor 1021 may be a VMM (virtual machine monitor), and in other examples, virtual machine monitor 1021 may be a hypervisors.
  • the virtual machine monitor 1021 can access the hardware 103 on the first server 10 and isolate a plurality of virtual machines running thereon, and when the first server 10 starts and executes the virtual machine monitor 1021, the virtual machine monitor 1021 loads The operating system of the virtual machine running on it will be allocated to each virtual machine with the right amount of memory, CPU, network and virtual disk.
  • the virtual machine monitor of the server where the virtual machine is located requests a volume file from the network disk 40 through the network disk component, and the network disk 40 allocates a volume file for the virtual machine, and
  • the volume number of the assigned volume file and the IO address of the physical disk corresponding to the volume file are sent to the network disk component, which sends the volume number to the virtual machine monitor of the server where it resides, and records the volume number and the IO of the physical disk.
  • the relationship between the addresses and the relationship between the virtual machine monitor record volume number and the IO address of the virtual disk.
  • the virtual machine monitor 1021 sends a notification for requesting a volume file to the network disk 40 through the network disk component 1022 (in some examples, the notification also includes the required virtual disk space)
  • the network disk 40 allocates a predetermined number of volume files to the virtual machine 101 according to the notification, and sends the volume number of the allocated volume file and the IO address of the physical disk corresponding to the volume file to the network disk component 1022, the network.
  • the disk component 1022 sends the volume number to the virtual machine monitor 1021 and records the relationship between the volume number and the IO address of the physical disk, and the virtual machine monitor 1021 records the relationship between the volume number and the IO address of the virtual disk.
  • the server 20 shown in FIG. 1 has substantially the same structure as the server 10, and modules having the same name have the same function, except that the server 20 does not have an IO redirection device and is provided with an IO processing proxy device 2025.
  • the IO processing proxy device 2025 is in communication with an IO redirection device 1025 that is provided with a network port in the operating system 202.
  • data synchronization is performed between network disk components of all servers in the server cluster 100.
  • the network disk component 1022 records the correspondence between the volume number of the volume file allocated by the network disk 40 to the virtual machine 101 and the IO address of the physical disk corresponding to the volume file (hereinafter referred to as a first correspondence relationship)
  • the network disk component 2022 records the correspondence relationship between the volume number of the volume file allocated to the virtual machine 201 by the network disk 40 and the IO address of the physical disk corresponding to the volume file (hereinafter referred to as a second correspondence).
  • the first correspondence relationship and the second correspondence relationship are synchronized between the network disk component 1022 and the network disk component 2022 through data interaction, as well as the network disk component in other servers of the server cluster 100 not shown in FIG. 1, thereby making the server cluster
  • Each of the network disk components in 100 records the correspondence between the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
  • the volume number of the volume file of the volume file allocated by the network disk 40 to all the virtual machines in the server cluster may be multicast by the network disk 40 to all the network disk components in the server cluster 100, respectively, and the physical volume corresponding to the volume file.
  • the correspondence between the IO addresses of the disks is such that each network disk component in the server cluster 100 records the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster and the physical disk corresponding to the volume file. The correspondence between IO addresses.
  • each monitoring device in the server cluster 100 periodically detects the status of the communication link between the server and the network disk 40, and reports the specific status to the IO redirection device 1025.
  • the monitoring device 1024 controls the physical network card 1031 to send a PING (Packet Internet Groper) command to the network disk 40 through the interface provided by the physical network card driver 1023, and uses the PING command to detect the physical network card 2031 and The status of the communication link between network disks 40.
  • the PING command may use the uniqueness of the network address of the device on the network to send a data packet to the network disk 40, and then request the network disk 40 to return a data packet of the same size to determine the first server 10 and the network disk 40. Whether the connection is connected and the delay is.
  • the packet carrying the status information and the own network address is sent to the IO redirection device 1025, wherein the status information includes status (normal or abnormal), time. Delay (when the state is abnormal, the delay is 0).
  • the other monitoring devices in the server cluster 100 also perform the above actions, and report the status information to the IO redirection device 1025.
  • the IO redirection device 1025 can receive the status information reported by all the servers in the server cluster 100, and perform update maintenance, wherein the maintenance list of the current status is as shown in Table 1:
  • the maintenance list since the maintenance list is continuously updated, the maintenance list is not limited to the one shown in Table 1, and its data can change in real time with the network status.
  • the network address of the first server 10 is 192.168.121.1
  • the network address of the second server is 192.168.121.2
  • the network address of the third server (not shown in FIG. 1) is 192.168.121.3.
  • the status is 1 indicates that the communication link state between itself and the network disk 40 is normal
  • the status of 0 indicates that the communication link state between itself and the network disk 40 is abnormal.
  • the communication link state of the first server 10 and the network disk 40 is normal, and the network delay is 50 ms.
  • the communication link status of the second server and the network disk 40 is normal, the network delay is 40 ms, the communication link status of the third server and the network disk 40 is normal, and the network delay value is 100 ms. Therefore, the communication link state between the second server 20 and the network disk 40 is currently optimal.
  • the read/write command is sent to another server with a normal communication link state between the network disk, so that the read/write command can be via another server.
  • the network disk component is processed to communicate with the network disk, which can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
  • FIG. 2 is a data interaction diagram of a storage system according to an embodiment of the present invention, and FIG. 2 illustrates a communication between the network disk component 1022 and the server 10 and the network disk 40 where the network disk component 1022 is located.
  • the data exchange method when the link status is normal, and the data exchange method specifically includes the following steps:
  • Step 501 When the application 1011 of the virtual machine 101 accesses the virtual disk 1012, the file system 1013 generates an IO command to operate the IO address of the virtual disk 1012, and sends the IO command to the virtual machine monitor 1021.
  • a file command for operating the user file is generated.
  • the file system 1013 receives the file command for operating the user file.
  • the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, so the file system 1013 can convert the file command for operating the user file to operate the IO address of the virtual disk 1012 according to the above correspondence. IO command.
  • Step 502 The virtual machine monitor 1021 receives an IO command for operating the IO address of the virtual disk 1012 from the file system 1013, and assigns the volume number of the volume file to the virtual machine 101 according to the IO address of the virtual disk 1012 and the network disk 40.
  • the corresponding relationship acquires the volume number corresponding to the IO command, generates a read/write command for the volume file corresponding to the volume number, and sends the read/write command to the network disk component 1022, and counts.
  • Step 503 The network disk component 1022 receives the read/write command from the virtual machine monitor 1021, and obtains the IO address of the physical disk according to the relationship between the volume number and the IO address of the physical disk, and generates an operation on the IO address of the physical disk.
  • the IO command is sent to network disk 40.
  • the network disk component 1022 encapsulates the IO command for operating the IO address of the physical disk into the network packet, the destination address of the network packet is the network address of the network disk, and the network disk component 1022 provides the interface provided by the physical network card driver 1023.
  • the control physical network card 1031 transmits the network message to the network 30 such that the network message is sent to the network disk 40 via the network 30.
  • Step 504 The network disk 40 performs an IO operation on the IO address of the physical disk and returns response information to the network disk component 1022.
  • the network disk 40 encapsulates the response information into the network packet, the destination address of the network packet is the network address of the first server 10, the network disk 40 is sent to the first server 10 through the network 30, and the network disk component 1022 passes the physical network card.
  • the interface provided by the driver 1023 receives the network packet from the physical network card 1031 and parses out the response information.
  • Step 505 The network disk component 1022 sends the response information to the virtual machine monitor 1021.
  • Step 506 The virtual machine monitor 1021 receives the response information and determines whether the time counted exceeds the preset time period.
  • Step 507 The virtual machine monitor 1021 determines that the time counted does not exceed the preset time period, and sends the response information to the file system 1013.
  • the file system 1013 transmits the response information to the application 1011 within a predetermined period of time, it is equivalent to the application 1011 to read and write directly from the virtual disk 1012, and acquire corresponding response information.
  • FIG. 3 is another data interaction diagram of the storage system according to an embodiment of the present invention.
  • FIG. 3 illustrates that in the step 502 of FIG. 2, when the time counted by the virtual machine monitor 1021 exceeds a predetermined period of time Still not receiving the response message sent by the network disk component 1022:
  • Step 601 When the application 1011 of the virtual machine 101 accesses the virtual disk 1012, the file system 1013 generates an IO command to operate the IO address of the virtual disk 1012, and sends the IO command to the virtual machine monitor 1021.
  • a file command for operating the user file is generated.
  • the file system 1013 receives the file command for operating the user file.
  • the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, so the file system 1013 can convert the file command for operating the user file to operate the IO address of the virtual disk 1012 according to the above correspondence. IO command.
  • Step 602 The virtual machine monitor 1021 receives an IO command for operating the IO address of the virtual disk 1012 from the file system 1013, and assigns the volume number of the volume file to the virtual machine 101 according to the IO address of the virtual disk 1012 and the network disk 40.
  • the corresponding relationship acquires the volume number corresponding to the IO command, generates a read/write command for the volume file corresponding to the volume number, and sends the read/write command to the network disk component 1022, and counts.
  • Step 603 The virtual machine monitor 1021 generates a notification message and sends it to the monitoring device 1024 when it determines that the read/write instruction fails to execute.
  • the virtual machine monitor 1021 when the virtual machine monitor 1021 has not received the response information from the network disk component 1022 after the time period exceeds the predetermined time period, it is determined that the read/write instruction execution fails, the notification information is generated, and the notification information is sent to the monitoring device 1024. .
  • Step 604 The monitoring device 1024 constructs an exception message according to the notification message and sends an exception message to the IO redirection device 1025.
  • the monitoring device 1024 detects the working state of the network disk component 1022, and detects the communication link state between the first server 10 and the network disk 40. When any abnormality occurs, abnormal information is constructed, and abnormal information is sent to the IO. Redirecting device 1025.
  • Step 605 The IO redirection device 1025 acquires the read/write instruction from the virtual machine monitor 1021 in response to the abnormality information, and searches for the network address of the server 20 in the server cluster 100 that is in a normal communication link state with the network disk 40, and generates the first network.
  • the message is sent to the server 20, where the first network message carries a read/write command, and the source address of the first network message is the network address of the server 10, and the destination address is the network address of the server 20.
  • the IO redirection device 1025 can query the maintenance list, and assume that the current time maintenance list refresh is as shown in Table 2:
  • Table 2 is different from Table 1 above, and the IO redirection device 1025 can know that the server 20 (the network address is 192.168.121.2) and the query table 2 (the maintenance list of the current state)
  • the communication link state between the network disks 40 is normal, and the delay (42 ms) is the shortest, so the server 20 is selected.
  • Step 606 The IO processing proxy device 2025 receives the first network packet, parses the read/write command from the first network packet, and sends the read/write command to the network disk component 2022.
  • Step 607 The network disk component 2022 generates an IO command for reading and writing the IO address of the physical disk in the network disk 40 according to the read/write command, and sends an IO command for reading and writing the IO address of the physical disk in the network disk to the network. Disk.
  • the network disk component 2022 and the network disk component 1022 both record the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster and the IO of the physical disk corresponding to the volume file.
  • the correspondence between the addresses so the network disk component 2022 can obtain the IO address of the physical disk corresponding to the volume file by querying the above relationship after obtaining the read/write command for the volume file, thereby generating the IO address of the physical disk. Read and write IO commands.
  • the network disk component 2022 sends an IO command to read and write the IO address of the physical disk to the network disk 40 via the network 30.
  • the network disk component 2022 generates a network message carrying the above IO command and sends the network message to the network disk 40.
  • Step 608 The network disk 40 receives the IO command for reading and writing the IO address of the physical disk, performs an IO operation on the physical disk, generates response information, and sends the response information to the IO proxy processing device 2024, wherein the response information includes the result of the IO operation.
  • the network disk 40 encapsulates the response information into the network message and sends it to the network 30, wherein the destination address of the network message is the network address of the server 20, and the destination port is the network port of the IO agent processing device 2024 at the operating system 202.
  • the IO proxy processing device 2024 controls the physical network card 2031 to receive the network packet through the interface provided by the physical network card driver 2023, and parses to obtain response information.
  • Step 609 The IO processing proxy device 2024 sends the response information to the IO redirection device 1025.
  • Step 610 The virtual machine monitor 2021 sends the response information to the file system 1013.
  • the application 1011 accesses the virtual disk 1012
  • the working state of the network disk component 1022 is abnormal, or the communication link between the first server 10 and the network disk 40 is abnormal
  • the other is through the network.
  • 30 sends a read/write command to the server 20, since the network disk component 2022 of the server 20 and the network disk component 1022 of the server 10 both record the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster 100 and the volume.
  • the correspondence between the IO addresses of the physical disks corresponding to the files so the network disk component 2022 can convert the read and write commands for the volume files into IO commands for the IO addresses of the physical disks and send the network disk 40, thereby ensuring the application.
  • the network disk 40 can still be accessed normally after the virtual machine 101 is migrated to the second server 20. It can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
  • FIG. 4 is a flowchart of a method for processing an IO command according to an embodiment of the present invention.
  • the method is applied to a server 10, where the server 10 includes a virtual machine 101.
  • the virtual machine monitor 1021, the network disk component 1022, the monitoring device 1024, and the IO redirection device 1025 are provided in the server cluster 100.
  • the server cluster 100 is connected to the network disk 40 via the network 30, and the server 10 is accessed through the network disk component 1022.
  • the network disk 40 is provided with an application 1011, a file system 1013, and a virtual disk 1012.
  • the method includes:
  • Step S701 The application 1011 generates a file command for operating the user file of the file system 1013;
  • Step S702 The file system 1013 generates an IO command for operating the IO address of the virtual disk 1012 according to the file command.
  • the file system 1013 manages the correspondence between the user file in the file system 1013 and the IO address of the virtual disk 1012.
  • the file system 1013 is based on the user file in the file system 1013 and the IO address of the virtual disk 1012.
  • the correspondence converts the file command into an IO command for operating the IO address of the virtual disk 1012.
  • Step S703 The virtual machine monitor 1021 generates a read/write command to the volume file in the network disk 40 according to the IO command for operating the IO address of the virtual disk 1012, and sends a read/write command to the network disk component 1022, when determining the read/write command. Sending notification information to the monitoring device 1024 when the execution fails;
  • the virtual machine monitor 1021 records the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101.
  • the virtual machine monitor 1021 is virtualized.
  • the correspondence between the IO address of the disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101 acquires the volume number of the volume file corresponding to the IO address of the virtual disk 1012, and the virtual machine 101 generates the volume number according to the volume file of the volume file. Read and write instructions to volume files in network disk 40.
  • Step S704 The monitoring device 1024 receives the notification message to construct the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device 1025.
  • step S704 the monitoring device 1024 detects the working state of the network disk component 1022 and the communication link state between the server 10 and the network disk 40 according to the notification message, the working state of the network disk component 1022 is abnormal, or the server When the communication link state between the network disk 40 and the network disk 40 is abnormal, an abnormality information is constructed.
  • Step S705 The IO redirection device 1025 acquires the read/write instruction from the virtual machine monitor 1021 in response to the abnormality information, and searches for the network address of another server 20 in the server cluster 100 that is in a normal communication link state with the network disk 40, and generates The first network packet is sent to another server 20, wherein the first network packet carries a read/write command, and the source address of the first network packet is the network address of the first server 10, and the destination address is another server 20. Network address.
  • the network disk component 1022 records the correspondence between the volume number of the volume file of the network file 40 allocated to all the virtual machines 101 in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
  • the read/write command is sent to another server 20 having a normal communication link state with the network disk 40
  • the network disk component 1022 of the other server 20 processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk 40, thereby executing the read and write instructions.
  • the network disk 40 can still be read and written by the processing of another server.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention, as shown in FIG.
  • the server 10 includes a memory 802, a processor 801 and a bus 803.
  • the memory 802 and the processor 801 are respectively connected to a bus 803.
  • the memory 802 stores program instructions
  • the processor 801 executes program instructions in the memory 802 to implement the virtual machine 101 and the virtual machine.
  • the functions of the monitor 1021, the network disk component 1022, the monitoring device 1024, and the IO redirection device 1025 are provided with an application 1011, a file system 1012, and a virtual disk 1013, wherein:
  • the processor 801 executes the first program instructions in the memory 802 to perform the steps: the application 1011 generates a file command to operate the user file of the file system 1013;
  • the processor 801 executes a second program instruction in the memory 802 to perform the steps: the file system 1013 generates an IO command to operate on the IO address of the virtual disk 1012 according to the file command;
  • the file system 1013 manages the correspondence between the user file in the file system 1013 and the IO address of the virtual disk 1012.
  • the file system 1013 is based on the user file in the file system 1013 and the IO address of the virtual disk 1012.
  • the correspondence converts the file command into an IO command for operating the IO address of the virtual disk 1012.
  • the processor 801 executes the third program instructions in the memory 802 to perform the steps: the virtual machine monitor 1021 generates read and write instructions to the volume file in the network disk 40 according to the IO command operating on the IO address of the virtual disk 1012, and sends the read command. Writing instructions to the network disk component 1022, when it is determined that the read and write instructions fail to execute, sending notification information to the monitoring device 1024;
  • the virtual machine monitor 1021 records the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101, and the processor 801 executes the third program instruction in the memory 802.
  • the virtual machine monitor 1021 acquires the volume number of the volume file corresponding to the IO address of the virtual disk 1012 according to the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101.
  • the virtual machine 101 generates a read/write command for the volume file in the network disk 40 based on the volume number of the volume file.
  • the processor 801 executes the fourth program instructions in the memory 802 to perform the steps of: the monitoring device 1024 receives the notification message constructing the exception information according to the notification message, and transmits the exception information to the IO redirection device 1025.
  • the monitoring device 1024 detects the working state of the network disk component 1022 and the communication link state between the server 10 and the network disk 40 according to the notification message, the working state of the network disk component 1022 is abnormal, or the server 10 and the network disk 40 When the communication link status is abnormal, an exception information is constructed.
  • the processor 801 executes the fifth program instructions in the memory 802 to perform the steps: the IO redirection device 1025 acquires the read and write instructions from the virtual machine monitor 1021 in response to the exception information, and looks up the communication chain between the server cluster 100 and the network disk 40.
  • the network address of the other server 20 whose path is normal is generated, and the first network packet is sent to another server 20, where the first network packet carries a read/write command, and the source address of the first network packet is the first
  • the network address of the server 10 the destination address is the network address of the other server 20.
  • the network disk component 1022 records the correspondence between the volume number of the volume file of the network file 40 allocated to all the virtual machines 101 in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
  • the read/write command is sent to another server 20 with a normal communication link state with the network disk 40, and another The network disk component 1022 of a server 20 processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk 40, thereby failing to execute the read/write instruction.
  • the network disk 40 can still be read and written by the processing of another server.
  • any of the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as the cells may or may not be Physical units can be located in one place or distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, dedicated hardware, dedicated CPU, dedicated memory, dedicated memory, Special components and so on.
  • functions performed by computer programs can be easily implemented with the corresponding hardware, and the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc.
  • software program implementation is a better implementation in more cases.
  • the technical solution of the present invention which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • U disk mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., including a number of instructions to make a computer device (may be A personal computer, server, or network device, etc.) performs the methods described in various embodiments of the present invention.
  • a computer device may be A personal computer, server, or network device, etc.

Abstract

An embodiment of the present invention discloses a server, a storage system and a related method, and the server comprises: an application for generating a file command for performing an operation on a user file of a file system; a file system for generating an IO command for performing an operation on an IO address of a virtual disk; a virtual machine monitor for generating, according to the IO command for performing an operation on the IO address of the virtual disk, a read/write instruction with respect to a volume file in a network disk and sending the same to a network disk component, and sending notification information to a monitoring device upon determining that execution of the read/write instruction has failed; a monitoring device for creating, according to the notification information, abnormality information and sending the same to an IO re-directing device; and an IO re-directing device for acquiring the read/write instruction from the virtual machine monitor, searching in a server cluster for a network address of another server in a normal communication link state with the network disk, and generating and sending a first network message to the other server. The present invention can be used to overcome the technical problem of service interruption caused by unprocessed IO commands.

Description

服务器、存储系统及相关方法Server, storage system and related methods 技术领域Technical field
本发明涉及IT技术领域,特别涉及一种服务器、存储系统及相关方法。The present invention relates to the field of IT technologies, and in particular, to a server, a storage system, and related methods.
背景技术Background technique
在现有的虚拟化环境中,服务器上安装有虚拟机,虚拟机内设置有应用程序和虚拟硬盘,服务器通过虚拟机监视器管理虚拟机,服务器与网络磁盘建立有数据连接,服务器上安装有网络磁盘组件,网络磁盘组件用于管理网络磁盘分配至服务器的存储空间,当虚拟机内的应用程序对虚拟硬盘进行读写时,产生IO命令,该IO命令会被虚拟机监视器获取,网络磁盘组件从虚拟机监视器获取IO命令,并发送至网络磁盘,网络磁盘根据IO命令进行IO操作,并将携带有IO操作结果的IO操作响应信息返回至网络磁盘组件,网络磁盘组件将IO操作响应信息发送至虚拟机监视器,虚拟机监视器将IO操作响应信息发送至虚拟机,从而使得虚拟机的应用程序可以获取到IO操作结果。In an existing virtualized environment, a virtual machine is installed on the server, and an application and a virtual hard disk are set in the virtual machine. The server manages the virtual machine through the virtual machine monitor, and the server establishes a data connection with the network disk, and the server is installed with The network disk component is used to manage the storage space allocated by the network disk to the server. When the application in the virtual machine reads and writes the virtual hard disk, an IO command is generated, and the IO command is obtained by the virtual machine monitor. The disk component obtains the IO command from the virtual machine monitor and sends it to the network disk. The network disk performs the IO operation according to the IO command, and returns the IO operation response information carrying the IO operation result to the network disk component, and the network disk component will perform the IO operation. The response message is sent to the virtual machine monitor, which sends the IO operation response information to the virtual machine so that the virtual machine's application can obtain the IO operation result.
在现有技术中,在网络磁盘组件本身出现问题不能工作维持一定时间,或在服务器与网络磁盘之间的通信链路断开的情况维持一定时间后,由于虚拟机发出的IO命另一直不能得到处理,虚拟机内部业务长期处于等待状态,可能会导致虚拟机卡死,从而引起业务中断。In the prior art, after a problem occurs in the network disk component itself, it cannot work for a certain period of time, or after the communication link between the server and the network disk is disconnected for a certain period of time, the IO life issued by the virtual machine cannot be directly After being processed, the internal service of the virtual machine is in a waiting state for a long time, which may cause the virtual machine to be stuck, which may cause service interruption.
发明内容Summary of the invention
为解决现有技术的问题,本发明实施例提供一种服务器、存储系统及相关方法,可克服因IO命令不能得到处理而造成业务中断的技术问题。To solve the problem of the prior art, the embodiment of the present invention provides a server, a storage system, and a related method, which can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
第一方面,本发明实施例提供一种存储系统,包括通过网络连接的服务器集群和网络磁盘,服务器集群包括:In a first aspect, an embodiment of the present invention provides a storage system, including a server cluster and a network disk connected through a network, where the server cluster includes:
第一服务器,包括:The first server includes:
第一网络磁盘组件,第一服务器通过第一网络磁盘组件访问网络磁盘;a first network disk component, the first server accesses the network disk through the first network disk component;
虚拟机,虚拟机设置有应用程序、文件系统以及虚拟磁盘,应用程序用于产生对文件系统的用户文件进行操作的文件命令,文件系统用于根据文件命令产生对虚拟磁盘的IO地址进行操作的IO命令;A virtual machine is provided with an application, a file system, and a virtual disk. The application is used to generate a file command for operating a file system user file, and the file system is configured to generate an operation of the virtual disk IO address according to the file command. IO command;
虚拟机监视器,用于根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令,发送读写指令至第一网络磁盘组件,当确定读写指令执行失败时发送通知信息至监控装置;The virtual machine monitor is configured to generate a read/write instruction to the volume file in the network disk according to the IO command for operating the virtual disk IO address, and send the read/write instruction to the first network disk component, and determine that the read/write instruction fails to execute. Send notification information to the monitoring device;
监控装置,用于接收通知消息,根据通知消息构造异常信息并发送至IO重定向装置;a monitoring device, configured to receive a notification message, construct an abnormality information according to the notification message, and send the information to the IO redirection device;
IO重定向装置,用于响应异常信息从虚拟机监视器获取读写指令,并查找服务器集群中与网络磁盘之间的通信链路状态正常的第二服务器的网络地址,产生第一网络报文并发送至第二服务器,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器的网络地址,目的地址是第二服务器的网络地址;The IO redirection device is configured to obtain a read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a network address of the second server in a normal state of the communication link between the network cluster and the network disk, and generate the first network packet. And sending to the second server, where the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of the second server;
第二服务器,包括:The second server includes:
IO处理代理装置,用于接收第一网络报文,从第一网络报文解析出读写命令并发送至第二网络磁盘组件;The IO processing proxy device is configured to receive the first network packet, parse the read/write command from the first network packet, and send the read/write command to the second network disk component.
第二网络磁盘组件,用于根据读写指令产生对网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送对网络磁盘中的物理磁盘的IO地址进行读写的IO命令至网络磁盘。a second network disk component, configured to generate an IO command for reading and writing an IO address of a physical disk in the network disk according to the read/write command, and send an IO command for reading and writing an IO address of the physical disk in the network disk to the network Disk.
在本发明实施例中,当在第一服务器中针对网络磁盘的读写指令执行失败时,将读写指令发送至与网络磁盘之间的通信链路状态正常的第二服务器,由第二服务器的网络磁盘组件对读写指令进行处理,产生对网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送该IO命令至网络磁盘,从而在读写指令执行失败时,仍可通过另一服务器的处理实现对网络磁盘40进行读写操作。In the embodiment of the present invention, when the execution of the read/write instruction for the network disk in the first server fails, the read/write command is sent to the second server with the normal communication link state with the network disk, and the second server is used. The network disk component processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk, so that when the read/write instruction fails to execute, the network disk component can still pass The processing of another server enables read and write operations on the network disk 40.
在本发明实施例的一种可能的实现方式中,监控装置具体用于根据通知消息检测第一网络磁盘组件的工作状态以及第一服务器与网络磁盘之间的通信链路状态,在网络磁盘组件的工作状态异常,或第一服务器与网络磁盘之间的通信链路状态异常时,构造异常信息。In a possible implementation manner of the embodiment of the present invention, the monitoring apparatus is specifically configured to detect, according to the notification message, an operating state of the first network disk component and a communication link state between the first server and the network disk, where the network disk component is The abnormality information is constructed when the working state is abnormal or the communication link state between the first server and the network disk is abnormal.
在本发明实施例的另一种可能的实现方式中,文件系统管理文件系统中的用户文件与虚拟磁盘的IO地址的对应关系。In another possible implementation manner of the embodiment of the present invention, the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk.
在本发明实施例的另一种可能的实现方式中,虚拟机监视器记录有虚拟磁盘的IO地址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the virtual machine monitor records the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual machine.
在本发明实施例的另一种可能的实现方式中,第一网络磁盘组件和第二网络磁盘组件均记录有网络磁盘分配至服务器集群中的所有虚拟机的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the first network disk component and the second network disk component respectively record that the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster corresponds to the volume file. The correspondence between the IO addresses of the physical disks.
第二方面,本发明实施例提供一种IO命令的处理方法,该方法应用于存储系统,存储系统包括第一服务器、第二服务器以及网络磁盘,第一服务器设置有虚拟机、第一网络磁盘组件、虚拟机监视器、IO重定向装置以及监控装置,虚拟机设置有虚拟磁盘,第一服务器通过第一网络磁盘组件访问网络磁盘,第二服务器设置IO处理代理装置和第二网络磁盘组件,该方法包括:In a second aspect, an embodiment of the present invention provides a method for processing an IO command, where the method is applied to a storage system, where the storage system includes a first server, a second server, and a network disk, and the first server is configured with a virtual machine and a first network disk. a component, a virtual machine monitor, an IO redirection device, and a monitoring device, the virtual machine is provided with a virtual disk, the first server accesses the network disk through the first network disk component, and the second server sets the IO processing proxy device and the second network disk component. The method includes:
虚拟机产生对虚拟磁盘的IO地址进行操作的IO命令;The virtual machine generates an IO command that operates on the IO address of the virtual disk;
虚拟机监视器根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令,发送读写指令至第一网络磁盘组件,当确定读写指令执行失败时发送通知信息至监控装置;The virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, sends a read/write command to the first network disk component, and sends a notification when it is determined that the read/write instruction fails to execute. Information to the monitoring device;
监控装置接收通知消息,根据通知消息构造异常信息并发送至IO重定向装置;The monitoring device receives the notification message, constructs the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
IO重定向装置响应异常信息从虚拟机监视器获取读写指令,并查找服务器集群中与网络磁盘之间的通信链路状态正常的第二服务器的网络地址,产生第一网络报文并发送至第二服务器,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器的网络地址,目的地址是第二服务器的网络地址;The IO redirecting device obtains the read/write command from the virtual machine monitor in response to the abnormality information, and searches for the network address of the second server in the server cluster that is in a normal state of the communication link with the network disk, and generates the first network packet and sends the a second server, wherein the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of the second server;
IO处理代理装置接收第一网络报文,从第一网络报文解析出读写命令并发送至第二网络磁盘组件;The IO processing proxy device receives the first network packet, parses the read/write command from the first network packet, and sends the read/write command to the second network disk component.
第二网络磁盘组件根据读写指令产生对网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送对网络磁盘中的物理磁盘的IO地址进行读写的IO命令至网络磁盘。The second network disk component generates an IO command for reading and writing the IO address of the physical disk in the network disk according to the read/write command, and sends an IO command for reading and writing the IO address of the physical disk in the network disk to the network disk.
在本发明实施例的一种可能的实现方式中,监控装置接收通知信息,根据通知消息 构造异常信息的步骤具体包括:In a possible implementation manner of the embodiment of the present invention, the monitoring device receives the notification information, and the step of constructing the abnormal information according to the notification message specifically includes:
监控装置根据通知消息检测第一网络磁盘组件的工作状态以及第一服务器与网络磁盘之间的通信链路状态,在第一网络磁盘组件的工作状态异常,或第一服务器与网络磁盘之间的通信链路状态异常时,构造异常信息。The monitoring device detects, according to the notification message, the working state of the first network disk component and the communication link state between the first server and the network disk, where the working state of the first network disk component is abnormal, or between the first server and the network disk When the communication link status is abnormal, an exception information is constructed.
在本发明实施例的另一种可能的实现方式中,虚拟机还设置有应用程序和文件系统,文件系统管理文件系统中的用户文件与虚拟磁盘的IO地址的对应关系,虚拟机产生对虚拟磁盘的IO地址进行操作的IO命令的步骤具体包括:In another possible implementation manner of the embodiment of the present invention, the virtual machine is further provided with an application program and a file system, and the file system manages a correspondence between the user file in the file system and the IO address of the virtual disk, and the virtual machine generates a virtual The steps of the IO command for operating the IO address of the disk specifically include:
应用程序产生对文件系统的用户文件进行操作的文件命令;The application generates a file command to operate on the file system's user file;
文件系统根据文件系统中的用户文件与虚拟磁盘的IO地址的对应关系将文件命令转换为虚拟磁盘的IO地址进行操作的IO命令。The file system converts the file command into an IO address of the virtual disk to operate according to the correspondence between the user file in the file system and the IO address of the virtual disk.
在本发明实施例的另一种可能的实现方式中,虚拟机监视器记录有虚拟磁盘的IO地址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系,虚拟机监视器根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令的步骤具体包括:In another possible implementation manner of the embodiment of the present invention, the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of the volume file allocated by the network disk to the virtual machine, and the virtual machine monitor is configured according to the virtual machine monitor. The step of generating an IO command for operating the IO address of the virtual disk to generate a read/write command to the volume file in the network disk includes:
虚拟机监视器根据虚拟磁盘的IO地址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系获取虚拟磁盘的IO地址对应的卷文件的卷号;The virtual machine monitor obtains the volume number of the volume file corresponding to the IO address of the virtual disk according to the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual disk;
虚拟机根据卷文件的卷号产生对网络磁盘中的卷文件的读写指令。The virtual machine generates read and write instructions for the volume files in the network disk based on the volume number of the volume file.
在本发明实施例的另一种可能的实现方式中,第一网络磁盘组件和第二网络磁盘组件均记录有网络磁盘分配至服务器集群中的所有虚拟机的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the first network disk component and the second network disk component respectively record that the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster corresponds to the volume file. The correspondence between the IO addresses of the physical disks.
第三方面,本发明实施例提供一种服务器,包括虚拟机、虚拟机监视器、网络磁盘组件、监控装置以及IO重定向装置,服务器设置于服务器集群中,服务器集群经由网络与网络磁盘连接,服务器通过网络磁盘组件访问网络磁盘,虚拟机设置有应用程序、文件系统以及虚拟磁盘,其中:In a third aspect, an embodiment of the present invention provides a server, including a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device. The server is disposed in a server cluster, and the server cluster is connected to the network disk via a network. The server accesses the network disk through the network disk component, which is set up with applications, file systems, and virtual disks, where:
应用程序,用于产生对文件系统的用户文件进行操作的文件命令;An application for generating a file command to operate on a file system user file;
文件系统,用于根据文件命令产生对虚拟磁盘的IO地址进行操作的IO命令;a file system for generating an IO command for operating an IO address of a virtual disk according to a file command;
虚拟机监视器,用于根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令,发送读写指令至网络磁盘组件,当确定读写指令执行失败时发送通知信息至监控装置;The virtual machine monitor is configured to generate a read/write command for a volume file in the network disk according to an IO command for operating the virtual disk IO address, send a read/write command to the network disk component, and send when the read/write instruction execution failure is determined. Notifying the information to the monitoring device;
监控装置,用于接收通知消息,根据通知消息构造异常信息并发送至IO重定向装置;a monitoring device, configured to receive a notification message, construct an abnormality information according to the notification message, and send the information to the IO redirection device;
IO重定向装置,用于响应异常信息从虚拟机监视器获取读写指令,并查找服务器集群中与网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至另一服务器,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器的网络地址,目的地址是另一服务器的网络地址。The IO redirection device is configured to obtain a read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a network address of another server in a server cluster that is in a normal state of communication link with the network disk, and generate a first network packet. And sending to another server, where the first network packet carries a read/write command, and the source address of the first network packet is the network address of the first server, and the destination address is the network address of the other server.
在本发明实施例的一种可能的实现方式中,监控装置具体用于根据通知消息检测网络磁盘组件的工作状态以及服务器与网络磁盘之间的通信链路状态,在网络磁盘组件的工作状态异常,或服务器与网络磁盘之间的通信链路状态异常时,构造异常信息。In a possible implementation manner of the embodiment of the present invention, the monitoring apparatus is specifically configured to detect, according to the notification message, the working state of the network disk component and the communication link state between the server and the network disk, where the working state of the network disk component is abnormal. Or when the communication link status between the server and the network disk is abnormal, construct an exception information.
在本发明实施例的另一种可能的实现方式中,文件系统管理文件系统中的用户文件与虚拟磁盘的IO地址的对应关系。In another possible implementation manner of the embodiment of the present invention, the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk.
在本发明实施例的另一种可能的实现方式中,虚拟机监视器记录有虚拟磁盘的IO地 址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the virtual machine monitor records the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual machine.
在本发明实施例的另一种可能的实现方式中,网络磁盘组件记录有网络磁盘分配至服务器集群中的所有虚拟机的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the network disk component records the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster and the IO address of the physical disk corresponding to the volume file. Correspondence relationship.
第四方面,本发明实施例提供一种IO命令的处理方法,该方法应用于服务器,服务器包括虚拟机、虚拟机监视器、网络磁盘组件、监控装置以及IO重定向装置,服务器设置于服务器集群中,服务器集群经由网络与网络磁盘连接,服务器通过网络磁盘组件访问网络磁盘,虚拟机设置有应用程序、文件系统以及虚拟磁盘,该方法包括:In a fourth aspect, an embodiment of the present invention provides a method for processing an IO command, where the method is applied to a server, where the server includes a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device, and the server is configured in the server cluster. The server cluster is connected to the network disk via the network, and the server accesses the network disk through the network disk component, and the virtual machine is provided with an application, a file system, and a virtual disk, and the method includes:
应用程序产生对文件系统的用户文件进行操作的文件命令;The application generates a file command to operate on the file system's user file;
文件系统根据文件命令产生对虚拟磁盘的IO地址进行操作的IO命令;The file system generates an IO command to operate the IO address of the virtual disk according to the file command;
虚拟机监视器根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令,发送读写指令至网络磁盘组件,当确定读写指令执行失败时发送通知信息至监控装置;The virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, sends a read/write command to the network disk component, and sends a notification message when it is determined that the read/write instruction fails to execute. Monitoring device
监控装置接收通知消息,根据通知消息构造异常信息并发送至IO重定向装置;The monitoring device receives the notification message, constructs the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
IO重定向装置响应异常信息从虚拟机监视器获取读写指令,并查找服务器集群中与网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至另一服务器,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器的网络地址,目的地址是另一服务器的网络地址。The IO redirecting device acquires the read/write command from the virtual machine monitor in response to the abnormality information, and searches for the network address of another server in the server cluster that is in a normal state of the communication link with the network disk, generates the first network packet, and sends the Another server, wherein the first network packet carries a read/write command, and the source address of the first network packet is a network address of the first server, and the destination address is a network address of another server.
在本发明实施例的一种可能的实现方式中,监控装置接收通知信息,根据通知消息构造异常信息的步骤具体包括:In a possible implementation manner of the embodiment of the present invention, the monitoring device receives the notification information, and the step of constructing the abnormal information according to the notification message specifically includes:
监控装置根据通知消息检测网络磁盘组件的工作状态以及服务器与网络磁盘之间的通信链路状态,在网络磁盘组件的工作状态异常,或服务器与网络磁盘之间的通信链路状态异常时,构造异常信息。The monitoring device detects the working state of the network disk component and the communication link state between the server and the network disk according to the notification message, and constructs when the working state of the network disk component is abnormal, or the communication link state between the server and the network disk is abnormal. Abnormal information.
在本发明实施例的另一种可能的实现方式中,文件系统管理文件系统中的用户文件与虚拟磁盘的IO地址的对应关系,虚拟机产生对虚拟磁盘的IO地址进行操作的IO命令的步骤具体包括:In another possible implementation manner of the embodiment of the present invention, the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk, and the virtual machine generates an IO command for operating the IO address of the virtual disk. Specifically include:
文件系统根据文件系统中的用户文件与虚拟磁盘的IO地址的对应关系将文件命令转换为虚拟磁盘的IO地址进行操作的IO命令。The file system converts the file command into an IO address of the virtual disk to operate according to the correspondence between the user file in the file system and the IO address of the virtual disk.
在本发明实施例的另一种可能的实现方式中,虚拟机监视器记录有虚拟磁盘的IO地址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系,虚拟机监视器根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令的步骤具体包括:In another possible implementation manner of the embodiment of the present invention, the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of the volume file allocated by the network disk to the virtual machine, and the virtual machine monitor is configured according to the virtual machine monitor. The step of generating an IO command for operating the IO address of the virtual disk to generate a read/write command to the volume file in the network disk includes:
虚拟机监视器根据虚拟磁盘的IO地址与网络磁盘分配至虚拟机的卷文件的卷号之间的对应关系获取虚拟磁盘的IO地址对应的卷文件的卷号;The virtual machine monitor obtains the volume number of the volume file corresponding to the IO address of the virtual disk according to the correspondence between the IO address of the virtual disk and the volume number of the volume file of the network disk allocated to the virtual disk;
虚拟机根据卷文件的卷号产生对网络磁盘中的卷文件的读写指令。The virtual machine generates read and write instructions for the volume files in the network disk based on the volume number of the volume file.
在本发明实施例的另一种可能的实现方式中,网络磁盘组件记录有网络磁盘分配至服务器集群中的所有虚拟机的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。In another possible implementation manner of the embodiment of the present invention, the network disk component records the volume number of the volume file of the network disk allocated to all the virtual machines in the server cluster and the IO address of the physical disk corresponding to the volume file. Correspondence relationship.
第五方面,本发明实施例提供一种服务器,包括存储器、处理器和总线,存储器和处理器分别与总线连接,存储器存储有程序指令,处理器执行存储器的程序指令以实现 设置在服务器上的虚拟机、虚拟机监视器、网络磁盘组件、监控装置以及IO重定向装置的功能,虚拟机设置有应用程序、文件系统和虚拟磁盘,其中:In a fifth aspect, an embodiment of the present invention provides a server, including a memory, a processor, and a bus. The memory and the processor are respectively connected to a bus. The memory stores program instructions, and the processor executes program instructions of the memory to implement setting on the server. The functions of virtual machines, virtual machine monitors, network disk components, monitoring devices, and IO redirection devices. The virtual machines are configured with applications, file systems, and virtual disks, where:
处理器执行存储器中的第一程序指令以执行步骤:应用程序产生对文件系统的用户文件进行操作的文件命令;The processor executes the first program instructions in the memory to perform the steps: the application generates a file command to operate the user file of the file system;
处理器执行存储器中的第二程序指令以执行步骤:文件系统根据文件命令产生对虚拟磁盘的IO地址进行操作的IO命令;The processor executes a second program instruction in the memory to perform the step: the file system generates an IO command to operate on the IO address of the virtual disk according to the file command;
处理器执行存储器中的第三程序指令以执行步骤:虚拟机监视器根据对虚拟磁盘的IO地址进行操作的IO命令产生对网络磁盘中的卷文件的读写指令,发送读写指令至网络磁盘组件,当确定读写指令执行失败时发送通知信息至监控装置;The processor executes the third program instruction in the memory to perform the step: the virtual machine monitor generates a read/write instruction to the volume file in the network disk according to the IO command for operating the IO address of the virtual disk, and sends the read/write instruction to the network disk. The component sends a notification message to the monitoring device when it is determined that the execution of the read/write instruction fails;
处理器执行存储器中的第四程序指令以执行步骤:监控装置接收通知消息,根据通知消息构造异常信息并发送至IO重定向装置;The processor executes a fourth program instruction in the memory to perform the step of: the monitoring device receives the notification message, constructs the exception information according to the notification message, and sends the information to the IO redirection device;
处理器执行存储器中的第五程序指令以执行步骤:IO重定向装置响应异常信息从虚拟机监视器获取读写指令,并查找服务器集群中与网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至另一服务器,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器的网络地址,目的地址是另一服务器的网络地址。The processor executes the fifth program instruction in the memory to perform the step: the IO redirection device acquires the read/write instruction from the virtual machine monitor in response to the exception information, and searches for another communication link state between the network cluster and the network disk in the server cluster. The network address of the server generates the first network packet and sends the message to the server. The first network packet carries the read/write command, and the source address of the first network packet is the network address of the first server, and the destination address is The network address of another server.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为根据本发明实施例的存储系统的结构示意图;1 is a schematic structural diagram of a storage system according to an embodiment of the present invention;
图2是根据本发明实施例的存储系统的数据交互图;2 is a data interaction diagram of a storage system in accordance with an embodiment of the present invention;
图3是根据本发明实施例的存储系统的另一数据交互图;3 is another data interaction diagram of a storage system in accordance with an embodiment of the present invention;
图4是根据本发明实施例的IO命令的处理方法的流程图;4 is a flowchart of a method of processing an IO command according to an embodiment of the present invention;
图5是根据本发明实施例的服务器的装置结构示意图。FIG. 5 is a schematic structural diagram of an apparatus of a server according to an embodiment of the present invention.
具体实施方式detailed description
首先请参见图1,图1为根据本发明实施例的存储系统的结构示意图,如图1所示,存储系统包括服务器集群100以及网络磁盘40,服务器集群100至少包括第一服务器10和第二服务器20,服务器集群100以及网络磁盘40通过网络30建立通信链路连接。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention. As shown in FIG. 1 , the storage system includes a server cluster 100 and a network disk 40. The server cluster 100 includes at least a first server 10 and a second. Server 20, server cluster 100, and network disk 40 establish a communication link connection over network 30.
可选地,网络30具体例如为INETERNET(互联网)、局域网、或INETERNET和局域网的混合。Optionally, the network 30 is specifically, for example, INETERNET (Internet), a local area network, or a mixture of INETERNET and a local area network.
网络磁盘40具有网络地址,由多个物理磁盘1-n组成,网络磁盘40提供接口以为服务器集群100中的服务器提供存储资源。网络磁盘40设置有网络地址,并且,网络磁盘40包含的多个物理磁盘1-n的存储空间分别设置为多个卷文件,并以卷号标识,网络磁盘40记录卷号与物理磁盘的IO地址之间的关系。Network disk 40 has a network address consisting of a plurality of physical disks 1-n that provide an interface to provide storage resources for servers in server cluster 100. The network disk 40 is provided with a network address, and the storage spaces of the plurality of physical disks 1-n included in the network disk 40 are respectively set to a plurality of volume files, and are identified by a volume number, and the network disk 40 records the volume number and the physical disk IO. The relationship between addresses.
IO重定向装置1025用于接收服务器集群100中的各监控装置上报的各监控装置所在的服务器与网络磁盘40之间的通信链路状态(于下文详细介绍)。The IO redirection device 1025 is configured to receive a communication link state between the server where each monitoring device reported by each monitoring device in the server cluster 100 and the network disk 40 (described in detail below).
第一服务器10上运行有至少一个虚拟机,示例性的,本发明实施例以一个虚拟机为例进行说明。该第一服务器10包括虚拟机101、操作系统102以及硬件103,虚拟机101包括应用程序1011、虚拟磁盘1012以及文件系统1013。操作系统102包括虚拟机监视器1021、网络磁盘组件1022、物理网卡驱动1023以及监控装置1024,硬件103包括物理网卡1031,虚拟机101运行在操作系统102上。The first server 10 runs on at least one virtual machine. Illustratively, the embodiment of the present invention uses a virtual machine as an example for description. The first server 10 includes a virtual machine 101, an operating system 102, and hardware 103. The virtual machine 101 includes an application 1011, a virtual disk 1012, and a file system 1013. The operating system 102 includes a virtual machine monitor 1021, a network disk component 1022, a physical network card driver 1023, and a monitoring device 1024. The hardware 103 includes a physical network card 1031, and the virtual machine 101 runs on the operating system 102.
在一些示例中,硬件103还包括处理器、存储器(图未示出)等,硬件103用于承载操作系统102的运行。In some examples, hardware 103 also includes a processor, memory (not shown), etc., and hardware 103 is used to carry the operation of operating system 102.
在一种示例中,虚拟机监视器1021、网络磁盘组件1022、物理网卡驱动1023可设置在操作系统102的内核中。在另一种示例中,网络磁盘组件1022、物理网卡驱动1023可作为应用软件安装到操作系统102,在操作系统102上直接运行。In one example, virtual machine monitor 1021, network disk component 1022, physical network card driver 1023 can be disposed in the kernel of operating system 102. In another example, the network disk component 1022, the physical network card driver 1023 can be installed as an application software to the operating system 102 and run directly on the operating system 102.
物理网卡驱动1023用于驱动物理网卡1031,物理网卡驱动1023在操作系统102为物理网卡1031提供接口,操作系统102或安装在操作系统102的软件(如网络磁盘组件1022、监控装置1024和IO重定向装置1025)可通过接口控制物理网卡1031发送或接收数据。The physical network card driver 1023 is used to drive the physical network card 1031. The physical network card driver 1023 provides an interface for the physical network card 1031 in the operating system 102, and the operating system 102 or software installed in the operating system 102 (such as the network disk component 1022, the monitoring device 1024, and the IO heavy The orientation device 1025) can control the physical network card 1031 to send or receive data through the interface.
网络磁盘组件1022、监控装置1024和IO重定向装置1025在操作系统102中设置有各自网络端口。 Network disk component 1022, monitoring device 1024, and IO redirecting device 1025 are provided with respective network ports in operating system 102.
网络磁盘组件1022记录了网络磁盘40的网络地址,网络磁盘组件1022可通过物理网卡驱动1023提供的接口控制物理网卡1031收发数据以访问网络磁盘40。The network disk component 1022 records the network address of the network disk 40. The network disk component 1022 can control the physical network card 1031 to send and receive data to access the network disk 40 through the interface provided by the physical network card driver 1023.
监控装置1024记录了网络磁盘40的网络地址,监控装置可通过物理网卡驱动1023提供的接口控制物理网卡1031收发数据,其中监控装置1024可发送命令至网络磁盘40以检测服务器10与网络磁盘40的通信链路状态。The monitoring device 1024 records the network address of the network disk 40. The monitoring device can control the physical network card 1031 to send and receive data through the interface provided by the physical network card driver 1023. The monitoring device 1024 can send a command to the network disk 40 to detect the server 10 and the network disk 40. Communication link status.
监控装置1024可监控网络磁盘组件1022的工作状态,举例而言,可通过检测操作系统102的进程列表,若网络磁盘组件1022中的关键进程不在进程列表中,则可确认网络磁盘组件1022工作状态异常。The monitoring device 1024 can monitor the working state of the network disk component 1022. For example, by detecting the process list of the operating system 102, if the key process in the network disk component 1022 is not in the process list, the working state of the network disk component 1022 can be confirmed. abnormal.
进一步,监控装置1024可监控第一服务器10与网络磁盘40之间的通信链路状态,举例而言,监控装置1024通过物理网卡驱动1023提供的接口控制物理网卡1031发送PING(Packet Internet Groper,因特网包探索器)命令至网络磁盘40,利用PING命令来检测物理网卡2031与网络磁盘40之间的通信链路状态,其中,PING命令可利用网络上的设备的网络地址的唯一性,给网络磁盘40发送一个数据包,再要求网络磁盘40返回一个同样大小的数据包来确定第一服务器10与网络磁盘40之间是否连接相通,且时延是多少。在没有收到返回数据包,或时延超过预定数值时,监控装置1024确认第一服务器10与网络磁盘40之间的通信链路状态异常。Further, the monitoring device 1024 can monitor the status of the communication link between the first server 10 and the network disk 40. For example, the monitoring device 1024 controls the physical network card 1031 to send PING (Packet Internet Groper, Internet) through the interface provided by the physical network card driver 1023. The packet explorer commands the network disk 40, and uses the PING command to detect the communication link state between the physical network card 2031 and the network disk 40. The PING command can utilize the uniqueness of the network address of the device on the network to the network disk. 40 sends a data packet, and then requests the network disk 40 to return a data packet of the same size to determine whether the first server 10 and the network disk 40 are connected, and what is the delay. When the return packet is not received, or the delay exceeds a predetermined value, the monitoring device 1024 confirms that the communication link state between the first server 10 and the network disk 40 is abnormal.
虚拟机101上设置有操作系统,并设置有与操作系统兼容的文件系统1013。举例而言,虚拟机101可以设置有WINDOWS(视窗)操作系统,则文件系统1013可以为NTFS(New Technology File System,新技术文件系统)。An operating system is provided on the virtual machine 101 and is provided with a file system 1013 compatible with the operating system. For example, the virtual machine 101 may be provided with a WINDOWS operating system, and the file system 1013 may be a NTFS (New Technology File System).
在另外一些示例中,虚拟机101可设置有UNIX或LINUX操作系统,文件系统1013可例如为EXT(Extended file system,延伸文件系统)或者XFS(extension of the Extent File System,扩展的延伸文件系统)文件系统。In other examples, the virtual machine 101 may be provided with a UNIX or LINUX operating system, and the file system 1013 may be, for example, an EXT (Extended File System) or an XFS (Extension of the Extent File System). File system.
文件系统1013内设置有用户文件,文件系统1013管理用户文件与虚拟磁盘1012的IO地址的对应关系,应用程序1011发出对用户文件进行操作的文件命令,文件系统1013 可接收该文件命令,并根据上述对应关系将该文件命令转换为对虚拟磁盘1012的IO地址进行读写的IO命令。The file system 1013 is provided with a user file, the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, and the application 1011 issues a file command for operating the user file, and the file system 1013 can receive the file command and The above correspondence converts the file command into an IO command for reading and writing the IO address of the virtual disk 1012.
虚拟机101在虚拟机监视器1021上运行(在一些示例中,虚拟机监视器1021可运行多个虚拟机),虚拟机监视器1021可允许运行于其上的虚拟机所设置的操作系统和应用程序共享硬件103。在一些示例中,虚拟机监视器1021可为VMM(virtual machine monitor,虚拟机监视器),在另一些示例中,虚拟机监视器1021可为Hypervisors(超级管理程序)。虚拟机监视器1021可以访问第一服务器10上的硬件103,并隔离运行于其上的多个虚拟机,当第一服务器10启动并执行虚拟机监视器1021时,虚拟机监视器1021会加载运行于其上的虚拟机的操作系统,同时会分配给每一台虚拟机适量的内存,CPU、网络和虚拟磁盘。The virtual machine 101 runs on a virtual machine monitor 1021 (in some examples, the virtual machine monitor 1021 can run multiple virtual machines), and the virtual machine monitor 1021 can allow an operating system set by a virtual machine running thereon and The application shares hardware 103. In some examples, virtual machine monitor 1021 may be a VMM (virtual machine monitor), and in other examples, virtual machine monitor 1021 may be a hypervisors. The virtual machine monitor 1021 can access the hardware 103 on the first server 10 and isolate a plurality of virtual machines running thereon, and when the first server 10 starts and executes the virtual machine monitor 1021, the virtual machine monitor 1021 loads The operating system of the virtual machine running on it will be allocated to each virtual machine with the right amount of memory, CPU, network and virtual disk.
在服务器集群100的服务器上运行的虚拟机加载虚拟磁盘时,虚拟机所在服务器的虚拟机监视器通过网络磁盘组件向网络磁盘40申请卷文件,网络磁盘40为虚拟机分配卷文件,并将所分配的卷文件的卷号和卷文件对应的物理磁盘的IO地址发送至该网络磁盘组件,该网络磁盘组件将卷号发送至所在服务器的虚拟机监视器,并记录卷号与物理磁盘的IO地址之间的关系以及该虚拟机监视器记录卷号与虚拟磁盘的IO地址之间的关系。When a virtual machine running on a server of the server cluster 100 loads a virtual disk, the virtual machine monitor of the server where the virtual machine is located requests a volume file from the network disk 40 through the network disk component, and the network disk 40 allocates a volume file for the virtual machine, and The volume number of the assigned volume file and the IO address of the physical disk corresponding to the volume file are sent to the network disk component, which sends the volume number to the virtual machine monitor of the server where it resides, and records the volume number and the IO of the physical disk. The relationship between the addresses and the relationship between the virtual machine monitor record volume number and the IO address of the virtual disk.
举例而言,虚拟机101加载虚拟磁盘1012时,虚拟机监视器1021通过网络磁盘组件1022向网络磁盘40发送用于申请卷文件的通知(在一些示例中,该通知还包括要求的虚拟磁盘空间大小等信息),网络磁盘40根据该通知为虚拟机101分配预定数量的卷文件,并将所分配的卷文件的卷号和卷文件对应的物理磁盘的IO地址发送至网络磁盘组件1022,网络磁盘组件1022将卷号发送至虚拟机监视器1021,并记录该卷号与物理磁盘的IO地址之间的关系,虚拟机监视器1021记录该卷号与虚拟磁盘的IO地址之间的关系。For example, when the virtual machine 101 loads the virtual disk 1012, the virtual machine monitor 1021 sends a notification for requesting a volume file to the network disk 40 through the network disk component 1022 (in some examples, the notification also includes the required virtual disk space) According to the notification, the network disk 40 allocates a predetermined number of volume files to the virtual machine 101 according to the notification, and sends the volume number of the allocated volume file and the IO address of the physical disk corresponding to the volume file to the network disk component 1022, the network. The disk component 1022 sends the volume number to the virtual machine monitor 1021 and records the relationship between the volume number and the IO address of the physical disk, and the virtual machine monitor 1021 records the relationship between the volume number and the IO address of the virtual disk.
值得注意的是,图1所示的服务器20与服务器10的结构大致相同,具有相同名称的模块具有相同功能,区别在于服务器20并没有设置IO重定向装置,并且设置有IO处理代理装置2025。It is to be noted that the server 20 shown in FIG. 1 has substantially the same structure as the server 10, and modules having the same name have the same function, except that the server 20 does not have an IO redirection device and is provided with an IO processing proxy device 2025.
IO处理代理装置2025与IO重定向装置1025通信,IO处理代理装置2025在操作系统202中设置有网络端口。The IO processing proxy device 2025 is in communication with an IO redirection device 1025 that is provided with a network port in the operating system 202.
在一种可能的实施方式中,服务器集群100中所有服务器的网络磁盘组件之间进行数据同步。举例而言,网络磁盘组件1022记录有网络磁盘40分配至虚拟机101的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系(以下称为第一对应关系),网络磁盘组件2022记录有网络磁盘40分配至虚拟机201的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系(以下称为第二对应关系)。网络磁盘组件1022和网络磁盘组件2022之间通过数据交互同步第一对应关系和第二对应关系,对于图1未示出的服务器集群100的其他服务器中的网络磁盘组件亦然,从而使得服务器集群100中的每一网络磁盘组件均记录了网络磁盘40分配至服务器集群100中的所有虚拟机的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系。In one possible implementation, data synchronization is performed between network disk components of all servers in the server cluster 100. For example, the network disk component 1022 records the correspondence between the volume number of the volume file allocated by the network disk 40 to the virtual machine 101 and the IO address of the physical disk corresponding to the volume file (hereinafter referred to as a first correspondence relationship), The network disk component 2022 records the correspondence relationship between the volume number of the volume file allocated to the virtual machine 201 by the network disk 40 and the IO address of the physical disk corresponding to the volume file (hereinafter referred to as a second correspondence). The first correspondence relationship and the second correspondence relationship are synchronized between the network disk component 1022 and the network disk component 2022 through data interaction, as well as the network disk component in other servers of the server cluster 100 not shown in FIG. 1, thereby making the server cluster Each of the network disk components in 100 records the correspondence between the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
在另外一些示例中,也可由网络磁盘40分别向服务器集群100中的所有网络磁盘组件组播发送网络磁盘40分配至服务器集群中的所有虚拟机的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系,使得服务器集群100中的每一网络磁盘组件均 记录网络磁盘40分配至服务器集群中的所有虚拟机的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系。In other examples, the volume number of the volume file of the volume file allocated by the network disk 40 to all the virtual machines in the server cluster may be multicast by the network disk 40 to all the network disk components in the server cluster 100, respectively, and the physical volume corresponding to the volume file. The correspondence between the IO addresses of the disks is such that each network disk component in the server cluster 100 records the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster and the physical disk corresponding to the volume file. The correspondence between IO addresses.
在本发明实施例中,服务器集群100中的各监控装置会定期检测所在的服务器与网络磁盘40之间的通信链路状态,并将具体状态分别上报至IO重定向装置1025。In the embodiment of the present invention, each monitoring device in the server cluster 100 periodically detects the status of the communication link between the server and the network disk 40, and reports the specific status to the IO redirection device 1025.
以第一服务器10为例,监控装置1024通过物理网卡驱动1023提供的接口控制物理网卡1031发送PING(Packet Internet Groper,因特网包探索器)命令至网络磁盘40,利用PING命令来检测物理网卡2031与网络磁盘40之间的通信链路状态。其中,PING命令可利用网络上的设备的网络地址的唯一性,给网络磁盘40发送一个数据包,再要求网络磁盘40返回一个同样大小的数据包来确定第一服务器10与网络磁盘40之间是否连接相通,且时延是多少。Taking the first server 10 as an example, the monitoring device 1024 controls the physical network card 1031 to send a PING (Packet Internet Groper) command to the network disk 40 through the interface provided by the physical network card driver 1023, and uses the PING command to detect the physical network card 2031 and The status of the communication link between network disks 40. The PING command may use the uniqueness of the network address of the device on the network to send a data packet to the network disk 40, and then request the network disk 40 to return a data packet of the same size to determine the first server 10 and the network disk 40. Whether the connection is connected and the delay is.
当监控装置1024接收到网络磁盘40响应PING命令的返回数据包时,将携带有状态信息和自身网络地址的报文发送至IO重定向装置1025,其中状态信息包括状态(正常或异常)、时延(当状态为异常时时延取0)。When the monitoring device 1024 receives the return packet of the network disk 40 in response to the PING command, the packet carrying the status information and the own network address is sent to the IO redirection device 1025, wherein the status information includes status (normal or abnormal), time. Delay (when the state is abnormal, the delay is 0).
而服务器集群100中的其他监控装置也会执行如上动作,分别向IO重定向装置1025上报状态信息。The other monitoring devices in the server cluster 100 also perform the above actions, and report the status information to the IO redirection device 1025.
因此,IO重定向装置1025可接收到服务器集群100中的所有服务器上报的状态信息,并进行更新维护,其中当前状态的维护列表如表1所示:Therefore, the IO redirection device 1025 can receive the status information reported by all the servers in the server cluster 100, and perform update maintenance, wherein the maintenance list of the current status is as shown in Table 1:
服务器网络地址Server network address 状态status 时延Delay
192.168.121.1192.168.121.1 11 50ms50ms
192.168.121.2192.168.121.2 11 40ms40ms
192.168.121.3192.168.121.3 11 100ms100ms
……...... ……...... ……......
表1Table 1
其中,由于维护列表会不断进行更新,维护列表并不限于表1所示,其数据可随网络状态实时变化。Among them, since the maintenance list is continuously updated, the maintenance list is not limited to the one shown in Table 1, and its data can change in real time with the network status.
假设第一服务器10的网络地址是192.168.121.1,第二服务器的网络地址是192.168.121.2,第三服务器(图1中未示出)的网络地址是192.168.121.3,在表1中,状态为1表示自身与网络磁盘40的通信链路状态正常,状态为0表示自身与网络磁盘40的通信链路状态异常。Assume that the network address of the first server 10 is 192.168.121.1, the network address of the second server is 192.168.121.2, and the network address of the third server (not shown in FIG. 1) is 192.168.121.3. In Table 1, the status is 1 indicates that the communication link state between itself and the network disk 40 is normal, and the status of 0 indicates that the communication link state between itself and the network disk 40 is abnormal.
因此,在当前时间,第一服务器10与网络磁盘40的通信链路状态正常,网络时延为50ms。第二服务器与网络磁盘40的通信链路状态正常,网络时延为40ms,第三服务器与网络磁盘40的通信链路状态正常,且网络时延值为100ms。故当前第二服务器20与网络磁盘40之间的通信链路状态最优。Therefore, at the current time, the communication link state of the first server 10 and the network disk 40 is normal, and the network delay is 50 ms. The communication link status of the second server and the network disk 40 is normal, the network delay is 40 ms, the communication link status of the third server and the network disk 40 is normal, and the network delay value is 100 ms. Therefore, the communication link state between the second server 20 and the network disk 40 is currently optimal.
在本发明实施例中,当针对网络磁盘的读写指令执行失败时,将读写指令发送与网络磁盘之间的通信链路状态正常的另一服务器,使得该读写指令可经由另一服务器的网络磁盘组件进行处理,从而实现与网络磁盘进行通信,可克服因IO命令不能得到处理而造成业务中断的技术问题。In the embodiment of the present invention, when the execution of the read/write instruction for the network disk fails, the read/write command is sent to another server with a normal communication link state between the network disk, so that the read/write command can be via another server. The network disk component is processed to communicate with the network disk, which can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
以下请参见图2,图2是根据本发明实施例的存储系统的数据交互图,图2示出在网络磁盘组件1022正常工作,且网络磁盘组件1022所在服务器10与网络磁盘40之间的 通信链路状态正常时的数据交换方法,该数据交换方法具体包括以下步骤:Referring to FIG. 2, FIG. 2 is a data interaction diagram of a storage system according to an embodiment of the present invention, and FIG. 2 illustrates a communication between the network disk component 1022 and the server 10 and the network disk 40 where the network disk component 1022 is located. The data exchange method when the link status is normal, and the data exchange method specifically includes the following steps:
步骤501:虚拟机101的应用程序1011访问虚拟磁盘1012时,文件系统1013产生对虚拟磁盘1012的IO地址进行操作的IO命令,并发送该IO命令至虚拟机监视器1021。Step 501: When the application 1011 of the virtual machine 101 accesses the virtual disk 1012, the file system 1013 generates an IO command to operate the IO address of the virtual disk 1012, and sends the IO command to the virtual machine monitor 1021.
其中,应用程序1011访问虚拟磁盘1012时,产生对用户文件进行操作的文件命令,此时文件系统1013接收到对用户文件进行操作的文件命令。When the application 1011 accesses the virtual disk 1012, a file command for operating the user file is generated. At this time, the file system 1013 receives the file command for operating the user file.
根据先前描述,文件系统1013管理用户文件与虚拟磁盘1012的IO地址的对应关系,故文件系统1013可根据上述对应关系将对用户文件进行操作的文件命令转换为对虚拟磁盘1012的IO地址进行操作的IO命令。According to the foregoing description, the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, so the file system 1013 can convert the file command for operating the user file to operate the IO address of the virtual disk 1012 according to the above correspondence. IO command.
步骤502:虚拟机监视器1021从文件系统1013接收对虚拟磁盘1012的IO地址进行操作的IO命令,并根据虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系获取与该IO命令对应的卷号,产生针对该卷号对应的卷文件的读写命令,并发送该读写命令至网络磁盘组件1022,并计时。Step 502: The virtual machine monitor 1021 receives an IO command for operating the IO address of the virtual disk 1012 from the file system 1013, and assigns the volume number of the volume file to the virtual machine 101 according to the IO address of the virtual disk 1012 and the network disk 40. The corresponding relationship acquires the volume number corresponding to the IO command, generates a read/write command for the volume file corresponding to the volume number, and sends the read/write command to the network disk component 1022, and counts.
步骤503:网络磁盘组件1022从虚拟机监视器1021接收该读写命令,并根据卷号与物理磁盘的IO地址之间的关系获取物理磁盘的IO地址,产生对物理磁盘的IO地址进行操作的IO命令并发送至网络磁盘40。Step 503: The network disk component 1022 receives the read/write command from the virtual machine monitor 1021, and obtains the IO address of the physical disk according to the relationship between the volume number and the IO address of the physical disk, and generates an operation on the IO address of the physical disk. The IO command is sent to network disk 40.
其中,网络磁盘组件1022将对物理磁盘的IO地址进行操作的IO命令封装到网络报文,该网络报文的目的地址为网络磁盘的网络地址,网络磁盘组件1022通过物理网卡驱动1023提供的接口控制物理网卡1031将网络报文发送至网络30,使得该网络报文经由网络30被发送至网络磁盘40。The network disk component 1022 encapsulates the IO command for operating the IO address of the physical disk into the network packet, the destination address of the network packet is the network address of the network disk, and the network disk component 1022 provides the interface provided by the physical network card driver 1023. The control physical network card 1031 transmits the network message to the network 30 such that the network message is sent to the network disk 40 via the network 30.
步骤504:网络磁盘40对物理磁盘的IO地址进行IO操作,并返回响应信息至网络磁盘组件1022。Step 504: The network disk 40 performs an IO operation on the IO address of the physical disk and returns response information to the network disk component 1022.
其中,网络磁盘40将响应信息封装到网络报文,该网络报文的目的地址为第一服务器10的网络地址,网络磁盘40通过网络30发送至第一服务器10,网络磁盘组件1022通过物理网卡驱动1023提供的接口从物理网卡1031接收该网络报文,并解析出响应信息。The network disk 40 encapsulates the response information into the network packet, the destination address of the network packet is the network address of the first server 10, the network disk 40 is sent to the first server 10 through the network 30, and the network disk component 1022 passes the physical network card. The interface provided by the driver 1023 receives the network packet from the physical network card 1031 and parses out the response information.
步骤505:网络磁盘组件1022将响应信息发送至虚拟机监视器1021。Step 505: The network disk component 1022 sends the response information to the virtual machine monitor 1021.
步骤506:虚拟机监视器1021接收响应信息,并判断计时的时间是否超出预设时间段。Step 506: The virtual machine monitor 1021 receives the response information and determines whether the time counted exceeds the preset time period.
步骤507:虚拟机监视器1021判断到计时的时间没有超出预设时间段,将响应信息发送至文件系统1013。Step 507: The virtual machine monitor 1021 determines that the time counted does not exceed the preset time period, and sends the response information to the file system 1013.
由于文件系统1013在预定时间段内将响应信息发送至应用程序1011,因此,对于应用程序1011而言,相当于直接从虚拟磁盘1012进行读写,并获取到相应的响应信息。Since the file system 1013 transmits the response information to the application 1011 within a predetermined period of time, it is equivalent to the application 1011 to read and write directly from the virtual disk 1012, and acquire corresponding response information.
在上述方案中,在读写指令执行成功的情况下,可完成对网络磁盘40进行读写的动作。在本发明实施例中,进一步提供一种在读写指令执行失败的情况下,也可完成对网络磁盘40进行读写的IO命令的处理方法,具体可参见图3。In the above solution, when the execution of the read/write command is successful, the operation of reading and writing the network disk 40 can be completed. In the embodiment of the present invention, a method for processing an IO command for reading and writing to the network disk 40 in the case that the read/write instruction fails to be executed is further provided. For details, refer to FIG. 3.
以下请参见图3,图3是根据本发明实施例的存储系统的另一数据交互图,图3示出在图2的步骤502中,在虚拟机监视器1021计时的时间超出预定时间段时仍没有接收到网络磁盘组件1022发送的响应信息的情况:Referring to FIG. 3, FIG. 3 is another data interaction diagram of the storage system according to an embodiment of the present invention. FIG. 3 illustrates that in the step 502 of FIG. 2, when the time counted by the virtual machine monitor 1021 exceeds a predetermined period of time Still not receiving the response message sent by the network disk component 1022:
步骤601:虚拟机101的应用程序1011访问虚拟磁盘1012时,文件系统1013产生对虚拟磁盘1012的IO地址进行操作的IO命令,并发送该IO命令至虚拟机监视器1021。Step 601: When the application 1011 of the virtual machine 101 accesses the virtual disk 1012, the file system 1013 generates an IO command to operate the IO address of the virtual disk 1012, and sends the IO command to the virtual machine monitor 1021.
其中,应用程序1011访问虚拟磁盘1012时,产生对用户文件进行操作的文件命令,此时文件系统1013接收到对用户文件进行操作的文件命令。When the application 1011 accesses the virtual disk 1012, a file command for operating the user file is generated. At this time, the file system 1013 receives the file command for operating the user file.
根据先前描述,文件系统1013管理用户文件与虚拟磁盘1012的IO地址的对应关系,故文件系统1013可根据上述对应关系将对用户文件进行操作的文件命令转换为对虚拟磁盘1012的IO地址进行操作的IO命令。According to the foregoing description, the file system 1013 manages the correspondence between the user file and the IO address of the virtual disk 1012, so the file system 1013 can convert the file command for operating the user file to operate the IO address of the virtual disk 1012 according to the above correspondence. IO command.
步骤602:虚拟机监视器1021从文件系统1013接收对虚拟磁盘1012的IO地址进行操作的IO命令,并根据虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系获取与该IO命令对应的卷号,产生针对该卷号对应的卷文件的读写命令,并发送该读写命令至网络磁盘组件1022,并计时。Step 602: The virtual machine monitor 1021 receives an IO command for operating the IO address of the virtual disk 1012 from the file system 1013, and assigns the volume number of the volume file to the virtual machine 101 according to the IO address of the virtual disk 1012 and the network disk 40. The corresponding relationship acquires the volume number corresponding to the IO command, generates a read/write command for the volume file corresponding to the volume number, and sends the read/write command to the network disk component 1022, and counts.
步骤603:虚拟机监视器1021在确定读写指令执行失败时产生通知消息并发送至监控装置1024。Step 603: The virtual machine monitor 1021 generates a notification message and sends it to the monitoring device 1024 when it determines that the read/write instruction fails to execute.
举例而言,当虚拟机监视器1021在计时的时间超出预定时间段仍没有从网络磁盘组件1022接收到响应信息时,确定读写指令执行失败,产生通知信息,并发送通知信息至监控装置1024。For example, when the virtual machine monitor 1021 has not received the response information from the network disk component 1022 after the time period exceeds the predetermined time period, it is determined that the read/write instruction execution fails, the notification information is generated, and the notification information is sent to the monitoring device 1024. .
步骤604:监控装置1024根据通知消息构造异常消息并发送异常消息至IO重定向装置1025。Step 604: The monitoring device 1024 constructs an exception message according to the notification message and sends an exception message to the IO redirection device 1025.
举例而言,监控装置1024检测网络磁盘组件1022的工作状态,并检测第一服务器10与网络磁盘40之间的通信链路状态,任一者出现异常时,构造异常信息,发送异常信息至IO重定向装置1025。For example, the monitoring device 1024 detects the working state of the network disk component 1022, and detects the communication link state between the first server 10 and the network disk 40. When any abnormality occurs, abnormal information is constructed, and abnormal information is sent to the IO. Redirecting device 1025.
步骤605:IO重定向装置1025响应异常信息从虚拟机监视器1021获取读写指令,并查找服务器集群100中与网络磁盘40的通信链路状态正常的服务器20的第网络地址,产生第一网络报文并发送至服务器20,其中第一网络报文携带有读写命令,且第一网络报文的源地址是服务器10的网络地址,目的地址是服务器20的网络地址。Step 605: The IO redirection device 1025 acquires the read/write instruction from the virtual machine monitor 1021 in response to the abnormality information, and searches for the network address of the server 20 in the server cluster 100 that is in a normal communication link state with the network disk 40, and generates the first network. The message is sent to the server 20, where the first network message carries a read/write command, and the source address of the first network message is the network address of the server 10, and the destination address is the network address of the server 20.
在本步骤中,IO重定向装置1025可查询维护列表,假设在当前时间维护列表刷新为表2所示:In this step, the IO redirection device 1025 can query the maintenance list, and assume that the current time maintenance list refresh is as shown in Table 2:
服务器网络地址Server network address 状态status 时延Delay
192.168.121.1192.168.121.1 00 00
192.168.121.2192.168.121.2 11 42ms42ms
192.168.121.3192.168.121.3 11 90ms90ms
……...... ……...... ……......
表2Table 2
值得注意的是,由于维护列表是定期更新的,因此表2与上述表1不同,IO重定向装置1025通过查询表2(当前状态的维护列表)可知服务器20(网络地址为192.168.121.2)与网络磁盘40之间的通信链路状态正常,且时延(42ms)最短,因此选择服务器20。It is worth noting that since the maintenance list is updated periodically, Table 2 is different from Table 1 above, and the IO redirection device 1025 can know that the server 20 (the network address is 192.168.121.2) and the query table 2 (the maintenance list of the current state) The communication link state between the network disks 40 is normal, and the delay (42 ms) is the shortest, so the server 20 is selected.
步骤606:IO处理代理装置2025接收第一网络报文,从第一网络报文解析出读写命令并发送至网络磁盘组件2022。Step 606: The IO processing proxy device 2025 receives the first network packet, parses the read/write command from the first network packet, and sends the read/write command to the network disk component 2022.
步骤607:网络磁盘组件2022根据读写指令产生对网络磁盘40中的物理磁盘的IO地址进行读写的IO命令,并发送对网络磁盘中的物理磁盘的IO地址进行读写的IO命令至网络磁盘。Step 607: The network disk component 2022 generates an IO command for reading and writing the IO address of the physical disk in the network disk 40 according to the read/write command, and sends an IO command for reading and writing the IO address of the physical disk in the network disk to the network. Disk.
在本步骤中,基于以上描述,由于网络磁盘组件2022与网络磁盘组件1022均记录有网络磁盘40分配至服务器集群中的所有虚拟机的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系,因此网络磁盘组件2022在获取到对卷文件的读写命令后,通过查询上述关系可获取卷文件对应的物理磁盘的IO地址,从而可产生对物理磁盘的IO地址进行读写的IO命令。In this step, based on the above description, since the network disk component 2022 and the network disk component 1022 both record the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster and the IO of the physical disk corresponding to the volume file. The correspondence between the addresses, so the network disk component 2022 can obtain the IO address of the physical disk corresponding to the volume file by querying the above relationship after obtaining the read/write command for the volume file, thereby generating the IO address of the physical disk. Read and write IO commands.
网络磁盘组件2022通过网络30将对物理磁盘的IO地址进行读写的IO命令发送至网络磁盘40。The network disk component 2022 sends an IO command to read and write the IO address of the physical disk to the network disk 40 via the network 30.
举例而言,网络磁盘组件2022产生携带有上述IO命令的网络报文,并将该网络报文发送至网络磁盘40。For example, the network disk component 2022 generates a network message carrying the above IO command and sends the network message to the network disk 40.
步骤608:网络磁盘40接收对物理磁盘的IO地址进行读写的IO命令,并对物理磁盘进行IO操作,产生响应信息并发送至IO代理处理装置2024,其中响应信息包括IO操作的结果。Step 608: The network disk 40 receives the IO command for reading and writing the IO address of the physical disk, performs an IO operation on the physical disk, generates response information, and sends the response information to the IO proxy processing device 2024, wherein the response information includes the result of the IO operation.
具体地,网络磁盘40将响应信息封装到网络报文并发送至网络30,其中该网络报文的目的地址为服务器20的网络地址,目的端口为IO代理处理装置2024在操作系统202的网络端口,IO代理处理装置2024通过物理网卡驱动2023提供的接口控制物理网卡2031接收该网络报文,并解析以获取响应信息。Specifically, the network disk 40 encapsulates the response information into the network message and sends it to the network 30, wherein the destination address of the network message is the network address of the server 20, and the destination port is the network port of the IO agent processing device 2024 at the operating system 202. The IO proxy processing device 2024 controls the physical network card 2031 to receive the network packet through the interface provided by the physical network card driver 2023, and parses to obtain response information.
步骤609:IO处理代理装置2024将响应信息发送至IO重定向装置1025。Step 609: The IO processing proxy device 2024 sends the response information to the IO redirection device 1025.
步骤610:虚拟机监视器2021将响应信息发送至文件系统1013。Step 610: The virtual machine monitor 2021 sends the response information to the file system 1013.
在本发明实施例中,应用程序1011在访问虚拟磁盘1012时,若网络磁盘组件1022的工作状态出现异常,或第一服务器10与网络磁盘40之间的通信链路状态异常,另一通过网络30发送读写命令至服务器20,由于服务器20的网络磁盘组件2022与服务器10的网络磁盘组件1022均记录了网络磁盘40分配至服务器集群100中的所有虚拟机的卷文件的卷号与该卷文件对应的物理磁盘的IO地址之间的对应关系,故网络磁盘组件2022可将对卷文件的读写命令转换为针对物理磁盘的IO地址的IO命令并发送网络磁盘40,从而可确保应用程序1011在所在虚拟机101迁移至第二服务器20后仍可正常访问网络磁盘40。可克服因IO命令不能得到处理而造成业务中断的技术问题。In the embodiment of the present invention, when the application 1011 accesses the virtual disk 1012, if the working state of the network disk component 1022 is abnormal, or the communication link between the first server 10 and the network disk 40 is abnormal, the other is through the network. 30 sends a read/write command to the server 20, since the network disk component 2022 of the server 20 and the network disk component 1022 of the server 10 both record the volume number of the volume file of the network disk 40 allocated to all the virtual machines in the server cluster 100 and the volume. The correspondence between the IO addresses of the physical disks corresponding to the files, so the network disk component 2022 can convert the read and write commands for the volume files into IO commands for the IO addresses of the physical disks and send the network disk 40, thereby ensuring the application. The network disk 40 can still be accessed normally after the virtual machine 101 is migrated to the second server 20. It can overcome the technical problem that the IO command cannot be processed and the service is interrupted.
本发明进一步揭示一种IO命令的处理方法,具体请参见图4,图4是根据本发明实施例的IO命令的处理方法的流程图,该方法应用于服务器10,服务器10包括虚拟机101、虚拟机监视器1021、网络磁盘组件1022、监控装置1024以及IO重定向装置1025,服务器10设置于服务器集群100中,服务器集群100经由网络30与网络磁盘40连接,服务器10通过网络磁盘组件1022访问网络磁盘40,虚拟机101设置有应用程序1011、文件系统1013以及虚拟磁盘1012,该方法包括:The present invention further discloses a method for processing an IO command. Referring to FIG. 4, FIG. 4 is a flowchart of a method for processing an IO command according to an embodiment of the present invention. The method is applied to a server 10, where the server 10 includes a virtual machine 101. The virtual machine monitor 1021, the network disk component 1022, the monitoring device 1024, and the IO redirection device 1025 are provided in the server cluster 100. The server cluster 100 is connected to the network disk 40 via the network 30, and the server 10 is accessed through the network disk component 1022. The network disk 40 is provided with an application 1011, a file system 1013, and a virtual disk 1012. The method includes:
步骤S701:应用程序1011产生对文件系统1013的用户文件进行操作的文件命令;Step S701: The application 1011 generates a file command for operating the user file of the file system 1013;
步骤S702:文件系统1013根据文件命令产生对虚拟磁盘1012的IO地址进行操作的IO命令;Step S702: The file system 1013 generates an IO command for operating the IO address of the virtual disk 1012 according to the file command.
可选地,文件系统1013管理文件系统1013中的用户文件与虚拟磁盘1012的IO地址的对应关系,在步骤702中,文件系统1013根据文件系统1013中的用户文件与虚拟 磁盘1012的IO地址的对应关系将文件命令转换为虚拟磁盘1012的IO地址进行操作的IO命令。Optionally, the file system 1013 manages the correspondence between the user file in the file system 1013 and the IO address of the virtual disk 1012. In step 702, the file system 1013 is based on the user file in the file system 1013 and the IO address of the virtual disk 1012. The correspondence converts the file command into an IO command for operating the IO address of the virtual disk 1012.
步骤S703:虚拟机监视器1021根据对虚拟磁盘1012的IO地址进行操作的IO命令产生对网络磁盘40中的卷文件的读写指令,发送读写指令至网络磁盘组件1022,当确定读写指令执行失败时发送通知信息至监控装置1024;Step S703: The virtual machine monitor 1021 generates a read/write command to the volume file in the network disk 40 according to the IO command for operating the IO address of the virtual disk 1012, and sends a read/write command to the network disk component 1022, when determining the read/write command. Sending notification information to the monitoring device 1024 when the execution fails;
可选地,虚拟机监视器1021记录有虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系,在步骤703中,虚拟机监视器1021根据虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系获取虚拟磁盘1012的IO地址对应的卷文件的卷号,虚拟机101根据卷文件的卷号产生对网络磁盘40中的卷文件的读写指令。Optionally, the virtual machine monitor 1021 records the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101. In step 703, the virtual machine monitor 1021 is virtualized. The correspondence between the IO address of the disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101 acquires the volume number of the volume file corresponding to the IO address of the virtual disk 1012, and the virtual machine 101 generates the volume number according to the volume file of the volume file. Read and write instructions to volume files in network disk 40.
步骤S704:监控装置1024接收通知消息根据通知消息构造异常信息,并发送异常信息至IO重定向装置1025。Step S704: The monitoring device 1024 receives the notification message to construct the abnormality information according to the notification message, and sends the abnormality information to the IO redirection device 1025.
可选地,在步骤S704中,监控装置1024根据通知消息检测网络磁盘组件1022的工作状态以及服务器10与网络磁盘40之间的通信链路状态,在网络磁盘组件1022的工作状态异常,或服务器10与网络磁盘40之间的通信链路状态异常时,构造异常信息。Optionally, in step S704, the monitoring device 1024 detects the working state of the network disk component 1022 and the communication link state between the server 10 and the network disk 40 according to the notification message, the working state of the network disk component 1022 is abnormal, or the server When the communication link state between the network disk 40 and the network disk 40 is abnormal, an abnormality information is constructed.
步骤S705:IO重定向装置1025响应异常信息从虚拟机监视器1021获取读写指令,并查找服务器集群100中与网络磁盘40之间的通信链路状态正常的另一服务器20的网络地址,产生第一网络报文并发送至另一服务器20,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器10的网络地址,目的地址是另一服务器20的网络地址。Step S705: The IO redirection device 1025 acquires the read/write instruction from the virtual machine monitor 1021 in response to the abnormality information, and searches for the network address of another server 20 in the server cluster 100 that is in a normal communication link state with the network disk 40, and generates The first network packet is sent to another server 20, wherein the first network packet carries a read/write command, and the source address of the first network packet is the network address of the first server 10, and the destination address is another server 20. Network address.
另一可选地,网络磁盘组件1022记录有网络磁盘40分配至服务器集群100中的所有虚拟机101的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。Alternatively, the network disk component 1022 records the correspondence between the volume number of the volume file of the network file 40 allocated to all the virtual machines 101 in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
在本发明实施例中,当在服务器10中,针对网络磁盘40的读写指令执行失败时,将读写指令发送至与网络磁盘40之间的通信链路状态正常的另一服务器20,由另一服务器20的网络磁盘组件1022对读写指令进行处理,产生对网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送该IO命令至网络磁盘40,从而在读写指令执行失败时,仍可通过另一服务器的处理实现对网络磁盘40进行读写操作。In the embodiment of the present invention, when the execution of the read/write instruction for the network disk 40 fails in the server 10, the read/write command is sent to another server 20 having a normal communication link state with the network disk 40, The network disk component 1022 of the other server 20 processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk 40, thereby executing the read and write instructions. When it fails, the network disk 40 can still be read and written by the processing of another server.
本发明进一步揭示一种服务器10,具体请参见图5,图5是根据本发明实施例的服务器的装置结构示意图,如图5所示:The present invention further discloses a server 10. Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention, as shown in FIG.
服务器10包括存储器802、处理器801和总线803,存储器802和处理器801分别与总线803连接,存储器802存储有程序指令,处理器801执行存储器802中的程序指令以实现虚拟机101、虚拟机监视器1021、网络磁盘组件1022、监控装置1024以及IO重定向装置1025的功能,虚拟机101设置有应用程序1011、文件系统1012和虚拟磁盘1013,其中:The server 10 includes a memory 802, a processor 801 and a bus 803. The memory 802 and the processor 801 are respectively connected to a bus 803. The memory 802 stores program instructions, and the processor 801 executes program instructions in the memory 802 to implement the virtual machine 101 and the virtual machine. The functions of the monitor 1021, the network disk component 1022, the monitoring device 1024, and the IO redirection device 1025 are provided with an application 1011, a file system 1012, and a virtual disk 1013, wherein:
处理器801执行存储器802中的第一程序指令以执行步骤:应用程序1011产生对文件系统1013的用户文件进行操作的文件命令;The processor 801 executes the first program instructions in the memory 802 to perform the steps: the application 1011 generates a file command to operate the user file of the file system 1013;
处理器801执行存储器802中的第二程序指令以执行步骤:文件系统1013根据文件命令产生对虚拟磁盘1012的IO地址进行操作的IO命令;The processor 801 executes a second program instruction in the memory 802 to perform the steps: the file system 1013 generates an IO command to operate on the IO address of the virtual disk 1012 according to the file command;
可选地,文件系统1013管理文件系统1013中的用户文件与虚拟磁盘1012的IO地址的对应关系,在上述步骤中,文件系统1013根据文件系统1013中的用户文件与虚拟 磁盘1012的IO地址的对应关系将文件命令转换为虚拟磁盘1012的IO地址进行操作的IO命令。Optionally, the file system 1013 manages the correspondence between the user file in the file system 1013 and the IO address of the virtual disk 1012. In the above step, the file system 1013 is based on the user file in the file system 1013 and the IO address of the virtual disk 1012. The correspondence converts the file command into an IO command for operating the IO address of the virtual disk 1012.
处理器801执行存储器802中的第三程序指令以执行步骤:虚拟机监视器1021根据对虚拟磁盘1012的IO地址进行操作的IO命令产生对网络磁盘40中的卷文件的读写指令,发送读写指令至网络磁盘组件1022,当确定读写指令执行失败时发送通知信息至监控装置1024;The processor 801 executes the third program instructions in the memory 802 to perform the steps: the virtual machine monitor 1021 generates read and write instructions to the volume file in the network disk 40 according to the IO command operating on the IO address of the virtual disk 1012, and sends the read command. Writing instructions to the network disk component 1022, when it is determined that the read and write instructions fail to execute, sending notification information to the monitoring device 1024;
可选地,虚拟机监视器1021记录有虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系,处理器801执行存储器802中的第三程序指令以执行步骤:虚拟机监视器1021根据虚拟磁盘1012的IO地址与网络磁盘40分配至虚拟机101的卷文件的卷号之间的对应关系获取虚拟磁盘1012的IO地址对应的卷文件的卷号,虚拟机101根据卷文件的卷号产生对网络磁盘40中的卷文件的读写指令。Optionally, the virtual machine monitor 1021 records the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101, and the processor 801 executes the third program instruction in the memory 802. In the execution step, the virtual machine monitor 1021 acquires the volume number of the volume file corresponding to the IO address of the virtual disk 1012 according to the correspondence between the IO address of the virtual disk 1012 and the volume number of the volume file of the network disk 40 allocated to the virtual machine 101. The virtual machine 101 generates a read/write command for the volume file in the network disk 40 based on the volume number of the volume file.
处理器801执行存储器802中的第四程序指令以执行步骤:监控装置1024接收通知消息根据通知消息构造异常信息,并发送异常信息至IO重定向装置1025,。The processor 801 executes the fourth program instructions in the memory 802 to perform the steps of: the monitoring device 1024 receives the notification message constructing the exception information according to the notification message, and transmits the exception information to the IO redirection device 1025.
可选地,监控装置1024根据通知消息检测网络磁盘组件1022的工作状态以及服务器10与网络磁盘40之间的通信链路状态,在网络磁盘组件1022的工作状态异常,或服务器10与网络磁盘40之间的通信链路状态异常时,构造异常信息。Optionally, the monitoring device 1024 detects the working state of the network disk component 1022 and the communication link state between the server 10 and the network disk 40 according to the notification message, the working state of the network disk component 1022 is abnormal, or the server 10 and the network disk 40 When the communication link status is abnormal, an exception information is constructed.
处理器801执行存储器802中的第五程序指令以执行步骤:IO重定向装置1025响应异常信息从虚拟机监视器1021获取读写指令,并查找服务器集群100中与网络磁盘40之间的通信链路状态正常的另一服务器20的网络地址,产生第一网络报文并发送至另一服务器20,其中第一网络报文携带有读写命令,且第一网络报文的源地址是第一服务器10的网络地址,目的地址是另一服务器20的网络地址。The processor 801 executes the fifth program instructions in the memory 802 to perform the steps: the IO redirection device 1025 acquires the read and write instructions from the virtual machine monitor 1021 in response to the exception information, and looks up the communication chain between the server cluster 100 and the network disk 40. The network address of the other server 20 whose path is normal is generated, and the first network packet is sent to another server 20, where the first network packet carries a read/write command, and the source address of the first network packet is the first The network address of the server 10, the destination address is the network address of the other server 20.
可选地,网络磁盘组件1022记录有网络磁盘40分配至服务器集群100中的所有虚拟机101的卷文件的卷号与卷文件对应的物理磁盘的IO地址之间的对应关系。Optionally, the network disk component 1022 records the correspondence between the volume number of the volume file of the network file 40 allocated to all the virtual machines 101 in the server cluster 100 and the IO address of the physical disk corresponding to the volume file.
在本发明实施例中,当在服务器10中针对网络磁盘40的读写指令执行失败时,将读写指令发送至与网络磁盘40之间的通信链路状态正常的另一服务器20,由另一服务器20的网络磁盘组件1022对读写指令进行处理,产生对网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送该IO命令至网络磁盘40,从而在读写指令执行失败时,仍可通过另一服务器的处理实现对网络磁盘40进行读写操作。In the embodiment of the present invention, when the execution of the read/write instruction for the network disk 40 in the server 10 fails, the read/write command is sent to another server 20 with a normal communication link state with the network disk 40, and another The network disk component 1022 of a server 20 processes the read and write instructions, generates an IO command for reading and writing the IO address of the physical disk in the network disk, and sends the IO command to the network disk 40, thereby failing to execute the read/write instruction. At the same time, the network disk 40 can still be read and written by the processing of another server.
需说明的是,以上描述的任意装置实施例都仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that any of the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as the cells may or may not be Physical units can be located in one place or distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized. Those of ordinary skill in the art can understand and implement without any creative effort.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本发明而言更多情况 下软件程序实现是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, dedicated hardware, dedicated CPU, dedicated memory, dedicated memory, Special components and so on. In general, functions performed by computer programs can be easily implemented with the corresponding hardware, and the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc. However, for the purposes of the present invention, software program implementation is a better implementation in more cases. Based on the understanding, the technical solution of the present invention, which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. , U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., including a number of instructions to make a computer device (may be A personal computer, server, or network device, etc.) performs the methods described in various embodiments of the present invention.
所属领域的技术人员可以清楚地了解到,上述描述的系统、装置或单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that the specific working process of the system, the device or the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (21)

  1. 一种存储系统,其特征在于,包括通过网络连接的服务器集群和网络磁盘,所述服务器集群包括:A storage system, comprising: a server cluster and a network disk connected through a network, the server cluster comprising:
    第一服务器,包括:The first server includes:
    第一网络磁盘组件,所述第一服务器通过所述第一网络磁盘组件访问所述网络磁盘;a first network disk component, the first server accessing the network disk through the first network disk component;
    虚拟机,所述虚拟机设置有应用程序、文件系统以及虚拟磁盘,所述应用程序用于产生对所述文件系统的用户文件进行操作的文件命令,所述文件系统用于根据所述文件命令产生对所述虚拟磁盘的IO地址进行操作的IO命令;a virtual machine, the virtual machine being provided with an application, a file system, and a virtual disk, the application being configured to generate a file command for operating a user file of the file system, the file system for using the file command according to the file Generating an IO command to operate on an IO address of the virtual disk;
    虚拟机监视器,用于根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令,发送所述读写指令至所述第一网络磁盘组件,当确定所述读写指令执行失败时发送通知信息至监控装置;a virtual machine monitor, configured to generate a read/write instruction to a volume file in the network disk according to an IO command that operates on an IO address of the virtual disk, and send the read/write instruction to the first network disk component Sending the notification information to the monitoring device when it is determined that the read/write instruction fails to execute;
    所述监控装置,用于接收所述通知消息,根据所述通知消息构造异常信息并发送至IO重定向装置;The monitoring device is configured to receive the notification message, construct abnormal information according to the notification message, and send the information to the IO redirection device;
    所述IO重定向装置,用于响应所述异常信息从所述虚拟机监视器获取所述读写指令,并查找所述服务器集群中与所述网络磁盘之间的通信链路状态正常的第二服务器的网络地址,产生第一网络报文并发送至所述第二服务器,其中所述第一网络报文携带有所述读写命令,且所述第一网络报文的源地址是所述第一服务器的网络地址,目的地址是所述第二服务器的网络地址;The IO redirection device is configured to acquire the read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a status of a communication link state between the network cluster and the network disk in the server cluster. The network address of the second server generates a first network packet and sends the first network packet to the second server, where the first network packet carries the read/write command, and the source address of the first network packet is Describe a network address of the first server, where the destination address is a network address of the second server;
    第二服务器,包括:The second server includes:
    IO处理代理装置,用于接收所述第一网络报文,从所述第一网络报文解析出所述读写命令并发送至第二网络磁盘组件;An IO processing proxy device, configured to receive the first network packet, parse the read/write command from the first network packet, and send the read/write command to a second network disk component;
    所述第二网络磁盘组件,用于根据所述读写指令产生对所述网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送所述对所述网络磁盘中的物理磁盘的IO地址进行读写的IO命令至所述网络磁盘。The second network disk component is configured to generate an IO command for reading and writing an IO address of a physical disk in the network disk according to the read/write command, and send the physical disk to the network disk The IO address reads and writes the IO command to the network disk.
  2. 根据权利要求1所述的存储系统,其特征在于,所述监控装置具体用于根据通知消息检测所述第一网络磁盘组件的工作状态以及所述第一服务器与所述网络磁盘之间的通信链路状态,在所述网络磁盘组件的工作状态异常,或所述第一服务器与所述网络磁盘之间的通信链路状态异常时,构造所述异常信息。The storage system according to claim 1, wherein the monitoring device is configured to detect an operating state of the first network disk component and a communication between the first server and the network disk according to a notification message. The link state is configured when the working state of the network disk component is abnormal, or the communication link state between the first server and the network disk is abnormal.
  3. 根据权利要求1所述的存储系统,其特征在于,所述文件系统管理所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系。The storage system according to claim 1, wherein the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk.
  4. 根据权利要求1所述的存储系统,其特征在于,所述虚拟机监视器记录有所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系。The storage system according to claim 1, wherein said virtual machine monitor records a correspondence between an IO address of said virtual disk and a volume number of said network disk to a volume file of said virtual machine relationship.
  5. 根据权利要求1所述的存储系统,其特征在于,所述第一网络磁盘组件和所述第二网络磁盘组件均记录有所述网络磁盘分配至所述服务器集群中的所有虚拟机的卷文件的卷号与所述卷文件对应的物理磁盘的IO地址之间的对应关系。The storage system according to claim 1, wherein said first network disk component and said second network disk component each record a volume file of said network disk allocated to all virtual machines in said server cluster Correspondence between the volume number and the IO address of the physical disk corresponding to the volume file.
  6. 一种IO命令的处理方法,其特征在于,所述方法应用于存储系统,所述存储系统包括第一服务器、第二服务器以及网络磁盘,所述第一服务器设置有虚拟机、第一网络磁盘组件、虚拟机监视器、IO重定向装置以及监控装置,所述虚拟机设置有虚拟磁盘, 所述第一服务器通过所述第一网络磁盘组件访问所述网络磁盘,所述第二服务器设置IO处理代理装置和第二网络磁盘组件,所述方法包括:A method for processing an IO command, the method is applied to a storage system, where the storage system includes a first server, a second server, and a network disk, and the first server is configured with a virtual machine and a first network disk. a component, a virtual machine monitor, an IO redirection device, and a monitoring device, the virtual machine being provided with a virtual disk, the first server accessing the network disk through the first network disk component, and the second server setting IO Processing the proxy device and the second network disk component, the method comprising:
    所述虚拟机产生对所述虚拟磁盘的IO地址进行操作的IO命令;The virtual machine generates an IO command to operate on an IO address of the virtual disk;
    虚拟机监视器根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令,发送所述读写指令至所述第一网络磁盘组件,当确定所述读写指令执行失败时发送通知信息至监控装置;The virtual machine monitor generates a read/write instruction to the volume file in the network disk according to an IO command that operates on the IO address of the virtual disk, and sends the read/write instruction to the first network disk component, when determining Sending the notification information to the monitoring device when the read/write instruction fails to execute;
    所述监控装置接收所述通知消息,根据所述通知消息构造异常信息并发送至IO重定向装置;The monitoring device receives the notification message, constructs an abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
    所述IO重定向装置响应所述异常信息从所述虚拟机监视器获取所述读写指令,并查找所述服务器集群中与所述网络磁盘之间的通信链路状态正常的第二服务器的网络地址,产生第一网络报文并发送至所述第二服务器,其中所述第一网络报文携带有所述读写命令,且所述第一网络报文的源地址是所述第一服务器的网络地址,目的地址是所述第二服务器的网络地址;The IO redirection device acquires the read/write instruction from the virtual machine monitor in response to the abnormality information, and searches for a second server in a normal state of a communication link between the server cluster and the network disk. a network address, the first network packet is sent to the second server, where the first network packet carries the read/write command, and the source address of the first network packet is the first The network address of the server, the destination address is the network address of the second server;
    所述IO处理代理装置接收所述第一网络报文,从所述第一网络报文解析出所述读写命令并发送至所述第二网络磁盘组件;Receiving, by the IO processing proxy device, the first network packet, parsing the read/write command from the first network packet, and sending the read/write command to the second network disk component;
    所述第二网络磁盘组件根据所述读写指令产生对所述网络磁盘中的物理磁盘的IO地址进行读写的IO命令,并发送所述对所述网络磁盘中的物理磁盘的IO地址进行读写的IO命令至所述网络磁盘。The second network disk component generates an IO command for reading and writing an IO address of a physical disk in the network disk according to the read/write command, and sends the IO address of the physical disk in the network disk. Read and write IO commands to the network disk.
  7. 根据权利要求6所述的方法,其特征在于,所述监控装置接收所述通知信息,根据所述通知消息构造异常信息的步骤具体包括:The method according to claim 6, wherein the step of receiving the notification information by the monitoring device, and constructing the abnormal information according to the notification message specifically includes:
    所述监控装置根据所述通知消息检测所述第一网络磁盘组件的工作状态以及所述第一服务器与所述网络磁盘之间的通信链路状态,在所述第一网络磁盘组件的工作状态异常,或所述第一服务器与所述网络磁盘之间的通信链路状态异常时,构造所述异常信息。The monitoring device detects, according to the notification message, an operating state of the first network disk component and a communication link state between the first server and the network disk, in an operating state of the first network disk component The abnormality, or the abnormality of the communication link state between the first server and the network disk is constructed.
  8. 根据权利要求6所述的方法,其特征在于,所述虚拟机还设置有应用程序和文件系统,所述文件系统管理所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系,所述虚拟机产生对所述虚拟磁盘的IO地址进行操作的IO命令的步骤具体包括:The method according to claim 6, wherein the virtual machine is further provided with an application program and a file system, and the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk. The step of generating, by the virtual machine, an IO command for operating an IO address of the virtual disk includes:
    所述应用程序产生对所述文件系统的用户文件进行操作的文件命令;The application generates a file command to operate a user file of the file system;
    所述文件系统根据所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系将所述文件命令转换为所述虚拟磁盘的IO地址进行操作的IO命令。The file system converts the file command into an IO command for operating the IO address of the virtual disk according to a correspondence between a user file in the file system and an IO address of the virtual disk.
  9. 根据权利要求6所述的方法,其特征在于,所述虚拟机监视器记录有所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系,所述虚拟机监视器根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令的步骤具体包括:The method according to claim 6, wherein the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of a volume file of the network disk allocated to the virtual machine. And the step of the virtual machine monitor generating a read/write command for the volume file in the network disk according to the IO command for operating the IO address of the virtual disk includes:
    所述虚拟机监视器根据所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系获取所述虚拟磁盘的IO地址对应的卷文件的卷号;Obtaining, by the virtual machine monitor, a volume of a volume file corresponding to an IO address of the virtual disk according to a correspondence between an IO address of the virtual disk and a volume number of a volume file of the network disk allocated to the virtual disk number;
    所述虚拟机根据所述卷文件的卷号产生对所述网络磁盘中的卷文件的读写指令。The virtual machine generates a read/write instruction for a volume file in the network disk according to a volume number of the volume file.
  10. 根据权利要求6所述的方法,其特征在于,所述第一网络磁盘组件和所述第二网络磁盘组件均记录有所述网络磁盘分配至所述服务器集群中的所有虚拟机的卷文件的卷号与所述卷文件对应的物理磁盘的IO地址之间的对应关系。The method according to claim 6, wherein the first network disk component and the second network disk component both record a volume file of the network disk allocated to all virtual machines in the server cluster. The correspondence between the volume number and the IO address of the physical disk corresponding to the volume file.
  11. 一种服务器,其特征在于,包括虚拟机、虚拟机监视器、网络磁盘组件、监控装 置以及IO重定向装置,所述服务器设置于服务器集群中,所述服务器集群经由网络与网络磁盘连接,所述服务器通过所述网络磁盘组件访问网络磁盘,所述虚拟机设置有应用程序、文件系统以及虚拟磁盘,其中:A server, comprising: a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device, wherein the server is disposed in a server cluster, and the server cluster is connected to a network disk via a network, where The server accesses a network disk through the network disk component, and the virtual machine is provided with an application, a file system, and a virtual disk, where:
    所述应用程序,用于产生对所述文件系统的用户文件进行操作的文件命令;The application program for generating a file command for operating a user file of the file system;
    所述文件系统,用于根据所述文件命令产生对所述虚拟磁盘的IO地址进行操作的IO命令;The file system is configured to generate an IO command for operating an IO address of the virtual disk according to the file command;
    所述虚拟机监视器,用于根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令,发送所述读写指令至所述网络磁盘组件,当确定所述读写指令执行失败时发送通知信息至所述监控装置;The virtual machine monitor is configured to generate a read/write instruction to a volume file in the network disk according to an IO command that operates on an IO address of the virtual disk, and send the read/write instruction to the network disk component. Sending notification information to the monitoring device when it is determined that the read/write instruction fails to execute;
    所述监控装置,用于接收所述通知消息,根据所述通知消息构造异常信息并发送至IO重定向装置;The monitoring device is configured to receive the notification message, construct abnormal information according to the notification message, and send the information to the IO redirection device;
    所述IO重定向装置,用于响应所述异常信息从所述虚拟机监视器获取所述读写指令,并查找所述服务器集群中与所述网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至所述另一服务器,其中所述第一网络报文携带有所述读写命令,且所述第一网络报文的源地址是所述第一服务器的网络地址,目的地址是所述另一服务器的网络地址。The IO redirection device is configured to obtain the read/write instruction from the virtual machine monitor in response to the abnormality information, and search for a normal communication link state with the network disk in the server cluster. a network address of the server, generating a first network packet and sending the message to the another server, where the first network packet carries the read/write command, and the source address of the first network packet is The network address of the first server, and the destination address is the network address of the other server.
  12. 根据权利要求11所述的服务器,其特征在于,所述监控装置具体用于根据通知消息检测所述网络磁盘组件的工作状态以及所述服务器与所述网络磁盘之间的通信链路状态,在所述网络磁盘组件的工作状态异常,或所述服务器与所述网络磁盘之间的通信链路状态异常时,构造所述异常信息。The server according to claim 11, wherein the monitoring device is configured to detect an operating state of the network disk component and a communication link state between the server and the network disk according to a notification message, The abnormality information is constructed when the working state of the network disk component is abnormal or the communication link state between the server and the network disk is abnormal.
  13. 根据权利要求11所述的服务器,其特征在于,所述文件系统管理所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系。The server according to claim 11, wherein said file system manages a correspondence between a user file in said file system and an IO address of said virtual disk.
  14. 根据权利要求11所述的服务器,其特征在于,所述虚拟机监视器记录有所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系。The server according to claim 11, wherein the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of a volume file of the network disk allocated to the virtual machine. .
  15. 根据权利要求11所述的服务器,其特征在于,所述网络磁盘组件记录有所述网络磁盘分配至所述服务器集群中的所有虚拟机的卷文件的卷号与所述卷文件对应的物理磁盘的IO地址之间的对应关系。The server according to claim 11, wherein said network disk component records a volume number of a volume file of said virtual disk allocated to all virtual machines in said server cluster and a physical disk corresponding to said volume file Correspondence between IO addresses.
  16. 一种IO命令的处理方法,其特征在于,所述方法应用于服务器,所述服务器包括虚拟机、虚拟机监视器、网络磁盘组件、监控装置以及IO重定向装置,所述服务器设置于服务器集群中,所述服务器集群经由网络与网络磁盘连接,所述服务器通过所述网络磁盘组件访问网络磁盘,所述虚拟机设置有应用程序、文件系统以及虚拟磁盘,所述方法包括:A method for processing an IO command, the method being applied to a server, the server comprising a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device, wherein the server is disposed in a server cluster The server cluster is connected to a network disk through a network, and the server accesses a network disk through the network disk component, where the virtual machine is provided with an application, a file system, and a virtual disk, and the method includes:
    所述应用程序产生对所述文件系统的用户文件进行操作的文件命令;The application generates a file command to operate a user file of the file system;
    所述文件系统根据所述文件命令产生对所述虚拟磁盘的IO地址进行操作的IO命令;The file system generates an IO command for operating an IO address of the virtual disk according to the file command;
    所述虚拟机监视器根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令,发送所述读写指令至所述网络磁盘组件,当确定所述读写指令执行失败时发送通知信息至所述监控装置;The virtual machine monitor generates a read/write instruction to a volume file in the network disk according to an IO command that operates on an IO address of the virtual disk, and sends the read/write instruction to the network disk component, when determining Sending the notification information to the monitoring device when the read/write instruction fails to execute;
    所述监控装置接收所述通知消息,根据所述通知消息构造异常信息并发送至IO重定向装置;The monitoring device receives the notification message, constructs an abnormality information according to the notification message, and sends the abnormality information to the IO redirection device;
    所述IO重定向装置响应所述异常信息从所述虚拟机监视器获取所述读写指令,并查 找所述服务器集群中与所述网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至所述另一服务器,其中所述第一网络报文携带有所述读写命令,且所述第一网络报文的源地址是所述第一服务器的网络地址,目的地址是所述另一服务器的网络地址。The IO redirection device acquires the read/write instruction from the virtual machine monitor in response to the abnormality information, and searches for another server in the server cluster that is in a normal communication link state with the network disk. a network address, the first network packet is sent to the another server, where the first network packet carries the read/write command, and the source address of the first network packet is the first The network address of the server, the destination address is the network address of the other server.
  17. 根据权利要求16所述的方法,其特征在于,所述监控装置接收所述通知信息,根据所述通知消息构造异常信息的步骤具体包括:The method according to claim 16, wherein the step of receiving the notification information by the monitoring device, and constructing the abnormality information according to the notification message comprises:
    所述监控装置根据所述通知消息检测所述网络磁盘组件的工作状态以及所述服务器与所述网络磁盘之间的通信链路状态,在所述网络磁盘组件的工作状态异常,或所述服务器与所述网络磁盘之间的通信链路状态异常时,构造所述异常信息。The monitoring device detects an operating state of the network disk component and a communication link state between the server and the network disk according to the notification message, an abnormal working state of the network disk component, or the server The abnormality information is constructed when the communication link state with the network disk is abnormal.
  18. 根据权利要求16所述的方法,其特征在于,所述文件系统管理所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系,所述虚拟机产生对所述虚拟磁盘的IO地址进行操作的IO命令的步骤具体包括:The method according to claim 16, wherein the file system manages a correspondence between a user file in the file system and an IO address of the virtual disk, and the virtual machine generates an IO to the virtual disk The steps of the IO command for the address to operate include:
    所述文件系统根据所述文件系统中的用户文件与所述虚拟磁盘的IO地址的对应关系将所述文件命令转换为所述虚拟磁盘的IO地址进行操作的IO命令。The file system converts the file command into an IO command for operating the IO address of the virtual disk according to a correspondence between a user file in the file system and an IO address of the virtual disk.
  19. 根据权利要求16所述的方法,其特征在于,所述虚拟机监视器记录有所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系,所述虚拟机监视器根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令的步骤具体包括:The method according to claim 16, wherein the virtual machine monitor records a correspondence between an IO address of the virtual disk and a volume number of a volume file of the network disk allocated to the virtual machine. And the step of the virtual machine monitor generating a read/write command for the volume file in the network disk according to the IO command for operating the IO address of the virtual disk includes:
    所述虚拟机监视器根据所述虚拟磁盘的IO地址与所述网络磁盘分配至所述虚拟机的卷文件的卷号之间的对应关系获取所述所述虚拟磁盘的IO地址对应的卷文件的卷号;Obtaining, by the virtual machine monitor, a volume file corresponding to an IO address of the virtual disk according to a correspondence between an IO address of the virtual disk and a volume number of a volume file of the network disk allocated to the virtual disk Volume number;
    所述虚拟机根据所述卷文件的卷号产生对所述网络磁盘中的卷文件的读写指令。The virtual machine generates a read/write instruction for a volume file in the network disk according to a volume number of the volume file.
  20. 根据权利要求16所述的方法,其特征在于,所述网络磁盘组件记录有所述网络磁盘分配至所述服务器集群中的所有虚拟机的卷文件的卷号与所述卷文件对应的物理磁盘的IO地址之间的对应关系。The method according to claim 16, wherein said network disk component records a volume number of a volume file of said network disk allocated to all virtual machines in said server cluster and a physical disk corresponding to said volume file Correspondence between IO addresses.
  21. 一种服务器,包括存储器、处理器和总线,所述存储器和所述处理器分别与所述总线连接,所述存储器存储有程序指令,所述处理器执行所述存储器的所述程序指令以实现设置在所述服务器上的虚拟机、虚拟机监视器、网络磁盘组件、监控装置以及IO重定向装置的功能,所述虚拟机设置有应用程序、文件系统和虚拟磁盘,其中:A server comprising a memory, a processor and a bus, the memory and the processor being respectively connected to the bus, the memory storing program instructions, the processor executing the program instructions of the memory to implement The functions of a virtual machine, a virtual machine monitor, a network disk component, a monitoring device, and an IO redirection device disposed on the server, the virtual machine being provided with an application, a file system, and a virtual disk, wherein:
    所述处理器执行所述存储器中的第一程序指令以执行步骤:所述应用程序产生对所述文件系统的用户文件进行操作的文件命令;The processor executes a first program instruction in the memory to perform the step of: the application generating a file command to operate a user file of the file system;
    所述处理器执行存储器中的第二程序指令以执行步骤:所述文件系统根据所述文件命令产生对所述虚拟磁盘的IO地址进行操作的IO命令;The processor executes a second program instruction in the memory to perform the step of: the file system generating an IO command to operate on an IO address of the virtual disk according to the file command;
    所述处理器执行所述存储器中的第三程序指令以执行步骤:所述虚拟机监视器根据对所述虚拟磁盘的IO地址进行操作的IO命令产生对所述网络磁盘中的卷文件的读写指令,发送所述读写指令至所述网络磁盘组件,当确定所述读写指令执行失败时发送通知信息至所述监控装置;The processor executing a third program instruction in the memory to perform the step of: the virtual machine monitor generating a read of a volume file in the network disk based on an IO command operating on an IO address of the virtual disk Writing a command, sending the read/write instruction to the network disk component, and sending notification information to the monitoring device when it is determined that the read/write instruction fails to execute;
    所述处理器执行所述存储器中的第四程序指令以执行步骤:所述监控装置接收所述通知消息,根据所述通知消息构造异常信息并发送至IO重定向装置;The processor executes a fourth program instruction in the memory to perform the steps: the monitoring device receives the notification message, constructs an abnormality information according to the notification message, and sends the information to the IO redirection device;
    所述处理器执行所述存储器中的第五程序指令以执行步骤:所述IO重定向装置响应所述异常信息从所述虚拟机监视器获取所述读写指令,并查找所述服务器集群中与所述 网络磁盘之间的通信链路状态正常的另一服务器的网络地址,产生第一网络报文并发送至所述另一服务器,其中所述第一网络报文携带有所述读写命令,且所述第一网络报文的源地址是所述第一服务器的网络地址,目的地址是所述另一服务器的网络地址。The processor executes a fifth program instruction in the memory to perform the step of: the IO redirection device acquiring the read and write instruction from the virtual machine monitor in response to the exception information, and searching in the server cluster Generating, by the network address of another server with a normal communication link state with the network disk, a first network packet sent to the another server, where the first network packet carries the read and write And the source address of the first network packet is a network address of the first server, and the destination address is a network address of the another server.
PCT/CN2018/080248 2017-03-23 2018-03-23 Server, storage system and related method WO2018171728A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710178712.6 2017-03-23
CN201710178712.6A CN107145304B (en) 2017-03-23 2017-03-23 Server, storage system and related method

Publications (1)

Publication Number Publication Date
WO2018171728A1 true WO2018171728A1 (en) 2018-09-27

Family

ID=59783628

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080248 WO2018171728A1 (en) 2017-03-23 2018-03-23 Server, storage system and related method

Country Status (2)

Country Link
CN (1) CN107145304B (en)
WO (1) WO2018171728A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656679A (en) * 2018-11-06 2019-04-19 新华三云计算技术有限公司 A kind of the storage access method and device of virtual machine

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145304B (en) * 2017-03-23 2020-07-07 华为技术有限公司 Server, storage system and related method
CN110110004B (en) * 2018-01-30 2023-05-30 腾讯科技(深圳)有限公司 Data operation method, device and storage medium
CN114816279B (en) * 2022-06-30 2022-11-11 广东睿江云计算股份有限公司 Control method and control system for realizing virtual machine disk read-write based on ebpf

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080155223A1 (en) * 2006-12-21 2008-06-26 Hiltgen Daniel K Storage Architecture for Virtual Machines
US20100175064A1 (en) * 2009-01-06 2010-07-08 Dell Products L.P. System and method for raw device mapping in traditional nas subsystems
CN101977227A (en) * 2010-10-25 2011-02-16 中国农业大学 Multi-user network storage system and construction method thereof
US20160342437A1 (en) * 2015-05-21 2016-11-24 Dell Products, L.P. Data path failover method for sr-iov capable ethernet controller
CN107145304A (en) * 2017-03-23 2017-09-08 华为技术有限公司 Server, storage system and correlation technique
CN107147516A (en) * 2017-03-22 2017-09-08 华为技术有限公司 Server, storage system and correlation technique

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997722B (en) * 2010-11-16 2012-05-09 西安电子科技大学 Three-network convergence-oriented digital home network service management system and method
CN104636077B (en) * 2013-11-15 2017-10-10 中国电信股份有限公司 Network control techology storage system and method for virtual machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080155223A1 (en) * 2006-12-21 2008-06-26 Hiltgen Daniel K Storage Architecture for Virtual Machines
US20100175064A1 (en) * 2009-01-06 2010-07-08 Dell Products L.P. System and method for raw device mapping in traditional nas subsystems
CN101977227A (en) * 2010-10-25 2011-02-16 中国农业大学 Multi-user network storage system and construction method thereof
US20160342437A1 (en) * 2015-05-21 2016-11-24 Dell Products, L.P. Data path failover method for sr-iov capable ethernet controller
CN107147516A (en) * 2017-03-22 2017-09-08 华为技术有限公司 Server, storage system and correlation technique
CN107145304A (en) * 2017-03-23 2017-09-08 华为技术有限公司 Server, storage system and correlation technique

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656679A (en) * 2018-11-06 2019-04-19 新华三云计算技术有限公司 A kind of the storage access method and device of virtual machine
CN109656679B (en) * 2018-11-06 2020-12-08 新华三云计算技术有限公司 Storage access method and device of virtual machine

Also Published As

Publication number Publication date
CN107145304A (en) 2017-09-08
CN107145304B (en) 2020-07-07

Similar Documents

Publication Publication Date Title
EP3620905B1 (en) Method and device for identifying osd sub-health, and data storage system
US10642704B2 (en) Storage controller failover system
US8560628B2 (en) Supporting autonomous live partition mobility during a cluster split-brained condition
US9448899B2 (en) Method, apparatus and system for switching over virtual application two-node cluster in cloud environment
US10243780B2 (en) Dynamic heartbeating mechanism
WO2018171728A1 (en) Server, storage system and related method
US8868966B2 (en) SVC cluster configuration node failover
US9450700B1 (en) Efficient network fleet monitoring
US8473692B2 (en) Operating system image management
US8856585B2 (en) Hardware failure mitigation
US8910160B1 (en) Handling of virtual machine migration while performing clustering operations
US11106556B2 (en) Data service failover in shared storage clusters
US20120180070A1 (en) Single point, scalable data synchronization for management of a virtual input/output server cluster
US9223606B1 (en) Automatically configuring and maintaining cluster level high availability of a virtual machine running an application according to an application level specified service level agreement
US20120151095A1 (en) Enforcing logical unit (lu) persistent reservations upon a shared virtual storage device
US9100443B2 (en) Communication protocol for virtual input/output server (VIOS) cluster communication
WO2018137520A1 (en) Service recovery method and apparatus
WO2021072847A1 (en) Method and apparatus for monitoring condition of computer network, computer device, and storage medium
US8661089B2 (en) VIOS cluster alert framework
CN113849136A (en) Automatic FC block storage processing method and system based on domestic platform
CN107147516B (en) Server, storage system and related method
US11153173B1 (en) Dynamically updating compute node location information in a distributed computing environment
US8819481B2 (en) Managing storage providers in a clustered appliance environment
US10203890B1 (en) Multi-tier mechanism to achieve high availability in a multi-controller system
US9710298B2 (en) Information processing system, storage apparatus, and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18772700

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18772700

Country of ref document: EP

Kind code of ref document: A1