CN117149095B - NAS-based cluster management method, NAS-based cluster management device, computer equipment and media - Google Patents

NAS-based cluster management method, NAS-based cluster management device, computer equipment and media Download PDF

Info

Publication number
CN117149095B
CN117149095B CN202311426345.9A CN202311426345A CN117149095B CN 117149095 B CN117149095 B CN 117149095B CN 202311426345 A CN202311426345 A CN 202311426345A CN 117149095 B CN117149095 B CN 117149095B
Authority
CN
China
Prior art keywords
state
storage system
node
nas
additional storage
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.)
Active
Application number
CN202311426345.9A
Other languages
Chinese (zh)
Other versions
CN117149095A (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 Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311426345.9A priority Critical patent/CN117149095B/en
Publication of CN117149095A publication Critical patent/CN117149095A/en
Application granted granted Critical
Publication of CN117149095B publication Critical patent/CN117149095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0894Policy-based network configuration 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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/0638Organizing or formatting or addressing of data
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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]
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of computers, and discloses a cluster management method, a device, computer equipment and a medium based on NAS, which are applied to a centralized cluster and comprise a master node and at least one slave node, wherein the nodes comprise a SAN system deployed in a host machine, and the NAS system is deployed in a docker container, a monitoring thread is arranged in the SAN system, the NAS system is provided with a master process, and the method is executed by the monitoring thread in the master node and comprises the following steps: when the operation instruction is acquired, generating an operation result according to the operation instruction; synchronizing the operation result to each slave node corresponding to the monitoring thread; and sending the operation result to the network additional storage system corresponding to each node in the centralized cluster in turn. And the SAN and the NAS are isolated by adopting a docker container, so that the isolation degree is better. The method has better expandability and reduces the influence on the storage service. And realizing cluster management of two clusters which are independent and related to each other.

Description

