IO link fault switching method, system, terminal and storage medium

文档序号:948193 发布日期:2020-10-30 浏览:2次 中文

阅读说明:本技术 一种io链路故障切换方法、系统、终端及存储介质 (IO link fault switching method, system, terminal and storage medium ) 是由 范会杨 于 2020-07-08 设计创作,主要内容包括:本发明提供一种IO链路故障切换方法、系统、终端及存储介质,包括:确认第二存储控制器故障,在第一存储控制器物理端口上虚拟与第二存储控制器故障物理端口对应的逻辑端口,所述逻辑端口与所述对应故障物理端口的标识符相同;启动逻辑端口,所述逻辑端口通过对应的第一存储器物理端口链路与主机端口建立连接。本发明可以缩短存储单节点故障时IO failover时间,降低单节点故障对业务的影响,提升产品竞争力。(The invention provides an IO link fault switching method, a system, a terminal and a storage medium, wherein the method comprises the following steps: confirming the failure of a second storage controller, and virtualizing a logical port corresponding to the failed physical port of the second storage controller on a physical port of the first storage controller, wherein the logical port has the same identifier as the corresponding failed physical port; and starting a logical port, wherein the logical port is connected with the host port through a corresponding first memory physical port link. The method and the device can shorten the IO failure time when the single node fails, reduce the influence of the single node failure on the service and improve the product competitiveness.)

1. An IO link failover method, the method comprising:

confirming the failure of a second storage controller, and virtualizing a logical port corresponding to the failed physical port of the second storage controller on a physical port of the first storage controller, wherein the logical port has the same identifier as the corresponding failed physical port;

and starting a logical port, wherein the logical port is connected with the host port through a corresponding first memory physical port link.

2. The method of claim 1, wherein the confirming the second storage controller failure comprises, but is not limited to, any of the following methods:

The first storage controller and the second storage controller send heartbeat information mutually, and if the first storage controller cannot receive the heartbeat information of the second storage controller, the second storage controller is judged to be in fault;

the first storage controller detects a failure of a connection link with the second storage controller.

3. The method of claim 1, wherein prior to virtualizing the logical port corresponding to the failed physical port of the second storage controller, the method further comprises:

a one-to-one mapping relationship between physical ports of a first storage controller and physical ports of a second storage controller is set.

4. An IO link failover system, the system comprising:

confirming the failure of a second storage controller, and virtualizing a logical port corresponding to the failed physical port of the second storage controller on a physical port of the first storage controller, wherein the logical port has the same identifier as the corresponding failed physical port;

and the port starting unit is configured to start a logical port, and the logical port is connected with the host port through a corresponding first memory physical port link.

5. The system of claim 4, wherein the confirming the second storage controller failure comprises, but is not limited to, any of the following methods:

The first storage controller and the second storage controller send heartbeat information mutually, and if the first storage controller cannot receive the heartbeat information of the second storage controller, the second storage controller is judged to be in fault;

the first storage controller detects a failure of a connection link with the second storage controller.

6. The system of claim 4, further comprising:

and the mapping setting unit is configured to set a one-to-one mapping relation between the physical ports of the first storage controller and the physical ports of the second storage controller.

7. A terminal, comprising:

a processor;

a memory for storing instructions for execution by the processor;

wherein the processor is configured to perform the method of any one of claims 1-3.

8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-3.

Technical Field

The invention belongs to the technical field of storage systems, and particularly relates to an IO link fault switching method, system, terminal and storage medium.

Background

When a single point of failure occurs in an existing storage system, IO failover (failure path switching) is performed depending on host multipath software, but failover time is uncontrollable due to diversity of the host multipath software. For example, the host multipath software can see four paths H1A1, H1B1, H2A2, H2B 2. At this time, if the storage B control fails, two paths, i.e., H1B1 and H2B2, are disconnected, and the multipath software will switch the IO failover to two paths, i.e., H1a1 and H2a2, but due to the diversity of the multipath, the switching time varies from several seconds to 60S, which may affect the continuity of the service.

Disclosure of Invention

In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for IO link failover, so as to solve the above-mentioned technical problems.

In a first aspect, the present invention provides an IO link failover method, where the method includes:

confirming the failure of a second storage controller, and virtualizing a logical port corresponding to the failed physical port of the second storage controller on a physical port of the first storage controller, wherein the logical port has the same identifier as the corresponding failed physical port;

and starting a logical port, wherein the logical port is connected with the host port through a corresponding first memory physical port link.

Further, the confirming the second storage controller failure includes, but is not limited to, any one of the following methods:

the first storage controller and the second storage controller send heartbeat information mutually, and if the first storage controller cannot receive the heartbeat information of the second storage controller, the second storage controller is judged to be in fault;

the first storage controller detects a failure of a connection link with the second storage controller.

Further, before virtualizing the logical port corresponding to the failed physical port of the second storage controller, the method further comprises:

A one-to-one mapping relationship between physical ports of a first storage controller and physical ports of a second storage controller is set.

In a second aspect, the present invention provides an IO link failover system, including:

