CN112732482A - Cifs service backup switching method, device, equipment and readable storage medium - Google Patents

Cifs service backup switching method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN112732482A
CN112732482A CN202011621402.5A CN202011621402A CN112732482A CN 112732482 A CN112732482 A CN 112732482A CN 202011621402 A CN202011621402 A CN 202011621402A CN 112732482 A CN112732482 A CN 112732482A
Authority
CN
China
Prior art keywords
node
cifs
network
service
information
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.)
Withdrawn
Application number
CN202011621402.5A
Other languages
Chinese (zh)
Inventor
马桂杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202011621402.5A priority Critical patent/CN112732482A/en
Publication of CN112732482A publication Critical patent/CN112732482A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a cifs service backup switching method, which realizes common cifs system service backup through double nodes, wherein a main configuration node opens a network port to respond to a cifs service request of a client, and a non-main configuration node starts the cifs service so as to conveniently backup the cifs service of the main configuration node and synchronize the service state; and monitoring the running state of the nodes in real time in the service process of the main configuration node, and if the network state of the main configuration node is abnormal, starting the network service to call the non-main configuration node to take over the cifs service. According to the method, the state of the two nodes is synchronized, and the state of the network of the other node is judged in real time, so that the backup transfer of the service is carried out, and the network port is opened, thereby providing high-availability data communication. The invention also discloses a cifs service backup switching device, equipment and a readable storage medium, and has corresponding technical effects.

Description

