CN111352574A - Path switching method and device and computer readable storage medium - Google Patents

Path switching method and device and computer readable storage medium Download PDF

Info

Publication number
CN111352574A
CN111352574A CN201811573445.3A CN201811573445A CN111352574A CN 111352574 A CN111352574 A CN 111352574A CN 201811573445 A CN201811573445 A CN 201811573445A CN 111352574 A CN111352574 A CN 111352574A
Authority
CN
China
Prior art keywords
port
controller
virtual
storage system
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811573445.3A
Other languages
Chinese (zh)
Other versions
CN111352574B (en
Inventor
吴鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN201811573445.3A priority Critical patent/CN111352574B/en
Publication of CN111352574A publication Critical patent/CN111352574A/en
Application granted granted Critical
Publication of CN111352574B publication Critical patent/CN111352574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0604Improving or facilitating administration, e.g. storage management
    • 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
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
    • 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
    • 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]

Abstract

The application provides a method, a device and a computer readable storage medium for switching paths, wherein the method comprises the following steps: the first controller disconnects all physical links corresponding to the first ports and sends the controller identification of the first controller to the second controller; wherein the first port is a port on the first controller; the second controller determines a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creates a virtual first port on the second port; wherein the second port is a port on the second controller; and the second controller accesses the virtual first port into a storage area network where the multi-control storage system is located. The technical scheme of the application can switch the path more quickly, and reduces the influence on the service on the server side caused by path switching.

Description