the port virtualization unit is configured to confirm that the second storage controller fails, and virtualize a logical port corresponding to a failed physical port of the second storage controller on a physical port of the first storage controller, where the logical port has the same identifier as the corresponding failed physical port;

and the port starting unit is configured to start a logical port, and the logical port is connected with the host port through a corresponding first memory physical port link.

Further, the confirming the second storage controller failure includes, but is not limited to, any one of the following methods:

the first storage controller and the second storage controller send heartbeat information mutually, and if the first storage controller cannot receive the heartbeat information of the second storage controller, the second storage controller is judged to be in fault;

the first storage controller detects a failure of a connection link with the second storage controller.

Further, the system further comprises:

and the mapping setting unit is configured to set a one-to-one mapping relation between the physical ports of the first storage controller and the physical ports of the second storage controller.

In a third aspect, a terminal is provided, including:

a processor, a memory, wherein,

the memory is used for storing a computer program which,

the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.

In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.

The beneficial effect of the invention is that,

according to the IO link fault switching method, system, terminal and storage medium provided by the invention, the IO failover time when a single node fails can be shortened by virtualizing the logic port corresponding to the failed port, the influence of the single node failure on the service is reduced, and the product competitiveness is improved.

In addition, the invention has reliable design principle, simple structure and very wide application prospect.

Drawings

In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.

FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.

FIG. 2 is a schematic block diagram of a method of one embodiment of the present invention.

FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.

Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.

Detailed Description

In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be an IO link failover system.

As shown in fig. 1, the method 100 includes:

step 110, confirming the failure of the second storage controller, and virtualizing a logical port corresponding to the failed physical port of the second storage controller on the physical port of the first storage controller, wherein the logical port has the same identifier as the corresponding failed physical port;

Step 120, a logical port is started, and the logical port establishes a connection with a host port through a corresponding first memory physical port link.

In order to facilitate understanding of the present invention, the IO link failover method provided in the present invention is further described below with reference to the principle of the IO link failover method of the present invention and in combination with the process of performing failover on an IO link in the embodiment.

Specifically, referring to fig. 2, the IO link failure switching method includes:

s1, confirming the second storage controller failure, and virtualizing a logical port corresponding to the second storage controller failure physical port on the first storage controller physical port, wherein the logical port has the same identifier as the corresponding failure physical port.

Firstly, a mapping relation between the physical ports of two storage controllers is established, wherein A1 corresponds to B1, and A2 corresponds to B2.

When the storage dual control normally operates, the host multi-path software issues IO through four paths including H1a1, H1B1, H2a2 and H2B2, when a failure occurs in the B-controller (storage controller B), a failure detection module on the a-controller (storage controller a) detects the failure through a heartbeat message or a LINK DOWN event between the AB-controllers, the NPIV port starting function is completed in 2S, a logical port B1 'is virtualized on a physical port a1, a logical port B2' is virtualized on a physical port a2, and two ports B1 and B2 on the B-controller are emulated (WWPNs of the two virtual ports are respectively the same as B1 and B2).

And S2, starting a logic port, wherein the logic port establishes connection with the host port through a corresponding first memory physical port link.

After the virtual logical port is established, immediately starting logical ports B1 'and B2', and after two NPIV ports are started, establishing logic with the ports H1 and H2 in 1S respectively; after the completion of the port drift, logins are still four pieces of H1a1, H1B1, H2a2 and H2B 2.

In the process, the host side senses that the B1 is pulled out from the S2 port of the A-way switch, and the H1B1 is disconnected (all unfinished IOs on the H1B1 are aborted at the moment); then B1 accesses the S1 port of the A-path switch, H1B1 is reestablished, and IO can be continuously issued. The whole process can be controlled within 2S.

As shown in fig. 3, the system 300 includes:

a port virtualization unit 210 configured to confirm a failure of a second storage controller, and virtualize a logical port corresponding to a failed physical port of the second storage controller on a physical port of the first storage controller, where the logical port has a same identifier as the corresponding failed physical port;

the port starting unit 220 is configured to start a logical port, where the logical port is connected to the host port through a corresponding first memory physical port link.

Optionally, as an embodiment of the present invention, the confirming the failure of the second storage controller includes, but is not limited to, any one of the following methods:

the first storage controller and the second storage controller send heartbeat information mutually, and if the first storage controller cannot receive the heartbeat information of the second storage controller, the second storage controller is judged to be in fault;

the first storage controller detects a failure of a connection link with the second storage controller.

Fig. 4 is a schematic structural diagram of a terminal system 400 according to an embodiment of the present invention, where the terminal system 400 may be used to execute an IO link failover method according to the embodiment of the present invention.

The terminal system 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.

The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.

The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.

A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.

The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).

Therefore, by virtualizing the logical port corresponding to the failed port, the IO failover time during single node failure storage can be shortened, the impact of the single node failure on the service is reduced, and the product competitiveness is improved.

Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.

The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.

In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于数据接收与存储的多通道、多协议硬件加速方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!