NAS-based cluster management method, NAS-based cluster management device, computer equipment and media
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cluster management method and apparatus based on NAS, a computer device, and a medium.
Background
In a unified network attached storage (Network Attached Storage, NAS for short) storage framework, a storage area network (Storage Area Network, SAN for short) storage system is deployed on the centralized storage, and NAS file storage service is provided for the outside based on the NAS storage deployed by the SAN, so that the method has wide application prospect.
However, in the unified and centralized NAS storage at present, the dependency between the NAS system and the SAN system is relatively strong, and the scalability and performance of the management architecture may be affected to some extent.
Disclosure of Invention
In view of the above, the present invention provides a cluster management method, device, computer device and medium based on NAS, so as to solve the above technical problems.
In a first aspect, the present invention provides a NAS-based cluster management method, which is applied to a centralized cluster, where the centralized cluster includes a master node and at least one slave node, each node includes a storage area network deployed in a host, and a network additional storage system deployed in a docker container, where a monitoring thread is disposed in the storage area network, and a master process is disposed in the network additional storage system, and the method is performed by the monitoring thread in the master node, and includes:
When an operation instruction is acquired, generating an operation result according to the operation instruction, wherein the operation instruction is used for indicating to execute the state switching operation of the network additional storage system or execute the restarting operation of the network additional storage system;
synchronizing operation results to the monitoring threads corresponding to each slave node, and completing configuration data synchronization in a storage area network deployed in the slave node by the monitoring threads corresponding to the slave nodes;
and sequentially sending the operation result to the network additional storage systems corresponding to each node in the centralized cluster, so that the main process deployed in the network additional storage system corresponding to each node can complete the synchronization of the configuration data.
The cluster management method based on NAS provided by the invention has the following advantages:
in a centralized cluster, a master node and a slave node are configured. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
Further, a monitor thread is provided in the SAN storage system, and a main process is provided in the NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. Configuration data synchronization in the SAN cluster and the NAS cluster is achieved. The method is equivalent to realizing the cluster management of the SAN cluster and the NAS cluster which are independent and associated with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
In an alternative embodiment, the method further comprises:
periodically acquiring the current state of the network additional storage system and the current environment information of the centralized cluster;
and when the network additional storage system is determined to be switched to the target state according to the current state and the environment information, generating a state switching instruction, and sending the state switching instruction to the network additional storage system corresponding to each node in the centralized cluster respectively, wherein the state switching instruction is used for completing state switching of a main process deployed in each network additional storage system.
Specifically, the monitoring thread in the master node may periodically detect the current state of the NAS system and the environmental information in which the centralized cluster is currently located. Then, based on the current state and Hua Jing information, it is determined whether the NAS system needs to perform a state handoff, and a target state for which handoff is required. When it is determined that the NAS system needs to be switched to the target state, a state switching instruction may be generated and sent to NAS systems corresponding to each node in the centralized cluster, so that the main process deployed in each NAS system completes the state switching operation.
In an alternative embodiment, when receiving the state switching request fed back by the first main process, the method further includes:
acquiring the current state of the network additional storage system and the current environment information of the centralized cluster according to the state switching request;
according to the current state and the environment information, when the network additional storage system is determined to be switched to the target state, a state switching instruction is generated;
and sending the state switching instruction to a first main process for the first main process to complete the state switching operation of the network additional storage system, wherein the first main process is the main process included in the network additional storage system corresponding to any node in the centralized cluster.
Specifically, in addition to the monitoring thread in the master node being able to monitor the state of the NAS system and the environmental information of the centralized cluster, each master process may also be able to periodically self-check the internal state, that is, the state of the NAS system and the environmental information of the centralized cluster. And then determining whether the state needs to be switched or not according to the state of the NAS system and the environment information of the centralized cluster, and determining the target state to be switched. Once it is determined that the target state needs to be switched, request information, that is, a state switching request, needs to be sent to the monitoring thread of the master node, so as to request whether the target state can be switched. After receiving the state switching request, the monitoring thread further verifies whether the state switching is needed by acquiring the state of the NAS system and the current environmental information of the centralized cluster. And if the verification result is consistent with the result requested by the first main process, sending a state switching instruction to the first main process, so that the first main process completes the state switching operation of the NAS system.
In an alternative embodiment, the method further comprises: and sending the state switching instruction to other main processes except the first main process, so that the other main processes except the first main process can complete the state switching operation of the network additional storage system according to the state switching instruction.
Specifically, in order to enable configuration data synchronization, the monitoring thread needs to send a state switching instruction not only to the first main process, but also to the main processes set in other nodes, so that all the main processes can complete state switching of the NAS system.
In an alternative embodiment, the method further comprises: after receiving response information after the state switching sent by the main process and included in the network additional storage systems respectively corresponding to all nodes in the centralized cluster is completed, synchronously updating the current state of the network additional storage system stored in the storage area network in each node.
Specifically, each master process needs to send response information to the monitoring thread of the master node after completing the state switching, so as to indicate that the state switching has been completed. So that the monitoring thread of the master node can synchronously update the current state of the NAS system recorded by the SAN system of each node according to the response.
In an alternative embodiment, the environmental information includes one or more of the following:
the state of the storage area network, the state of the network attached storage system, file system identification information, file system state, storage pool state, volume state, and acquired alert information in the current environment.
In an alternative embodiment, the state of the network attached storage system includes one or more of the following:
start-up, run, hot backup, start, stop, stopped, and downtime.
Specifically, the states in this application include only these 7 states, and compared to the switching operation of more than ten states in the related art, the state switching will be simpler, and the state switching logic will be simpler for each state, and the state switching efficiency will be higher.
In an alternative embodiment, a communication connection is established between the monitoring thread and the host process in each node via a heartbeat, the heartbeat frequency including multiple levels.
Specifically, whether the two parties are in a normal working state is verified through heartbeat, and different heartbeat frequency gears can be configured according to different working states.
In an optional implementation manner, when it is determined that the current state of the network additional storage system is a first target state and the heartbeat frequency gear is not the lowest gear, a first gear adjustment instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, where the first gear adjustment instruction is used to instruct to automatically lower the heartbeat frequency gear by one gear;
Or,
when the current state of the network additional storage system is determined to change or the current state of the network additional storage system is determined to be abnormal, a second gear adjusting instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, and the second gear adjusting instruction is used for adjusting the heartbeat frequency gear to the highest gear.
Specifically, when the current state of the NAS system is the first target state, it indicates that the current NAS system is in a stable state, and if the heartbeat frequency gear is not the lowest gear, a first gear adjustment instruction may be sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, where the first gear adjustment instruction is used to instruct to automatically lower the heartbeat frequency gear by one gear. The method is used for reducing the frequency of heartbeat access, reducing the occurrence of resource occupation and avoiding unnecessary resource waste.
However, once it is determined that the state of the NAS system changes or is abnormal, the heartbeat frequency gear needs to be adjusted to the highest gear, and the current system state is determined in real time through frequent heartbeat access, so that unnecessary loss is avoided.
In a second aspect, the present invention provides a NAS-based cluster management method, which is applied to a centralized cluster, where the centralized cluster includes a master node and at least one slave node, each node includes a storage area network deployed in a host, and a network additional storage system deployed in a dock container, where a monitoring thread is disposed in the storage area network, and a master process is disposed in the network additional storage system, and the method is executed by the master process in any node, and includes:
acquiring an operation instruction sent by a monitoring thread in a main node;
and executing an operation corresponding to the operation instruction according to the operation instruction, wherein the operation for synchronizing the configuration data comprises a state switching operation of the network additional storage system or a restarting operation of the network additional storage system.
The cluster management method based on NAS provided by the invention has the following advantages:
in a centralized cluster, a master node and a slave node are configured. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
A monitor thread is provided in a SAN storage system, and a main process is provided in a NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. The main process can execute corresponding operation according to the operation instruction under the condition of receiving the operation instruction sent by the monitoring thread, so as to realize the configuration data synchronization in the SAN cluster and the NAS cluster. The configuration data synchronization operation may include, but is not limited to, a state switch of the NAS system, or a heartbeat frequency switch operation between the host process and the monitoring thread in each node. In this way, the SAN cluster and the NAS cluster are managed independently and in association with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
In an alternative embodiment, the current state of the network additional storage system and the current environmental information of the centralized cluster are periodically acquired;
according to the current state and the environment information, when the network additional storage system is determined to be switched to the target state, a state switching request is sent to a monitoring thread in the main node;
When a state switching instruction corresponding to a state switching request fed back by a monitoring thread in a master node is received, the state of the switching network additional storage system is a target state.
Specifically, each master process may also periodically self-check the internal state, that is, the state of the self-check NAS system, and the environmental information of the centralized cluster. And then determining whether the state needs to be switched or not according to the state of the NAS system and the environment information of the centralized cluster, and determining the target state to be switched. Once it is determined that the target state needs to be switched, request information, that is, a state switching request, needs to be sent to the monitoring thread of the master node, so as to request whether the target state can be switched. After receiving the state switching request, the monitoring thread further verifies whether the state switching is needed by acquiring the state of the NAS system and the current environmental information of the centralized cluster. And if the verification result is consistent with the result requested by the first main process, sending a state switching instruction to the first main process, so that the first main process completes the state switching operation of the NAS system.
In an alternative embodiment, when receiving a state switching instruction corresponding to a state switching request fed back by a monitoring thread in the master node, after switching the state of the network attached storage system to a target state, the method further includes:
And generating response information of switching completion, and sending the response information to the monitoring thread corresponding to the master node.
Specifically, each master process needs to send response information to the monitoring thread of the master node after completing the state switching, so as to indicate that the state switching has been completed. So that the monitoring thread of the master node can synchronously update the current state of the NAS system recorded by the SAN system of each node according to the response.
In an alternative embodiment, the method further comprises:
metadata sent by a main process corresponding to a target service protocol is obtained, after the metadata is packaged, a disc-dropping operation is executed, wherein the data corresponding to the metadata is directly sent to a storage pool by the main process corresponding to the target service protocol for the disc-dropping operation.
Specifically, the target service protocol is modified, that is, the business logic is adjusted, so as to realize data and metadata distribution. After the distribution is completed, the process corresponding to the target service protocol can automatically send the data to the storage pool for disc dropping. Meanwhile, communication connection is also directly established with the main process of any node, and metadata is sent to the main process. And the main process encapsulates the metadata and falls into a disk after the processing is completed. Because the metadata processing is implemented in the main process, no external file system is required to provide functions, and thus the dependence on an open source file system is eliminated.
In a third aspect, the present invention provides a cluster management device based on NAS, including:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for operating instructions, wherein the operating instructions are used for indicating to execute state switching operation of a network additional storage system or execute restarting operation of the network additional storage system;
the processing module is used for generating an operation result according to the operation instruction;
the synchronization module is used for synchronizing the operation result to the monitoring thread corresponding to each slave node, and is used for completing the synchronization of configuration data in the storage area network deployed in the slave node by the monitoring thread corresponding to the slave node;
and the sending module is used for sequentially sending the operation result to the network additional storage systems corresponding to each node in the centralized cluster, and finishing the configuration data synchronization by the main process deployed in the network additional storage system corresponding to each node.
The cluster management device based on NAS provided by the invention has the following advantages:
in a centralized cluster, a master node and a slave node are configured. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
Further, a monitor thread is provided in the SAN storage system, and a main process is provided in the NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. Configuration data synchronization in the SAN cluster and the NAS cluster is achieved. The method is equivalent to realizing the cluster management of the SAN cluster and the NAS cluster which are independent and associated with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
In a fourth aspect, the present invention provides a cluster management device based on NAS, including:
the acquisition module is used for acquiring an operation instruction sent by the main process;
and the processing module is used for executing the operation corresponding to the operation instruction according to the operation instruction and completing the configuration data synchronization operation, wherein the configuration data synchronization operation comprises the state switching operation of the network additional storage system or the heartbeat frequency switching operation between the main process and the monitoring thread.
The cluster management device based on NAS provided by the invention has the following advantages:
In a centralized cluster, a master node and a slave node are configured. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
A monitor thread is provided in a SAN storage system, and a main process is provided in a NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. The main process can execute corresponding operation according to the operation instruction under the condition of receiving the operation instruction sent by the monitoring thread, so as to realize the configuration data synchronization in the SAN cluster and the NAS cluster. The configuration data synchronization operation may include, but is not limited to, a state switch of the NAS system, or a heartbeat frequency switch operation between the host process and the monitoring thread in each node. In this way, the SAN cluster and the NAS cluster are managed independently and in association with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
In a fifth aspect, the present invention provides a computer device comprising: the storage and the processor are in communication connection, the storage stores computer instructions, and the computer executes the computer instructions to perform the NAS-based cluster management method according to the first aspect or any corresponding embodiment of the first aspect, or executes the computer instructions to perform the NAS-based cluster management method according to the second aspect or any corresponding embodiment of the second aspect.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to execute the NAS-based cluster management method according to the first aspect or any one of the embodiments corresponding thereto, or the computer executes the computer instructions to thereby execute the NAS-based cluster management method according to the second aspect or any one of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a structure of each node in a centralized cluster according to the present invention;
FIG. 2 is a schematic diagram of a structure for establishing a communication connection between a monitoring thread and a host process in different nodes provided by the present invention;
FIG. 3 is a schematic diagram providing switching between different states in accordance with the present invention;
fig. 4 is a schematic flow chart of a cluster management method based on NAS according to an embodiment of the present invention;
FIG. 5 is a flowchart of another cluster management method based on NAS according to an embodiment of the present invention;
FIG. 6 is a flowchart of another cluster management method based on NAS according to an embodiment of the present invention;
FIG. 7 is a flowchart of another cluster management method based on NAS according to an embodiment of the present invention;
FIG. 8 is a flowchart of another cluster management method based on NAS according to an embodiment of the present invention;
fig. 9 is a block diagram of a cluster management device based on NAS according to an embodiment of the present invention;
FIG. 10 is a block diagram of another NAS-based cluster management device according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Centralized storage means that a central node is composed of one or more computers, data is stored centrally in this central node, and all business units of the entire system are deployed centrally on this central node. All functions of the system are processed in a centralized way. In the unified NAS storage framework, a SAN storage system is deployed on the centralized storage, and NAS storage deployed based on the SAN provides NAS file storage service to the outside, so that the method has wide application prospect. The centralized storage has the advantages of simple deployment structure, high transmission speed and low loss, and is suitable for application scenes with high read-write times (Input/Output Operations Per Second, IOPS for short) and low delay.
In unified centralized NAS storage, the dependency between the NAS system and the SAN system is strong, and the scalability and performance of the management architecture may be affected to some extent.
To address the above-described problems, embodiments of the present invention provide a NAS-based cluster management embodiment, it should be noted that the steps illustrated in the flowchart of the figures may be performed in a computer system (computer device) including, for example, a set of computer-executable instructions, and although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The method is particularly applied to a centralized cluster, wherein the centralized cluster comprises a master node and at least one slave node, each node comprises a storage area network deployed in a host machine and a network additional storage system deployed in a docker container, a monitoring thread is arranged in the storage area network, and a master process is arranged in the network additional storage system. Referring specifically to fig. 1, the above structure included in each node in the centralized cluster is shown in fig. 1.
In this structure, in the docker container deployed by each node, the host process in the NAS system may communicate with the monitor process in the SAN system deployed by the host node, and the monitor thread in the host node may instruct each host process to perform a corresponding operation. The monitoring thread in each node may also establish a communication connection with the host process in that node to perform query class operations. The host process of the NAS system is operated in a docker environment, isolation from the SAN system is realized, the influence of a new frame NAS cluster structure on the existing SAN cluster environment is avoided, and the docker environment can reduce the loss to the performance to the minimum as a lightweight container.
Specifically, when both NAS and SAN clusters are running locally, without the use of a docker for isolation, both NAS and SAN have the same dependencies. However, NAS and SAN can provide services independently and externally, and the dependence required by both can be largely different. In some scenarios, the user may perform a hot upgrade of some of the NAS functionality without operating the SAN. If both NAS and SAN are running in the local system, a hot upgrade of part of the functionality of such a cluster may have an impact on the whole SAN cluster. Therefore, the NAS cluster is selected to run in a docker environment, and the functions of the SAN cluster and the NAS cluster are completely isolated and are not influenced by each other. Moreover, the system consumption of the docker is small, and experimental test data show that the loss of the docker to IO performance is within 1%.
Fig. 2 is a schematic diagram illustrating a structure of a communication connection between a monitoring thread and a main process in different nodes. See in particular fig. 2. In fig. 2, node1 is a master node, and the other nodes are slaves.
In a specific application scenario, for example, a monitoring thread in a master node needs to control different master processes in different nodes to complete an operation step corresponding to a certain operation instruction, so as to realize configuration data synchronization. The specific operation steps comprise:
Step 1, when a monitoring thread in a main node acquires an operation instruction, generating an operation result according to the operation instruction.
For example, the operation instruction may include a state switch that is input by the user in the form of a set instruction to instruct normal switching of the state of the NAS system, or to perform a restart operation of the NAS system, or to be performed when it is determined that the NAS system is abnormal, or the like.
And step 2, synchronizing the operation result to the SAN system corresponding to each slave node by the monitoring thread of the master node to complete the synchronization of the configuration data.
And step 3, the monitoring thread of the master node sequentially sends the operation result to the NAS system respectively corresponding to each node in the centralized cluster.
And 4, acquiring an operation instruction sent by a monitoring thread in the master node by a master process deployed by the NAS system in each slave node.
And step 5, each main process executes the operation corresponding to the operation instruction according to the operation instruction, so as to complete the configuration data synchronization operation.
The configuration data synchronization operation includes a state switching operation of the network additional storage system or a restarting operation of the network additional storage system.
The purpose of data synchronization is to prevent a node from being damaged, and other nodes can take over the tasks of the node to avoid errors. When the master node is in error, the node is selected randomly from the rest normal nodes to serve as the master node, and the cluster service is taken over, so that the influence of the master node fault on the storage service is reduced.
In particular, in performing configuration data synchronization, in an alternative embodiment, configuration data synchronization between different nodes may be performed based on a Paxos algorithm to ensure consistency of data between the different nodes.
In addition to the above operation, the monitoring thread in the master node also periodically self-checks the internal working condition of the own system. For example, it further includes:
and step 6, periodically acquiring the current state of the NAS system stored in the monitoring thread in the master node and the current environment information of the centralized cluster by the monitoring thread in the master node.
In an alternative embodiment, the environmental information may include, for example, but is not limited to, one or more of the following:
the state of the storage area network, the state of the network attached storage system, file system identification information, file system state, storage pool state, volume state, and acquired alert information in the current environment.
In an alternative embodiment, the state of the NAS system comprises one or more of the following:
boot, active, hot standby, start, stop, stopped, and downtime. Compared with the existing NAS storage, the NAS system in the embodiment has fewer states, and the state switching logic is simpler, so that the maintenance cost can be reduced, and the management efficiency of state switching is improved.
And 7, when the monitoring thread of the master node determines that the network additional storage system is to be switched to the target state according to the current state and the environment information, generating a state switching instruction.
And 8, the monitoring thread of the master node sends a state switching instruction to the network additional storage system corresponding to each node in the centralized cluster.
Specifically, the process of determining whether the state of the NAS system needs to be switched and the target state to be switched by the monitoring thread of the master node according to the current state and the environmental information belongs to the current mature technology. And thus will not be described in detail herein. And when the state switching is required to be switched to the target state, generating a state switching instruction, and sending the state switching instruction to each NAS system deployed in the slave nodes.
The state switching is switching in the state mentioned in the foregoing. Referring specifically to fig. 3, a schematic diagram of switching between different states is shown in fig. 3.
For example, when the NAS system has just started, it is set to a boot state. After the startup is completed, after the main node confirms that the environment is normal, the NAS cluster is allowed to switch the state to the starting state, related data structures such as cluster management, file systems and the like are created for the NAS cluster in the switching process, and after the creation and initialization of the corresponding data structures are completed, the NAS cluster state is switched to the active state. When the NAS cluster is actively stopped, the NAS state writing is converted into a stop state, then converted into stop, the cluster can be awakened again after stopping, and the test state is switched to start.
In addition, if the state of one NAS system is abnormal, the monitoring thread sends a state switching instruction at the moment, controls the corresponding main process to add the NAS system into a blacklist, sets the state of the NAS system as offline, and then selects other NAS systems to take over the current file system IO. In this embodiment, a repair function of a system error generation file of the NAS cluster may be further provided, and after the environment is repaired, the state may be switched to the boot state, and the switching process of the state machine is performed again.
In addition, a standby_replay state may be included, and after the system is started, the system may be switched from the starting state to the standby_replay state.
The hot standby mode represents that two main processes are started in the same dock, namely, the main processes exist. Of the two main processes, one enters an active state and one enters a standby_replay state as a hot standby process. The two master processes are spatially separated. When the active state main process is abnormal, if the process is insufficient due to excessive memory occupation or the process exits the active state due to intrinsic bug triggering interruption or other reasons, the hot-driven process immediately takes over all services of the active state process, and the hot-driven process continues to support the NAS service, so that the influence on the NAS service in the scene is reduced.
In the scenario that the hot standby mode is not started, when an abnormality occurs in the main process, the operations such as resource drift or process restarting may be caused, and at this time, the time consumption is greatly increased by other controllers (the resource drift may cause service interruption, and the resource drift to other controllers, which takes longer time) or the newly started process (the initialization of the process may occupy part of the time) to take over the resource.
Because the hot standby process is arranged in the resident memory, the process occupies part of system resources. Therefore, the configuration of the storage device in the hot standby mode is required to be higher. After the hot standby mode is started, the two processes are hot standby processes.
That is, the active state of the main process a is that the main process B is in the standby_replay state, and the object of the hot standby is process a. Otherwise, when the state of the process A is abnormal, the state of the process B is switched to the active state. After the process A is repaired, the state is automatically switched to a standby_replay state, and the object of the hot standby is the process B.
In addition, the monitoring thread in the master node may periodically acquire the state of the NAS system and the storage environment of the centralized cluster, so as to determine whether to switch the state of the NAS system, or may further determine whether to switch the state of the NAS system by sending a state switching request to the monitoring thread in the master node by any master process. Thus, the following method steps may also be included.
And 9, periodically acquiring the current state of the network additional storage system and the current environment information of the centralized cluster by the main process in any node.
Specifically, a first process is taken as an example for explanation, where the first main process is a main process included in a network additional storage system corresponding to any node in the centralized cluster. The first main process can periodically acquire the current state of the NAS system stored in the first main process and the current environment information of the centralized cluster.
And step 10, the first main process sends a state switching request to a monitoring thread in the main node when determining that the network additional storage system is to be switched to a target state according to the current state and the environment information.
The specific process of judging whether to switch to the target state can be referred to in the prior art, and will not be described herein. And when the NAS system is determined to be switched to the target state, sending a state switching request to a monitoring thread in the master node.
And step 11, the monitoring thread in the master node receives a state switching request fed back by the first master process.
And step 12, the monitoring thread in the master node acquires the current state of the network additional storage system and the current environmental information of the centralized cluster according to the state switching request.
And 13, when the monitoring thread in the main node determines that the network additional storage system is to be switched to the target state according to the current state and the environment information, generating a state switching instruction.
Step 14, the monitoring thread in the master node sends a state switching instruction to the first master process.
And the state switching operation of the network additional storage system is completed by the first main process.
And step 15, when the first main process receives a state switching instruction corresponding to the state switching request fed back by the monitoring thread in the main node, the state of the switching network additional storage system is a target state.
In an alternative embodiment, in addition to the need to send state switch instructions to the first host process, in order to be able to guarantee configuration data synchronization, the state switch instructions need to be sent to other host processes than the first host process. Thus, the method may include:
and step 16, the monitoring thread in the master node sends the state switching instruction to other master processes except the first master process, so that the other master processes except the first master process can complete the state switching operation on the network additional storage system according to the state switching instruction.
Step 17, after the host process in each node switches the state of the NAS system to the target state according to the state switching instruction, the method further includes: and generating response information of switching completion, and sending the response information to the monitoring thread corresponding to the master node.
And step 18, after monitoring the process in the master node collects the response information after the state switching sent by the master process in the network additional storage system corresponding to all the nodes in the centralized cluster respectively, synchronously updating the current state of the network additional storage system stored in the storage area network in each node.
In an alternative embodiment, the communication between any of the above monitoring threads and the host process is implemented by socket. And, in order to detect whether or not an abnormality occurs in communication between the monitoring thread and the main process, a communication connection is established between the monitoring thread and the main process in each node through heartbeat, and the heartbeat frequency includes a plurality of stages.
That is, a heartbeat mechanism is provided between the main process and the monitoring thread, and the heartbeat frequency can be intelligently adjusted. The heart beat frequency can be divided into 5 s/time, 30 s/time, 1 min/time and 5 min/time, and the total is four gears. The initial default value is 5 s/time, the main process and the monitoring process respectively start a sub-thread, and every 5s, heartbeat messages are mutually sent between the two processes to inform the current state of the other party, and whether state switching is needed or not is judged. The type of the transmission message may be defined as a mins heart type, and in this type of structure, a WAnt_state (a field indicating a desired switch), fsid (file system id), etc. field is set for recording information such as a state to which the NAS system needs to switch and an id of the file system that takes over.
After the monitoring thread is sent to the master node, the monitoring thread analyzes the information sent by the master process, and after confirming that the condition of state switching is met, a reply message is sent to the master process to inform the master process that the state switching can be carried out. Meanwhile, when the monitoring thread performs the self-tick flow, the monitoring thread also detects the current cluster, and detects the state of the SAN cluster, the state of a storage pool, the state of a volume, the state of a file system, the state of an NAS cluster and the like. After the detection is completed, setting a MINSHeartBuat type structure, sending a heartbeat message packet (the heartbeat message packet can comprise a state switching instruction, for example) of the monitoring thread to the main process, and analyzing by the main process to complete state switching.
Specifically, the cluster supports creating multiple file systems, allocating globally unique ids as identifiers for each file system, maintaining a map structure in the system, and recording the mapping relationship between the file system ids (fsid) and the actual file system attribute information structures (class file systems). The file system id and file system type structure are assigned and initialized by the monitoring thread in the master node and complete the synchronization actions among the nodes within the cluster. And the monitoring thread in the master node will send the map structure to the master process in each node. The monitoring thread in the master node can also write the data in the map structure into the local storage space periodically, so that the data loss caused by the monitor thread exit is avoided. The file system id is used as a unique identifier of the file system in the whole cluster operation process to record and transfer (fsid is used as a parameter to transfer between different functions, and after transfer, the file system information corresponding to the fsid is acquired through a map structure).
Each host process has its own specialized file system and only processes the metadata of that file system, so that it is also necessary to maintain a mapping relationship between the file system and the host process, and each host process is only allowed to process metadata of a single file system, where fsid is used as an identification of the file system. Therefore, when the master process performs heartbeat connection with the monitoring thread in the master node, the heartbeat message will record fsid information, which indicates metadata of the file system corresponding to fsid processed by the master process.
In the heartbeat message, the sender of the heartbeat message and the fsid of the file system to which the sender belongs are recorded, meanwhile, the monitoring thread in the master node also records the mapping relation between the master process and the fsid, after the monitoring thread receives the heartbeat message, whether the mapping relation records of the master process and the fsid recorded by the two parties are consistent is detected, and if the records are consistent, the verification is successfully completed, and other heartbeat message flows are continued.
Or when the mapping relation records are detected to be inconsistent, executing an abnormal processing flow, wherein the processing flow is as follows:
the automatic playback function configured in the system can automatically restore the configuration in the cluster, taking mapping of the file system and the main process as an example, recording the operation each time the operations such as creating the file system, switching the state of the main process, creating and releasing the mapping relation between the monitoring thread and the file system in the main node are executed, outputting the operation to a local file for storage, and recording the stored priority higher than the execution of the actual operation content, namely, recording the operation first and then executing the operation;
Because the mapping relationship between each host process and the file system is globally unique, when the mapping relationship between fsid and the host process is abnormal, it can be considered that serious data inconsistency occurs in the current cluster, for example, the host process ins_nas_main1 should originally process metadata of the file system identified as fsid1, but actually starts to process metadata of the file system identified as fsid2, and the current operation will not be allowed. Therefore, the opposite ins_nas_main1 process is firstly made to resend the heartbeat, and verification is performed again. If the verification is abnormal, continuing the current heartbeat process;
if the verification is still abnormal again, immediately replaying the previous operation record until the latest operation record is replayed, namely obtaining the most accurate mapping relation between the file system and the ins_nas_main1 process, confirming which record in the monitoring thread of the main node is accurate with the record in the heartbeat message, if the data in the monitoring thread of the main node is wrong, updating the data, recording the data in the local, and synchronizing the data to all nodes; if the heartbeat message is wrong, the exception is thrown out, the metadata processing record of the current ins_nas_main1 process is played back, the previous metadata processing flow is carried out again, whether the record with the wrong processing exists in the previous metadata processing process or not is checked, and the record is discarded, so that partial data can be lost. After playback is completed, the monitoring thread in the master node sends a return packet of the heartbeat message, updates the mapping relation with fsid recorded in ins_nas_main1, and continues the current business flow.
In an alternative embodiment, the method may further comprise:
step 19, when the current state of the network additional storage system is determined to be a first target state and the heartbeat frequency gear is not the lowest gear, the monitoring thread in the master node sends a first gear adjustment instruction to the master process included in the network additional storage system respectively corresponding to each node in the centralized cluster, wherein the first gear adjustment instruction is used for indicating that the heartbeat frequency gear is automatically adjusted down by one gear;
or,
when the current state of the network additional storage system is determined to change or the current state of the network additional storage system is determined to be abnormal, a second gear adjusting instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, and the second gear adjusting instruction is used for adjusting the heartbeat frequency gear to the highest gear.
Specifically, when the NAS cluster states are an active state and a standby_replay state (first target states), the NAS cluster is considered to be in a steady state, after entering the two states, the system needs to provide more resources for the storage service, and when the NAS cluster is unchanged for 100 consecutive times (after the heartbeat frequency is automatically adapted to be opened, the frequency can be adjusted by a user, and the default is 100 times), the heartbeat frequency is automatically reduced by one step, and the maximum time can be up to 5 min/time, so that the occupation of the system resources by heartbeat monitoring is reduced.
Or when the cluster state changes or the cluster abnormality is detected, the heartbeat frequency is automatically adjusted to the highest frequency.
In this embodiment, a count field of the number of times of sending the heartbeat message in steady state operation is added to the heartbeat message, and how many times of sending the heartbeat message in steady state is recorded, so as to facilitate adjustment of the heartbeat frequency. When the state of the main process recorded in the received heartbeat message is inconsistent with the state of the locally recorded monitoring thread, the state switching is performed, and the heartbeat frequency adjustment is required to be performed.
In a specific example, the cluster exception involves more scenes, and more typical scenes include that an alarm module reports an alarm, nodes are damaged due to node plugging and the like, and in addition, the monitoring thread and the inside of the main process are both realized with their own tick flows, namely, certain resources and data structures in the inside are checked regularly, and if certain resources are found to lose contact in the checking process, if the monitoring thread finds that a message sent to the main process cannot be returned in the tick process, the cluster is considered to be a problem at the moment. If some of the external operations such as the CPU temperature is too high, the power line is pulled out, the hard disk is pulled out and the like or the stored indexes are detected to be problematic, the cluster is informed in a mode of reporting an alarm, and the cluster is considered to be abnormal. The intelligent regulation of the heartbeat frequency is a trust mechanism for the historical state of the cluster, when the cluster has undergone long-time steady operation, the probability of a problem in a short time is low, a certain trust can be given to the cluster, the heartbeat frequency is reduced, and the consumption of the heartbeat to system resources is reduced. However, the cluster management is most preferable to ensure the normal operation of the cluster, when the above problem occurs, the history state of the cluster cannot be trusted, and the frequency of heartbeat detection needs to be adjusted to be the highest.
In addition, regarding the related art, it is common to directly access files on a file system by using an open-source file system, such as XFS, ZFS, ext, as a base, and externally providing CIFS, NFS, FTP protocols. That is, the conventional unified storage architecture formats the block storage provided by the SAN into an open source file system, and then provides file storage services to the outside by using the open source file system. The development based on the open source file system also has the problems of poor expansibility, low performance and the like.
Thus, the method may further comprise:
and step 20, the main process acquires the metadata sent by the main process corresponding to the target service protocol, encapsulates the metadata, and then executes the disc-dropping operation.
Specifically, a metadata processing module is added in the main process. The method is mainly used for realizing files and printing services of a Linux system, a Linux user can realize resource sharing with Windows users by configuring and using a Samba server, a host process of a vsftp (which is a software of a FTP server based on a Unix system published by GPL and is called Very Secure FTP) and other protocols is modified, when a storage service is provided outside through the protocols, the host process of the protocols can automatically send data to a storage pool for dishing, and metadata is sent to a metadata processing module of the host process, so that data and metadata processing is shunted, and after the shunting is completed, the host process encapsulates the metadata and falls into a disk. Because the metadata processing is implemented in the main process, no external file system is required to provide functions, and thus the dependence on an open source file system is eliminated.
Specifically, the foregoing is all executed by the controllers in the nodes, and based on different requirements of the customer sites, controllers with different specifications of double control, four control, eight control and the like can be provided. For centralized storage, there may be different specifications including 2/4/8 controllers. Equivalently, the cluster may include 2, 4 or 8 nodes, and the customer requirements mentioned herein refer to what kind of storage device is required by the user, how the user requires the storage device, and so on. And each controller runs a management process of the master cluster, under a default scene, a node executing a cluster creation command is used as an initial master node, and meanwhile, a monitoring thread of the node is also used as a master monitoring thread to be responsible for realizing the processing of configuration actions of the NAS cluster, such as state switching, configuration modification, file system creation and the like of the NAS cluster.
In addition to the above-mentioned operation instruction, each monitoring thread and the main process deployed in the node to which the monitoring thread belongs can be in communication connection for executing some inquiry class operation. The query operation does not involve data modification, only queries the existing data, and all the data of the main process are synchronous, and the results obtained by querying any node are the same, so that the query operation directly queries the main process of the node, and the query speed of the node is inevitably faster than that of the cross-node query.
The actions of the operation class may involve data changes, if each node can operate, the situation that the same data is modified at the same time is likely to generate conflict, so that all the actions of the operation class are sent to the monitoring thread of the master node to be executed, after the operations are completed, if the data information changes, the monitoring thread of the master node can be synchronized with the monitoring threads of other nodes, and then the monitoring threads of the master node are fed back to the master process of the NAS system of the node sending the operation class request, and the master processes of the NAS systems of other nodes can complete configuration data synchronization. When the configuration data synchronization is realized, the configuration data synchronization can be directly communicated with a monitoring thread in a main node or can be directly communicated with the monitoring thread in the main node.
In an alternative embodiment, when the operation instruction includes a plurality of operation instructions, in specific execution, operations corresponding to each operation instruction may be sequentially performed in order of receiving timings of the plurality of operation instructions, so as to generate operation results corresponding to each operation instruction, respectively.
In an alternative embodiment, when any monitoring thread deployed in a slave node receives an operation instruction, the operation instruction is discarded.
The above is an overall flow diagram of cluster management in the whole centralized cluster system. For a clearer explanation, see in particular the following. In this embodiment, a cluster management method based on NAS is provided, which may be used for the terminal device, such as a mobile phone, a tablet computer, etc., and fig. 4 is a schematic flow chart of a cluster management method based on NAS provided in this embodiment of the present invention, as shown in fig. 4, where the flow of the method is executed by a monitoring thread in a master node, and the flow of the method includes the following steps:
step S401, when the operation instruction is obtained, generating an operation result according to the operation instruction.
The operation instruction is used for indicating to execute the state switching operation of the network additional storage system or execute the restarting operation of the network additional storage system.
Step S402, synchronizing the operation result to each slave node corresponding to the monitoring thread.
The monitoring thread corresponding to the slave node is used for completing configuration data synchronization in the storage area network deployed in the slave node.
Step S403, the operation result is sequentially sent to the network additional storage system corresponding to each node in the centralized cluster.
And the main process deployed in the network additional storage system corresponding to each node is used for completing the synchronization of the configuration data.
In the NAS-based cluster management method provided in this embodiment, in a centralized cluster, a master node and a slave node are configured. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
Further, a monitor thread is provided in the SAN storage system, and a main process is provided in the NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. Configuration data synchronization in the SAN cluster and the NAS cluster is achieved. The method is equivalent to realizing the cluster management of the SAN cluster and the NAS cluster which are independent and associated with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
On the basis of the foregoing embodiment, another NAS-based cluster management method is provided in this embodiment, and may be used for the foregoing mobile terminal, such as a mobile phone, a tablet pc, etc., and fig. 5 is a schematic flow chart of another NAS-based cluster management method provided in the embodiment of the present invention, as shown in fig. 5, where the flow includes the following steps:
step S501, periodically acquiring the current state of the network attached storage system and the current environmental information of the centralized cluster.
Step S502, when the network additional storage system is determined to be switched to the target state according to the current state and the environment information, a state switching instruction is generated.
Step S503, a status switching instruction is sent to the network attached storage system corresponding to each node in the centralized cluster.
The state switching is accomplished with a master process deployed in each network attached storage system.
According to the cluster management method based on the NAS, the monitoring thread in the master node can periodically detect the current state of the NAS system and the current environment information of the centralized cluster. Then, based on the current state and Hua Jing information, it is determined whether the NAS system needs to perform a state handoff, and a target state for which handoff is required. When it is determined that the NAS system needs to be switched to the target state, a state switching instruction may be generated and sent to NAS systems corresponding to each node in the centralized cluster, so that the main process deployed in each NAS system completes the state switching operation.
On the basis of the embodiment shown in fig. 4, when a state switching request fed back by the first main process is received, another NAS-based cluster management method is further provided in this embodiment, which may be used for the above mobile terminal, such as a mobile phone, a tablet computer, etc., and fig. 6 is a schematic flow diagram of another NAS-based cluster management method provided in the embodiment of the present invention, as shown in fig. 6, where the flow includes the following steps:
step S601, according to the state switching request, the current state of the network additional storage system and the current environment information of the centralized cluster are obtained.
Step S602, when the network additional storage system is determined to be switched to the target state according to the current state and the environment information, a state switching instruction is generated.
Step S603, a status switch instruction is sent to the first main process.
And the state switching operation of the network additional storage system is completed by the first main process, wherein the first main process is the main process included in the network additional storage system corresponding to any node in the centralized cluster.
Specifically, in addition to the monitoring thread in the master node being able to monitor the state of the NAS system and the environmental information of the centralized cluster, each master process may also be able to periodically self-check the internal state, that is, the state of the NAS system and the environmental information of the centralized cluster. And then determining whether the state needs to be switched or not according to the state of the NAS system and the environment information of the centralized cluster, and determining the target state to be switched. Once it is determined that the target state needs to be switched, request information, that is, a state switching request, needs to be sent to the monitoring thread of the master node, so as to request whether the target state can be switched. After receiving the state switching request, the monitoring thread further verifies whether the state switching is needed by acquiring the state of the NAS system and the current environmental information of the centralized cluster. And if the verification result is consistent with the result requested by the first main process, sending a state switching instruction to the first main process, so that the first main process completes the state switching operation of the NAS system.
In addition to any of the foregoing embodiments, the method may further include: and sending the state switching instruction to other main processes except the first main process, so that the other main processes except the first main process can complete the state switching operation of the network additional storage system according to the state switching instruction.
Specifically, in order to enable configuration data synchronization, the monitoring thread needs to send a state switching instruction not only to the first main process, but also to the main processes set in other nodes, so that all the main processes can complete state switching of the NAS system.
In addition to any of the foregoing embodiments, the method may further include: after receiving response information after the state switching sent by the main process and included in the network additional storage systems respectively corresponding to all nodes in the centralized cluster is completed, synchronously updating the current state of the network additional storage system stored in the storage area network in each node.
Specifically, each master process needs to send response information to the monitoring thread of the master node after completing the state switching, so as to indicate that the state switching has been completed. So that the monitoring thread of the master node can synchronously update the current state of the NAS system recorded by the SAN system of each node according to the response.
In an alternative embodiment, the environmental information includes one or more of the following:
the state of the storage area network, the state of the network attached storage system, file system identification information, file system state, storage pool state, volume state, and acquired alert information in the current environment.
In an alternative embodiment, the state of the network attached storage system includes one or more of the following: start-up, run, hot backup, start, stop, stopped, and downtime.
Specifically, the states in this application include only these 7 states, and compared to the switching operation of more than ten states in the related art, the state switching will be simpler, and the state switching logic will be simpler for each state, and the state switching efficiency will be higher.
In an alternative embodiment, a communication connection is established between the monitoring thread and the host process in each node via a heartbeat, the heartbeat frequency including multiple levels.
Specifically, whether the two parties are in a normal working state is verified through heartbeat, and different heartbeat frequency gears can be configured according to different working states.
On the basis of the above embodiment, the method may further include:
When the current state of the network additional storage system is determined to be a first target state and the heartbeat frequency gear is not the lowest gear, a first gear adjusting instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, wherein the first gear adjusting instruction is used for indicating that the heartbeat frequency gear is automatically adjusted down by one gear;
or,
when the current state of the network additional storage system is determined to change or the current state of the network additional storage system is determined to be abnormal, a second gear adjusting instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, and the second gear adjusting instruction is used for adjusting the heartbeat frequency gear to the highest gear.
Specifically, when the current state of the NAS system is the first target state, it indicates that the current NAS system is in a stable state, and if the heartbeat frequency gear is not the lowest gear, a first gear adjustment instruction may be sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, where the first gear adjustment instruction is used to instruct to automatically lower the heartbeat frequency gear by one gear. The method is used for reducing the frequency of heartbeat access, reducing the occurrence of resource occupation and avoiding unnecessary resource waste.
However, once it is determined that the state of the NAS system changes or is abnormal, the heartbeat frequency gear needs to be adjusted to the highest gear, and the current system state is determined in real time through frequent heartbeat access, so that unnecessary loss is avoided.
In this embodiment, a further NAS-based cluster management method is provided, which may be used in the mobile terminal, such as a mobile phone, a tablet pc, etc., and fig. 7 is a schematic flowchart of a further NAS-based cluster management method provided in this embodiment, as shown in fig. 7, where the method flow is executed by a main process in any node, and the method flow includes the following steps:
step S701, acquiring an operation instruction sent by a monitoring thread in a master node.
Step S702, according to the operation instruction, executing the operation corresponding to the operation instruction to complete the configuration data synchronization operation.
The configuration data synchronization operation includes a state switching operation of the network additional storage system or a restarting operation of the network additional storage system.
The embodiment of the invention provides a cluster management method based on NAS, wherein a master node and a slave node are configured in a centralized cluster. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
A monitor thread is provided in a SAN storage system, and a main process is provided in a NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. The main process can execute corresponding operation according to the operation instruction under the condition of receiving the operation instruction sent by the monitoring thread, so as to realize the configuration data synchronization in the SAN cluster and the NAS cluster. The configuration data synchronization operation may include, but is not limited to, a state switch of the NAS system, or a heartbeat frequency switch operation between the host process and the monitoring thread in each node. In this way, the SAN cluster and the NAS cluster are managed independently and in association with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
On the basis of the foregoing embodiment corresponding to fig. 7, a further NAS-based cluster management method is provided in this embodiment, which may be used in the foregoing mobile terminal, such as a mobile phone, a tablet computer, etc., and fig. 8 is a schematic flow chart of the further NAS-based cluster management method provided in the embodiment of the present invention, as shown in fig. 8, where the flow includes the following steps:
Step S801 periodically acquires the current state of the network attached storage system and the current environmental information of the centralized cluster.
Step S802, when the network additional storage system is determined to be switched to the target state according to the current state and the environment information, a state switching request is sent to a monitoring thread in the master node.
In step S803, when a state switching instruction corresponding to the state switching request fed back by the monitoring thread in the master node is received, the state of the switching network additional storage system is the target state.
Specifically, each master process may also periodically self-check the internal state, that is, the state of the self-check NAS system, and the environmental information of the centralized cluster. And then determining whether the state needs to be switched or not according to the state of the NAS system and the environment information of the centralized cluster, and determining the target state to be switched. Once it is determined that the target state needs to be switched, request information, that is, a state switching request, needs to be sent to the monitoring thread of the master node, so as to request whether the target state can be switched. After receiving the state switching request, the monitoring thread further verifies whether the state switching is needed by acquiring the state of the NAS system and the current environmental information of the centralized cluster. And if the verification result is consistent with the result requested by the first main process, sending a state switching instruction to the first main process, so that the first main process completes the state switching operation of the NAS system.
On the basis of the embodiment corresponding to fig. 8, the method may further include:
when a state switching instruction corresponding to a state switching request fed back by a monitoring thread in a main node is received, after the state of the switching network additional storage system is the target state, response information of switching completion is generated and sent to the monitoring thread corresponding to the main node.
Specifically, each master process needs to send response information to the monitoring thread of the master node after completing the state switching, so as to indicate that the state switching has been completed. So that the monitoring thread of the master node can synchronously update the current state of the NAS system recorded by the SAN system of each node according to the response.
On the basis of the embodiment corresponding to fig. 7 or fig. 8, the method may further include:
metadata sent by a main process corresponding to a target service protocol is obtained, after the metadata is packaged, a disc-dropping operation is executed, wherein the data corresponding to the metadata is directly sent to a storage pool by the main process corresponding to the target service protocol for the disc-dropping operation.
Specifically, the target service protocol is modified, that is, the business logic is adjusted, so as to realize data and metadata distribution. After the distribution is completed, the process corresponding to the target service protocol can automatically send the data to the storage pool for disc dropping. Meanwhile, communication connection is also directly established with the main process of any node, and metadata is sent to the main process. And the main process encapsulates the metadata and falls into a disk after the processing is completed. Because the metadata processing is implemented in the main process, no external file system is required to provide functions, and thus the dependence on an open source file system is eliminated.
The specific implementation process in the above method embodiment is described in detail in the beginning of the specific implementation manner in the embodiment of the present application, so that redundant description is not repeated here.
In this embodiment, a cluster management device based on NAS is further provided, and this device is used to implement any embodiment and preferred implementation manner of fig. 4 to fig. 6, which have already been described and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a cluster management device based on NAS, as shown in fig. 9, including: an acquisition module 901, a processing module 902, a synchronization module 903, and a transmission module 904.
An obtaining module 901, configured to instruct to perform a state switching operation of the network additional storage system or perform a restarting operation of the network additional storage system;
a processing module 902, configured to generate an operation result according to the operation instruction;
the synchronization module 903 is configured to synchronize an operation result to a monitoring thread corresponding to each slave node, so that the monitoring thread corresponding to the slave node completes synchronization of configuration data in a storage area network deployed in the slave node;
And the sending module 904 is configured to send the operation result to the network additional storage systems corresponding to each node in the centralized cluster in turn, so as to complete synchronization of configuration data by using the main process deployed in the network additional storage system corresponding to each node.
In an optional implementation manner, the acquiring module 901 is further configured to periodically acquire a current state of the network additional storage system and information of an environment where the centralized cluster is currently located;
the processing module 902 is further configured to generate a state switching instruction when determining that the network additional storage system is to be switched to the target state according to the current state and the environmental information;
the sending module 904 is further configured to send a state switching instruction to the network additional storage systems corresponding to each node in the centralized cluster, where the state switching is completed by a main process deployed in each network additional storage system.
In an alternative embodiment, the apparatus further comprises: a receiving module 905;
a receiving module 905, configured to receive a state switching request fed back by a first main process, where the first main process is a main process included in a network additional storage system corresponding to any node in the centralized cluster;
The processing module 902 is configured to generate a state switching instruction when determining that the network additional storage system is to be switched to the target state according to the current state and the environmental information;
the sending module 904 is further configured to send a status switching instruction to the first host process, so that the first host process completes the status switching operation on the network attached storage system.
In an alternative embodiment, the sending module 904 is further configured to send a status switch instruction to a host process other than the first host process, so that the host process other than the first host process completes the status switch operation on the network additional storage system according to the status switch instruction.
In an optional implementation manner, the receiving module 905 is further configured to collect response information after the state switching sent by the main process included in the network additional storage system corresponding to all the nodes in the centralized cluster is completed;
the synchronization module 903 is further configured to synchronously update a current state of the network attached storage system stored in the storage area network in each node.
In an alternative embodiment, the environmental information includes one or more of the following:
the state of the storage area network, the state of the network attached storage system, file system identification information, file system state, storage pool state, volume state, and acquired alert information in the current environment.
In an alternative embodiment, the state of the network attached storage system includes one or more of the following:
start-up, run, hot backup, start, stop, stopped, and downtime.
In an alternative embodiment, a communication connection is established between the monitoring thread and the host process in each node via a heartbeat, the heartbeat frequency including multiple levels.
In an alternative embodiment, the processing module 902 is further configured to determine a current state of the network additional storage system, and a heartbeat frequency gear;
the sending module 904 is configured to send a first gear adjustment instruction to a main process included in the network additional storage system corresponding to each node in the centralized cluster when the processing module 902 determines that the current state of the network additional storage system is a first target state and the heartbeat frequency gear is not the lowest gear, where the first gear adjustment instruction is used to instruct to automatically lower the heartbeat frequency gear by one gear; or when the processing module 902 determines that the current state of the network additional storage system changes or determines that the current state of the network additional storage system is abnormal, a second gear adjustment instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, where the second gear adjustment instruction is used to adjust the heartbeat frequency gear to the highest gear.
The NAS-based cluster management apparatus in this embodiment is presented in the form of functional modules, where the modules refer to application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASICs), processors and memories that execute one or more software or firmware programs, and/or other devices that provide the above described functionality.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention provides a cluster management device based on NAS, wherein a master node and a slave node are configured in a centralized cluster. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
Further, a monitor thread is provided in the SAN storage system, and a main process is provided in the NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. Configuration data synchronization in the SAN cluster and the NAS cluster is achieved. The method is equivalent to realizing the cluster management of the SAN cluster and the NAS cluster which are independent and associated with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
In this embodiment, another NAS-based cluster management apparatus is further provided, and this apparatus is used to implement the corresponding embodiment and the preferred embodiment of any one of the foregoing fig. 7 to fig. 8, which are already described and will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a cluster management device based on NAS, as shown in fig. 10, including: an acquisition module 1001 and a processing module 1002.
An obtaining module 1001, configured to obtain an operation instruction sent by a main process;
the processing module 1002 is configured to execute an operation corresponding to the operation instruction according to the operation instruction, and perform a configuration data synchronization operation, where the configuration data synchronization operation includes a state switching operation of the network additional storage system or a switching operation of a heartbeat frequency between the main process and the monitoring thread.
In an alternative embodiment, the apparatus further comprises: a transmission module 1003 and a reception module 1004;
the obtaining module 1001 is further configured to periodically obtain a current state of the network additional storage system and information of an environment where the centralized cluster is currently located;
the processing module 1002 is further configured to determine whether the network additional storage system is switched to the target state according to the current state and the environmental information;
the sending module 1003 is further configured to send a state switching request to a monitoring thread in the master node when the processing module 1002 determines that the network additional storage system is to be switched to the target state;
the receiving module 1004 is further configured to receive a state switching instruction corresponding to the state switching request, where the state switching instruction is fed back by the monitoring thread;
the processing module 1002 is further configured to switch the state of the additional storage system to a target state according to the state switching instruction.
In an alternative embodiment, the processing module 1002 is further configured to generate response information for completing the handover;
the sending module 1003 is further configured to send the response information to the monitoring thread corresponding to the master node.
In an alternative embodiment, the obtaining module 1001 is further configured to obtain metadata sent by a main process corresponding to the target service protocol;
the processing module 1002 is further configured to perform a disc-dropping operation after performing the encapsulation processing on the metadata, where data corresponding to the metadata is directly sent to the storage pool by the host process corresponding to the target service protocol for the disc-dropping operation.
The NAS-based cluster management apparatus in this embodiment is presented in the form of functional modules, where the modules refer to application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASICs), processors and memories that execute one or more software or firmware programs, and/or other devices that provide the above described functionality.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention provides a cluster management device based on NAS, wherein a master node and a slave node are configured in a centralized cluster. Each node includes a host and a docker container. The host machine deploys the SAN storage system, and the docker container deploys the NAS system. This is equivalent to isolating SAN and NAS using a docker container, and the isolation will be better. For example, when the NAS needs to perform upgrades of certain dependent libraries, but the SAN does not, only the dependent libraries inside the docker can be upgraded without the SAN cluster having to deal with. When the NAS needs to expand functions and perform function expansion, the influence of implementation of the functions and newly added dependency libraries on the SAN does not need to be considered. The inner and outer sides of the dock are equivalent to two terminals and do not interfere with each other. Meanwhile, NAS clusters are realized in the docker, for example, when a user needs to upgrade the function of the NAS of the existing storage device, but the function of the SAN is used at the same time, the docker mirror image can be directly replaced without influencing the function of the SAN. Based on this, it can be considered that such a management architecture has better scalability and reduced impact on storage traffic.
A monitor thread is provided in a SAN storage system, and a main process is provided in a NAS system. SAN systems in the plurality of nodes constitute SAN clusters, and NAS systems in the plurality of nodes constitute NAS clusters. The SAN cluster and the NAS cluster are in communication connection through the monitoring thread and the main process. The main process can execute corresponding operation according to the operation instruction under the condition of receiving the operation instruction sent by the monitoring thread, so as to realize the configuration data synchronization in the SAN cluster and the NAS cluster. The configuration data synchronization operation may include, but is not limited to, a state switch of the NAS system, or a heartbeat frequency switch operation between the host process and the monitoring thread in each node. In this way, the SAN cluster and the NAS cluster are managed independently and in association with each other. Based on information interaction between the monitoring thread and the main thread, novel centralized NAS storage under a unified architecture is realized, and cluster management is more efficient.
The embodiment of the invention also provides computer equipment, which is provided with the cluster management device based on NAS shown in the figure 9 or the figure 10.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 11, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 11.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device further comprises input means 30 and output means 40. The processor 10, memory 20, input device 30, and output device 40 may be connected by a bus or other means, for example in fig. 11.
The input device 30 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointer stick, one or more mouse buttons, a trackball, a joystick, and the like. The output means 40 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. Such display devices include, but are not limited to, liquid crystal displays, light emitting diodes, displays and plasma displays. In some alternative implementations, the display device may be a touch screen.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (17)