Cifs service backup switching method, device, equipment and readable storage medium
Technical Field
The invention relates to the technical field of storage, in particular to a cifs service backup switching method, a cifs service backup switching device, cifs service backup switching equipment and a readable storage medium.
Background
The cifs (common Internet File system) service system is a common general network File system, and plays an important role in a cifs service platform for locally storing nas services and cloud data centers. At present, in order to ensure the stability of service operation in the cifs service system, a service backup switching mode is adopted to implement redundancy setting of service invocation, so that the backup service can be immediately invoked to implement service switching after the service is down.
However, currently, the cifs itself is still incomplete in transparent switching, and has a risk of cutoff, which brings a certain threat to the stable operation of a service system, and needs to be matched with a network in actual service, so that the realization difficulty is high.
In summary, how to implement stable, reliable and easy-to-implement cifs service backup switching is a technical problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a cifs service backup switching method, a cifs service backup switching device, cifs service backup switching equipment and a readable storage medium, which can realize stable, reliable and easy-to-realize cifs service backup switching.
In order to solve the technical problems, the invention provides the following technical scheme:
a cifs service backup switching method comprises the following steps:
the first node determines a second node which is used for cifs system service backup together with the first node and is connected to the second node;
monitoring the network states of the second node and the second node;
judging whether the current node is a main configuration node or not;
if so, enabling the network port, starting cifs service according to configuration, and sending the configuration to the second node so that the second node starts the service same as the first node according to the configuration;
if not, starting the cifs service, and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
Optionally, the connecting to the second node comprises:
the first node determines an ip inside the node and a host name of the connection;
sending the local node information to the second node; wherein the home node information includes the host name;
after receiving the node information fed back by the second node, taking the node information as opposite node information;
and connecting to the second node according to the opposite node information.
Optionally, the determining, by the first node, an ip inside a node and a host name of a connection includes:
and the first node sets the node internal ip according to the specified heartbeat port in the configuration file and generates the name of the connected host.
Optionally, the monitoring of the network states of the second node and the second node includes:
monitoring the network state of the user to obtain network state information;
sending the network state information to the second node through a heartbeat packet;
and receiving the network state information fed back by the second node as the network state of the second node.
Optionally, the monitoring of the network state of the mobile terminal itself to obtain the network state information includes:
monitoring the communication state of a gateway connected with the gateway;
receiving the physical connection state of a physical network card connected with the network card;
and determining the network state of the user according to the communication state and the physical connection state to obtain network state information.
A cifs service backup switching device is applied to a first node, and comprises:
a node connection unit, configured to determine a second node that is used for cifs system service backup together with the first node, and connect to the second node;
the state monitoring unit is used for monitoring the network states of the second node and the second node;
the main configuration judging unit is used for judging whether the current node is a main configuration node or not; if yes, triggering a main configuration unit; if not, triggering the standby configuration unit;
the main configuration unit is used for enabling the network port, starting cifs service according to configuration and sending the configuration to the second node so that the second node can start the service which is the same as that of the first node according to the configuration;
the standby configuration unit is used for starting the cifs service and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
Optionally, the interconnection subunit in the node connection unit, configured to connect to the second node, includes:
the information determining subunit is used for determining an ip inside the node and a host name of the connection;
the information sending subunit is used for sending the local node information to the second node; wherein the home node information includes the host name;
the opposite-end information receiving subunit is configured to receive the node information fed back by the second node, and then use the node information as opposite-end node information;
and the connection subunit is used for connecting to the second node according to the opposite-end node information.
Optionally, the information determining subunit is specifically a first information determining subunit, and is configured to: and setting the node internal ip according to the specified heartbeat port in the configuration file, and generating the host name of the connection.
A cifs service backup switching device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the cifs service backup switching method when the computer program is executed.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned cifs service backup switching method.
In the method provided by the embodiment of the invention, the common cifs system service backup is realized through double nodes, the main configuration node opens a network port to respond to the cifs service request of the client, and the non-main configuration node starts the cifs service so as to backup the cifs service of the main configuration node and synchronize the service state; and monitoring the running state of the nodes in real time in the service process of the main configuration node, and if the network state of the main configuration node is abnormal, starting the network service to call the non-main configuration node to take over the cifs service. According to the method, the state of the two nodes is synchronized, and the state of the network of the other node is judged in real time, so that the backup transfer of the service is carried out, and the network port is opened, thereby providing high-availability data communication.
Correspondingly, the embodiment of the invention also provides a cifs service backup switching device, a device and a readable storage medium corresponding to the cifs service backup switching method, which have the technical effects described above and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a cifs service backup switching method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a cifs service backup switching device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a cifs service backup switching device in an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a cifs service backup switching method, which can realize stable, reliable and easy-to-realize cifs service backup switching.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
Referring to fig. 1, fig. 1 is a flowchart of a cifs service backup switching method in an embodiment of the present invention, where the method includes the following steps:
s101, the first node determines a second node which is used for cifs system service backup together with the first node and is connected to the second node;
determining a first node and a second node under the storage equipment of the cifs system as two nodes commonly used for the business backup of the cifs system, wherein the first node and the second node are only used for distinguishing the two nodes. In order to reduce the risk of heartbeat disconnection caused by network fluctuation due to network crossing network segments, a first node and a second node of a storage device in a cifs system can be selected to be located in the same switching network as two nodes commonly used for business backup of the cifs system, that is, the lower ports of the storage devices to which the first node and the second node belong are located in the same switching network, and of course, the first node and the second node can also be determined according to other use requirements.
It should be noted that the two nodes commonly used for the service backup of the cifs system are not in a complete main-standby relationship, and both can run the service and can switch the service to the opposite end node.
After determining a second node, which is used for cifs system service backup together with a first node, the first node needs to be connected to the second node, and a specific connection manner is not limited in this embodiment, and one implementation manner is as follows:
(1) the first node determines the ip inside the node and the name of the connected host;
the ip inside the node indicates the connected network segment, and the name of the connected host indicates the service object.
The determination method of the internal ip and the host name of the connection is not limited in this embodiment, the internal ip may be determined by obtaining network configuration information of the internal ip, and the first node may also set the node internal ip according to a heartbeat port specified in the configuration file. And appointing a heartbeat port and a heartbeat port network segment in the equipment configuration file, setting an internal ip of a node according to the appointed heartbeat port in the configuration file, and generating a host name so as to be flexibly configured according to actual network deployment.
(2) Sending the local node information to a second node; the local end node information comprises a host name;
connecting an opposite end (second node) ip, and sending node information including a home name of the home end to the opposite end, wherein the node information is mainly used for secret-free connection and establishment of a corresponding relation between the ip and the home name, the configuration of information except the home name is not limited, and for example, the node information may further include public key information and the like.
The two nodes exchange node information to facilitate connection establishment and service switching.
(3) After receiving the node information fed back by the second node, taking the node information as opposite node information;
after receiving the correspondent node information, the correspondent node information can be written into the local hosts file, so that the correspondent node information can be read from the local hosts file for mutual handshake connection.
(4) And connecting to the second node according to the opposite node information.
The implementation of the inter-node connection according to the information of the corresponding node may refer to the description of the related art, and will not be described herein again.
In this embodiment, only the above implementation manner of information determination is described as an example, and other implementation manners may refer to the above description, which is not described herein again.
S102, monitoring the network states of the second node and the second node;
the network state may be determined according to the operation of the actual service, such as the failure of heartbeat packet transmission, or may be determined according to the operation state of the connected network device, such as the abnormality of the switch.
After the network state of the two nodes is determined, the respective network state information can be exchanged between the two nodes, so that the network state of the opposite node can be monitored, and the timely discovery and the timely service switching when the opposite network is abnormal can be further realized.
In order to promote the network state information to be timely acquired by the opposite node, the transmission of the network state information between the two nodes may be in the form of a heartbeat packet, and accordingly, the process of monitoring the network states of the second node and the second node may specifically include the following steps:
(1) monitoring the network state of the user to obtain network state information;
the monitoring of the network state itself may be determined by the transmission of the data packet and the operating state of the connected network device, and the implementation manner of monitoring the network state itself in this embodiment is not limited, and one implementation manner is as follows:
(1.1) monitoring the communication state of the gateway connected with the gateway;
(1.2) receiving the physical connection state of a physical network card connected with the network card;
and (1.3) determining the network state of the user according to the communication state and the physical connection state to obtain network state information.
The communication state of the monitoring gateway and the physical connection state of the physical network card are adopted in the evaluation mode of the network state, so that the network state of the node can be objectively evaluated from the perspective of physical line connection.
(2) Sending the network state information to the second node through the heartbeat packet;
(3) and receiving the network state information fed back by the second node as the network state of the second node.
The information transmission form of the heartbeat packet can ensure that the opposite terminal can know the network state of the local terminal in time, and meanwhile, the reverse monitoring of the network state can be further realized through frequent data transmission, for example, if the network state data sent by the opposite terminal node is still not received after the transmission time interval of the heartbeat packet is exceeded, the transmission of the network state data is proved to be abnormal.
In this embodiment, only the information transmission method is described as an example, and the above description can be referred to for the implementation of network status monitoring based on other transmission methods.
S103, judging whether the current node is a main configuration node or not; if yes, triggering step S104; if not, triggering step S105;
both nodes can be used as a main configuration node and a standby node, and in this embodiment, a corresponding main configuration node processing flow and a standby node processing flow are set for each node, so that flexible assignment of the main configuration node and the standby node is performed according to different use requirements.
One of the two nodes is set as a main configuration node, and the other is set as a standby node, it should be noted that the standby node may not be completely used as a standby of the main configuration node, and may also implement other service functions.
Judging whether the current node (namely the executed node itself, namely the first node) is a main configuration node; if yes, triggering step S104 to execute the corresponding process of the main configuration node; if not, triggering step S105 to execute the corresponding process of the standby node.
S104, enabling the network port, starting the cifs service according to the configuration, and sending the configuration to the second node so that the second node starts the service same as that of the first node according to the configuration;
if the self node is the main configuration node, the network port is enabled (allowing the input and output of signals), and at the moment, the client can be normally connected with the cifs service so as to start the cifs service according to the configuration, and simultaneously, the cifs configuration is sent to the opposite end node so as to facilitate the opposite end node to perform the same configuration after receiving the configuration information, thereby realizing the synchronous backup of the service.
S105, starting the cifs service, and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
The non-main configuration node (namely the standby node) only starts the cifs service, and does not enable the network card configuration and directly respond to the user service while realizing the service. It should be noted that the two nodes map and mount the same iscsi volume, so as to implement the same service configuration.
In addition, two nodes send network state information to an opposite end node in the running process, the network state information (usually including basic detection information such as physical connection state, network quality and the like), if the network state of the active main configuration node is abnormal (for example, the service network is abnormal or the heartbeat does not respond), the standby node makes a virtual network card up and sends an ARP packet of the gateway, at the moment, the cifs service is successfully transferred (the ARP packet is a basic network protocol, and the purpose is mainly to actively refresh the configuration in the network), and the service switching of the main configuration node is realized.
It should be noted that, the processing mode of the main configuration node after the network state is abnormal is not limited in this embodiment, if the network state of the main configuration node is abnormal and recovered, the service recovery mechanism is also not limited in this embodiment, in order to avoid the processing burden of the standby node that is too heavy for a long time as much as possible, the standby node may close the network port (drop the network port) after receiving the notification of the network state recovery of the main configuration node, and the main configuration node refreshes the arp, so far, the cifs service of the main configuration node is recovered, and the standby node recovers the service standby state before the failure.
Based on the introduction, the technical scheme provided by the embodiment of the invention realizes common cifs system service backup through double nodes, the main configuration node opens a network port to respond to the cifs service request of the client, and the non-main configuration node starts the cifs service so as to conveniently backup the cifs service of the main configuration node and synchronize the service state; and monitoring the running state of the nodes in real time in the service process of the main configuration node, and if the network state of the main configuration node is abnormal, starting the network service to call the non-main configuration node to take over the cifs service. According to the method, the state of the two nodes is synchronized, and the state of the network of the other node is judged in real time, so that the backup transfer of the service is carried out, and the network port is opened, thereby providing high-availability data communication.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a cifs service backup switching device, and the cifs service backup switching device described below and the above cifs service backup switching method may be referred to in correspondence.
Referring to fig. 2, the apparatus is applied to a first node in a cifs system, and mainly comprises the following modules:
the node connection unit 110 is mainly used for determining a second node which is used for cifs system service backup together with the first node, and connecting to the second node;
the state monitoring unit 120 is mainly configured to monitor network states of the second node and the first node;
the main configuration determining unit 130 is mainly configured to determine whether the current node is a main configuration node; if yes, triggering the main configuration unit 140; if not, triggering the standby configuration unit 150;
the main configuration unit 140 is mainly used to enable the network interface, start cifs service according to the configuration, and send the configuration to the second node, so that the second node starts the same service as the first node according to the configuration;
the standby configuration unit 150 is mainly used for starting the cifs service and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
In an embodiment of the present invention, an interconnection subunit in the node connection unit, configured to connect to the second node, includes:
the information determining subunit is used for determining an ip inside the node and a host name of the connection;
the information sending subunit is used for sending the home node information to the second node; the local end node information comprises a host name;
the opposite terminal information receiving subunit is configured to receive the node information fed back by the second node, and then use the node information as opposite terminal node information;
and the connection subunit is used for connecting to the second node according to the opposite node information.
In a specific embodiment of the present invention, the information determining subunit is specifically a first information determining subunit, and is configured to set an ip inside a node according to a heartbeat port specified in the configuration file, and generate a host name of the connection.
In this embodiment, the function division manner of the unit is not limited, and the division of the unit function may be performed according to the requirement of the actual function configuration and the convenience of maintenance, and all the implementation manners of other unit divisions can refer to the above description.
For further understanding, another unit and function division manner of the cifs service backup switching device is introduced herein, wherein the cifs service backup switching device mainly comprises: the cifs network backup switching system comprises an agent module, a network state module, a heartbeat module and a cifs service control module, wherein the agent module, the network state module, the heartbeat module and the cifs service control module are coordinated with one another to realize the configuration, state synchronization, starting and state monitoring of the cifs network, and the cifs service starting node is controlled by starting and stopping a network card, so that the backup switching of the cifs service is realized.
Specifically, the agent module is mainly used for setting an ip inside a node according to a heartbeat port specified in the configuration file, generating a host name, and starting the heartbeat module.
The network state module is mainly used for monitoring the communication state of the gateway and receiving the physical connection state of the physical network card, so that the network state of the node is judged and reported to the heartbeat module.
The heartbeat module is mainly responsible for connecting the ip of the opposite end and sending the host and the public key information of the local end to the opposite end. And after receiving the information of the opposite end node, writing the ip host of the opposite end node into a local hosts file. And the heartbeat module reads the information of the other party in the local hosts file and then performs mutual handshake connection. And starting a network state module for monitoring, judging the network state of the node and reporting to the cifs service control module by detecting the communication state of the gateway and the physical connection state of the physical network card.
The cifs service control module mainly realizes the following functions: and judging whether the current node is a main configuration node or not, if so, enabling the network port, and enabling the client to be normally connected with the cifs service. The non-main configuration node only starts the cifs service, creates the configuration network card, but enables the network card to process the down state. And when receiving the exception reported by the heartbeat management module, the cifs service control module of the standby node enables the virtual network card up and sends an arp packet of the gateway, and if the main configuration node is alive, the main configuration node enables the network port to be down, so that the cifs service is successfully transferred. When the main configuration node network is restored, the standby node drops the network port, the main configuration node refreshes the arp, and the cifs service is restored.
Based on the function realization of the units, one realization step for completing the backup switching of the cifs service by cooperation among the units is as follows:
(1) determining two physical nodes (as a first node and a second node) of a storage device lower connection port under the same switching network, wherein the upper connection port can map the same iscsi volume through different or the same network.
(2) After the two nodes are powered on and started, judging whether the current state is an initial state, if so, designating a heartbeat port and a heartbeat port network segment in an equipment configuration file, and then restarting the equipment;
(3) after the equipment is restarted, waiting for the agent module to start, setting the node internal ip by the agent module according to the specified heartbeat port in the configuration file, generating a host name, and starting the heartbeat module.
(4) And after the heartbeat module is started, connecting the ip of the opposite end, and sending the home terminal host and the public key information to the opposite end for secret-free connection and establishing the corresponding relation between the ip and the hostname. After receiving the information of the opposite end node, writing the ip host of the opposite end node into a local hosts file, and starting a network state module and a cifs service control module.
(5) And the cifs service control module starts the cifs service according to the configuration and sends the cifs configuration to the heartbeat module. And after receiving the information, the heartbeat module sends the information to the opposite node. And the opposite end node performs the same configuration after receiving the configuration information. And the cifs service control modules of the two nodes map and mount the same iscsi volume.
(5) The cifs service control module judges whether the current node is a main configuration node, and if the current node is an enabled (allowing input and output of signals) network port, the client can be normally connected with the cifs service. The non-configuration node only starts the cifs service and does not enable the network card configuration.
(6) The network state module monitors the communication state of the gateway and receives the physical connection state of the physical network card, so that the network state of the node is judged and reported to the heartbeat module.
(7) And the heartbeat module sends the received network state information to the opposite end node.
(8) And if the network state module determines that the service network of the active node is abnormal or the heartbeat does not respond, sending a network abnormal message to the cifs service control module.
(9) And the cifs service control module controls the standby node to enable the virtual network card up and sends an arp packet of the gateway, and at the moment, the cifs service is successfully transferred.
(10) When the main configuration node network is restored, the standby node drops the network port, the main configuration node refreshes the arp, and the cifs service is restored.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a cifs service backup switching device, and a cifs service backup switching device described below and a cifs service backup switching method described above may be referred to correspondingly.
The cifs service backup switching equipment comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the cifs service backup switching method of the embodiment of the method when executing the computer program.
Specifically, referring to fig. 3, a schematic diagram of a specific structure of a cifs service backup switching device provided in this embodiment is shown, where the cifs service backup switching device may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Further, the central processor 322 may be configured to communicate with the memory 332, and execute a series of instruction operations in the memory 332 on the cifs service backup switching device 301.
The cifs service backup switching device 301 may also comprise one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the above-described cifs service backup switching method may be implemented by the structure of the cifs service backup switching device.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and the above cifs service backup switching method may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the cifs service backup switching method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1. A cifs service backup switching method is characterized by comprising the following steps:
the first node determines a second node which is used for cifs system service backup together with the first node and is connected to the second node;
monitoring the network states of the second node and the second node;
judging whether the current node is a main configuration node or not;
if so, enabling the network port, starting cifs service according to configuration, and sending the configuration to the second node so that the second node starts the service same as the first node according to the configuration;
if not, starting the cifs service, and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
2. The cifs service backup switching method according to claim 1, wherein said connecting to said second node comprises:
the first node determines an ip inside the node and a host name of the connection;
sending the local node information to the second node; wherein the home node information includes the host name;
after receiving the node information fed back by the second node, taking the node information as opposite node information;
and connecting to the second node according to the opposite node information.
3. The cifs service backup switching method according to claim 2, wherein the determining, by the first node, ip inside a node and a host name of a connection comprises:
and the first node sets the node internal ip according to the specified heartbeat port in the configuration file and generates the name of the connected host.
4. The cifs service backup switching method according to claim 1, wherein the monitoring of the network states of the cifs service backup switching method and the second node comprises:
monitoring the network state of the user to obtain network state information;
sending the network state information to the second node through a heartbeat packet;
and receiving the network state information fed back by the second node as the network state of the second node.
5. The cifs service backup switching method according to claim 4, wherein the monitoring of the network status of the cifs service backup switching method to obtain the network status information comprises:
monitoring the communication state of a gateway connected with the gateway;
receiving the physical connection state of a physical network card connected with the network card;
and determining the network state of the user according to the communication state and the physical connection state to obtain network state information.
6. A cifs service backup switching apparatus, applied to a first node, the apparatus comprising:
a node connection unit, configured to determine a second node that is used for cifs system service backup together with the first node, and connect to the second node;
the state monitoring unit is used for monitoring the network states of the second node and the second node;
the main configuration judging unit is used for judging whether the current node is a main configuration node or not; if yes, triggering a main configuration unit; if not, triggering the standby configuration unit;
the main configuration unit is used for enabling the network port, starting cifs service according to configuration and sending the configuration to the second node so that the second node can start the service which is the same as that of the first node according to the configuration;
the standby configuration unit is used for starting the cifs service and triggering the corresponding cifs service according to the received configuration; and if the network state of the main configuration node is abnormal, enabling the network port and sending an arp packet of the gateway.
7. The cifs service backup switching apparatus according to claim 6, wherein the interconnection subunit in the node connection unit for connecting to the second node comprises:
the information determining subunit is used for determining an ip inside the node and a host name of the connection;
the information sending subunit is used for sending the local node information to the second node; wherein the home node information includes the host name;
the opposite-end information receiving subunit is configured to receive the node information fed back by the second node, and then use the node information as opposite-end node information;
and the connection subunit is used for connecting to the second node according to the opposite-end node information.
8. The cifs service backup switching apparatus according to claim 7, wherein the information determining subunit is specifically a first information determining subunit, configured to: and setting the node internal ip according to the specified heartbeat port in the configuration file, and generating the host name of the connection.
9. A CIFS service backup switching device is characterized by comprising:
a memory for storing a computer program;
processor for implementing the steps of the CIFS service backup switching method according to any of claims 1 to 5 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the CIFS service backup switching method according to any of claims 1 to 5.
CN202011621402.5A 2020-12-30 2020-12-30 Cifs service backup switching method, device, equipment and readable storage medium Withdrawn CN112732482A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011621402.5A CN112732482A (en) 2020-12-30 2020-12-30 Cifs service backup switching method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011621402.5A CN112732482A (en) 2020-12-30 2020-12-30 Cifs service backup switching method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112732482A true CN112732482A (en) 2021-04-30