Path switching method and device and computer readable storage medium
Technical Field
The present application relates to the field of storage, and in particular, to a method and an apparatus for path switching, and a computer-readable storage medium.
Background
In a SAN (Storage Area Network) Network, multiple controllers of a multi-controller Storage system can access the SAN Network through different ports, wherein a port on a controller can be referred to as a target port (targetport). A service (e.g., a service server) may also access the SAN network through a plurality of different ports, where a port on the service may be referred to as an initiator port.
The starting port on the service end and the target port on the controller can form various connection relations. Referring to fig. 1, which is a schematic diagram of an architecture of a SAN network shown in the present application, as shown in fig. 1, a server (service server) has two start ports, a controller 1 has two destination ports, and a controller 2 has two destination ports. In the network architecture of fig. 1, the connection relationship between the start port and the target port includes: P1-P9, P1-P11, P2-P12 and P2-P10.
Further, the starting port, the target port and a LUN (Logical Unit Number) on the multi-control storage system form multiple paths for the server to access the LUN.
If any controller is abnormal, the server cannot access the LUN through the path where the target port on the controller is located, and the server needs to reselect an available path.
However, in the prior art, the time for switching the path is too long, which may cause a significant impact on the stability and continuity of the service on the server.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, and a computer-readable storage medium for switching a path, so as to switch the path more quickly and reduce the influence on the service at the service end due to the path switching.
Specifically, the method is realized through the following technical scheme:
a first aspect of the present application provides a method for switching paths, which is applied to a multi-control storage system, where the multi-control storage system includes a first controller and a second controller, and includes:
the first controller disconnects all physical links corresponding to the first ports and sends the controller identification of the first controller to the second controller; wherein the first port is a port on the first controller;
the second controller determines a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creates a virtual first port on the second port; wherein the second port is a port on the second controller;
and the second controller accesses the virtual first port into a storage area network where the multi-control storage system is located.
In the method of path switching, the method further includes:
if the first controller is re-enabled, the second controller removes the virtual first port on the second port and sends the controller identification of the second controller to the first controller;
the first controller determines a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enables the first port corresponding to the second port;
the first controller accesses the first port to the storage area network.
A second aspect of the present application provides a method for switching paths, which is applied to a first controller of a multi-control storage system, where the multi-control storage system further includes a second controller, and the method includes:
disconnecting physical links corresponding to all the first ports;
sending the controller identification of the controller to the second controller, creating a virtual first port on a second port corresponding to each first port by the second controller, and accessing the virtual first port to a storage area network where the multi-control storage system is located; the first port is a port on the first controller, the second port is a port on the second controller, and the second port is determined by the second controller through a controller identifier of the first controller and a preset port binding relationship.
In the method of path switching, the method further includes:
if the physical link corresponding to the first port is re-enabled, receiving a controller identifier of the second controller sent by the second controller;
determining a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enabling the first port;
and accessing the first port into the storage area network.
A third aspect of the present application provides a method for switching paths, which is applied to a second storage device of a multi-control storage system, where the multi-control storage system further includes a first controller, and the method includes:
receiving a controller identifier sent by the first controller after the physical link corresponding to the first port is disconnected; wherein the first port is a port on the first controller;
determining a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creating a virtual first port on the second port; wherein the second port is a port on the second controller;
and accessing the virtual first port into a storage area network where the multi-control storage system is located.
The fourth aspect of the present application provides a path switching apparatus, which is applied to a first controller of a multi-control storage system, where the multi-control storage system further includes a second controller, including:
the processing unit is used for disconnecting the physical links corresponding to all the first ports;
a sending unit, configured to send a controller identifier of the sending unit to the second controller, where the second controller creates a virtual first port on a second port corresponding to each first port, and accesses the virtual first port to a storage area network where the multi-control storage system is located; the first port is a port on the first controller, the second port is a port on the second controller, and the second port is determined by the second controller through a controller identifier of the first controller and a preset port binding relationship.
In the apparatus for switching paths, the processing unit is further configured to:
if the physical link corresponding to the first port is re-enabled, receiving a controller identifier of the second controller sent by the second controller;
determining a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enabling the first port;
and accessing the first port into the storage area network.
The fifth aspect of the present application provides a path switching apparatus, which is applied to a second storage device of a multi-control storage system, where the multi-control storage system further includes a first controller, including:
a receiving unit, configured to receive a controller identifier sent by the first controller after a physical link corresponding to the first port is disconnected; wherein the first port is a port on the first controller;
a creating unit, configured to determine a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and create a virtual first port on the second port; wherein the second port is a port on the second controller;
and the access unit is used for accessing the virtual first port into a storage area network where the multi-control storage system is located.
A computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of path switching as provided in the second aspect of the present application.
A computer-readable storage medium having stored therein a computer program which, when executed by a processor, provides the method of path switching according to the third aspect of the present application.
In the technical scheme of the application, when the first controller determines that the first controller crashes, a service module fails, a system is upgraded or is overhauled, the first controller can firstly disconnect all physical links corresponding to the local first port, and then send the controller identifier of the first controller to the second controller; the second controller can determine a second port corresponding to each first port based on the controller identifier and a preset port binding relationship, and create a virtual first port on the second port; wherein the second port is a port on the second controller; further, the virtual first port is accessed to a storage area network where the multi-control storage system is located;
after the first controller disconnects the physical link corresponding to the local first port, the second controller can quickly create the virtual first port on the second port corresponding to the first port and access the virtual first port to the storage area network, so that for the server, the path corresponding to the first port is only flashed, the server does not need to switch the path, and the LUN can be accessed by using the path as usual, thereby greatly reducing the delay caused by path switching and avoiding the influence on the service.
Drawings
FIG. 1 is a schematic diagram of the architecture of a SAN network shown in the present application;
FIG. 2 is a flow chart of a method of path switching shown herein;
FIG. 3 is a schematic diagram of an alternative SAN network architecture shown in the present application;
FIG. 4 is an architectural diagram of yet another SAN network shown in the present application;
FIG. 5 is a block diagram of an embodiment of a path switching apparatus shown in the present application;
fig. 6 is a hardware configuration diagram of a path switching apparatus shown in the present application;
FIG. 7 is a block diagram of an embodiment of another path switching apparatus shown in the present application;
fig. 8 is a hardware configuration diagram of another path switching apparatus according to the present application.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the following description of the prior art and the technical solutions in the embodiments of the present invention with reference to the accompanying drawings is provided.
The connection relationship between the starting port on the server and the target port on the controller can form a plurality of paths for the server to access the LUN.
Referring to FIG. 1, for LUN1, a service server can access LUN1 through 4 paths, P1-P3-P5-P9, P1-P3-P6-P11, P2-P4-P7-P10, P2-P4-P8-P12.
In general, for a given LUN, the paths derived from one controller of the multi-control storage system are optimized paths, and the paths derived from the other controllers are non-optimized paths. To maximize the efficiency of the SAN network, the server generally accesses the designated LUN through an optimized path.
When the controller crashes (for example, the kernel of the controller crashes) or the service module fails, the optimized path is not available, and in this case, the server accesses the designated LUN according to the non-optimized path. The service module may include an FC Target module, an LUN module, a RAID (Redundant array of Independent Disks) module, a disk module, and a cache module.
Such as: if, in FIG. 1, for LUN1, the outgoing P1-P3-P5-P9 and P2-P4-P7-P10 on controller 1 are optimized paths, the service server will usually access LUN1 according to the optimized paths. When the controller 1 crashes or any service module of the controller 1 fails, the optimized path is unavailable, and the service server can access the LUN1 according to the non-optimized path led out from the controller 2.
The server may send heartbeat messages to each target port of the controller, thereby detecting whether each path is available.
In the related art, when a controller fails, the controller may actively connect all the physical link ports corresponding to the local target ports. The server is enabled to timely sense that the path is unavailable, and therefore the multi-control storage system is accessed by switching to the available path through an MPIO (Multi Path I/O) module.
However, in the above-mentioned related art, the time for the server to switch the path still takes several seconds, depending on the performance of the operating system of the server and the HBA (Host Bus Adapter) that provides the start port at the bottom. In practical applications, the server may cause traffic jam during the process of switching paths, and even affect the normal processing of the traffic.
In order to solve the above problems, the present application provides a method for path switching, which completes path switching more quickly and avoids affecting services on a server.
Referring to fig. 2, a flowchart of a method for switching paths is shown, as shown in fig. 1, the method includes the following steps:
step 201: the first controller disconnects all physical links corresponding to the first ports and sends the controller identification of the first controller to the second controller; wherein the first port is a port on the first controller.
The method is applied to a multi-control storage system, and the multi-control storage system comprises a first controller and a second controller; the first controller and the second controller are generally referred to as any controller on the multi-control storage system, and are only named for convenience of description, and do not limit the application. It should be noted that a multi-control storage system may include two or more controllers.
The system kernel (standard kernel) of each controller of the multi-control storage system is preset with a corresponding capture kernel (capture kernel), and the capture kernel can be started after the system kernel crashes based on a kdump mechanism. The capture kernel is a second kernel which runs after the system kernel is crashed, and the capture kernel can be started quickly by bypassing a BIOS (Basic Input output System) setting stage in the process of starting the kernel. The specific configuration process may refer to the prior art, and is not described herein in detail.
For convenience of describing the technical solution of the present application, the target ports on the first controller are all referred to as first ports, and the target ports on the second controller are all referred to as second ports. A binding relationship is pre-established between a first port on the first controller and a second port on the second controller. Taking fig. 1 as an example, the target port P9 of the controller 1 may be bound to the target port P11 of the controller 2, and the target port P10 of the controller 1 may be bound to the target port P12 of the controller 2.
It should be noted that, when there are at least three controllers in the multi-control storage system, at least two target ports on one controller may respectively establish a binding relationship with target ports on different controllers. Such as: the multi-control storage system comprises a controller 1, a controller 2 and a controller 3, wherein a target port P9 of the controller 1 is in a binding relationship with a target port P11 of the controller 2, a target port P10 of the controller 1 is in a binding relationship with a target port P13 of the controller 3, and a target port P12 of the controller 2 is in a binding relationship with a target port P14 of the controller 3.
As an embodiment, a Port binding relationship is preconfigured on each controller, and the Port binding relationship can be recorded in a binding relationship table, where the binding relationship table includes a mapping relationship between a Port number (world wide Port Name, WWPN) of a local target Port and Port numbers of target ports of other controllers; in addition, for the convenience of lookup, the mapping relationship between the controller identifier of the other controller and the port number of the destination port may also be recorded in the binding relationship table.
When the first controller needs to suspend processing an IO (Input Output) request, the physical links corresponding to all the local first ports may be disconnected first.
The first controller suspends the processing of the IO request when the first controller crashes (for example, the kernel of the controller crashes), a local service module fails, and a system is upgraded or is subjected to maintenance.
And if the crash happens, triggering the capture kernel of the first controller to start after the system kernel of the first controller crashes. The first controller loads the HBA driver through a local capture kernel, and then closes the FC Port signaling function of the HBA of the first controller by using the HBA driver, so that physical links corresponding to all target ports of the first controller are disconnected.
If the IO request needs to be suspended from being processed in other situations, the first controller loads the HBA driver through the local system kernel, and then closes the FC Port signal sending function of the HBA of the first controller by using the HBA driver, so that physical links corresponding to all target ports of the first controller are disconnected. It should be noted that, if the IO request is suspended during system upgrade or during a receiving of a maintenance sequence, the first controller may first receive a takeover request sent by the second controller, and then execute an operation of disconnecting the physical link corresponding to the first port in response to the takeover request.
Referring to fig. 3, for another configuration diagram of the SAN network shown in the present application, as shown in fig. 3, if the controller 1 can load the HBA driver to turn off the FC Port signaling function of the HBA of the controller 1. FC switch 1 may immediately determine that physical links P5-P9 are disconnected, FC switch 2 may immediately determine that physical links P7-P10 are disconnected, and further, FC switch 1 and FC switch 2 may send RSCN (Registered State Change Notification) Notification to the server.
After receiving the RSCN notification, the server knows that the physical links where the connection relationships P1-P9 and P2-P10 between the start port and the target port led out from the controller 1 are broken, and the path for accessing the LUN through the connection relationships is unavailable. The HBA of the server may delete the connection relationship between the start port and the target port, and report to the MPIO module. The MPIO module further selects a path led out from the controller 2 to access the multi-control storage system.
Further, the first controller needs to send its own controller identifier to the second controller.
Step 202: and the second controller determines a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creates a virtual first port on the second port.
Step 203: and the second controller accesses the virtual first port into a storage area network where the multi-control storage system is located.
After receiving the controller identifier sent by the first controller, the second controller may determine that the first port on the first controller is offline from the storage area network, and therefore, the second controller may determine, based on the controller identifier of the first controller and a preset port binding relationship, a second port corresponding to each first port.
As an embodiment, after determining that the first port is offline, the second controller may first determine, based on the controller identifier of the first controller, a port number of the first port on the first controller from a local binding relationship table, and then determine a port number of the second port corresponding to each first port.
The second controller may create virtual first ports on the local second ports, respectively. It should be noted that, for any second port, the port number of the virtual first port created on the second port is the same as the port number of the first port corresponding to the second port.
Further, the second controller may access the created virtual first port to the storage area network. Referring to fig. 4, which is a schematic diagram of a SAN network according to the present application, as shown in fig. 4, the controller 2 creates a virtual port P9 'on the destination port P11, creates a virtual port P10' on the destination port P12, and then logs the virtual port P9 'to the FC switch 1 and logs the virtual port P10' to the FC switch 2. FC switch 1 and FC switch 2 may notify the traffic server of the new port access and inform of the port number of the new port. The HBA of the service server is caused to reestablish the connection relationship between the local start port and the new port, i.e. the connection relationships P1-P9 'and P2-P10' are established between the start port and the target port. In addition, the HBA of the service server may report the connection relationship to the MPIO.
The port number of the destination port in the connection relationship reestablished by the service server is the same as the port number of the destination port in the connection relationship deleted by the HBA before. After knowing that any connection relation is invalid, the MPIO module deletes the path where the connection relation is located after a preset timeout period, and the time from the first port failure to the virtual first port accessing the storage area network is very short, so that the MPIO module of the server does not sense the change of the path. From the perspective of the traffic server, the path just described above is only flashed, and therefore, fast switching of the path is effectively achieved.
In this embodiment, if the first controller is re-enabled, the second controller may first remove the virtual first port on the second port and then send its own controller identifier to the first port. Since the second controller has an FC protocol connection with the FC switch through the virtual first port at the software level, after the virtual first port is removed at the software level, the FC protocol connection is naturally broken, and the FC switch can sense that the virtual first port has been removed. The FC switch may further send an RSCN notification to the server, so that the HBA of the server modifies the connection relationship between the local start port and the target port. Details are not repeated.
After receiving the controller identifier of the second controller, the first controller may determine that the virtual first port is offline from the storage area network, and therefore, the first controller may determine, based on the controller identifier and a local port binding relationship, a first port corresponding to the second port, enable the local first port, and further access the first port to the storage area network. For a specific access manner, reference may be made to the related description above, and details are not repeated herein.
Similarly, for the server, the path corresponding to the port number is only flashed, and the MPIO module of the server does not sense the change of the path. Thus, fast switching of paths is effectively achieved.
In summary, in the technical solution of the present application, when the first controller determines that the first controller has crashed, a service module failure, a system upgrade, or receives maintenance, the first controller may first disconnect all physical links corresponding to the local first port, and then send the controller identifier of the first controller to the second controller; the second controller can determine a second port corresponding to each first port based on the controller identifier and a preset port binding relationship, and create a virtual first port on the second port; wherein the second port is a port on the second controller; further, the virtual first port is accessed to a storage area network;
after the first controller disconnects the physical link corresponding to the local first port, the second controller can quickly create the virtual first port on the second port corresponding to the first port and access the virtual first port to the storage area network, so that for the server, the path corresponding to the first port is only flashed, the server does not need to switch the path, and the LUN can be accessed by using the path as usual, thereby greatly reducing the delay caused by path switching and avoiding the influence on the service.
Corresponding to the embodiment of the method for switching the path, the application also provides an embodiment of a device for switching the path.
Referring to fig. 5, a block diagram of an embodiment of a path switching apparatus shown in the present application is shown:
as shown in fig. 5, the path switching apparatus 50 includes:
a processing unit 510, configured to disconnect physical links corresponding to all first ports;
a sending unit 520, configured to send a controller identifier of the second controller to the second controller, where the second controller creates a virtual first port on a second port corresponding to each first port, and accesses the virtual first port to a storage area network where the multi-control storage system is located; the first port is a port on the first controller, the second port is a port on the second controller, and the second port is determined by the second controller through a controller identifier of the first controller and a preset port binding relationship.
In this example, the processing unit 510 is further configured to:
if the physical link corresponding to the first port is re-enabled, receiving a controller identifier of the second controller sent by the second controller;
determining a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enabling the first port;
and accessing the first port into the storage area network.
The embodiment of the path switching device can be applied to the first controller. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the first controller where the software implementation is located as a logical device. From a hardware aspect, as shown in fig. 6, a hardware structure diagram of a first controller where a device for switching a path according to the present application is located is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 6, the first controller where the device is located in the embodiment may also include other hardware according to an actual function of the device for switching the path, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and 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 modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the steps of the method applied to the path switching of the first controller in the technical solution of the present application.
In particular, computer-readable storage media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (such as EPROM, EEPROM, and flash memory devices), magnetic disks (such as an internal hard disk or removable disk), magneto-optical disks, and CD ROM and DVD-ROM disks, or similar storage media, or a combination of both.
Referring to fig. 7, a block diagram of another embodiment of a path switching apparatus shown in the present application is shown:
as shown in fig. 7, the path switching apparatus 70 includes:
a receiving unit 710, configured to receive a controller identifier sent by the first controller after the physical link corresponding to the first port is disconnected; wherein the first port is a port on the first controller;
a creating unit 720, configured to determine, based on the controller identifier of the first controller and a preset port binding relationship, a second port corresponding to each first port, and create a virtual first port on the second port; wherein the second port is a port on the second controller;
an accessing unit 730, configured to access the virtual first port to a storage area network where the multi-control storage system is located.
The embodiment of the path switching device can be applied to the second controller. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a device in a logical sense, the processor of the second controller reads corresponding computer program instructions in the nonvolatile memory to the memory for operation. In terms of hardware, as shown in fig. 8, a hardware structure diagram of a second controller where the apparatus for switching a path is located in the present application is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 8, the second controller where the apparatus is located in the embodiment may also include other hardware according to an actual function of the apparatus for switching a path, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and 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 modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the steps of the method applied to the path switching of the second controller in the technical solution of the present application.
In particular, computer-readable storage media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (such as EPROM, EEPROM, and flash memory devices), magnetic disks (such as an internal hard disk or removable disk), magneto-optical disks, and CD ROM and DVD-ROM disks, or similar storage media, or a combination of both.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A method for switching paths is applied to a multi-control storage system, the multi-control storage system comprises a first controller and a second controller, and the method is characterized by comprising the following steps:
the first controller disconnects all physical links corresponding to the first ports and sends the controller identification of the first controller to the second controller; wherein the first port is a port on the first controller;
the second controller determines a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creates a virtual first port on the second port; wherein the second port is a port on the second controller;
and the second controller accesses the virtual first port into a storage area network where the multi-control storage system is located.
2. The method of claim 1, further comprising:
if the first controller is re-enabled, the second controller removes the virtual first port on the second port and sends the controller identification of the second controller to the first controller;
the first controller determines a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enables the first port corresponding to the second port;
the first controller accesses the first port to the storage area network.
3. A method for switching paths is applied to a first controller of a multi-control storage system, the multi-control storage system further comprises a second controller, and the method is characterized by comprising the following steps:
disconnecting physical links corresponding to all the first ports;
sending the controller identification of the controller to the second controller, creating a virtual first port on a second port corresponding to each first port by the second controller, and accessing the virtual first port to a storage area network where the multi-control storage system is located; the first port is a port on the first controller, the second port is a port on the second controller, and the second port is determined by the second controller through a controller identifier of the first controller and a preset port binding relationship.
4. The method of claim 3, further comprising:
if the physical link corresponding to the first port is re-enabled, receiving a controller identifier of the second controller sent by the second controller;
determining a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enabling the first port;
and accessing the first port into the storage area network.
5. A method for switching paths is applied to a second storage device of a multi-control storage system, the multi-control storage system further comprises a first controller, and the method is characterized by comprising the following steps:
receiving a controller identifier sent by the first controller after the physical link corresponding to the first port is disconnected; wherein the first port is a port on the first controller;
determining a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and creating a virtual first port on the second port; wherein the second port is a port on the second controller; and accessing the virtual first port into a storage area network where the multi-control storage system is located.
6. A path switching device is applied to a first controller of a multi-control storage system, the multi-control storage system further comprises a second controller, and the path switching device is characterized by comprising:
the processing unit is used for disconnecting the physical links corresponding to all the first ports;
a sending unit, configured to send a controller identifier of the sending unit to the second controller, where the second controller creates a virtual first port on a second port corresponding to each first port, and accesses the virtual first port to a storage area network where the multi-control storage system is located; the first port is a port on the first controller, the second port is a port on the second controller, and the second port is determined by the second controller through a controller identifier of the first controller and a preset port binding relationship.
7. The apparatus of claim 6, wherein the processing unit is further configured to:
if the physical link corresponding to the first port is re-enabled, receiving a controller identifier of the second controller sent by the second controller;
determining a first port corresponding to the second port based on the controller identifier of the second controller and the port binding relationship, and enabling the first port;
and accessing the first port into the storage area network.
8. A path switching device is applied to a second storage device of a multi-control storage system, wherein the multi-control storage system further comprises a first controller, and the path switching device comprises:
a receiving unit, configured to receive a controller identifier sent by the first controller after a physical link corresponding to the first port is disconnected; wherein the first port is a port on the first controller;
a creating unit, configured to determine a second port corresponding to each first port based on the controller identifier of the first controller and a preset port binding relationship, and create a virtual first port on the second port; wherein the second port is a port on the second controller;
and the access unit is used for accessing the virtual first port into a storage area network where the multi-control storage system is located.
9. A computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of path switching of any of claims 3-4.
10. A computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of path switching of claim 5.
CN201811573445.3A 2018-12-21 2018-12-21 Path switching method, device and computer readable storage medium Active CN111352574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811573445.3A CN111352574B (en) 2018-12-21 2018-12-21 Path switching method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811573445.3A CN111352574B (en) 2018-12-21 2018-12-21 Path switching method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111352574A true CN111352574A (en) 2020-06-30
CN111352574B CN111352574B (en) 2023-04-25

