CN111371886A - Method and system for realizing high availability of iSCSI (Internet small computer system interface) - Google Patents

Method and system for realizing high availability of iSCSI (Internet small computer system interface) Download PDF

Info

Publication number
CN111371886A
CN111371886A CN202010132958.1A CN202010132958A CN111371886A CN 111371886 A CN111371886 A CN 111371886A CN 202010132958 A CN202010132958 A CN 202010132958A CN 111371886 A CN111371886 A CN 111371886A
Authority
CN
China
Prior art keywords
iscsi
service
node
etcd
proxy
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
CN202010132958.1A
Other languages
Chinese (zh)
Other versions
CN111371886B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010132958.1A priority Critical patent/CN111371886B/en
Publication of CN111371886A publication Critical patent/CN111371886A/en
Application granted granted Critical
Publication of CN111371886B publication Critical patent/CN111371886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1034Reaction to server failures by a load balancer
    • 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/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention provides a method and a system for realizing high availability of iSCSI.A method comprises the following steps of initializing iSCSI agent service and an etcd cluster, so that the iSCSI agent service polls to detect whether the iSCSI service of a node of the iSCSI agent service is operated; after the iSCSI service is started at the distributed storage nodes, a network is deployed for the iSCSI service through a floating IP; and monitoring the health state of the operation node of the iSCSI service end, triggering iSCSI service switching when the operation node is unhealthy or based on the self state of the iSCSI service, and autonomously reporting a fault to trigger the iSCSI service switching to realize high availability of the iSCSI service when the operation node detects that the iSCSI service is unhealthy.

Description