Family

ID=75608144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011621402.5A Withdrawn CN112732482A (en) 2020-12-30 2020-12-30 Cifs service backup switching method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112732482A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221854A (en) * 2021-11-15 2022-03-22 深圳绿米联创科技有限公司 Method and device for recovering network information in gateway, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221854A (en) * 2021-11-15 2022-03-22 深圳绿米联创科技有限公司 Method and device for recovering network information in gateway, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103744809B (en) Vehicle information management system double hot standby method based on VRRP
CN115460068A (en) Method and system for high availability enhancement of computer networks
CN111459749B (en) Prometheus-based private cloud monitoring method and device, computer equipment and storage medium
CN111949444A (en) Data backup and recovery system and method based on distributed service cluster
CN110868278B (en) Method for dual-computer redundancy of communication front-end processor of rail transit comprehensive monitoring system
WO2021185169A1 (en) Switching method and apparatus, and device and storage medium
CN110677282B (en) Hot backup method of distributed system and distributed system
CN109656753A (en) A kind of Redundant backup system applied to track traffic synthetic monitoring system
WO2012097588A1 (en) Data storage method, apparatus and system
KR20020062483A (en) Fault tolerant system and duplication method thereof
CN109151082A (en) A kind of multi-connection method for building up, device and system
JP4343282B2 (en) Composite communication terminal device management system and composite communication terminal device
CN112732482A (en) Cifs service backup switching method, device, equipment and readable storage medium
CN113407382B (en) Dynamic regulation and control method and system for service fault
CN109474694A (en) A kind of management-control method and device of the NAS cluster based on SAN storage array
CN110290163A (en) A kind of data processing method and device
CN110086657B (en) Configuration synchronization method and device
CN109274763B (en) Information synchronization method and dual-computer hot standby equipment
JP2004032452A (en) System changing method and system of cluster-configured machines
CN110399254A (en) A kind of server CMC dual-locomotive heat activating method, system, terminal and storage medium
CN114124803B (en) Device management method and device, electronic device and storage medium
CN114257500A (en) Fault switching method, system and device for internal network of super-converged cluster
CN111181766B (en) Redundant FC network system and method for realizing dynamic configuration of switch
CN115277375B (en) Method, system, equipment and storage medium for switching master server and standby server
CN115037674B (en) Single-machine and multi-equipment redundancy backup method for central control system

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210430