Family

ID=71197908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811573445.3A Active CN111352574B (en) 2018-12-21 2018-12-21 Path switching method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111352574B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858414A (en) * 2020-07-08 2020-10-30 苏州浪潮智能科技有限公司 IO link fault switching method, system, terminal and storage medium
CN114327250A (en) * 2020-09-29 2022-04-12 株式会社日立制作所 Storage system and control method of storage system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014199447A1 (en) * 2013-06-11 2014-12-18 株式会社日立製作所 Computer and failover method
WO2017193966A1 (en) * 2016-05-13 2017-11-16 华为技术有限公司 Link switching method for service in storage system, and storage device
US20180302243A1 (en) * 2016-12-19 2018-10-18 Huawei Technologies Co., Ltd. Data Packet Processing Method, Host, and System
CN108768692A (en) * 2018-04-18 2018-11-06 华为技术有限公司 A kind of network creation method, relevant device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014199447A1 (en) * 2013-06-11 2014-12-18 株式会社日立製作所 Computer and failover method
WO2017193966A1 (en) * 2016-05-13 2017-11-16 华为技术有限公司 Link switching method for service in storage system, and storage device
US20180302243A1 (en) * 2016-12-19 2018-10-18 Huawei Technologies Co., Ltd. Data Packet Processing Method, Host, and System
CN108768692A (en) * 2018-04-18 2018-11-06 华为技术有限公司 A kind of network creation method, relevant device and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858414A (en) * 2020-07-08 2020-10-30 苏州浪潮智能科技有限公司 IO link fault switching method, system, terminal and storage medium
CN114327250A (en) * 2020-09-29 2022-04-12 株式会社日立制作所 Storage system and control method of storage system
US11836386B2 (en) 2020-09-29 2023-12-05 Hitachi, Ltd. Storage system and method of controlling storage system that set ports associated with a logical unit
CN114327250B (en) * 2020-09-29 2024-02-09 株式会社日立制作所 Storage system and control method of storage system