1. A NAS-based cluster management method, wherein the method is applied to a centralized cluster, the centralized cluster includes a master node and at least one slave node, each node includes a storage area network deployed in a host machine, and a network additional storage system deployed in a docker container, the storage area network is provided with a monitoring thread, the network additional storage system is provided with a master process, and the method is executed by the monitoring thread in the master node, and the method includes:
when an operation instruction is acquired, generating an operation result according to the operation instruction, wherein the operation instruction is used for indicating to execute state switching operation of the network additional storage system or execute restarting operation of the network additional storage system;
synchronizing the operation result to each monitoring thread corresponding to the slave node, so that the monitoring threads corresponding to the slave node complete configuration data synchronization in a storage area network deployed in the slave node;
and sequentially sending the operation result to the network additional storage systems corresponding to each node in the centralized cluster, so that the main process deployed in the network additional storage system corresponding to each node can complete the synchronization of configuration data.
2. The method according to claim 1, wherein the method further comprises:
periodically acquiring the current state of the network additional storage system and the current environment information of the centralized cluster;
and when the network additional storage system is determined to be switched to a target state according to the current state and the environment information, generating a state switching instruction, and sending the state switching instruction to the network additional storage system corresponding to each node in the centralized cluster respectively, wherein the state switching instruction is used for completing state switching of a main process deployed in each network additional storage system.
3. The method of claim 1, wherein when receiving a state switch request fed back by the first main process, the method further comprises:
acquiring the current state of the network additional storage system and the current environment information of the centralized cluster according to the state switching request;
according to the current state and the environment information, when the network additional storage system is determined to be switched to a target state, a state switching instruction is generated;
and sending the state switching instruction to the first main process to complete the state switching operation of the network additional storage system by the first main process, wherein the first main process is the main process included in the network additional storage system corresponding to any node in the centralized cluster.
4. A method according to claim 3, characterized in that the method further comprises:
and sending the state switching instruction to other main processes except the first main process, and completing the state switching operation of the network additional storage system by the other main processes except the first main process according to the state switching instruction.
5. The method according to claim 4, wherein the method further comprises:
and after receiving response information after the state switching is completed, which is sent by a main process included in the network additional storage system and respectively corresponds to all nodes in the centralized cluster, synchronously updating the current state of the network additional storage system stored in the storage area network in each node.
6. The method of claim 2, wherein the environmental information includes one or more of:
the state of the storage area network, the state of the network attached storage system, file system identification information, file system state, storage pool state, volume state, and acquired alert information in the current environment.
7. A method according to claim 2 or 3, wherein the state of the network attached storage system comprises one or more of:
Start-up, run, hot backup, start, stop, stopped, and downtime.
8. The method of claim 7, wherein the communication connection is established between the monitoring thread and the host process in each node via a heartbeat, the heartbeat frequency comprising a plurality of levels.
9. The method according to claim 8, wherein when it is determined that the current state of the network additional storage system is a first target state and the gear of the heartbeat frequency is not a lowest gear, sending a first gear adjustment instruction to a main process included in the network additional storage system respectively corresponding to each node in the centralized cluster, where the first gear adjustment instruction is used to instruct to automatically lower the gear of the heartbeat frequency by one gear;
or,
when the current state of the network additional storage system is determined to change or the current state of the network additional storage system is determined to be abnormal, a second gear adjusting instruction is sent to a main process included in the network additional storage system corresponding to each node in the centralized cluster, and the second gear adjusting instruction is used for adjusting the gear of the heartbeat frequency to be the highest gear.
10. A NAS-based cluster management method, wherein the method is applied to a centralized cluster, the centralized cluster includes a master node and at least one slave node, each node includes a storage area network deployed in a host machine, and a network additional storage system deployed in a docker container, the storage area network is provided with a monitoring thread, the network additional storage system is provided with a master process, and the method is executed by the master process in any node, and the method includes:
acquiring an operation instruction sent by a monitoring thread in a main node;
and executing an operation corresponding to the operation instruction according to the operation instruction, wherein the configuration data synchronization operation comprises a state switching operation of the network additional storage system or a restarting operation of the network additional storage system.
11. The method according to claim 10, wherein the method further comprises:
periodically acquiring the current state of the network additional storage system and the current environment information of the centralized cluster;
according to the current state and the environment information, when the network additional storage system is determined to be switched to a target state, a state switching request is sent to a monitoring thread in the main node;
And when a state switching instruction corresponding to the state switching request fed back by the monitoring thread in the master node is received, switching the state of the network attached storage system to be a target state.
12. The method of claim 11, wherein after receiving a state switching instruction corresponding to the state switching request fed back by the monitoring thread in the master node, the method further comprises, after switching the state of the network attached storage system to the target state:
and generating response information of switching completion, and sending the response information to the monitoring thread corresponding to the master node.
13. The method according to claim 10, wherein the method further comprises:
and acquiring metadata sent by a main process corresponding to a target service protocol, packaging the metadata, and then executing a disc-dropping operation, wherein the data corresponding to the metadata is directly sent to a storage pool by the main process corresponding to the target service protocol for the disc-dropping operation.
14. A NAS-based cluster management apparatus, wherein the apparatus is applied to a centralized cluster, the centralized cluster including a master node and at least one slave node, each node including a storage area network deployed in a host, and a network attached storage system deployed in a docker container, the storage area network having a monitoring thread disposed therein, and the network attached storage system having a master process disposed therein, the apparatus comprising:
The system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for operating instructions, wherein the operating instructions are used for indicating to execute state switching operation of a network additional storage system or execute restarting operation of the network additional storage system;
the processing module is used for generating an operation result according to the operation instruction;
the synchronization module is used for synchronizing the operation result to the monitoring thread corresponding to each slave node, so that the monitoring thread corresponding to the slave node can complete configuration data synchronization in the storage area network deployed in the slave node;
and the sending module is used for sequentially sending the operation result to the network additional storage systems corresponding to each node in the centralized cluster, and finishing the configuration data synchronization by the main process deployed in the network additional storage system corresponding to each node.
15. A NAS-based cluster management apparatus, wherein the apparatus is applied to a centralized cluster, the centralized cluster including a master node and at least one slave node, each node including a storage area network deployed in a host, and a network attached storage system deployed in a docker container, the storage area network having a monitoring thread disposed therein, and the network attached storage system having a master process disposed therein, the apparatus comprising:
The acquisition module is used for acquiring an operation instruction sent by the main process;
and the processing module is used for executing the operation corresponding to the operation instruction according to the operation instruction, and is used for completing the configuration data synchronization operation, wherein the configuration data synchronization operation comprises the state switching operation of a network additional storage system or the heartbeat frequency switching operation between the main process and the monitoring thread.
16. A computer device, comprising:
a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions that, when executed, perform the NAS-based cluster management method of any one of claims 1 to 9, or that, when executed, perform the NAS-based cluster management method of any one of claims 10 to 13.
17. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the NAS-based cluster management method of any one of claims 1 to 9, or by executing the computer instructions, thereby performing the NAS-based cluster management method of any one of claims 10 to 13.
CN202311426345.9A 2023-10-31 2023-10-31 NAS-based cluster management method, NAS-based cluster management device, computer equipment and media Active CN117149095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311426345.9A CN117149095B (en) 2023-10-31 2023-10-31 NAS-based cluster management method, NAS-based cluster management device, computer equipment and media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311426345.9A CN117149095B (en) 2023-10-31 2023-10-31 NAS-based cluster management method, NAS-based cluster management device, computer equipment and media