Method and system for realizing high availability of iSCSI (Internet small computer system interface)
Technical Field
The invention relates to the technical field of service process management, in particular to a method and a system for realizing high availability of iSCSI.
Background
Etcd is an open-source, highly available distributed key-value database. The adoption of the raft protocol as the consistency algorithm can provide strong consistency while considering high available database storage. Etcd is often used in service discovery systems, mainly because it provides a simple and convenient API interface for Http, and configures TTL for registered services, and updates the timestamp of the service periodically to ensure monitoring of the service status.
iSCSI is a storage technology based on the internet and SCSI-3 protocol for transporting native SCSI protocol over TCP/IP networks, also commonly referred to as IP-SAN. (iSCSI, Internet Small Computer System interface, Small Computer System interface).
Since the iSCSI service is a service process, the iSCSI service is externally provided, and can be managed by Etcd as a service. In addition, the problem often encountered in the distributed environment is how to decide which storage node provides the iSCSI service and migrate to which node to continue providing the iSCSI service after the iSCSI service node fails, and the like, and such a problem can be realized by taking the Etcd as a core management module to realize high availability of the iSCSI service.
Disclosure of Invention
Aiming at the problem that the iSCSI service often meets the problem of how to decide which storage node provides the iSCSI service in a distributed environment and migrate to which node to continue providing the iSCSI service after the iSCSI service node fails, the invention provides a method and a system for realizing high availability of the iSCSI.
The technical scheme of the invention is as follows:
in one aspect, the present invention provides a method for implementing high availability of iSCSI, comprising the following steps:
initializing the iSCSI agent service and the etcd cluster, and enabling the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated;
after the iSCSI service is started at the distributed storage nodes, a network is deployed for the iSCSI service through a floating IP;
monitoring the health state of the iSCSI service end running node, and triggering iSCSI service switching to realize high availability of iSCSI service when the iSCSI service end running node is unhealthy; or the like, or, alternatively,
based on the self state of the iSCSI service, when the self iSCSI service is detected to be unhealthy, the fault is reported autonomously to trigger the switching of the iSCSI service so as to realize the high availability of the iSCSI service.
When the storage end service fails, the iSCSI connection is triggered to be disconnected, at the moment, the iSCSI client can inquire the iSCSI server about the real network of the iSCSI client, at the moment, the real network is returned to the iSCSI client to establish connection again, and the high availability of the iSCSI service without interruption is guaranteed.
Further, the step of initializing the iSCSI proxy service and the etcd cluster includes:
deploying the etcd cluster according to the basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name;
starting iSCSI proxy service at each node, wherein the service is connected to the etcd cluster and generates a unique identifier and records the unique identifier of the node;
the iSCSI agent service polling detects whether the iSCSI service of the node itself is operated, and if the iSCSI service is operated, the TTL is updated to the etcd at regular time.
Further, the step of deploying the etcd cluster with the basic parameter of each node further includes:
after the etcd cluster is deployed, creating a directory with a proxy name as a key in a distributed database of the etcd.
Further, the step of starting an iSCSI proxy service at each node, where the service is connected to the etcd cluster and generates a unique identifier, and records the unique identifier of the node specifically includes:
and starting iSCSI proxy service at each node, connecting the service with an etcd cluster through a restful API provided by the etcd to generate a unique identifier, and creating a sub-key under a proxy directory according to the generated unique identifier and simultaneously recording the unique identifier of the node.
Further, after the iSCSI service is started at the distributed storage node, the step of deploying a network for the iSCSI service through a floating IP specifically includes:
each node inquires all the sub-keys in the proxy directory through the iSCSI proxy service;
calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; and if the value of the self node is minimum, configuring the floating IP to the actual network.
Further, calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; if the value of the self node is minimum, the step of configuring the floating IP to the actual network further comprises the following steps:
and creating a key directory named vip in a key value database in the etcd cluster for recording the floating IP externally provided by the current iSCSI service.
On the other hand, the technical scheme of the invention provides an iSCSI high-availability implementation system, which comprises an initialization module, a network deployment module and a high-availability implementation module;
the initialization module is used for initializing the iSCSI agent service and the etcd cluster so as to enable the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated;
the network deployment module is used for deploying a network for the iSCSI service through a floating IP after the iSCSI service is started at the distributed storage nodes;
the high availability realization module is used for monitoring the health state of the operation node of the iSCSI server and triggering the iSCSI service switching to realize the high availability of the iSCSI service when the operation node is unhealthy;
and the high availability realization module is used for autonomously reporting faults to trigger iSCSI service switching to realize high availability of the iSCSI service when detecting that the iSCSI service is unhealthy based on the self state of the iSCSI service.
Further, the initialization module comprises an etcd cluster deployment unit, a directory creation unit, a service start processing unit and an update unit;
the etcd cluster deployment unit is used for deploying the etcd cluster according to the basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name;
the directory creating unit is used for creating a directory taking a proxy name as a key in the distributed database of the etcd after the etcd cluster is deployed;
the service starting processing unit is used for starting the iSCSI proxy service at each node, and the service is connected to the etcd cluster, generates a unique identifier and records the unique identifier of the node;
and the updating unit is used for updating the timestamp to the etcd at a timing when the iSCSI proxy service polling detects that the iSCSI service of the node per se is operated.
Further, the service initiation processing unit is specifically configured to initiate an iSCSI proxy service at each node, where the service connects with the etcd cluster through a restful API provided by the etcd to generate a unique identifier, and creates a child key under a proxy directory according to the generated unique identifier and records the unique identifier of the node.
Further, the network deployment module comprises a deployment unit and a recording unit;
the deployment unit is used for inquiring all the sub-keys in the proxy directory by each node through the iSCSI proxy service, calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; if the value of the node is minimum, the floating IP is configured on the actual network;
and the recording unit is used for creating a key directory named vip in a key value database in the etcd cluster to record the floating IP externally provided by the current iSCSI service.
The vip is a Virtual IP (Internet protocol), namely a floating IP, the IP is an IP address externally provided by the iSCSI service, and the Client end is connected with the iSCSI service end through the vip; each distributed storage node provides an iSCSI service and an iSCSI Proxy (iSCSI Proxy). The iSCSI service is provided by distributed storage and can be connected with the distributed storage, the iSCSI Proxy is an etcd agent, whether the iSCSI service is alive or not is detected regularly, and TTL is updated regularly with etcd cluster communication. The etcd cluster is deployed by a node that partially provides distributed storage and iSCSI services.
According to the technical scheme, the invention has the following advantages: the iSCSI messages are transmitted to different iSCSI server ends in a balanced mode, and meanwhile iSCSI response messages are not required to be transmitted to the scheduler but are directly transmitted to the client end, so that the pressure of the scheduler is relieved, and a better load balancing effect is achieved. By utilizing the minimum connection number algorithm in the LVS, the system performance of a real server can be achieved, and meanwhile, better balanced load is considered.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
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 chart diagram illustrating a method for implementing high iSCSI availability provided by an embodiment of the present invention.
Fig. 2 is a diagram of a distributed system architecture.
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.
Example one
As shown in fig. 1, the technical solution of the present invention provides a method for implementing high iSCSI availability, which includes the following steps:
s1: initializing the iSCSI agent service and the etcd cluster, and enabling the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated;
s2: after the iSCSI service is started at the distributed storage nodes, a network is deployed for the iSCSI service through a floating IP;
s3: and monitoring the health state of the operation node of the iSCSI service end, triggering iSCSI service switching when the operation node is unhealthy or based on the self state of the iSCSI service, and autonomously reporting a fault to trigger the iSCSI service switching to realize high availability of the iSCSI service when the operation node detects that the iSCSI service is unhealthy. When the storage end service fails, the iSCSI connection is triggered to be disconnected, at the moment, the iSCSI client can inquire the iSCSI server about the real network of the iSCSI client, at the moment, the real network is returned to the iSCSI client to establish connection again, and the high availability of the iSCSI service without interruption is guaranteed.
Example two
The technical scheme of the invention provides a method for realizing high availability of iSCSI, which comprises the following steps:
s1: initializing the iSCSI agent service and the etcd cluster, and enabling the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated; it should be noted that the present step specifically includes:
as shown in fig. 2, first, an etcd cluster is deployed with basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name; after the etcd cluster is deployed, a key directory named proxy is created in a distributed database of the etcd;
secondly, starting iSCSI Proxy service at each node, connecting the service with an etcd cluster through a restful API provided by the etcd to generate a unique identifier, and creating a sub-key under a Proxy directory according to the generated unique identifier and simultaneously recording the unique identifier of the node;
and finally, the iSCSI Proxy service polling detects whether the iSCSI service of the node per se is operated, and if the iSCSI service is operated, the TTL is updated to the etcd at regular time.
S2: after the iSCSI service is started at the distributed storage nodes, a network is deployed for the iSCSI service through a floating IP; it should be noted that after the iSCSI service is started at the distributed storage nodes, the iSCSI service is started at each node to be in an active state, and an actual network is configured for the iSCSI service at the same time, which is specifically implemented as follows:
each node can inquire all sub-keys under a Proxy directory through iSCSI Proxy service, calculate the numerical value of each node through Hash, and detect whether the value of the node is minimum or not through comparison; if the value of the self node is minimum, the floating IP is configured on the actual network, and a key directory named vip is created in a key value database in the etcd cluster and used for recording the floating IP externally provided by the current iSCSI service.
S3: and monitoring the health state of the operation node of the iSCSI service end, triggering iSCSI service switching when the operation node is unhealthy or based on the self state of the iSCSI service, and autonomously reporting a fault to trigger the iSCSI service switching to realize high availability of the iSCSI service when the operation node detects that the iSCSI service is unhealthy.
There are two types of failures that are often encountered in distributed storage: the iSCSI service fails to issue IO or the storage node fails or is shut down. Different high-availability implementation schemes are respectively designed according to the two fault scenes of the iSCSI service in the distributed storage, so that high availability in various fault scenes is achieved, and the method specifically comprises the following steps:
(1) when iSCSI service fails to issue IO itself
Generally, when the iSCSI service fails, the iSCSI Proxy detects whether the iSCSI service is alive or not at regular time. When the iSCSI service cannot read and write business service due to some software reasons or distributed storage, the iSCSI Proxy can detect whether the iSCSI Proxy is alive or not, if the iSCSI Proxy is not alive, the iSCSI Proxy stops updating the Proxy, meanwhile, the value of the Key corresponding to the iSCSI Proxy is updated to the etcd cluster to be 'fault', and meanwhile, the floating IP is deleted on the actual network of the node. Detecting the change of key values by iSCSI Proxy of all nodes, detecting whether the key values are 'fault', if so, detecting whether the key values corresponding to the key Proxy are the minimum values in all the survival nodes, if so, reading the floating IP from a 'vip' directory in the etcd cluster and configuring the floating IP for the actual network of the node where the iSCSI is located;
(2) when storage node fails or shuts down
When the storage node where the iSCSI service works fails or is shut down, the iSCSI Proxy and the iSCSI service cannot work normally at the moment. The maximum latency provided by the iSCSI service is timed (which may be configured according to its own traffic needs, typically between 10-120s, too small being too sensitive to traffic failure and too large being too long a traffic restoration latency). Because the etcd supports that when the iSCSI Proxy itself cannot update TTL (TIME TO LIVE, generally, a message is sent at a certain TIME interval, and an opposite end receives the message and replies with a message ACK TO indicate that the opposite end receives the message TO verify whether the opposite end is alive, which may be referred TO as a "timestamp", the iSCSI Proxy itself may notify other nodes. And when other nodes sense that the working node can not work normally, detecting whether the unique identifier corresponding to the node is the minimum value or not. If the minimum value is reached, a floating IP is configured for the actual network of the node where the iSCSI is positioned.
When iSCSI memory is not working, the actual network where it works can be replaced to achieve high availability. When the storage end service fails, the iSCSI connection is triggered to be disconnected, at the moment, the iSCSI client can inquire the iSCSI server about the real network of the iSCSI client, at the moment, the real network is returned to the iSCSI client to establish connection again, and the high availability of the iSCSI service without interruption is guaranteed.
EXAMPLE III
The technical scheme of the invention provides a high-availability implementation system of iSCSI, which comprises an initialization module, a network deployment module and a high-availability implementation module;
the initialization module is used for initializing the iSCSI agent service and the etcd cluster so as to enable the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated; the initialization module comprises an etcd cluster deployment unit, a directory creation unit, a service starting processing unit and an updating unit; the etcd cluster deployment unit is used for deploying the etcd cluster according to the basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name; the directory creating unit is used for creating a directory taking a proxy name as a key in the distributed database of the etcd after the etcd cluster is deployed; the service starting processing unit is specifically used for starting iSCSI Proxy service at each node, the service is connected with an etcd cluster through restful API provided by the etcd to generate a unique identifier, and creates a sub-key under a Proxy directory according to the generated unique identifier and records the unique identifier of the node; and the updating unit is used for updating TTL to the etcd at regular time when the iSCSI Proxy service polling detects that the iSCSI service of the node per se is operated.
The network deployment module is used for deploying a network for the iSCSI service through a floating IP after the iSCSI service is started at the distributed storage nodes; the network deployment module comprises a deployment unit and a recording unit; the deployment unit is used for inquiring all sub-keys under a Proxy directory by each node through iSCSI Proxy service, calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; if the value of the node is minimum, the floating IP is configured on the actual network; and the recording unit is used for creating a key directory named vip in a key value database in the etcd cluster to record the floating IP externally provided by the current iSCSI service.
The high availability realization module is used for monitoring the health state of the operation node of the iSCSI server and triggering the iSCSI service switching to realize the high availability of the iSCSI service when the operation node is unhealthy;
and the high availability realization module is used for autonomously reporting faults to trigger iSCSI service switching to realize high availability of the iSCSI service when detecting that the iSCSI service is unhealthy based on the self state of the iSCSI service.
The vip is a Virtual IP (Internet protocol), namely a floating IP, the IP is an IP address externally provided by the iSCSI service, the Client is connected with the iSCSI service end through the vip, and each distributed storage node provides an iSCSI service and an iSCSI Proxy. The iSCSI service is provided by distributed storage and can be connected with the distributed storage, the iSCSI Proxy is an etcd agent, whether the iSCSI service is alive or not is detected regularly, and TTL is updated regularly with etcd cluster communication. The etcd cluster is deployed by a node that partially provides distributed storage and iSCSI services.
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 appended claims.

Claims (10)

1. An iSCSI high availability implementation method, comprising the following steps:
initializing the iSCSI agent service and the etcd cluster, and enabling the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated;
after the iSCSI service is started at the distributed storage nodes, a network is deployed for the iSCSI service through a floating IP;
monitoring the health state of the iSCSI service end running node, and triggering the iSCSI service to switch a floating IP to realize high availability of the iSCSI service when the iSCSI service end running node is unhealthy; or
Based on the self state of the iSCSI service, when the self iSCSI service is detected to be unhealthy, the fault is reported autonomously to trigger the iSCSI service to switch the floating IP so as to realize the high availability of the iSCSI service.
2. The method as in claim 1, wherein the step of initializing iSCSI proxy services and etcd clusters comprises:
deploying the etcd cluster according to the basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name; after the etcd cluster is deployed, creating a directory taking a proxy name as a key in a distributed database of the etcd;
starting iSCSI proxy service at each node, wherein the service is connected to the etcd cluster and generates a unique identifier and records the unique identifier of the node;
the iSCSI agent service polling detects whether the iSCSI service of the node itself is operated, and if the iSCSI service is operated, the timestamp is updated to the etcd at regular time.
3. The method as claimed in claim 2, wherein the step of initiating an iSCSI proxy service at each node, the service connecting to the etcd cluster and generating a unique id and recording the unique id of the node comprises:
and starting iSCSI proxy service at each node, connecting the service with an etcd cluster through a restful API provided by the etcd to generate a unique identifier, and creating a sub-key under a proxy directory according to the generated unique identifier and simultaneously recording the unique identifier of the node.
4. The method as claimed in claim 3, wherein the step of deploying a network for the iSCSI service via a floating IP after the iSCSI service is started up at the distributed storage node comprises:
each node inquires all the sub-keys in the proxy directory through the iSCSI proxy service;
calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; if the value of the node is minimum, the floating IP is configured on the actual network; and creating a key directory in a key value database in the etcd cluster for recording the floating IP externally provided by the current iSCSI service.
5. The method as claimed in claim 4, wherein when the iSCSI service itself fails, the iSCSI agent periodically detects whether the iSCSI service is alive, and if not, the iSCSI agent stops updating and updates the etcd cluster with its corresponding health value as fault, and deletes the floating IP on the actual network of the node; when the iSCSI agents of all the nodes detect that the key values are fault, detecting whether the key values corresponding to the iSCSI agents are the minimum values in all the survival nodes, if so, reading the floating IP from the vip directory in the etcd cluster and configuring the floating IP for the actual network of the node where the iSCSI is located.
6. The method as in claim 4, wherein when the iSCSI agent cannot update the timestamp due to a storage service failure, sending a message to other nodes, when the other nodes sense that the working node cannot work normally, detecting whether the unique identifier corresponding to the node is the minimum value, and if so, configuring a floating IP for the actual network of the node where the iSCSI is located.
7. An iSCSI high-availability implementation system is characterized by comprising an initialization module, a network deployment module and a high-availability implementation module;
the initialization module is used for initializing the iSCSI agent service and the etcd cluster so as to enable the iSCSI agent service to poll and detect whether the iSCSI service of the node per se is operated;
the network deployment module is used for deploying a network for the iSCSI service through a floating IP after the iSCSI service is started at the distributed storage nodes;
the high availability realization module is used for monitoring the health state of the operation node of the iSCSI server and triggering the iSCSI service switching to realize the high availability of the iSCSI service when the operation node is unhealthy;
and the high availability realization module is used for autonomously reporting faults to trigger iSCSI service switching to realize high availability of the iSCSI service when detecting that the iSCSI service is unhealthy based on the self state of the iSCSI service.
8. The system as recited in claim 7, wherein the initialization module comprises an etcd cluster deployment unit, a directory creation unit, a service initiation processing unit, and an update unit;
the etcd cluster deployment unit is used for deploying the etcd cluster according to the basic parameters of each node; the basic parameters comprise a node IP, a host name and an etcd cluster name;
the directory creating unit is used for creating a directory taking a proxy name as a key in the distributed database of the etcd after the etcd cluster is deployed;
the service starting processing unit is used for starting the iSCSI proxy service at each node, and the service is connected to the etcd cluster, generates a unique identifier and records the unique identifier of the node;
and the updating unit is used for updating the timestamp to the etcd at a timing when the iSCSI proxy service polling detects that the iSCSI service of the node per se is operated.
9. The system as in claim 8, wherein the service initiation processing unit is specifically configured to initiate an iSCSI proxy service at each node, and the service connects with an etcd cluster through a restful API provided by the etcd to generate a unique identifier, and creates a sub-key under a proxy directory according to the generated unique identifier and records the unique identifier of the node.
10. The system as recited in claim 9, wherein the network deployment module comprises a deployment unit and a recording unit;
the deployment unit is used for inquiring all the sub-keys in the proxy directory by each node through the iSCSI proxy service, calculating a Hash value in the node by performing Hash operation according to the unique identifier of each node, and detecting whether the node value is minimum; if the value of the node is minimum, the floating IP is configured on the actual network;
and the recording unit is used for creating a key directory in a key value database in the etcd cluster to record the floating IP externally provided by the current iSCSI service.
CN202010132958.1A 2020-02-29 2020-02-29 Method and system for realizing high availability of iSCSI (Internet small computer system interface) Active CN111371886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010132958.1A CN111371886B (en) 2020-02-29 2020-02-29 Method and system for realizing high availability of iSCSI (Internet small computer system interface)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010132958.1A CN111371886B (en) 2020-02-29 2020-02-29 Method and system for realizing high availability of iSCSI (Internet small computer system interface)

Publications (2)

Publication Number Publication Date
CN111371886A true CN111371886A (en) 2020-07-03
CN111371886B CN111371886B (en) 2022-12-27

Family

ID=71211633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010132958.1A Active CN111371886B (en) 2020-02-29 2020-02-29 Method and system for realizing high availability of iSCSI (Internet small computer system interface)

Country Status (1)

Country Link
CN (1) CN111371886B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256497A (en) * 2020-10-28 2021-01-22 重庆紫光华山智安科技有限公司 Universal high-availability service implementation method, system, medium and terminal
CN112367214A (en) * 2020-10-12 2021-02-12 成都精灵云科技有限公司 Method for rapidly detecting and switching main node based on etcd
CN115001956A (en) * 2022-05-24 2022-09-02 中国平安财产保险股份有限公司 Server cluster operation method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740167A (en) * 2019-09-20 2020-01-31 北京浪潮数据技术有限公司 distributed storage system and node monitoring method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740167A (en) * 2019-09-20 2020-01-31 北京浪潮数据技术有限公司 distributed storage system and node monitoring method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367214A (en) * 2020-10-12 2021-02-12 成都精灵云科技有限公司 Method for rapidly detecting and switching main node based on etcd
CN112367214B (en) * 2020-10-12 2022-06-14 成都精灵云科技有限公司 Method for rapidly detecting and switching main node based on etcd
CN112256497A (en) * 2020-10-28 2021-01-22 重庆紫光华山智安科技有限公司 Universal high-availability service implementation method, system, medium and terminal
CN112256497B (en) * 2020-10-28 2023-05-12 重庆紫光华山智安科技有限公司 Universal high-availability service realization method, system, medium and terminal
CN115001956A (en) * 2022-05-24 2022-09-02 中国平安财产保险股份有限公司 Server cluster operation method, device, equipment and storage medium
CN115001956B (en) * 2022-05-24 2023-06-16 中国平安财产保险股份有限公司 Method, device, equipment and storage medium for running server cluster

Also Published As

Publication number Publication date
CN111371886B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN111371886B (en) Method and system for realizing high availability of iSCSI (Internet small computer system interface)
US10489254B2 (en) Storage cluster failure detection
US20210028987A1 (en) System and method for network validation architecture for clustered and federated storage systems
US7430616B2 (en) System and method for reducing user-application interactions to archivable form
WO2017162173A1 (en) Method and device for establishing connection of cloud server cluster
CN112311583B (en) Intent-aware contextual device configuration backup and restoration
US20070070975A1 (en) Storage system and storage device
US20030196148A1 (en) System and method for peer-to-peer monitoring within a network
US8533525B2 (en) Data management apparatus, monitoring apparatus, replica apparatus, cluster system, control method and computer-readable medium
JP5617304B2 (en) Switching device, information processing device, and fault notification control program
CN110740167A (en) distributed storage system and node monitoring method thereof
US20020082927A1 (en) Intelligent caching routers
WO2012012962A1 (en) Disaster tolerance service system and disaster tolerance method
CN114116912A (en) Method for realizing high availability of database based on Keepalived
EP3186720B1 (en) Organizing a computing system having multiple computers, distributing computing tasks among the computers, and maintaining data integrity and redundancy in the computing system
Mitrović et al. Improving fault-tolerance of distributed multi-agent systems with mobile network-management agents
KR102327520B1 (en) Nondisruptive network mirroring solutions system and method thereof
CN114090342A (en) Storage disaster tolerance link management method, message execution node and storage control cluster
CN114930313A (en) System and method for managing blockchain nodes
CN112131201A (en) Method, system, equipment and medium for high availability of network additional storage
JP2013046252A (en) Vrrp system and vrrp program
CN116112500B (en) NFS high availability system and method based on fault detection and routing strategy
WO2016032634A1 (en) Systems and methods to organize a computing system having multiple computers, distribute computing tasks among the computers, and maintain data integrity and redundancy in the computing system
KR101726253B1 (en) System for providing duplex service based on database and method thereof
US20130279506A1 (en) Methods and systems for routing application traffic

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