Also Published As

Publication number Publication date
CN111352574B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN108696569B (en) System and method for providing data replication in NVMe-oF Ethernet SSD
EP1845450A2 (en) Storage Controller
US9933946B2 (en) Fibre channel storage array methods for port management
US9823955B2 (en) Storage system which is capable of processing file access requests and block access requests, and which can manage failures in A and storage system failure management method having a cluster configuration
US7793145B2 (en) Method and apparatus for verifying fault tolerant configuration
US7568119B2 (en) Storage control device and storage control device path switching method
CN110213065B (en) Method and device for switching paths
CN110413213B (en) Seamless migration of storage volumes between storage arrays
US20140317437A1 (en) Automatic cluster-based failover handling
JP2006127201A (en) Storage system and conduction confirmation method
US20140047441A1 (en) Information processing apparatus, virtual machine control method, and program
EP4210280A1 (en) Failed link handover method and system, and related device
US8443119B1 (en) System and method for disabling auto-trespass in response to an automatic failover
JP2017010390A (en) Storage control device, storage control program, and storage control method
US20220179812A1 (en) Method for Improving Reliability of Storage System, and Related Apparatus
CN113342261A (en) Server and control method applied to same
CN111352574A (en) Path switching method and device and computer readable storage medium
CN105159846B (en) Method and storage system for supporting double-control switching of virtualized disk
US11860719B2 (en) Method for implementing storage service continuity in storage system, front-end interface card, and storage system
JP5511546B2 (en) Fault tolerant computer system, switch device connected to multiple physical servers and storage device, and server synchronization control method
EP3974989A1 (en) Link state setting method and device for virtual network interface card, and storage medium
CN112463670A (en) Storage controller access method and related device
JP7409700B2 (en) Storage systems, servers, path switching methods, and programs
US20210133132A1 (en) Accessing secondary storage
CN114205331A (en) Method and device for IP address drifting

Legal Events

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