Publications (2)

Publication Number Publication Date
CN117149095A CN117149095A (en) 2023-12-01
CN117149095B true CN117149095B (en) 2024-02-06

Family

ID=88910525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311426345.9A Active CN117149095B (en) 2023-10-31 2023-10-31 NAS-based cluster management method, NAS-based cluster management device, computer equipment and media

Country Status (1)

Country Link
CN (1) CN117149095B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775846A (en) * 2016-11-30 2017-05-31 三星(中国)半导体有限公司 For the method and device of the online migration of physical server
CN115102887A (en) * 2022-07-15 2022-09-23 济南浪潮数据技术有限公司 Cluster node monitoring method and related equipment
CN116302716A (en) * 2023-03-09 2023-06-23 中国建设银行股份有限公司 Cluster deployment method and device, electronic equipment and computer readable medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004220216A (en) * 2003-01-14 2004-08-05 Hitachi Ltd San/nas integrated storage device
CA3019911A1 (en) * 2015-07-27 2017-02-02 Datagrid Systems, Inc. Techniques for evaluating server system reliability, vulnerability and component compatibility using crowdsourced server and vulnerability data
US20170068686A1 (en) * 2015-09-07 2017-03-09 Jacob Broido Accessing a block based volume as a file based volume

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775846A (en) * 2016-11-30 2017-05-31 三星(中国)半导体有限公司 For the method and device of the online migration of physical server
CN115102887A (en) * 2022-07-15 2022-09-23 济南浪潮数据技术有限公司 Cluster node monitoring method and related equipment
CN116302716A (en) * 2023-03-09 2023-06-23 中国建设银行股份有限公司 Cluster deployment method and device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN117149095A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
EP3493471B1 (en) Data disaster recovery method, apparatus and system
US9189349B2 (en) Distributed blade server system, management server and switching method
WO2017162173A1 (en) Method and device for establishing connection of cloud server cluster
US9348706B2 (en) Maintaining a cluster of virtual machines
US9128902B2 (en) Systems and methods for managing disaster recovery in a storage system
CN103546914A (en) HSS (home subscriber server) master-slave management method and HSS master-slave management device
CN106657167B (en) Management server, server cluster, and management method
CN102394914A (en) Cluster brain-split processing method and device
CN106960060B (en) Database cluster management method and device
CN113656147B (en) Cluster deployment method, device, equipment and storage medium
JP2021524104A (en) Master / Standby Container System Switching
CN111935244B (en) Service request processing system and super-integration all-in-one machine
CN111752488B (en) Management method and device of storage cluster, management node and storage medium
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
CN114116912A (en) Method for realizing high availability of database based on Keepalived
CN112199240B (en) Method for switching nodes during node failure and related equipment
CN112887367B (en) Method, system and computer readable medium for realizing high availability of distributed cluster
CN117149095B (en) NAS-based cluster management method, NAS-based cluster management device, computer equipment and media
CN104052799A (en) Method for achieving high availability storage through resource rings
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
CN115766715B (en) Super-fusion cluster monitoring method and system
CN114124803B (en) Device management method and device, electronic device and storage medium
WO2016183735A1 (en) Method, apparatus and device for synchronizing virtualized network function (vnf) states
CN111510336B (en) Network equipment state management method and device

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